@@ -314,6 +314,10 @@ static void alg_test(odp_crypto_op_t op,
.data = ovr_iv ? NULL : ref->iv,
.length = ref->iv_length
};
+ odp_crypto_iv_t auth_iv = {
+ .data = ovr_iv ? NULL : ref->auth_iv,
+ .length = ref->auth_iv_length
+ };
int num, i;
int found;
@@ -407,6 +411,7 @@ static void alg_test(odp_crypto_op_t op,
/* Search for the test case */
for (i = 0; i < num; i++) {
if (auth_capa[i].digest_len == ref->digest_length &&
+ auth_capa[i].iv_len == auth_iv.length &&
auth_capa[i].key_len == auth_key.length) {
found = 1;
break;
@@ -415,8 +420,9 @@ static void alg_test(odp_crypto_op_t op,
if (!found) {
printf("\n Unsupported: alg=%s, key_len=%" PRIu32 ", "
- "digest_len=%" PRIu32 "\n", auth_alg_name(auth_alg),
- auth_key.length, ref->digest_length);
+ "digest_len=%" PRIu32 ", iv_len=%" PRIu32 "\n",
+ auth_alg_name(auth_alg), auth_key.length,
+ ref->digest_length, auth_iv.length);
return;
}
@@ -432,6 +438,7 @@ static void alg_test(odp_crypto_op_t op,
ses_params.output_pool = suite_context.pool;
ses_params.cipher_key = cipher_key;
ses_params.iv = iv;
+ ses_params.auth_iv = auth_iv;
ses_params.auth_key = auth_key;
ses_params.auth_digest_len = ref->digest_length;
ses_params.auth_aad_len = ref->aad_length;
@@ -16,6 +16,8 @@ typedef struct crypto_test_reference_s {
uint8_t auth_key[MAX_KEY_LEN];
uint32_t iv_length;
uint8_t iv[MAX_IV_LEN];
+ uint32_t auth_iv_length;
+ uint8_t auth_iv[MAX_IV_LEN];
uint32_t length;
uint8_t plaintext[MAX_DATA_LEN];
uint8_t ciphertext[MAX_DATA_LEN];
@@ -447,9 +449,9 @@ static crypto_test_reference_t aes_gmac_reference[] = {
.auth_key_length = AES128_GCM_KEY_LEN,
.auth_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
- .iv_length = AES_GCM_IV_LEN,
- .iv = { 0x22, 0x43, 0x3c, 0x64, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00 },
+ .auth_iv_length = AES_GCM_IV_LEN,
+ .auth_iv = { 0x22, 0x43, 0x3c, 0x64, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00 },
.length = 68,
.plaintext = { 0x00, 0x00, 0x43, 0x21, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,