API Reference Manual
1.46.0
|
Crypto API session creation parameters. More...
#include <crypto_types.h>
Data Fields | |
odp_crypto_op_t | op |
Encode vs. More... | |
odp_crypto_op_type_t | op_type |
Crypto operation type. More... | |
odp_bool_t | cipher_range_in_bits |
Cipher range unit. More... | |
odp_bool_t | auth_range_in_bits |
Auth range unit. More... | |
odp_bool_t | auth_cipher_text |
Authenticate cipher vs. More... | |
odp_bool_t | hash_result_in_auth_range |
Hash result location may overlap authentication range. More... | |
odp_bool_t | null_crypto_enable |
Enable skipping crypto on per-packet basis. More... | |
odp_crypto_op_mode_t | op_mode |
Operation mode when using packet interface: sync or async. More... | |
odp_cipher_alg_t | cipher_alg |
Cipher algorithm. More... | |
odp_crypto_key_t | cipher_key |
Cipher key. More... | |
uint32_t | cipher_iv_len |
Cipher IV length. More... | |
odp_auth_alg_t | auth_alg |
Authentication algorithm. More... | |
odp_crypto_key_t | auth_key |
Authentication key. More... | |
uint32_t | auth_iv_len |
Authentication IV length. More... | |
uint32_t | auth_digest_len |
Authentication digest length in bytes. More... | |
uint32_t | auth_aad_len |
Additional Authenticated Data (AAD) length in bytes. More... | |
odp_queue_t | compl_queue |
Async mode completion event queue. More... | |
odp_pool_t | output_pool |
Output pool. More... | |
Crypto API session creation parameters.
Definition at line 745 of file api/spec/crypto_types.h.
odp_crypto_op_t odp_crypto_session_param_t::op |
Encode vs.
decode operation
The default value is ODP_CRYPTO_OP_ENCODE.
Definition at line 750 of file api/spec/crypto_types.h.
odp_crypto_op_type_t odp_crypto_session_param_t::op_type |
Crypto operation type.
This field defines how the crypto operation functions are to be called and what they return. In particular, this field specifies the interpretation of the output packet parameter, how output packets are allocated and what data and metadata they contain.
The default value is ODP_CRYPTO_OP_TYPE_BASIC.
Definition at line 762 of file api/spec/crypto_types.h.
odp_bool_t odp_crypto_session_param_t::cipher_range_in_bits |
Cipher range unit.
When this flag is true, cipher range offset and length are in bits. Otherwise the offset and length are in bytes.
If cipher capabilities do not include bit_mode, setting this to true causes a session creation failure.
The default value is false.
Definition at line 774 of file api/spec/crypto_types.h.
odp_bool_t odp_crypto_session_param_t::auth_range_in_bits |
Auth range unit.
When this flag is true, auth range offset and length are in bits. Otherwise the offset and length are in bytes.
If auth capabilities do not include bit_mode, setting this to true causes a session creation failure.
The default value is false.
Definition at line 786 of file api/spec/crypto_types.h.
odp_bool_t odp_crypto_session_param_t::auth_cipher_text |
Authenticate cipher vs.
plain text
Controls ordering of authentication and cipher operations, and is relative to the operation (encode vs decode). When encoding, TRUE indicates the authentication operation should be performed after the cipher operation else before. When decoding, TRUE indicates the reverse order of operation.
The value is ignored with authenticated encryption algorithms such as AES-GCM. The value is also ignored when one of the algorithms is null.
true: Authenticate cipher text false: Authenticate plain text
The default value is false.
Definition at line 805 of file api/spec/crypto_types.h.
odp_bool_t odp_crypto_session_param_t::hash_result_in_auth_range |
Hash result location may overlap authentication range.
This flag indicates that the hash result location may (but is not required to) overlap authentication range. Setting this flag may reduce performance.
Default value is false.
Definition at line 815 of file api/spec/crypto_types.h.
odp_bool_t odp_crypto_session_param_t::null_crypto_enable |
Enable skipping crypto on per-packet basis.
When this flag is true, the null_crypto flag of crypto operation parameters can be set to request skipping of ciphering and authentication of a packet regardless of session configuration. This may be useful for preserving packet order between packets that require crypto processing and packets that do not.
This flag must be set false when op_mode is ODP_CRYPTO_SYNC.
The default value is false.
Definition at line 829 of file api/spec/crypto_types.h.
odp_crypto_op_mode_t odp_crypto_session_param_t::op_mode |
Operation mode when using packet interface: sync or async.
The default value is ODP_CRYPTO_SYNC.
Definition at line 835 of file api/spec/crypto_types.h.
odp_cipher_alg_t odp_crypto_session_param_t::cipher_alg |
Cipher algorithm.
Select cipher algorithm to be used. ODP_CIPHER_ALG_NULL indicates that ciphering is disabled. Use odp_crypto_capability() for supported algorithms. Note that some algorithms restrict choice of the pairing authentication algorithm. When ciphering is enabled cipher key and IV need to be set. The default value is ODP_CIPHER_ALG_NULL.
When ciphering is disabled, i.e. cipher_alg is ODP_CIPHER_ALG_NULL, cipher_key and cipher_iv_len parameters are ignored.
Definition at line 849 of file api/spec/crypto_types.h.
odp_crypto_key_t odp_crypto_session_param_t::cipher_key |
Cipher key.
Use odp_crypto_cipher_capa() for supported key and IV lengths.
Definition at line 855 of file api/spec/crypto_types.h.
uint32_t odp_crypto_session_param_t::cipher_iv_len |
Cipher IV length.
The default value is zero.
Definition at line 858 of file api/spec/crypto_types.h.
odp_auth_alg_t odp_crypto_session_param_t::auth_alg |
Authentication algorithm.
Select authentication algorithm to be used. ODP_AUTH_ALG_NULL indicates that authentication is disabled. Use odp_crypto_capability() for supported algorithms. Note that some algorithms restrict choice of the pairing cipher algorithm.
When single algorithm provides both ciphering and authentication (i.e. authenticated encryption), authentication side key (auth_key) and IV (auth_iv) are ignored, and cipher side parameters are used instead.
When authentication is disabled, i.e. auth_alg is ODP_AUTH_ALG_NULL, auth_key, auth_iv_len, auth_digest_len, auth_aad_len and hash_result_in_auth_range parameters are ignored.
The default value is ODP_AUTH_ALG_NULL.
Definition at line 878 of file api/spec/crypto_types.h.
odp_crypto_key_t odp_crypto_session_param_t::auth_key |
Authentication key.
Use odp_crypto_auth_capability() for supported key lengths.
Definition at line 884 of file api/spec/crypto_types.h.
uint32_t odp_crypto_session_param_t::auth_iv_len |
Authentication IV length.
The default value is zero.
Definition at line 887 of file api/spec/crypto_types.h.
uint32_t odp_crypto_session_param_t::auth_digest_len |
Authentication digest length in bytes.
Use odp_crypto_auth_capability() for supported digest lengths.
Definition at line 893 of file api/spec/crypto_types.h.
uint32_t odp_crypto_session_param_t::auth_aad_len |
Additional Authenticated Data (AAD) length in bytes.
AAD length is constant for all operations (packets) of the session. Set to zero when AAD is not used. Use odp_crypto_auth_capability() for supported AAD lengths. The default value is zero.
Definition at line 901 of file api/spec/crypto_types.h.
odp_queue_t odp_crypto_session_param_t::compl_queue |
Async mode completion event queue.
The completion queue is used to return completions from odp_crypto_op_enq() to the application.
Definition at line 908 of file api/spec/crypto_types.h.
odp_pool_t odp_crypto_session_param_t::output_pool |
Output pool.
When the output packet is not specified during the call to crypto operation in the legacy operation type, the output packet will be allocated from this pool.
In ODP_CRYPTO_OP_TYPE_BASIC and ODP_CRYPTO_OP_TYPE_OOP operation types this must be set to ODP_POOL_INVALID.
Definition at line 919 of file api/spec/crypto_types.h.