aead_xform.aead.iv.length = test_vector->aead_iv.length;
aead_xform.aead.digest_length = options->digest_sz;
- aead_xform.aead.add_auth_data_length =
+ aead_xform.aead.aad_length =
options->aead_aad_sz;
/* Create crypto session */
key_length = aead_xform->aead.key.length;
key = aead_xform->aead.key.data;
- sess->aad_length = aead_xform->aead.add_auth_data_length;
+ sess->aad_length = aead_xform->aead.aad_length;
digest_length = aead_xform->aead.digest_length;
} else {
GCM_LOG_ERR("Wrong xform type, has to be AEAD or authentication");
session->digest_length = aead_xform->digest_length;
session->aead_key.length = aead_xform->key.length;
- ctxt->auth_only_len = aead_xform->add_auth_data_length;
+ ctxt->auth_only_len = aead_xform->aad_length;
aeaddata.key = (uint64_t)session->aead_key.data;
aeaddata.keylen = session->aead_key.length;
return -EINVAL;
}
- sess->auth.aad_length = xform->aead.add_auth_data_length;
+ sess->auth.aad_length = xform->aead.aad_length;
sess->auth.digest_length = xform->aead.digest_length;
return 0;
int qat_alg_aead_session_create_content_desc_auth(struct qat_session *cdesc,
uint8_t *authkey,
uint32_t authkeylen,
- uint32_t add_auth_data_length,
+ uint32_t aad_length,
uint32_t digestsize,
unsigned int operation);
int qat_alg_aead_session_create_content_desc_auth(struct qat_session *cdesc,
uint8_t *authkey,
uint32_t authkeylen,
- uint32_t add_auth_data_length,
+ uint32_t aad_length,
uint32_t digestsize,
unsigned int operation)
{
* in big-endian format. This field is 8 bytes
*/
auth_param->u2.aad_sz =
- RTE_ALIGN_CEIL(add_auth_data_length, 16);
+ RTE_ALIGN_CEIL(aad_length, 16);
auth_param->hash_state_sz = (auth_param->u2.aad_sz) >> 3;
aad_len = (uint32_t *)(cdesc->cd_cur_ptr +
ICP_QAT_HW_GALOIS_128_STATE1_SZ +
ICP_QAT_HW_GALOIS_H_SZ);
- *aad_len = rte_bswap32(add_auth_data_length);
- cdesc->aad_len = add_auth_data_length;
+ *aad_len = rte_bswap32(aad_length);
+ cdesc->aad_len = aad_length;
break;
case ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2:
qat_proto_flag = QAT_CRYPTO_PROTO_FLAG_SNOW3G;
if (qat_alg_aead_session_create_content_desc_auth(session,
aead_xform->key.data,
aead_xform->key.length,
- aead_xform->add_auth_data_length,
+ aead_xform->aad_length,
aead_xform->digest_length,
RTE_CRYPTO_AUTH_OP_GENERATE))
goto error_out;
if (qat_alg_aead_session_create_content_desc_auth(session,
aead_xform->key.data,
aead_xform->key.length,
- aead_xform->add_auth_data_length,
+ aead_xform->aad_length,
aead_xform->digest_length,
RTE_CRYPTO_AUTH_OP_VERIFY))
goto error_out;
sa_ctx->xf[idx].a.next = NULL;
sa_ctx->xf[idx].a.aead.iv.offset = IV_OFFSET;
sa_ctx->xf[idx].a.aead.iv.length = iv_length;
- sa_ctx->xf[idx].a.aead.add_auth_data_length =
+ sa_ctx->xf[idx].a.aead.aad_length =
sa->aad_len;
sa_ctx->xf[idx].a.aead.digest_length =
sa->digest_len;
sa_ctx->xf[idx].a.next = NULL;
sa_ctx->xf[idx].a.aead.iv.offset = IV_OFFSET;
sa_ctx->xf[idx].a.aead.iv.length = iv_length;
- sa_ctx->xf[idx].a.aead.add_auth_data_length =
+ sa_ctx->xf[idx].a.aead.aad_length =
sa->aad_len;
sa_ctx->xf[idx].a.aead.digest_length =
sa->digest_len;
port_cparams[i].aead_algo = options->aead_xform.aead.algo;
port_cparams[i].digest_length =
options->aead_xform.aead.digest_length;
- if (options->aead_xform.aead.add_auth_data_length) {
+ if (options->aead_xform.aead.aad_length) {
port_cparams[i].aad.data = options->aad.data;
port_cparams[i].aad.phys_addr = options->aad.phys_addr;
port_cparams[i].aad.length = options->aad.length;
} else
options->aad.length = cap->sym.auth.aad_size.min;
- options->aead_xform.aead.add_auth_data_length =
+ options->aead_xform.aead.aad_length =
options->aad.length;
/* Check if digest size is supported by the algorithm. */
uint16_t digest_length;
- uint16_t add_auth_data_length;
+ uint16_t aad_length;
/**< The length of the additional authenticated data (AAD) in bytes. */
};
ut_params->aead_xform.aead.iv.offset = IV_OFFSET;
ut_params->aead_xform.aead.iv.length = iv_len;
ut_params->aead_xform.aead.digest_length = auth_len;
- ut_params->aead_xform.aead.add_auth_data_length = aad_len;
+ ut_params->aead_xform.aead.aad_length = aad_len;
TEST_HEXDUMP(stdout, "key:", key, key_len);
sym_op->xform->aead.iv.offset = IV_OFFSET;
sym_op->xform->aead.iv.length = iv_len;
sym_op->xform->aead.digest_length = auth_len;
- sym_op->xform->aead.add_auth_data_length = aad_len;
+ sym_op->xform->aead.aad_length = aad_len;
TEST_HEXDUMP(stdout, "key:", key, key_len);
case RTE_CRYPTO_AEAD_AES_GCM:
aead_xform.aead.key.data = aes_key;
aead_xform.aead.iv.length = AES_CIPHER_IV_LENGTH;
- aead_xform.aead.add_auth_data_length = AES_GCM_AAD_LENGTH;
+ aead_xform.aead.aad_length = AES_GCM_AAD_LENGTH;
aead_xform.aead.digest_length = get_aead_digest_length(aead_algo);
break;
default:
aead_xform.aead.key.length = pparams->session_attrs->key_aead_len;
aead_xform.aead.iv.length = pparams->session_attrs->iv_len;
aead_xform.aead.iv.offset = IV_OFFSET;
- aead_xform.aead.add_auth_data_length = pparams->session_attrs->aad_len;
+ aead_xform.aead.aad_length = pparams->session_attrs->aad_len;
aead_xform.aead.digest_length = pparams->session_attrs->digest_len;
test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);