memcpy(hash_key, key, key_len);
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
/* Setup Authentication Parameters */
ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = iv_len;
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session */
ut_params->sess = rte_cryptodev_sym_session_create(
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
memset(sym_op->auth.digest.data, 0, auth_tag_len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
else
ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
plaintext_len, buffer);
/* Validate obuf */
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
else
ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
else
plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, ciphertext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);
const uint8_t *reference_plaintext = tdata->plaintext.data +
(tdata->validCipherOffsetInBits.len >> 3);
ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
else
plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, ciphertext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);
const uint8_t *reference_plaintext = tdata->plaintext.data +
(tdata->validCipherOffsetInBits.len >> 3);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
else
ciphertext = plaintext;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
else
ciphertext = plaintext;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,
plaintext_len, buffer);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
else
plaintext = ciphertext;
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, ciphertext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
else
plaintext = ciphertext;
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, ciphertext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, ciphertext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create ZUC operation */
retval = create_zuc_cipher_hash_generate_operation(tdata);
else
ciphertext = plaintext;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
else
ciphertext = plaintext;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ plaintext_pad_len;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(tdata->digest.len,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
else
ciphertext = plaintext;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
0, plaintext_len, ciphertext_buffer);
/* Validate obuf */
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ut_params->aead_xform.aead.digest_length = auth_len;
ut_params->aead_xform.aead.aad_length = aad_len;
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
sym_op->xform->aead.digest_length = auth_len;
sym_op->xform->aead.aad_length = aad_len;
- TEST_HEXDUMP(stdout, "key:", key, key_len);
+ debug_hexdump(stdout, "key:", key, key_len);
return 0;
}
rte_pktmbuf_iova(ut_params->ibuf);
/* Copy AAD 18 bytes after the AAD pointer, according to the API */
memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len);
- TEST_HEXDUMP(stdout, "aad:", sym_op->aead.aad.data,
+ debug_hexdump(stdout, "aad:", sym_op->aead.aad.data,
tdata->aad.len);
/* Append IV at the end of the crypto operation*/
/* Copy IV 1 byte after the IV pointer, according to the API */
rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len);
- TEST_HEXDUMP(stdout, "iv:", iv_ptr,
+ debug_hexdump(stdout, "iv:", iv_ptr,
tdata->iv.len);
} else {
aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
sym_op->aead.aad.phys_addr =
rte_pktmbuf_iova(ut_params->ibuf);
memcpy(sym_op->aead.aad.data, tdata->aad.data, tdata->aad.len);
- TEST_HEXDUMP(stdout, "aad:", sym_op->aead.aad.data,
+ debug_hexdump(stdout, "aad:", sym_op->aead.aad.data,
tdata->aad.len);
/* Append IV at the end of the crypto operation*/
uint8_t *, IV_OFFSET);
rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
- TEST_HEXDUMP(stdout, "iv:", iv_ptr,
+ debug_hexdump(stdout, "iv:", iv_ptr,
tdata->iv.len);
}
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext,
+ debug_hexdump(stdout, "plaintext:", plaintext,
tdata->plaintext.len);
if (ut_params->obuf) {
memcpy(ciphertext, tdata->ciphertext.data,
tdata->ciphertext.len);
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext,
+ debug_hexdump(stdout, "ciphertext:", ciphertext,
tdata->ciphertext.len);
if (ut_params->obuf) {
rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data,
tdata->auth_tag.len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->aead.digest.data,
tdata->auth_tag.len);
}
auth_tag = ciphertext + plaintext_pad_len;
}
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
- TEST_HEXDUMP(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
+ debug_hexdump(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
uint8_t *,
ut_params->op->sym->cipher.data.offset);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
ut_params->op->sym->cipher.data.offset);
auth_tag = ciphertext + plaintext_pad_len;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
- TEST_HEXDUMP(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
+ debug_hexdump(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
plaintext = rte_pktmbuf_mtod_offset(ut_params->obuf, uint8_t *,
ut_params->op->sym->cipher.data.offset);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
ut_params->op->sym->cipher.data.offset);
auth_tag = ciphertext + plaintext_pad_len;
- TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
- TEST_HEXDUMP(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
+ debug_hexdump(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
plaintext = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *,
ut_params->op->sym->cipher.data.offset);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
if (op == RTE_CRYPTO_AUTH_OP_VERIFY) {
rte_memcpy(sym_op->auth.digest.data, tdata->gmac_tag.data,
tdata->gmac_tag.len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
tdata->gmac_tag.len);
}
rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
- TEST_HEXDUMP(stdout, "iv:", iv_ptr, tdata->iv.len);
+ debug_hexdump(stdout, "iv:", iv_ptr, tdata->iv.len);
sym_op->cipher.data.length = 0;
sym_op->cipher.data.offset = 0;
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext,
+ debug_hexdump(stdout, "plaintext:", plaintext,
tdata->plaintext.len);
retval = create_gmac_operation(RTE_CRYPTO_AUTH_OP_GENERATE,
auth_tag = plaintext + plaintext_pad_len;
}
- TEST_HEXDUMP(stdout, "auth tag:", auth_tag, tdata->gmac_tag.len);
+ debug_hexdump(stdout, "auth tag:", auth_tag, tdata->gmac_tag.len);
TEST_ASSERT_BUFFERS_ARE_EQUAL(
auth_tag,
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext,
+ debug_hexdump(stdout, "plaintext:", plaintext,
tdata->plaintext.len);
retval = create_gmac_operation(RTE_CRYPTO_AUTH_OP_VERIFY,
reference->digest.data,
reference->digest.len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
reference->digest.len);
reference->digest.data,
reference->digest.len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
reference->digest.len);
reference->digest.data,
reference->digest.len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->auth.digest.data,
reference->digest.len);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, reference->plaintext.data, reference->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, reference->plaintext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext,
+ reference->plaintext.len);
/* Create operation */
retval = create_auth_verify_operation(ts_params, ut_params, reference);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, reference->plaintext.data, reference->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, reference->plaintext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext,
+ reference->plaintext.len);
/* Create operation */
retval = create_auth_verify_GMAC_operation(ts_params,
if (op == RTE_CRYPTO_AEAD_OP_DECRYPT) {
rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data,
auth_tag_len);
- TEST_HEXDUMP(stdout, "digest:",
+ debug_hexdump(stdout, "digest:",
sym_op->aead.digest.data,
auth_tag_len);
}
/* Copy AAD 18 bytes after the AAD pointer, according to the API */
rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len);
- TEST_HEXDUMP(stdout, "iv:", iv_ptr, iv_len);
- TEST_HEXDUMP(stdout, "aad:",
+ debug_hexdump(stdout, "iv:", iv_ptr, iv_len);
+ debug_hexdump(stdout, "aad:",
sym_op->aead.aad.data, aad_len);
} else {
uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op,
memset(sym_op->aead.aad.data, 0, aad_len);
rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len);
- TEST_HEXDUMP(stdout, "iv:", iv_ptr, iv_len);
- TEST_HEXDUMP(stdout, "aad:",
+ debug_hexdump(stdout, "iv:", iv_ptr, iv_len);
+ debug_hexdump(stdout, "aad:",
sym_op->aead.aad.data, aad_len);
}