| Data Accelerator Offload
    | 
Go to the source code of this file.
| Data Structures | |
| struct | dao_lc_buf | 
| struct | dao_lc_sym_op | 
| union | dao_cpt_res_s | 
| struct | dao_cpt_res_s::cpt_cn10k_res_s | 
| struct | dao_cpt_res_s::cpt_cn9k_res_s | 
| struct | dao_lc_info | 
| struct | dao_lc_dev_conf | 
| struct | dao_lc_qp_conf | 
| struct | dao_lc_res | 
| struct | dao_lc_cmd_sess_event | 
| struct | dao_lc_cmd_event | 
| struct | dao_lc_sym_fc_ctx | 
| struct | dao_lc_feature_params | 
| struct | dao_lc_hmac_hash_ctx | 
| struct | dao_lc_aes_key_wrap_ctx | 
| struct | dao_lc_sym_ctx | 
| struct | dao_lc_random_op_x9_17 | 
| Macros | |
| #define | DAO_LC_VERSION "25.10.0" | 
| #define | DAO_CRYPTO_VERSION_LEN 32 | 
| #define | DAO_CRYPTO_MAX_NB_DEV 1 | 
| #define | DAO_CMD_QP_IDX_INVALID 0xFFFF | 
| #define | DAO_LC_SESS_ID_INVALID 0 | 
| #define | DAO_LC_SESS_ID_HASH 1 | 
| #define | DAO_LC_SESS_ID_AES_KEY_WRAP 2 | 
| #define | DAO_LC_MAX_DIGEST_LEN 255 | 
| #define | DAO_LC_MAX_AUTH_KEY_LEN 1024 | 
| #define | DAO_LC_AES_KEY_WRAP_MAX_KEY_DATA_LEN 3072 | 
| #define | DAO_LC_AES_MAX_KEY_ENC_KEY_LEN 32 | 
| #define | DAO_LC_AES_KEY_WRAP_IV_LEN 8 | 
| Functions | |
| int | dao_liquid_crypto_init (void) | 
| int | dao_liquid_crypto_fini (void) | 
| int | dao_liquid_crypto_info_get (struct dao_lc_info *info) | 
| int | dao_liquid_crypto_dev_create (struct dao_lc_dev_conf *conf) | 
| int | dao_liquid_crypto_dev_destroy (uint8_t dev_id) | 
| int | dao_liquid_crypto_qp_configure (uint8_t dev_id, uint16_t qp_id, struct dao_lc_qp_conf *conf) | 
| int | dao_liquid_crypto_dev_start (uint8_t dev_id) | 
| int | dao_liquid_crypto_dev_stop (uint8_t dev_id) | 
| uint16_t | dao_liquid_crypto_seg_size_calc (struct dao_lc_feature_params *params) | 
| int | dao_liquid_crypto_enqueue_op_passthrough (uint8_t dev_id, uint16_t qp_id, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_pkcs1v15enc (uint8_t dev_id, uint16_t qp_id, enum dao_liquid_crypto_rsa_key_type key_type, uint16_t mod_len, uint16_t exp_len, uint16_t msg_len, uint8_t *mod, uint8_t *exp, uint8_t *msg, uint8_t *em, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_pkcs1v15dec (uint8_t dev_id, uint16_t qp_id, enum dao_liquid_crypto_rsa_key_type key_type, uint16_t mod_len, uint16_t exp_len, uint8_t *mod, uint8_t *exp, uint8_t *em, uint8_t *msg, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_pkcs1v15enc_crt (uint8_t dev_id, uint16_t qp_id, uint16_t mod_len, uint16_t msg_len, uint8_t *q, uint8_t *dQ, uint8_t *p, uint8_t *dP, uint8_t *qInv, uint8_t *msg, uint8_t *em, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_pkcs1v15dec_crt (uint8_t dev_id, uint16_t qp_id, uint16_t mod_len, uint8_t *q, uint8_t *dQ, uint8_t *p, uint8_t *dP, uint8_t *qInv, uint8_t *em, uint8_t *msg, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_random (uint8_t dev_id, uint16_t qp_id, struct dao_lc_random_op *op) | 
| uint16_t | dao_liquid_crypto_sym_enqueue_burst (uint8_t dev_id, uint16_t qp_id, struct dao_lc_sym_op *op, uint16_t nb_ops) | 
| uint16_t | dao_liquid_crypto_dequeue_burst (uint8_t dev_id, uint16_t qp_id, struct dao_lc_res *res, uint16_t nb_ops) | 
| int | dao_liquid_crypto_sym_sess_create (uint8_t dev_id, const struct dao_lc_sym_ctx *ctx, uint64_t sess_cookie) | 
| int | dao_liquid_crypto_sym_sess_destroy (uint8_t dev_id, uint64_t sess_id, uint64_t sess_cookie) | 
| uint16_t | dao_liquid_crypto_cmd_event_dequeue (uint8_t dev_id, struct dao_lc_cmd_event *events, uint16_t nb_events) | 
| int | dao_liquid_crypto_enq_op_ecdsa_sign (uint8_t dev_id, uint16_t qp_id, enum dao_liquid_crypto_ec_curve_type curve_id, uint16_t nonce_len, uint16_t pkey_len, uint16_t digest_len, const uint8_t *nonce, const uint8_t *pkey, const uint8_t *digest_data, uint8_t *rs_outdata, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_ecdsa_verify (uint8_t dev_id, uint16_t qp_id, enum dao_liquid_crypto_ec_curve_type curve_id, uint16_t r_len, uint16_t s_len, uint16_t digest_len, uint16_t qx_len, uint16_t qy_len, const uint8_t *r_data, const uint8_t *s_data, const uint8_t *digest, const uint8_t *qx_data, const uint8_t *qy_data, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_rsa_oaep_enc (uint8_t dev_id, uint16_t qp_id, uint8_t *label, uint16_t label_len, enum dao_lc_hash_type hash_type, uint16_t mod_len, uint16_t exp_len, uint16_t msg_len, uint8_t *mod, uint8_t *exp, uint8_t *msg, uint8_t *em, uint64_t op_cookie) | 
| int | dao_liquid_crypto_enq_op_rsa_oaep_exp_dec (uint8_t dev_id, uint16_t qp_id, uint8_t *label, uint16_t label_len, enum dao_lc_hash_type hash_type, uint16_t mod_len, uint16_t exp_len, uint16_t em_len, uint8_t *mod, uint8_t *exp, uint8_t *em, uint8_t *msg, uint64_t op_cookie) | 
This file contains the API for liquid crypto.
Definition in file dao_liquid_crypto.h.
| #define DAO_LC_VERSION "25.10.0" | 
The version of the liquid crypto library
Definition at line 20 of file dao_liquid_crypto.h.
| #define DAO_CRYPTO_VERSION_LEN 32 | 
The maximum length of the version string.
Definition at line 22 of file dao_liquid_crypto.h.
| #define DAO_CRYPTO_MAX_NB_DEV 1 | 
The maximum number of devices supported by the liquid crypto library.
Definition at line 24 of file dao_liquid_crypto.h.
| #define DAO_CMD_QP_IDX_INVALID 0xFFFF | 
Use DAO_CMD_QP_IDX_INVALID as cmd_qp_idx value to disable command queue altogether.
Definition at line 26 of file dao_liquid_crypto.h.
| #define DAO_LC_SESS_ID_INVALID 0 | 
Session ID returned as response if the session create request fails
Definition at line 28 of file dao_liquid_crypto.h.
| #define DAO_LC_SESS_ID_HASH 1 | 
Session ID returned as response if the session create is for HASH operation
Definition at line 30 of file dao_liquid_crypto.h.
| #define DAO_LC_SESS_ID_AES_KEY_WRAP 2 | 
Session ID returned as response if the session create is for AES Key Wrap operation
Definition at line 32 of file dao_liquid_crypto.h.
| #define DAO_LC_MAX_DIGEST_LEN 255 | 
Maximum digest length
Definition at line 34 of file dao_liquid_crypto.h.
| #define DAO_LC_MAX_AUTH_KEY_LEN 1024 | 
Maximum authentication key
Definition at line 36 of file dao_liquid_crypto.h.
| #define DAO_LC_AES_KEY_WRAP_MAX_KEY_DATA_LEN 3072 | 
Maximum key data supported for key wrap
Definition at line 38 of file dao_liquid_crypto.h.
| #define DAO_LC_AES_MAX_KEY_ENC_KEY_LEN 32 | 
Maximum size of key encryption key for AES Key Wrap
Definition at line 40 of file dao_liquid_crypto.h.
| #define DAO_LC_AES_KEY_WRAP_IV_LEN 8 | 
AES Key Wrap IV length
Definition at line 42 of file dao_liquid_crypto.h.
| enum dao_cpt_comp_code | 
CPT hardware completion codes.
Definition at line 144 of file dao_liquid_crypto.h.
| enum dao_uc_comp_code | 
Completion codes returned by CPT microcode.
Definition at line 164 of file dao_liquid_crypto.h.
The liquid crypto RSA key type.
| Enumerator | |
|---|---|
| DAO_LC_RSA_KEY_TYPE_PUBLIC | Public key | 
| DAO_LC_RSA_KEY_TYPE_PRIVATE | Private key | 
Definition at line 356 of file dao_liquid_crypto.h.
The liquid crypto command event type.
This enumeration defines the command event types supported by liquid crypto. The command event type is used to indicate the type of command event.
| Enumerator | |
|---|---|
| DAO_LC_CMD_EVENT_SESS_CREATE | Event type for session create | 
| DAO_LC_CMD_EVENT_SESS_DESTROY | Event type for session destroy | 
Definition at line 369 of file dao_liquid_crypto.h.
| enum dao_lc_sym_opcode | 
The liquid crypto symmetric op code.
This enumeration defines the symmetric operation codes supported by the microcode.
| Enumerator | |
|---|---|
| DAO_LC_SYM_OPCODE_FC | Opcode for Flexi Crypto | 
| DAO_LC_SYM_OPCODE_HASH | Opcode for HASH | 
| DAO_LC_SYM_OPCODE_HMAC | Opcode for HMAC | 
| DAO_LC_SYM_OPCODE_AES_KEY_WRAP | Opcode for AES Key Wrap | 
Definition at line 407 of file dao_liquid_crypto.h.
| enum dao_lc_fc_iv_src | 
The liquid crypto flexi crypto IV source.
| Enumerator | |
|---|---|
| DAO_LC_FC_IV_SRC_CTX | Flexi Crypto IV Source = CTX | 
| DAO_LC_FC_IV_SRC_OP | Flexi Crypto IV Source = OP | 
Definition at line 421 of file dao_liquid_crypto.h.
The liquid crypto flexi crypto AES key length.
| Enumerator | |
|---|---|
| DAO_LC_FC_AES_KEY_LEN_128 | Flexi Crypto AES Key Length = 128 | 
| DAO_LC_FC_AES_KEY_LEN_192 | Flexi Crypto AES Key Length = 192 | 
| DAO_LC_FC_AES_KEY_LEN_256 | Flexi Crypto AES Key Length = 256 | 
Definition at line 431 of file dao_liquid_crypto.h.
| enum dao_lc_fc_enc_cipher | 
The liquid crypto flexi crypto encryption cipher.
Definition at line 443 of file dao_liquid_crypto.h.
The liquid crypto flexi crypto authentication input type.
| Enumerator | |
|---|---|
| DAO_LC_FC_AUTH_INPUT_OPAD_IPAD | Flexi Crypto Authentication Input Type = OPAD/IPAD | 
| DAO_LC_FC_AUTH_INPUT_KEY | Flexi Crypto Authentication Input Type = Key | 
Definition at line 474 of file dao_liquid_crypto.h.
The liquid crypto flexi crypto authentication key source.
| Enumerator | |
|---|---|
| DAO_LC_FC_AUTH_KEY_SRC_CTX | Flexi Crypto Authentication Key Source = CTX | 
| DAO_LC_FC_AUTH_KEY_SRC_OP | Flexi Crypto Authentication Key Source = OP | 
Definition at line 484 of file dao_liquid_crypto.h.
| enum dao_lc_hash_type | 
The liquid crypto hash type.
Definition at line 494 of file dao_liquid_crypto.h.
The liquid crypto supported elliptic curves
| Enumerator | |
|---|---|
| DAO_LC_AE_EC_ID_PMAX | Maximum value for elliptic curve identifier | 
Definition at line 534 of file dao_liquid_crypto.h.
| enum dao_lc_random_type | 
Parameters for random number generation operation.
This structure encapsulates all parameters required for both hardware RNG and X9.17 (3DES-based) RNG.
For hardware RNG:
For X9.17 RNG:
| Enumerator | |
|---|---|
| DAO_LC_RANDOM_TYPE_HW | Use hardware RNG | 
| DAO_LC_RANDOM_TYPE_X9_17 | Use X9.17 (3DES-based) RNG | 
Definition at line 778 of file dao_liquid_crypto.h.
The liquid crypto AES key length in bytes.
| Enumerator | |
|---|---|
| DAO_LC_AES_KEY_LEN_16_BYTES | AES key length = 16 bytes | 
| DAO_LC_AES_KEY_LEN_24_BYTES | AES key length = 24 bytes | 
| DAO_LC_AES_KEY_LEN_32_BYTES | AES key length = 32 bytes | 
Definition at line 821 of file dao_liquid_crypto.h.
| int dao_liquid_crypto_init | ( | void | ) | 
Initialize liquid crypto.
This function initializes the liquid crypto library. This API must be called before any other liquid crypto API and must be called after calling rte_eal_init().
| int dao_liquid_crypto_fini | ( | void | ) | 
Cleanup liquid crypto.
This function cleans up the liquid crypto library.
| int dao_liquid_crypto_info_get | ( | struct dao_lc_info * | info | ) | 
Get liquid crypto information.
This function retrieves the liquid crypto information.
| info | [out] A pointer to the liquid crypto information structure. | 
| int dao_liquid_crypto_dev_create | ( | struct dao_lc_dev_conf * | conf | ) | 
Create a liquid crypto device.
This function creates a liquid crypto device.
| conf | A pointer to the liquid crypto device configuration structure. | 
| int dao_liquid_crypto_dev_destroy | ( | uint8_t | dev_id | ) | 
Destroy a liquid crypto device.
This function destroys a liquid crypto device. The device must be stopped before it can be destroyed. Once destroyed, the device cannot be used.
| dev_id | The device identifier. | 
| int dao_liquid_crypto_qp_configure | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| struct dao_lc_qp_conf * | conf | ||
| ) | 
Configure a liquid crypto queue pair.
This function configures a liquid crypto queue pair. Queue pairs can be configured only when the device is stopped.
| dev_id | The device identifier. Value must between 0 and dao_lc_info.nb_dev- 1. | 
| qp_id | The queue pair identifier. Value must between 0 and dao_lc_info.nb_qp[dev_id]- 1. | 
| conf | A pointer to the liquid crypto queue pair configuration structure. | 
| int dao_liquid_crypto_dev_start | ( | uint8_t | dev_id | ) | 
Start a liquid crypto device.
This function starts a liquid crypto device. The device must be created before it can be started.
Note: For performance benefits, the actual number of descriptors would be rounded up to a power of 2.
| dev_id | The device identifier. | 
| int dao_liquid_crypto_dev_stop | ( | uint8_t | dev_id | ) | 
Stop a liquid crypto device.
This function stops a liquid crypto device.
| dev_id | The device identifier. | 
| uint16_t dao_liquid_crypto_seg_size_calc | ( | struct dao_lc_feature_params * | params | ) | 
Calculate the size of the maximum segment size.
This function calculates the size of the maximum segment size for the liquid crypto device to support the given feature parameters.
This value can be passed to the max_seg_size field of the dao_lc_qp_conf structure when configuring a queue pair.
| params | A pointer to the liquid crypto feature parameters structure. | 
| int dao_liquid_crypto_enqueue_op_passthrough | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue passthrough operation to the liquid crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_pkcs1v15enc | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| enum dao_liquid_crypto_rsa_key_type | key_type, | ||
| uint16_t | mod_len, | ||
| uint16_t | exp_len, | ||
| uint16_t | msg_len, | ||
| uint8_t * | mod, | ||
| uint8_t * | exp, | ||
| uint8_t * | msg, | ||
| uint8_t * | em, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform RSA encrypt operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| key_type | The type of RSA key to be used. | 
| mod_len | The length of the modulus. Value should be at least 17 bytes and at most 1024 bytes. | 
| exp_len | The length of the exponent. | 
| msg_len | The length of the message. Value must be at most mod_len - 11. | 
| mod | The address of the buffer containing the modulus. Length of this buffer must be at most mod_len bytes. | 
| exp | The address of the buffer containing the exponent. | 
| msg | The address of the buffer containing the message. | 
| em | The address of the buffer where the encrypted message is to be stored. Length of this buffer must be at least mod_len bytes. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_pkcs1v15dec | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| enum dao_liquid_crypto_rsa_key_type | key_type, | ||
| uint16_t | mod_len, | ||
| uint16_t | exp_len, | ||
| uint8_t * | mod, | ||
| uint8_t * | exp, | ||
| uint8_t * | em, | ||
| uint8_t * | msg, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform RSA decrypt operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| key_type | The type of RSA key to be used. | 
| mod_len | The length of the modulus. Value should be at least 17 bytes and at most 1024 bytes. | 
| exp_len | The length of the exponent. | 
| mod | The address of the buffer containing the modulus. Length of this buffer must be mod_len bytes. | 
| exp | The address of the buffer containing the exponent. | 
| em | The address of the buffer containing the encrypted message. Length of this buffer must be mod_len bytes. | 
| msg | The address of the buffer where the decrypted message is to be stored. Length of this buffer must be at least mod_len - 11 bytes. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_pkcs1v15enc_crt | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| uint16_t | mod_len, | ||
| uint16_t | msg_len, | ||
| uint8_t * | q, | ||
| uint8_t * | dQ, | ||
| uint8_t * | p, | ||
| uint8_t * | dP, | ||
| uint8_t * | qInv, | ||
| uint8_t * | msg, | ||
| uint8_t * | em, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform RSA CRT encrypt operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| mod_len | The length of the modulus. Value must be even and should be at least 34 bytes and at most 1024 bytes. | 
| msg_len | The length of the message in bytes. Value must be at most mod_len - 11. | 
| q | The address of the buffer containing the first factor. Length of this buffer must be mod_len/2 bytes and the value must be odd. | 
| dQ | The address of the buffer containing the first factor's CRT exponent. Length of this buffer must be mod_len/2 bytes. | 
| p | The address of the buffer containing the second factor. Length of this buffer must be mod_len/2 bytes and the value must be odd. | 
| dP | The address of the buffer containing the second factor's CRT exponent. Length of this buffer must be mod_len/2 bytes. | 
| qInv | The address of the buffer containing the CRT coefficient. Length of this buffer must be mod_len/2 bytes. | 
| msg | The address of the buffer containing the message. | 
| em | The address of the buffer where the encrypted message is to be stored. Length of this buffer must be mod_len bytes. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_pkcs1v15dec_crt | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| uint16_t | mod_len, | ||
| uint8_t * | q, | ||
| uint8_t * | dQ, | ||
| uint8_t * | p, | ||
| uint8_t * | dP, | ||
| uint8_t * | qInv, | ||
| uint8_t * | em, | ||
| uint8_t * | msg, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform RSA CRT decrypt operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| mod_len | The length of the modulus in bytes. Value must be even and should be at least 34 bytes and at most 1024 bytes. | 
| q | The address of the buffer containing the first factor. Length of this buffer must be mod_len/2 bytes and the value must be odd. | 
| dQ | The address of the buffer containing the first factor's CRT exponent. Length of this buffer must be mod_len/2 bytes. | 
| p | The address of the buffer containing the second factor. Length of this buffer must be mod_len/2 bytes and the value must be odd. | 
| dP | The address of the buffer containing the second factor's CRT exponent. Length of this buffer must be mod_len/2 bytes. | 
| qInv | The address of the buffer containing the CRT coefficient. Length of this buffer must be mod_len/2 bytes. | 
| em | The address of the buffer containing the encrypted message. Length of this buffer must be mod_len bytes. | 
| msg | The address of the buffer where the decrypted message is to be stored. Length of this buffer must be at least mod_len - 11 bytes. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_random | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| struct dao_lc_random_op * | op | ||
| ) | 
Enqueue request to generate random data.
Select the RNG type and provide parameters via the op structure.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| op | Pointer to the random operation parameter structure. | 
| uint16_t dao_liquid_crypto_sym_enqueue_burst | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| struct dao_lc_sym_op * | op, | ||
| uint16_t | nb_ops | ||
| ) | 
Enqueue a burst of requests to perform symmetric crypto operations on the crypto device.
Note: The max number of requests that can be enqueued at once is 128.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operations are to be enqueued. | 
| op | The array of pointers to dao_lc_sym_op structures containing the operations to be enqueued. | 
| nb_ops | The number of operations to enqueue. | 
| uint16_t dao_liquid_crypto_dequeue_burst | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| struct dao_lc_res * | res, | ||
| uint16_t | nb_ops | ||
| ) | 
Dequeue burst of crypto operations from the crypto device.
Note: The max number of requests that can be dequeued at once is 128.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which ops are to be dequeued. | 
| res | [out] The array of pointers to dao_lc_res structures where the results of the operations are stored. | 
| nb_ops | The maximum number of operations to dequeue. | 
| int dao_liquid_crypto_sym_sess_create | ( | uint8_t | dev_id, | 
| const struct dao_lc_sym_ctx * | ctx, | ||
| uint64_t | sess_cookie | ||
| ) | 
Create a symmetric session on the liquid crypto device.
The session create request would be submitted via the command queue designated by cmd_qp_idx of the device.
| dev_id | The identifier of the device. | 
| ctx | The symmetric context. | 
| sess_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_cmd_sess_event structure when the operation is dequeued. The session ID of the session created would be returned in the dao_lc_cmd_sess_event structure. | 
| int dao_liquid_crypto_sym_sess_destroy | ( | uint8_t | dev_id, | 
| uint64_t | sess_id, | ||
| uint64_t | sess_cookie | ||
| ) | 
Destroy a symmetric session on the liquid crypto device.
The session destroy request would be submitted via the command queue designated by cmd_qp_idx of the device.
| dev_id | The identifier of the device. | 
| sess_id | The session identifier. | 
| sess_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_cmd_sess_event structure when the operation is dequeued. | 
| uint16_t dao_liquid_crypto_cmd_event_dequeue | ( | uint8_t | dev_id, | 
| struct dao_lc_cmd_event * | events, | ||
| uint16_t | nb_events | ||
| ) | 
Dequeue burst of command events from the command queue.
Note: The max number of requests that can be dequeued at once is 128.
| dev_id | The identifier of the device. | 
| events | The array of pointers to dao_lc_cmd_event structures where the command events can be stored. | 
| nb_events | The maximum number of command events to dequeue. | 
| int dao_liquid_crypto_enq_op_ecdsa_sign | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| enum dao_liquid_crypto_ec_curve_type | curve_id, | ||
| uint16_t | nonce_len, | ||
| uint16_t | pkey_len, | ||
| uint16_t | digest_len, | ||
| const uint8_t * | nonce, | ||
| const uint8_t * | pkey, | ||
| const uint8_t * | digest_data, | ||
| uint8_t * | rs_outdata, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform ECDSA sign operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| curve_id | The identifier of the elliptic curve to be used for ECDSA signing. Supported curve types are: 
 | 
| nonce_len | The length of the ECDSA per-message secret number in bytes. For all curves except P-521, nonce_len must be equal to the prime length of the curve. For P-521, nonce_len can be either the prime length or (prime length - 1) bytes. | 
| pkey_len | The length of the ECDSA private key data in bytes. pkey_len must be equal to the prime length of the curve. For P-521, pkey_len can be either the prime length or (prime length - 1) bytes. | 
| digest_len | The length of the message digest in bytes. The valid digest length and maximum supported length must be equal to the prime length of the curve. | 
| nonce | The address of the buffer containing the per-message secret number (nonce). Length must be equal to the prime length of the curve. | 
| pkey | The address of the buffer containing the private key data. The private key is an integer in the interval [1, n-1], where n is the order of the base point G of the elliptic curve. Length must be equal to the prime length of the curve. | 
| digest_data | The address of the buffer containing the message digest. | 
| rs_outdata | The address of the buffer where the ECDSA signature (containing both r and s components) is to be stored. For all curves except P-521, the buffer must be exactly 2 * prime_length bytes in size, where prime_length is the prime length of the specified curve. For the P-521 curve, the buffer can be either 2 * prime_length bytes or 2 * (prime_length - 1) bytes in size. The signature is stored as a single contiguous block, with the r component (prime_length bytes) followed immediately by the s component (prime_length bytes). | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_ecdsa_verify | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| enum dao_liquid_crypto_ec_curve_type | curve_id, | ||
| uint16_t | r_len, | ||
| uint16_t | s_len, | ||
| uint16_t | digest_len, | ||
| uint16_t | qx_len, | ||
| uint16_t | qy_len, | ||
| const uint8_t * | r_data, | ||
| const uint8_t * | s_data, | ||
| const uint8_t * | digest, | ||
| const uint8_t * | qx_data, | ||
| const uint8_t * | qy_data, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform ECDSA verify operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| curve_id | The identifier of the elliptic curve to be used for ECDSA verify. Supported curve types are: 
 | 
| r_len | The length of the ECDSA r sign component in bytes. For all curves except P-521, r_len must be equal to the prime length of the curve. For P-521, r_len can be either the prime length or (prime length - 1) bytes. | 
| s_len | The length of the ECDSA s sign component in bytes. For all curves except P-521, s_len must be equal to the prime length of the curve. For P-521, s_len can be either the prime length or (prime length - 1) bytes. | 
| digest_len | The length of the message digest in bytes. The valid digest length and maximum supported length must be equal to the prime length of the curve. | 
| qx_len | The length of the x-coordinate of the public key in bytes. For all curves except P-521, qx_len must be equal to the prime length of the curve. For P-521, qx_len can be either the prime length or (prime length - 1) bytes. | 
| qy_len | The length of the y-coordinate of the public key in bytes. For all curves except P-521, qy_len must be equal to the prime length of the curve. For P-521, qy_len can be either the prime length or (prime length - 1) bytes. | 
| r_data | The address of the buffer containing the ECDSA r component. | 
| s_data | The address of the buffer containing the ECDSA s component. | 
| digest | The address of the buffer containing the message digest. | 
| qx_data | The address of the buffer containing the x-coordinate of the public key. The public_x key is an integer in the interval [0, q-1], where q is prime number | 
| qy_data | The address of the buffer containing the y-coordinate of the public key. The public_y key is an integer in the interval [0, q-1], where q is prime number | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_rsa_oaep_enc | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| uint8_t * | label, | ||
| uint16_t | label_len, | ||
| enum dao_lc_hash_type | hash_type, | ||
| uint16_t | mod_len, | ||
| uint16_t | exp_len, | ||
| uint16_t | msg_len, | ||
| uint8_t * | mod, | ||
| uint8_t * | exp, | ||
| uint8_t * | msg, | ||
| uint8_t * | em, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform RSA OAEP public encrypt operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| label | Optional label to be associated with the message. In RSA OAEP, this label is used as an input to the mask generation function (MGF) and can provide additional binding context for the encryption operation. If not required, it can be set to NULL. | 
| label_len | The length of the label in bytes. If no label is used, this should be set to 0. | 
| hash_type | The hash algorithm to be used in the OAEP padding scheme. Supported hash types are: -DAO_LC_HASH_TYPE_SHA1 -DAO_LC_HASH_TYPE_SHA2_SHA256 -DAO_LC_HASH_TYPE_SHA2_SHA384 -DAO_LC_HASH_TYPE_SHA2_SHA512 | 
| mod_len | The length of the modulus. Value should be at least 17 bytes and at most 1024 bytes. | 
| exp_len | The length of the exponent. | 
| msg_len | The length of the message. . | 
| mod | The address of the buffer containing the modulus. Length of this buffer must be at most mod_len bytes. | 
| exp | The address of the buffer containing the exponent. | 
| msg | The address of the buffer containing the message. The length of the message (msg_len) must satisfy: msg_len <= (mod_len - (2 * hlen) - 2), where hlen is the length of the hash output used in OAEP. | 
| em | The address of the buffer where the encrypted message is to be stored. Length of this buffer must be at least mod_len bytes. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. | 
| int dao_liquid_crypto_enq_op_rsa_oaep_exp_dec | ( | uint8_t | dev_id, | 
| uint16_t | qp_id, | ||
| uint8_t * | label, | ||
| uint16_t | label_len, | ||
| enum dao_lc_hash_type | hash_type, | ||
| uint16_t | mod_len, | ||
| uint16_t | exp_len, | ||
| uint16_t | em_len, | ||
| uint8_t * | mod, | ||
| uint8_t * | exp, | ||
| uint8_t * | em, | ||
| uint8_t * | msg, | ||
| uint64_t | op_cookie | ||
| ) | 
Enqueue request to perform RSA OAEP private decrypt operation on the crypto device.
| dev_id | The identifier of the device. | 
| qp_id | The index of the queue pair on which the operation is to be enqueued. | 
| label | Optional label to be associated with the message. In RSA OAEP, this label is used as an input to the mask generation function (MGF) and can provide additional binding context for the decryption operation. If not required, it can be set to NULL. | 
| label_len | The length of the label in bytes. If no label is used, this should be set to 0. | 
| hash_type | The hash algorithm to be used in the OAEP padding scheme. Supported hash types are: -DAO_LC_HASH_TYPE_SHA1 -DAO_LC_HASH_TYPE_SHA2_SHA256 -DAO_LC_HASH_TYPE_SHA2_SHA384 -DAO_LC_HASH_TYPE_SHA2_SHA512 | 
| mod_len | The length of the modulus. Value should be at least 17 bytes and at most LIQUID_CRYPTO_RSA_MOD_LEN_MAX bytes. | 
| exp_len | The length of the exponent. | 
| mod | The address of the buffer containing the modulus. Length of this buffer must be mod_len bytes. | 
| exp | The address of the buffer containing the exponent. | 
| em | The address of the buffer containing the encrypted message. Length of this buffer must be mod_len bytes. | 
| em_len | The length of the encrypted message. This should be equal to mod_len bytes. | 
| msg | The address of the buffer where the decrypted message is to be stored. | 
| op_cookie | The cookie to be associated with the operation. This cookie is returned in the dao_lc_res structure when the operation is dequeued. |