aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2023-05-25 10:42:54 +0300
committerMatias Elo <matias.elo@nokia.com>2023-05-31 11:08:05 +0300
commita8454de2b7767d3f095e5ed9f1ad74b273610da1 (patch)
tree69fd2d832757089a5ee640e61a10a8548b60ee82
parentcc87fdb1df326ddc140b5f58c29eeb20c356e803 (diff)
validation: crypto: add crypto algorithm IDs in test vectors
Each test vector is for a specific cipher and/or auth algorithm, but the test vectors do not include the algorithm IDs. This makes it necessary to hardcode the correspondence between algorithms and test vectors in the test code and to carry the algorithm IDs in the code separately alongside the test vectors. Improve the situation by including algorithm IDs in the test vectors. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
-rw-r--r--test/validation/api/crypto/odp_crypto_test_inp.c239
-rw-r--r--test/validation/api/crypto/test_vectors.h126
2 files changed, 161 insertions, 204 deletions
diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c
index d076afb89..9e90f7b8a 100644
--- a/test/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/validation/api/crypto/odp_crypto_test_inp.c
@@ -348,8 +348,6 @@ typedef struct alg_test_param_t {
odp_crypto_op_t op;
odp_crypto_op_type_t op_type;
int32_t oop_shift;
- odp_cipher_alg_t cipher_alg;
- odp_auth_alg_t auth_alg;
crypto_test_reference_t *ref;
odp_packet_data_range_t cipher_range;
odp_packet_data_range_t auth_range;
@@ -376,9 +374,9 @@ static void prepare_crypto_ranges(const alg_test_param_t *param,
cipher_range->offset += c_scale * param->header_len;
auth_range->offset += a_scale * param->header_len;
- if (param->cipher_alg == ODP_CIPHER_ALG_NULL)
+ if (param->ref->cipher == ODP_CIPHER_ALG_NULL)
*cipher_range = zero_range;
- if (param->auth_alg == ODP_AUTH_ALG_NULL)
+ if (param->ref->auth == ODP_AUTH_ALG_NULL)
*auth_range = zero_range;
}
@@ -527,7 +525,7 @@ static void prepare_ignore_info(const alg_test_param_t *param,
* ciphers have undefined values.
*/
if (param->is_bit_mode_cipher &&
- param->cipher_alg != ODP_CIPHER_ALG_NULL) {
+ param->ref->cipher != ODP_CIPHER_ALG_NULL) {
uint8_t leftover_bits = ref_length_in_bits(param->ref) % 8;
ignore->byte_offset = cipher_offset + cipher_len - 1 + shift;
@@ -541,7 +539,7 @@ static void prepare_ignore_info(const alg_test_param_t *param,
* In decode sessions the bytes in the hash location have
* undefined values.
*/
- if (param->auth_alg != ODP_AUTH_ALG_NULL &&
+ if (param->ref->auth != ODP_AUTH_ALG_NULL &&
param->op == ODP_CRYPTO_OP_DECODE) {
uint32_t offs = param->digest_offset;
@@ -605,12 +603,12 @@ static void prepare_expected_data(const alg_test_param_t *param,
auth_offset /= 8;
auth_len = (auth_len + 7) / 8;
}
- if (param->cipher_alg == ODP_CIPHER_ALG_NULL)
+ if (param->ref->cipher == ODP_CIPHER_ALG_NULL)
cipher_len = 0;
- if (param->auth_alg == ODP_AUTH_ALG_NULL ||
- param->auth_alg == ODP_AUTH_ALG_AES_GCM ||
- param->auth_alg == ODP_AUTH_ALG_AES_CCM ||
- param->auth_alg == ODP_AUTH_ALG_CHACHA20_POLY1305) {
+ if (param->ref->auth == ODP_AUTH_ALG_NULL ||
+ param->ref->auth == ODP_AUTH_ALG_AES_GCM ||
+ param->ref->auth == ODP_AUTH_ALG_AES_CCM ||
+ param->ref->auth == ODP_AUTH_ALG_CHACHA20_POLY1305) {
/* auth range is ignored with null and AEAD algorithms */
auth_len = 0;
}
@@ -705,7 +703,7 @@ static void alg_test_execute(const alg_test_param_t *param)
* only when decoding and using non-null auth algorithm.
*/
if (param->wrong_digest &&
- (param->auth_alg == ODP_AUTH_ALG_NULL ||
+ (param->ref->auth == ODP_AUTH_ALG_NULL ||
param->op == ODP_CRYPTO_OP_ENCODE))
return;
@@ -762,8 +760,8 @@ static void alg_test_execute(const alg_test_param_t *param)
CU_ASSERT(test_packet_is_md_equal(&md_out, &md_in));
}
- if (param->cipher_alg != ODP_CIPHER_ALG_NULL &&
- param->auth_alg != ODP_AUTH_ALG_NULL &&
+ if (param->ref->cipher != ODP_CIPHER_ALG_NULL &&
+ param->ref->auth != ODP_AUTH_ALG_NULL &&
param->digest_offset >= cipher_range.offset &&
param->digest_offset < cipher_range.offset + cipher_range.length) {
/*
@@ -803,13 +801,13 @@ static void print_alg_test_param(const alg_test_param_t *p)
}
printf("%s\n", p->op == ODP_CRYPTO_OP_ENCODE ? "encode" : "decode");
- printf("cipher: %s, %s mode\n", cipher_alg_name(p->cipher_alg), cipher_mode);
+ printf("cipher: %s, %s mode\n", cipher_alg_name(p->ref->cipher), cipher_mode);
printf(" key length: %d, iv length: %d\n",
p->ref->cipher_key_length, p->ref->cipher_iv_length);
printf(" range: offset %d, length %d\n",
p->cipher_range.offset, p->cipher_range.length);
- printf("auth: %s, %s mode\n", auth_alg_name(p->auth_alg), auth_mode);
+ printf("auth: %s, %s mode\n", auth_alg_name(p->ref->auth), auth_mode);
printf(" key length: %d, iv length: %d\n",
p->ref->auth_key_length, p->ref->auth_iv_length);
printf(" range: offset %d, length %d; aad length: %d\n",
@@ -881,8 +879,6 @@ typedef enum {
static odp_crypto_session_t session_create(odp_crypto_op_t op,
odp_crypto_op_type_t op_type,
- odp_cipher_alg_t cipher_alg,
- odp_auth_alg_t auth_alg,
alg_order_t order,
crypto_test_reference_t *ref,
hash_test_mode_t hash_mode)
@@ -911,8 +907,8 @@ static odp_crypto_session_t session_create(odp_crypto_op_t op,
ses_params.op_type = op_type;
ses_params.auth_cipher_text = (order == AUTH_CIPHERTEXT);
ses_params.op_mode = suite_context.op_mode;
- ses_params.cipher_alg = cipher_alg;
- ses_params.auth_alg = auth_alg;
+ ses_params.cipher_alg = ref->cipher;
+ ses_params.auth_alg = ref->auth;
ses_params.compl_queue = suite_context.queue;
ses_params.output_pool = suite_context.pool;
ses_params.cipher_key = cipher_key;
@@ -928,8 +924,8 @@ static odp_crypto_session_t session_create(odp_crypto_op_t op,
if (!combo_warning_shown) {
combo_warning_shown = 1;
printf("\n Unsupported algorithm combination: %s, %s\n",
- cipher_alg_name(cipher_alg),
- auth_alg_name(auth_alg));
+ cipher_alg_name(ref->cipher),
+ auth_alg_name(ref->auth));
}
return ODP_CRYPTO_SESSION_INVALID;
}
@@ -942,8 +938,8 @@ static odp_crypto_session_t session_create(odp_crypto_op_t op,
if (rc < 0 && status == ODP_CRYPTO_SES_ERR_ALG_ORDER &&
ses_params.op_mode == ODP_CRYPTO_ASYNC) {
printf("\n Unsupported algorithm order: %s, %s, auth_cipher_text: %d\n",
- cipher_alg_name(cipher_alg),
- auth_alg_name(auth_alg),
+ cipher_alg_name(ref->cipher),
+ auth_alg_name(ref->auth),
ses_params.auth_cipher_text);
return ODP_CRYPTO_SESSION_INVALID;
}
@@ -975,8 +971,6 @@ static odp_crypto_session_t session_create(odp_crypto_op_t op,
static void alg_test_ses(odp_crypto_op_t op,
odp_crypto_op_type_t op_type,
- odp_cipher_alg_t cipher_alg,
- odp_auth_alg_t auth_alg,
alg_order_t order,
crypto_test_reference_t *ref,
odp_packet_data_range_t cipher_range,
@@ -998,7 +992,7 @@ static void alg_test_ses(odp_crypto_op_t op,
digest_offset < auth_range.offset + auth_range.length)
hash_mode = HASH_OVERLAP;
- session = session_create(op, op_type, cipher_alg, auth_alg, order, ref, hash_mode);
+ session = session_create(op, op_type, order, ref, hash_mode);
if (session == ODP_CRYPTO_SESSION_INVALID)
return;
@@ -1006,8 +1000,6 @@ static void alg_test_ses(odp_crypto_op_t op,
test_param.session = session;
test_param.op = op;
test_param.op_type = op_type;
- test_param.cipher_alg = cipher_alg;
- test_param.auth_alg = auth_alg;
test_param.ref = ref;
test_param.cipher_range = cipher_range;
test_param.auth_range = auth_range;
@@ -1021,8 +1013,8 @@ static void alg_test_ses(odp_crypto_op_t op,
seg_len = 0;
if (!full_test &&
- cipher_alg != ODP_CIPHER_ALG_NULL &&
- auth_alg != ODP_AUTH_ALG_NULL) {
+ ref->cipher != ODP_CIPHER_ALG_NULL &&
+ ref->auth != ODP_AUTH_ALG_NULL) {
/* run the loop body just once */
seg_len = max_shift / 2;
max_shift = seg_len;
@@ -1059,8 +1051,6 @@ static void alg_test_ses(odp_crypto_op_t op,
}
static void alg_test(odp_crypto_op_t op,
- odp_cipher_alg_t cipher_alg,
- odp_auth_alg_t auth_alg,
alg_order_t order,
crypto_test_reference_t *ref,
odp_packet_data_range_t cipher_range,
@@ -1078,8 +1068,6 @@ static void alg_test(odp_crypto_op_t op,
for (unsigned int n = 0; n < ARRAY_SIZE(op_types); n++) {
alg_test_ses(op,
op_types[n],
- cipher_alg,
- auth_alg,
order,
ref,
cipher_range,
@@ -1104,12 +1092,12 @@ static odp_bool_t aad_len_ok(const odp_crypto_auth_capability_t *capa, uint32_t
}
static void check_alg(odp_crypto_op_t op,
- odp_cipher_alg_t cipher_alg,
- odp_auth_alg_t auth_alg,
crypto_test_reference_t *ref,
size_t count)
{
int rc, i;
+ const odp_cipher_alg_t cipher_alg = ref->cipher;
+ const odp_auth_alg_t auth_alg = ref->auth;
int cipher_num = odp_crypto_cipher_capability(cipher_alg, NULL, 0);
int auth_num = odp_crypto_auth_capability(auth_alg, NULL, 0);
odp_bool_t cipher_ok = false;
@@ -1211,10 +1199,10 @@ static void check_alg(odp_crypto_op_t op,
ref_length_in_bits(&ref[idx]) :
ref_length_in_bytes(&ref[idx]);
- alg_test(op, cipher_alg, auth_alg, AUTH_PLAINTEXT, &ref[idx],
+ alg_test(op, AUTH_PLAINTEXT, &ref[idx],
cipher_range, auth_range, digest_offs,
is_bit_mode_cipher, is_bit_mode_auth);
- alg_test(op, cipher_alg, auth_alg, AUTH_CIPHERTEXT, &ref[idx],
+ alg_test(op, AUTH_CIPHERTEXT, &ref[idx],
cipher_range, auth_range, digest_offs,
is_bit_mode_cipher, is_bit_mode_auth);
@@ -1493,6 +1481,8 @@ static int create_hash_test_reference(odp_auth_alg_t auth,
odp_packet_data_range_t cipher_range = {.offset = 0, .length = 0};
odp_packet_data_range_t auth_range = {.offset = 0};
+ ref->cipher = ODP_CIPHER_ALG_NULL;
+ ref->auth = auth;
ref->auth_key_length = capa->key_len;
ref->auth_iv_length = capa->iv_len;
ref->digest_length = capa->digest_len;
@@ -1520,8 +1510,7 @@ static int create_hash_test_reference(odp_auth_alg_t auth,
session = session_create(ODP_CRYPTO_OP_ENCODE,
ODP_CRYPTO_OP_TYPE_LEGACY,
- ODP_CIPHER_ALG_NULL,
- auth, AUTH_PLAINTEXT, ref, HASH_NO_OVERLAP);
+ AUTH_PLAINTEXT, ref, HASH_NO_OVERLAP);
if (session == ODP_CRYPTO_SESSION_INVALID)
return -1;
@@ -1589,8 +1578,6 @@ static void test_auth_hash_in_auth_range(odp_auth_alg_t auth,
* hash bytes in the ciphertext packet before calculating the hash.
*/
alg_test(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- auth,
order,
&ref,
cipher_range, auth_range,
@@ -1618,8 +1605,6 @@ static void test_auth_hash_in_auth_range(odp_auth_alg_t auth,
* the hash bytes in the plaintext packet before calculating the hash.
*/
alg_test(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- auth,
order,
&ref,
cipher_range, auth_range,
@@ -1699,8 +1684,6 @@ static void test_auth_hashes_in_auth_range(void)
* Encode ref->plaintext and save result in ref->ciphertext.
*/
static int crypto_encode_ref(crypto_test_reference_t *ref,
- odp_cipher_alg_t cipher,
- odp_auth_alg_t auth,
odp_packet_data_range_t cipher_range,
odp_packet_data_range_t auth_range,
uint32_t hash_result_offset)
@@ -1719,8 +1702,6 @@ static int crypto_encode_ref(crypto_test_reference_t *ref,
session = session_create(ODP_CRYPTO_OP_ENCODE,
ODP_CRYPTO_OP_TYPE_LEGACY,
- cipher,
- auth,
AUTH_PLAINTEXT,
ref,
HASH_OVERLAP);
@@ -1730,9 +1711,9 @@ static int crypto_encode_ref(crypto_test_reference_t *ref,
return 1;
}
- if (cipher == ODP_CIPHER_ALG_NULL)
+ if (ref->cipher == ODP_CIPHER_ALG_NULL)
cipher_range = zero_range;
- if (auth == ODP_AUTH_ALG_NULL) {
+ if (ref->auth == ODP_AUTH_ALG_NULL) {
auth_range = zero_range;
hash_result_offset = 0;
}
@@ -1783,8 +1764,6 @@ static int create_combined_ref(const crypto_suite_t *suite,
crypto_test_reference_t ref_cipher_only;
crypto_test_reference_t ref_auth_only;
crypto_test_reference_t *first_ref, *second_ref;
- odp_auth_alg_t first_auth, second_auth;
- odp_cipher_alg_t first_cipher, second_cipher;
total_len = cipher_range->offset + cipher_range->length;
if (auth_range->offset + auth_range->length > total_len)
@@ -1792,6 +1771,8 @@ static int create_combined_ref(const crypto_suite_t *suite,
if (digest_offset + suite->auth_capa->digest_len > total_len)
total_len = digest_offset + suite->auth_capa->digest_len;
+ ref->cipher = suite->cipher;
+ ref->auth = suite->auth;
ref->cipher_key_length = suite->cipher_capa->key_len;
ref->cipher_iv_length = suite->cipher_capa->iv_len;
ref->auth_key_length = suite->auth_capa->key_len;
@@ -1824,39 +1805,31 @@ static int create_combined_ref(const crypto_suite_t *suite,
memset(ref->plaintext + digest_offset, 0, ref->digest_length);
ref_cipher_only = *ref;
+ ref_cipher_only.auth = ODP_AUTH_ALG_NULL;
ref_cipher_only.auth_key_length = 0;
ref_cipher_only.auth_iv_length = 0;
ref_cipher_only.aad_length = 0;
ref_cipher_only.digest_length = 0;
ref_auth_only = *ref;
+ ref_auth_only.cipher = ODP_CIPHER_ALG_NULL;
ref_auth_only.cipher_key_length = 0;
ref_auth_only.cipher_iv_length = 0;
if (suite->order == AUTH_CIPHERTEXT) {
first_ref = &ref_cipher_only;
- first_cipher = suite->cipher;
- first_auth = ODP_AUTH_ALG_NULL;
second_ref = &ref_auth_only;
- second_cipher = ODP_CIPHER_ALG_NULL;
- second_auth = suite->auth;
} else {
first_ref = &ref_auth_only;
- first_cipher = ODP_CIPHER_ALG_NULL;
- first_auth = suite->auth;
second_ref = &ref_cipher_only;
- second_cipher = suite->cipher;
- second_auth = ODP_AUTH_ALG_NULL;
}
rc = crypto_encode_ref(first_ref,
- first_cipher, first_auth,
*cipher_range, *auth_range,
digest_offset);
if (rc)
return 1;
memcpy(second_ref->plaintext, first_ref->ciphertext, ref->length);
rc = crypto_encode_ref(second_ref,
- second_cipher, second_auth,
*cipher_range, *auth_range,
digest_offset);
if (rc)
@@ -2138,8 +2111,6 @@ static void test_combo(const crypto_suite_t *suite,
return;
alg_test(ODP_CRYPTO_OP_ENCODE,
- suite->cipher,
- suite->auth,
suite->order,
&ref,
cipher_range, auth_range,
@@ -2148,8 +2119,6 @@ static void test_combo(const crypto_suite_t *suite,
suite->auth_capa->bit_mode);
alg_test(ODP_CRYPTO_OP_DECODE,
- suite->cipher,
- suite->auth,
suite->order,
&ref,
cipher_range, auth_range,
@@ -2241,8 +2210,6 @@ static int check_alg_null(void)
static void crypto_test_enc_alg_null(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_NULL,
null_reference,
ARRAY_SIZE(null_reference));
}
@@ -2250,8 +2217,6 @@ static void crypto_test_enc_alg_null(void)
static void crypto_test_dec_alg_null(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_NULL,
null_reference,
ARRAY_SIZE(null_reference));
}
@@ -2264,8 +2229,6 @@ static int check_alg_3des_cbc(void)
static void crypto_test_enc_alg_3des_cbc(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_3DES_CBC,
- ODP_AUTH_ALG_NULL,
tdes_cbc_reference,
ARRAY_SIZE(tdes_cbc_reference));
}
@@ -2273,8 +2236,6 @@ static void crypto_test_enc_alg_3des_cbc(void)
static void crypto_test_dec_alg_3des_cbc(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_3DES_CBC,
- ODP_AUTH_ALG_NULL,
tdes_cbc_reference,
ARRAY_SIZE(tdes_cbc_reference));
}
@@ -2287,8 +2248,6 @@ static int check_alg_3des_ecb(void)
static void crypto_test_enc_alg_3des_ecb(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_3DES_ECB,
- ODP_AUTH_ALG_NULL,
tdes_ecb_reference,
ARRAY_SIZE(tdes_ecb_reference));
}
@@ -2296,8 +2255,6 @@ static void crypto_test_enc_alg_3des_ecb(void)
static void crypto_test_dec_alg_3des_ecb(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_3DES_ECB,
- ODP_AUTH_ALG_NULL,
tdes_ecb_reference,
ARRAY_SIZE(tdes_ecb_reference));
}
@@ -2311,8 +2268,6 @@ static int check_alg_chacha20_poly1305(void)
static void crypto_test_enc_alg_chacha20_poly1305(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_CHACHA20_POLY1305,
- ODP_AUTH_ALG_CHACHA20_POLY1305,
chacha20_poly1305_reference,
ARRAY_SIZE(chacha20_poly1305_reference));
}
@@ -2320,8 +2275,6 @@ static void crypto_test_enc_alg_chacha20_poly1305(void)
static void crypto_test_dec_alg_chacha20_poly1305(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_CHACHA20_POLY1305,
- ODP_AUTH_ALG_CHACHA20_POLY1305,
chacha20_poly1305_reference,
ARRAY_SIZE(chacha20_poly1305_reference));
}
@@ -2334,8 +2287,6 @@ static int check_alg_aes_gcm(void)
static void crypto_test_enc_alg_aes_gcm(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_GCM,
- ODP_AUTH_ALG_AES_GCM,
aes_gcm_reference,
ARRAY_SIZE(aes_gcm_reference));
}
@@ -2343,8 +2294,6 @@ static void crypto_test_enc_alg_aes_gcm(void)
static void crypto_test_dec_alg_aes_gcm(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_GCM,
- ODP_AUTH_ALG_AES_GCM,
aes_gcm_reference,
ARRAY_SIZE(aes_gcm_reference));
}
@@ -2357,8 +2306,6 @@ static int check_alg_aes_ccm(void)
static void crypto_test_enc_alg_aes_ccm(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_CCM,
- ODP_AUTH_ALG_AES_CCM,
aes_ccm_reference,
ARRAY_SIZE(aes_ccm_reference));
}
@@ -2366,8 +2313,6 @@ static void crypto_test_enc_alg_aes_ccm(void)
static void crypto_test_dec_alg_aes_ccm(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_CCM,
- ODP_AUTH_ALG_AES_CCM,
aes_ccm_reference,
ARRAY_SIZE(aes_ccm_reference));
}
@@ -2380,8 +2325,6 @@ static int check_alg_aes_cbc(void)
static void crypto_test_enc_alg_aes_cbc(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_CBC,
- ODP_AUTH_ALG_NULL,
aes_cbc_reference,
ARRAY_SIZE(aes_cbc_reference));
}
@@ -2389,8 +2332,6 @@ static void crypto_test_enc_alg_aes_cbc(void)
static void crypto_test_dec_alg_aes_cbc(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_CBC,
- ODP_AUTH_ALG_NULL,
aes_cbc_reference,
ARRAY_SIZE(aes_cbc_reference));
}
@@ -2403,8 +2344,6 @@ static int check_alg_aes_ctr(void)
static void crypto_test_enc_alg_aes_ctr(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_CTR,
- ODP_AUTH_ALG_NULL,
aes_ctr_reference,
ARRAY_SIZE(aes_ctr_reference));
}
@@ -2412,8 +2351,6 @@ static void crypto_test_enc_alg_aes_ctr(void)
static void crypto_test_dec_alg_aes_ctr(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_CTR,
- ODP_AUTH_ALG_NULL,
aes_ctr_reference,
ARRAY_SIZE(aes_ctr_reference));
}
@@ -2426,8 +2363,6 @@ static int check_alg_aes_ecb(void)
static void crypto_test_enc_alg_aes_ecb(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_ECB,
- ODP_AUTH_ALG_NULL,
aes_ecb_reference,
ARRAY_SIZE(aes_ecb_reference));
}
@@ -2435,8 +2370,6 @@ static void crypto_test_enc_alg_aes_ecb(void)
static void crypto_test_dec_alg_aes_ecb(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_ECB,
- ODP_AUTH_ALG_NULL,
aes_ecb_reference,
ARRAY_SIZE(aes_ecb_reference));
}
@@ -2449,8 +2382,6 @@ static int check_alg_aes_cfb128(void)
static void crypto_test_enc_alg_aes_cfb128(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_CFB128,
- ODP_AUTH_ALG_NULL,
aes_cfb128_reference,
ARRAY_SIZE(aes_cfb128_reference));
}
@@ -2458,8 +2389,6 @@ static void crypto_test_enc_alg_aes_cfb128(void)
static void crypto_test_dec_alg_aes_cfb128(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_CFB128,
- ODP_AUTH_ALG_NULL,
aes_cfb128_reference,
ARRAY_SIZE(aes_cfb128_reference));
}
@@ -2472,8 +2401,6 @@ static int check_alg_aes_xts(void)
static void crypto_test_enc_alg_aes_xts(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_XTS,
- ODP_AUTH_ALG_NULL,
aes_xts_reference,
ARRAY_SIZE(aes_xts_reference));
}
@@ -2481,8 +2408,6 @@ static void crypto_test_enc_alg_aes_xts(void)
static void crypto_test_dec_alg_aes_xts(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_XTS,
- ODP_AUTH_ALG_NULL,
aes_xts_reference,
ARRAY_SIZE(aes_xts_reference));
}
@@ -2495,8 +2420,6 @@ static int check_alg_kasumi_f8(void)
static void crypto_test_enc_alg_kasumi_f8(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_KASUMI_F8,
- ODP_AUTH_ALG_NULL,
kasumi_f8_reference,
ARRAY_SIZE(kasumi_f8_reference));
}
@@ -2504,8 +2427,6 @@ static void crypto_test_enc_alg_kasumi_f8(void)
static void crypto_test_dec_alg_kasumi_f8(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_KASUMI_F8,
- ODP_AUTH_ALG_NULL,
kasumi_f8_reference,
ARRAY_SIZE(kasumi_f8_reference));
}
@@ -2518,8 +2439,6 @@ static int check_alg_snow3g_uea2(void)
static void crypto_test_enc_alg_snow3g_uea2(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_SNOW3G_UEA2,
- ODP_AUTH_ALG_NULL,
snow3g_uea2_reference,
ARRAY_SIZE(snow3g_uea2_reference));
}
@@ -2527,8 +2446,6 @@ static void crypto_test_enc_alg_snow3g_uea2(void)
static void crypto_test_dec_alg_snow3g_uea2(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_SNOW3G_UEA2,
- ODP_AUTH_ALG_NULL,
snow3g_uea2_reference,
ARRAY_SIZE(snow3g_uea2_reference));
}
@@ -2542,8 +2459,6 @@ static int check_alg_aes_eea2(void)
static void crypto_test_enc_alg_aes_eea2(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_AES_EEA2,
- ODP_AUTH_ALG_NULL,
aes_eea2_reference,
ARRAY_SIZE(aes_eea2_reference));
}
@@ -2551,8 +2466,6 @@ static void crypto_test_enc_alg_aes_eea2(void)
static void crypto_test_dec_alg_aes_eea2(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_AES_EEA2,
- ODP_AUTH_ALG_NULL,
aes_eea2_reference,
ARRAY_SIZE(aes_eea2_reference));
}
@@ -2565,8 +2478,6 @@ static int check_alg_zuc_eea3(void)
static void crypto_test_enc_alg_zuc_eea3(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_ZUC_EEA3,
- ODP_AUTH_ALG_NULL,
zuc_eea3_reference,
ARRAY_SIZE(zuc_eea3_reference));
}
@@ -2574,8 +2485,6 @@ static void crypto_test_enc_alg_zuc_eea3(void)
static void crypto_test_dec_alg_zuc_eea3(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_ZUC_EEA3,
- ODP_AUTH_ALG_NULL,
zuc_eea3_reference,
ARRAY_SIZE(zuc_eea3_reference));
}
@@ -2588,8 +2497,6 @@ static int check_alg_hmac_md5(void)
static void crypto_test_gen_alg_hmac_md5(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_MD5_HMAC,
hmac_md5_reference,
ARRAY_SIZE(hmac_md5_reference));
}
@@ -2597,8 +2504,6 @@ static void crypto_test_gen_alg_hmac_md5(void)
static void crypto_test_check_alg_hmac_md5(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_MD5_HMAC,
hmac_md5_reference,
ARRAY_SIZE(hmac_md5_reference));
}
@@ -2611,8 +2516,6 @@ static int check_alg_hmac_sha1(void)
static void crypto_test_gen_alg_hmac_sha1(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA1_HMAC,
hmac_sha1_reference,
ARRAY_SIZE(hmac_sha1_reference));
}
@@ -2620,8 +2523,6 @@ static void crypto_test_gen_alg_hmac_sha1(void)
static void crypto_test_check_alg_hmac_sha1(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA1_HMAC,
hmac_sha1_reference,
ARRAY_SIZE(hmac_sha1_reference));
}
@@ -2634,8 +2535,6 @@ static int check_alg_hmac_sha224(void)
static void crypto_test_gen_alg_hmac_sha224(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA224_HMAC,
hmac_sha224_reference,
ARRAY_SIZE(hmac_sha224_reference));
}
@@ -2643,8 +2542,6 @@ static void crypto_test_gen_alg_hmac_sha224(void)
static void crypto_test_check_alg_hmac_sha224(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA224_HMAC,
hmac_sha224_reference,
ARRAY_SIZE(hmac_sha224_reference));
}
@@ -2657,8 +2554,6 @@ static int check_alg_hmac_sha256(void)
static void crypto_test_gen_alg_hmac_sha256(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA256_HMAC,
hmac_sha256_reference,
ARRAY_SIZE(hmac_sha256_reference));
}
@@ -2666,8 +2561,6 @@ static void crypto_test_gen_alg_hmac_sha256(void)
static void crypto_test_check_alg_hmac_sha256(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA256_HMAC,
hmac_sha256_reference,
ARRAY_SIZE(hmac_sha256_reference));
}
@@ -2680,8 +2573,6 @@ static int check_alg_hmac_sha384(void)
static void crypto_test_gen_alg_hmac_sha384(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA384_HMAC,
hmac_sha384_reference,
ARRAY_SIZE(hmac_sha384_reference));
}
@@ -2689,8 +2580,6 @@ static void crypto_test_gen_alg_hmac_sha384(void)
static void crypto_test_check_alg_hmac_sha384(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA384_HMAC,
hmac_sha384_reference,
ARRAY_SIZE(hmac_sha384_reference));
}
@@ -2703,8 +2592,6 @@ static int check_alg_hmac_sha512(void)
static void crypto_test_gen_alg_hmac_sha512(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA512_HMAC,
hmac_sha512_reference,
ARRAY_SIZE(hmac_sha512_reference));
}
@@ -2712,8 +2599,6 @@ static void crypto_test_gen_alg_hmac_sha512(void)
static void crypto_test_check_alg_hmac_sha512(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA512_HMAC,
hmac_sha512_reference,
ARRAY_SIZE(hmac_sha512_reference));
}
@@ -2727,8 +2612,6 @@ static int check_alg_aes_xcbc(void)
static void crypto_test_gen_alg_aes_xcbc(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_XCBC_MAC,
aes_xcbc_reference,
ARRAY_SIZE(aes_xcbc_reference));
}
@@ -2736,8 +2619,6 @@ static void crypto_test_gen_alg_aes_xcbc(void)
static void crypto_test_check_alg_aes_xcbc(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_XCBC_MAC,
aes_xcbc_reference,
ARRAY_SIZE(aes_xcbc_reference));
}
@@ -2750,8 +2631,6 @@ static int check_alg_aes_gmac(void)
static void crypto_test_gen_alg_aes_gmac(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_GMAC,
aes_gmac_reference,
ARRAY_SIZE(aes_gmac_reference));
}
@@ -2759,8 +2638,6 @@ static void crypto_test_gen_alg_aes_gmac(void)
static void crypto_test_check_alg_aes_gmac(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_GMAC,
aes_gmac_reference,
ARRAY_SIZE(aes_gmac_reference));
}
@@ -2773,8 +2650,6 @@ static int check_alg_aes_cmac(void)
static void crypto_test_gen_alg_aes_cmac(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_CMAC,
aes_cmac_reference,
ARRAY_SIZE(aes_cmac_reference));
}
@@ -2782,8 +2657,6 @@ static void crypto_test_gen_alg_aes_cmac(void)
static void crypto_test_check_alg_aes_cmac(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_CMAC,
aes_cmac_reference,
ARRAY_SIZE(aes_cmac_reference));
}
@@ -2796,8 +2669,6 @@ static int check_alg_kasumi_f9(void)
static void crypto_test_gen_alg_kasumi_f9(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_KASUMI_F9,
kasumi_f9_reference,
ARRAY_SIZE(kasumi_f9_reference));
}
@@ -2805,8 +2676,6 @@ static void crypto_test_gen_alg_kasumi_f9(void)
static void crypto_test_check_alg_kasumi_f9(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_KASUMI_F9,
kasumi_f9_reference,
ARRAY_SIZE(kasumi_f9_reference));
}
@@ -2819,8 +2688,6 @@ static int check_alg_snow3g_uia2(void)
static void crypto_test_gen_alg_snow3g_uia2(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SNOW3G_UIA2,
snow3g_uia2_reference,
ARRAY_SIZE(snow3g_uia2_reference));
}
@@ -2828,8 +2695,6 @@ static void crypto_test_gen_alg_snow3g_uia2(void)
static void crypto_test_check_alg_snow3g_uia2(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SNOW3G_UIA2,
snow3g_uia2_reference,
ARRAY_SIZE(snow3g_uia2_reference));
}
@@ -2843,8 +2708,6 @@ static int check_alg_aes_eia2(void)
static void crypto_test_gen_alg_aes_eia2(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_EIA2,
aes_eia2_reference,
ARRAY_SIZE(aes_eia2_reference));
}
@@ -2852,8 +2715,6 @@ static void crypto_test_gen_alg_aes_eia2(void)
static void crypto_test_check_alg_aes_eia2(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_AES_EIA2,
aes_eia2_reference,
ARRAY_SIZE(aes_eia2_reference));
}
@@ -2866,8 +2727,6 @@ static int check_alg_zuc_eia3(void)
static void crypto_test_gen_alg_zuc_eia3(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_ZUC_EIA3,
zuc_eia3_reference,
ARRAY_SIZE(zuc_eia3_reference));
}
@@ -2875,8 +2734,6 @@ static void crypto_test_gen_alg_zuc_eia3(void)
static void crypto_test_check_alg_zuc_eia3(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_ZUC_EIA3,
zuc_eia3_reference,
ARRAY_SIZE(zuc_eia3_reference));
}
@@ -2889,8 +2746,6 @@ static int check_alg_md5(void)
static void crypto_test_gen_alg_md5(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_MD5,
md5_reference,
ARRAY_SIZE(md5_reference));
}
@@ -2898,8 +2753,6 @@ static void crypto_test_gen_alg_md5(void)
static void crypto_test_check_alg_md5(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_MD5,
md5_reference,
ARRAY_SIZE(md5_reference));
}
@@ -2912,8 +2765,6 @@ static int check_alg_sha1(void)
static void crypto_test_gen_alg_sha1(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA1,
sha1_reference,
ARRAY_SIZE(sha1_reference));
}
@@ -2921,8 +2772,6 @@ static void crypto_test_gen_alg_sha1(void)
static void crypto_test_check_alg_sha1(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA1,
sha1_reference,
ARRAY_SIZE(sha1_reference));
}
@@ -2935,8 +2784,6 @@ static int check_alg_sha224(void)
static void crypto_test_gen_alg_sha224(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA224,
sha224_reference,
ARRAY_SIZE(sha224_reference));
}
@@ -2944,8 +2791,6 @@ static void crypto_test_gen_alg_sha224(void)
static void crypto_test_check_alg_sha224(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA224,
sha224_reference,
ARRAY_SIZE(sha224_reference));
}
@@ -2958,8 +2803,6 @@ static int check_alg_sha256(void)
static void crypto_test_gen_alg_sha256(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA256,
sha256_reference,
ARRAY_SIZE(sha256_reference));
}
@@ -2967,8 +2810,6 @@ static void crypto_test_gen_alg_sha256(void)
static void crypto_test_check_alg_sha256(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA256,
sha256_reference,
ARRAY_SIZE(sha256_reference));
}
@@ -2981,8 +2822,6 @@ static int check_alg_sha384(void)
static void crypto_test_gen_alg_sha384(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA384,
sha384_reference,
ARRAY_SIZE(sha384_reference));
}
@@ -2990,8 +2829,6 @@ static void crypto_test_gen_alg_sha384(void)
static void crypto_test_check_alg_sha384(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA384,
sha384_reference,
ARRAY_SIZE(sha384_reference));
}
@@ -3004,8 +2841,6 @@ static int check_alg_sha512(void)
static void crypto_test_gen_alg_sha512(void)
{
check_alg(ODP_CRYPTO_OP_ENCODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA512,
sha512_reference,
ARRAY_SIZE(sha512_reference));
}
@@ -3013,8 +2848,6 @@ static void crypto_test_gen_alg_sha512(void)
static void crypto_test_check_alg_sha512(void)
{
check_alg(ODP_CRYPTO_OP_DECODE,
- ODP_CIPHER_ALG_NULL,
- ODP_AUTH_ALG_SHA512,
sha512_reference,
ARRAY_SIZE(sha512_reference));
}
diff --git a/test/validation/api/crypto/test_vectors.h b/test/validation/api/crypto/test_vectors.h
index b9a9c2f06..16683fb94 100644
--- a/test/validation/api/crypto/test_vectors.h
+++ b/test/validation/api/crypto/test_vectors.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2014-2018, Linaro Limited
- * Copyright (c) 2021-2022, Nokia
+ * Copyright (c) 2021-2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -8,10 +8,13 @@
#ifndef _ODP_TEST_CRYPTO_VECTORS_H_
#define _ODP_TEST_CRYPTO_VECTORS_H_
+#include <odp_api.h>
#include "test_vectors_len.h"
typedef struct crypto_test_reference_s {
uint8_t copy_previous_vector; /* does not copy digest_length */
+ odp_cipher_alg_t cipher;
+ odp_auth_alg_t auth;
uint32_t cipher_key_length;
uint8_t cipher_key[MAX_KEY_LEN];
uint32_t auth_key_length;
@@ -30,6 +33,9 @@ typedef struct crypto_test_reference_s {
uint8_t digest[MAX_DIGEST_LEN];
} crypto_test_reference_t;
+ODP_STATIC_ASSERT(ODP_CIPHER_ALG_NULL == 0, "null cipher is not the default");
+ODP_STATIC_ASSERT(ODP_AUTH_ALG_NULL == 0, "null auth is not the default");
+
/*
* Return test data length in bytes, rounding up to full bytes.
*/
@@ -66,6 +72,7 @@ static crypto_test_reference_t null_reference[] = {
*/
static crypto_test_reference_t tdes_cbc_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_3DES_CBC,
.cipher_key_length = TDES_CBC_KEY_LEN,
.cipher_key = { 0x62, 0x7f, 0x46, 0x0e, 0x08, 0x10, 0x4a, 0x10,
0x43, 0xcd, 0x26, 0x5d, 0x58, 0x40, 0xea, 0xf1,
@@ -77,6 +84,7 @@ static crypto_test_reference_t tdes_cbc_reference[] = {
.ciphertext = { 0xb2, 0x2b, 0x8d, 0x66, 0xde, 0x97, 0x06, 0x92 }
},
{
+ .cipher = ODP_CIPHER_ALG_3DES_CBC,
.cipher_key_length = TDES_CBC_KEY_LEN,
.cipher_key = { 0x37, 0xae, 0x5e, 0xbf, 0x46, 0xdf, 0xf2, 0xdc,
0x07, 0x54, 0xb9, 0x4f, 0x31, 0xcb, 0xb3, 0x85,
@@ -98,6 +106,7 @@ static crypto_test_reference_t tdes_cbc_reference[] = {
static crypto_test_reference_t tdes_ecb_reference[] = {
/* CAVS 18.0 TECBMMT2.rsp #0 */
{
+ .cipher = ODP_CIPHER_ALG_3DES_ECB,
.cipher_key_length = TDES_ECB_KEY_LEN,
.cipher_key = { 0x15, 0x1f, 0x10, 0x38, 0x3d, 0x6d, 0x19, 0x9b,
0x4a, 0x76, 0x3b, 0xd5, 0x4a, 0x46, 0xa4, 0x45,
@@ -108,6 +117,7 @@ static crypto_test_reference_t tdes_ecb_reference[] = {
},
/* CAVS 18.0 TECBMMT2.rsp #2 */
{
+ .cipher = ODP_CIPHER_ALG_3DES_ECB,
.cipher_key_length = TDES_ECB_KEY_LEN,
.cipher_key = { 0xcd, 0x3d, 0x9b, 0xf7, 0x2f, 0x8c, 0x8a, 0xb5,
0xfe, 0xe6, 0x73, 0x34, 0x31, 0x1c, 0xa4, 0x62,
@@ -124,6 +134,7 @@ static crypto_test_reference_t tdes_ecb_reference[] = {
static crypto_test_reference_t aes_cbc_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b,
0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06},
@@ -136,6 +147,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x27, 0x08, 0x94, 0x2d, 0xbe, 0x77, 0x18, 0x1a }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0,
0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a},
@@ -153,6 +165,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x1b, 0x82, 0x66, 0xbe, 0xa6, 0xd6, 0x1a, 0xb1 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x6c, 0x3e, 0xa0, 0x47, 0x76, 0x30, 0xce, 0x21,
0xa2, 0xce, 0x33, 0x4a, 0xa7, 0x46, 0xc2, 0xcd},
@@ -169,6 +182,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x85, 0x79, 0x69, 0x5d, 0x83, 0xba, 0x26, 0x84 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x56, 0xe4, 0x7a, 0x38, 0xc5, 0x59, 0x89, 0x74,
0xbc, 0x46, 0x90, 0x3d, 0xba, 0x29, 0x03, 0x49},
@@ -194,6 +208,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x49, 0xa5, 0x3e, 0x87, 0xf4, 0xc3, 0xda, 0x55 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
@@ -213,6 +228,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -239,6 +255,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,
@@ -263,6 +280,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -294,6 +312,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
static crypto_test_reference_t aes_ctr_reference[] = {
/* RFC3686 https://tools.ietf.org/html/rfc3686 */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7,
0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63},
@@ -312,6 +331,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -338,6 +358,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* Generated by Crypto++ 5.6.1 (715 bytes data)*/
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -528,6 +549,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* RFC3686 https://tools.ietf.org/html/rfc3686 */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x02, 0xBF, 0x39, 0x1E, 0xE8, 0xEC, 0xB1, 0x59,
0xB9, 0x59, 0x61, 0x7B, 0x09, 0x65, 0x27, 0x9B,
@@ -549,6 +571,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -576,6 +599,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* RFC3686 https://tools.ietf.org/html/rfc3686 */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xFF, 0x7A, 0x61, 0x7C, 0xE6, 0x91, 0x48, 0xE4,
0xF1, 0x72, 0x6E, 0x2F, 0x43, 0x58, 0x1D, 0xE2,
@@ -598,6 +622,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -629,6 +654,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
static crypto_test_reference_t aes_ecb_reference[] = {
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -652,6 +678,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
},
/* Generated by Crypto++ 5.6.1 (528 bytes) */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -791,6 +818,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -815,6 +843,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -843,6 +872,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
static crypto_test_reference_t aes_cfb128_reference[] = {
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CFB128,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -869,6 +899,7 @@ static crypto_test_reference_t aes_cfb128_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CFB128,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -896,6 +927,7 @@ static crypto_test_reference_t aes_cfb128_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CFB128,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -927,6 +959,7 @@ static crypto_test_reference_t aes_cfb128_reference[] = {
static crypto_test_reference_t aes_xts_reference[] = {
/* CAVS 11.0 XTSGen information, #1 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES128_XTS_KEY_LEN,
.cipher_key = { 0xa1, 0xb9, 0x0c, 0xba, 0x3f, 0x06, 0xac, 0x35,
0x3b, 0x2c, 0x34, 0x38, 0x76, 0x08, 0x17, 0x62,
@@ -943,6 +976,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #101 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES128_XTS_KEY_LEN,
.cipher_key = { 0xb7, 0xb9, 0x3f, 0x51, 0x6a, 0xef, 0x29, 0x5e,
0xff, 0x3a, 0x29, 0xd8, 0x37, 0xcf, 0x1f, 0x13,
@@ -963,6 +997,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #227 TODO (Length 130 bits)*/
/* {
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES128_XTS_KEY_LEN,
.cipher_key = { 0xec, 0x14, 0xc0, 0xa3, 0xb7, 0x72, 0x58, 0x5c,
0x15, 0xd4, 0xeb, 0x94, 0xe6, 0x9e, 0x2c, 0x55,
@@ -981,6 +1016,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
}, */
/* CAVS 11.0 XTSGen information, #1 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES256_XTS_KEY_LEN,
.cipher_key = { 0x1e, 0xa6, 0x61, 0xc5, 0x8d, 0x94, 0x3a, 0x0e,
0x48, 0x01, 0xe4, 0x2f, 0x4b, 0x09, 0x47, 0x14,
@@ -1005,6 +1041,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #110 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES256_XTS_KEY_LEN,
.cipher_key = { 0x6b, 0x19, 0x84, 0xc2, 0x4e, 0x7e, 0xb6, 0x62,
0x8e, 0x3a, 0x11, 0xc9, 0xcc, 0xd2, 0x59, 0x40,
@@ -1033,6 +1070,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #211 TODO: length 140 bits */
/* {
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES256_XTS_KEY_LEN,
.cipher_key = { 0x62, 0xc2, 0xe4, 0xf8, 0x52, 0xa9, 0x3e, 0xea,
0x4a, 0x2f, 0x61, 0xe8, 0x67, 0x68, 0x14, 0xf4,
@@ -1060,6 +1098,8 @@ static crypto_test_reference_t aes_xts_reference[] = {
*/
static crypto_test_reference_t aes_gcm_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
@@ -1093,6 +1133,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x2f, 0xd0, 0x47, 0x96, 0x56, 0x2d, 0xfd, 0xb4 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08},
@@ -1123,6 +1165,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0xc3, 0x09, 0xe9, 0xd8, 0x5a, 0x41, 0xad, 0x4a }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
@@ -1153,6 +1197,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x8a, 0xd2, 0xb6, 0x9e, 0x47, 0x99, 0xc7, 0x1d }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x3d, 0xe0, 0x98, 0x74, 0xb3, 0x88, 0xe6, 0x49,
0x19, 0x88, 0xd0, 0xc3, 0x60, 0x7e, 0xae, 0x1f},
@@ -1176,6 +1222,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x95, 0xf1, 0x12, 0xe4, 0xe7, 0xd0, 0x5d, 0x35 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
@@ -1201,6 +1249,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x18, 0x02, 0x7b, 0x5b, 0x4c, 0xd7, 0xa6, 0x36 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,
@@ -1237,6 +1287,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
* AES-CCM reference from RFC 3610
*/
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf},
@@ -1258,6 +1310,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
/* The rest of test vectors are generated manually, no "interesting"
* vectors for use cases in RFC 3610 or SP 800-38C. */
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1278,6 +1332,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0x67, 0xae, 0xc8, 0x0a, 0xc5, 0x88, 0xab, 0x16 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1299,6 +1355,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0xb5, 0x57, 0x2a, 0x17, 0x2d, 0x49, 0x16, 0xd5 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf},
@@ -1318,6 +1376,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0x63, 0xe7, 0x01, 0x5c, 0x69, 0xaf, 0xb4, 0x0c }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1338,6 +1398,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0x31, 0x29, 0x47, 0xa4, 0x6d, 0x76, 0x34, 0xb4 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1362,6 +1424,7 @@ static crypto_test_reference_t aes_ccm_reference[] = {
static crypto_test_reference_t aes_gmac_reference[] = {
{
+ .auth = ODP_AUTH_ALG_AES_GMAC,
.auth_key_length = AES128_KEY_LEN,
.auth_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
@@ -1393,6 +1456,7 @@ static crypto_test_reference_t aes_gmac_reference[] = {
},
/* AES192-GMAC from DPDK 17.02 */
{
+ .auth = ODP_AUTH_ALG_AES_GMAC,
.auth_key_length = AES192_KEY_LEN,
.auth_key = { 0xaa, 0x74, 0x0a, 0xbf, 0xad, 0xcd, 0xa7, 0x79,
0x22, 0x0d, 0x3b, 0x40, 0x6c, 0x5d, 0x7e, 0xc0,
@@ -1427,6 +1491,7 @@ static crypto_test_reference_t aes_gmac_reference[] = {
},
/* AES256-GMAC from DPDK 17.02 */
{
+ .auth = ODP_AUTH_ALG_AES_GMAC,
.auth_key_length = AES256_KEY_LEN,
.auth_key = { 0xb5, 0x48, 0xe4, 0x93, 0x4f, 0x5c, 0x64, 0xd3,
0xc0, 0xf0, 0xb7, 0x8f, 0x7b, 0x4d, 0x88, 0x24,
@@ -1466,6 +1531,7 @@ static crypto_test_reference_t aes_gmac_reference[] = {
*/
static crypto_test_reference_t aes_cmac_reference[] = {
{
+ .auth = ODP_AUTH_ALG_AES_CMAC,
.auth_key_length = AES128_KEY_LEN,
.auth_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },
@@ -1484,6 +1550,7 @@ static crypto_test_reference_t aes_cmac_reference[] = {
.digest_length = 12,
},
{
+ .auth = ODP_AUTH_ALG_AES_CMAC,
.auth_key_length = AES192_KEY_LEN,
.auth_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -1503,6 +1570,7 @@ static crypto_test_reference_t aes_cmac_reference[] = {
.digest_length = 12,
},
{
+ .auth = ODP_AUTH_ALG_AES_CMAC,
.auth_key_length = AES256_KEY_LEN,
.auth_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -1529,6 +1597,8 @@ static crypto_test_reference_t aes_cmac_reference[] = {
*/
static crypto_test_reference_t chacha20_poly1305_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_CHACHA20_POLY1305,
+ .auth = ODP_AUTH_ALG_CHACHA20_POLY1305,
.cipher_key_length = CHACHA20_POLY1305_KEY_LEN,
.cipher_key = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
@@ -1576,6 +1646,8 @@ static crypto_test_reference_t chacha20_poly1305_reference[] = {
0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60, 0x06, 0x91 }
},
{
+ .cipher = ODP_CIPHER_ALG_CHACHA20_POLY1305,
+ .auth = ODP_AUTH_ALG_CHACHA20_POLY1305,
.cipher_key_length = CHACHA20_POLY1305_KEY_LEN,
.cipher_key = { 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a,
0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0,
@@ -1664,6 +1736,7 @@ static crypto_test_reference_t chacha20_poly1305_reference[] = {
static crypto_test_reference_t hmac_md5_reference[] = {
{
+ .auth = ODP_AUTH_ALG_MD5_HMAC,
.auth_key_length = HMAC_MD5_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b },
@@ -1681,6 +1754,7 @@ static crypto_test_reference_t hmac_md5_reference[] = {
.digest_length = HMAC_MD5_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_MD5_HMAC,
.auth_key_length = HMAC_MD5_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1704,6 +1778,7 @@ static crypto_test_reference_t hmac_md5_reference[] = {
.digest_length = HMAC_MD5_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_MD5_HMAC,
.auth_key_length = HMAC_MD5_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },
@@ -1734,6 +1809,7 @@ static crypto_test_reference_t hmac_md5_reference[] = {
static crypto_test_reference_t hmac_sha1_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA1_HMAC,
.auth_key_length = HMAC_SHA1_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
@@ -1752,6 +1828,7 @@ static crypto_test_reference_t hmac_sha1_reference[] = {
.digest_length = HMAC_SHA1_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA1_HMAC,
.auth_key_length = HMAC_SHA1_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1775,6 +1852,7 @@ static crypto_test_reference_t hmac_sha1_reference[] = {
.digest_length = HMAC_SHA1_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA1_HMAC,
.auth_key_length = HMAC_SHA1_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -1807,6 +1885,7 @@ static crypto_test_reference_t hmac_sha1_reference[] = {
static crypto_test_reference_t hmac_sha224_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA224_HMAC,
.auth_key_length = HMAC_SHA224_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
@@ -1822,6 +1901,7 @@ static crypto_test_reference_t hmac_sha224_reference[] = {
0x53, 0x68, 0x4b, 0x22 }
},
{
+ .auth = ODP_AUTH_ALG_SHA224_HMAC,
.auth_key_length = HMAC_SHA224_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1842,6 +1922,7 @@ static crypto_test_reference_t hmac_sha224_reference[] = {
0x8f, 0xd0, 0x5e, 0x44 }
},
{
+ .auth = ODP_AUTH_ALG_SHA224_HMAC,
.auth_key_length = HMAC_SHA224_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -1871,6 +1952,7 @@ static crypto_test_reference_t hmac_sha224_reference[] = {
static crypto_test_reference_t hmac_sha256_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA256_HMAC,
.auth_key_length = HMAC_SHA256_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
@@ -1890,6 +1972,7 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
.digest_length = HMAC_SHA256_128_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA256_HMAC,
.auth_key_length = HMAC_SHA256_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1914,6 +1997,7 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
.digest_length = HMAC_SHA256_128_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA256_HMAC,
.auth_key_length = HMAC_SHA256_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -1947,6 +2031,7 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
static crypto_test_reference_t hmac_sha384_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA384_HMAC,
.auth_key_length = HMAC_SHA384_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
@@ -1968,6 +2053,7 @@ static crypto_test_reference_t hmac_sha384_reference[] = {
.digest_length = HMAC_SHA384_192_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA384_HMAC,
.auth_key_length = HMAC_SHA384_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1994,6 +2080,7 @@ static crypto_test_reference_t hmac_sha384_reference[] = {
.digest_length = HMAC_SHA384_192_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA384_HMAC,
.auth_key_length = HMAC_SHA384_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -2029,6 +2116,7 @@ static crypto_test_reference_t hmac_sha384_reference[] = {
static crypto_test_reference_t hmac_sha512_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA512_HMAC,
.auth_key_length = HMAC_SHA512_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
@@ -2052,6 +2140,7 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
.digest_length = HMAC_SHA512_256_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA512_HMAC,
.auth_key_length = HMAC_SHA512_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -2080,6 +2169,7 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
.digest_length = HMAC_SHA512_256_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA512_HMAC,
.auth_key_length = HMAC_SHA512_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -2121,6 +2211,7 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
static crypto_test_reference_t aes_xcbc_reference[] = {
/* Test Case #1 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
@@ -2135,6 +2226,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #2 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
@@ -2151,6 +2243,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #3 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
@@ -2169,6 +2262,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #4 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
@@ -2189,6 +2283,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #5 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
@@ -2211,6 +2306,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #6 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
@@ -2235,6 +2331,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #7 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.auth_key_length = AES_XCBC_MAC_KEY_LEN,
.auth_key = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
@@ -2263,6 +2360,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
*/
static crypto_test_reference_t kasumi_f8_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_KASUMI_F8,
.cipher_key_length = KASUMI_F8_KEY_LEN,
.cipher_key = { 0x5a, 0xcb, 0x1d, 0x64, 0x4c, 0x0d, 0x51, 0x20,
0x4e, 0xa5, 0xf1, 0x45, 0x10, 0x10, 0xd8, 0x52},
@@ -2279,6 +2377,7 @@ static crypto_test_reference_t kasumi_f8_reference[] = {
static crypto_test_reference_t kasumi_f9_reference[] = {
{
+ .auth = ODP_AUTH_ALG_KASUMI_F9,
.auth_key_length = KASUMI_F9_KEY_LEN,
.auth_key = { 0xc7, 0x36, 0xc6, 0xaa, 0xb2, 0x2b, 0xff, 0xf9,
0x1e, 0x26, 0x98, 0xd2, 0xe2, 0x2a, 0xd5, 0x7e },
@@ -2314,6 +2413,7 @@ static crypto_test_reference_t kasumi_f9_reference[] = {
*/
static crypto_test_reference_t snow3g_uea2_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_SNOW3G_UEA2,
.cipher_key_length = SNOW3G_UEA2_KEY_LEN,
.cipher_key = { 0x5a, 0xcb, 0x1d, 0x64, 0x4c, 0x0d, 0x51, 0x20,
0x4e, 0xa5, 0xf1, 0x45, 0x10, 0x10, 0xd8, 0x52},
@@ -2331,6 +2431,7 @@ static crypto_test_reference_t snow3g_uea2_reference[] = {
static crypto_test_reference_t snow3g_uia2_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SNOW3G_UIA2,
.auth_key_length = SNOW3G_UIA2_KEY_LEN,
.auth_key = { 0xc7, 0x36, 0xc6, 0xaa, 0xb2, 0x2b, 0xff, 0xf9,
0x1e, 0x26, 0x98, 0xd2, 0xe2, 0x2a, 0xd5, 0x7e},
@@ -2363,6 +2464,7 @@ static crypto_test_reference_t snow3g_uia2_reference[] = {
*/
static crypto_test_reference_t aes_eea2_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_AES_EEA2,
.cipher_key_length = AES_EEA2_KEY_LEN,
.cipher_key = { 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C,
0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1},
@@ -2380,6 +2482,7 @@ static crypto_test_reference_t aes_eea2_reference[] = {
0x3C, 0x22, 0xD7, 0xBD, 0xEE, 0xED, 0x8E, 0x78}
},
{
+ .cipher = ODP_CIPHER_ALG_AES_EEA2,
.cipher_key_length = AES_EEA2_KEY_LEN,
.cipher_key = { 0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC4, 0x40, 0xE0,
0x95, 0x2C, 0x49, 0x10, 0x48, 0x05, 0xFF, 0x48},
@@ -2419,6 +2522,7 @@ static crypto_test_reference_t aes_eea2_reference[] = {
static crypto_test_reference_t aes_eia2_reference[] = {
/* 3GPP TS 33.401, C.2.1 */
{
+ .auth = ODP_AUTH_ALG_AES_EIA2,
.auth_key_length = AES_EIA2_KEY_LEN,
.auth_key = { 0x2b, 0xd6, 0x45, 0x9f, 0x82, 0xc5, 0xb3, 0x00,
0x95, 0x2c, 0x49, 0x10, 0x48, 0x81, 0xff, 0x48 },
@@ -2433,6 +2537,7 @@ static crypto_test_reference_t aes_eia2_reference[] = {
},
/* 3GPP TS 33.401, C.2.2. */
{
+ .auth = ODP_AUTH_ALG_AES_EIA2,
.auth_key_length = AES_EIA2_KEY_LEN,
.auth_key = { 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C,
0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1 },
@@ -2447,6 +2552,7 @@ static crypto_test_reference_t aes_eia2_reference[] = {
},
/* 3GPP TS 33.401, C.2.5 */
{
+ .auth = ODP_AUTH_ALG_AES_EIA2,
.auth_key_length = AES_EIA2_KEY_LEN,
.auth_key = { 0x83, 0xfd, 0x23, 0xa2, 0x44, 0xa7, 0x4c, 0xf3,
0x58, 0xda, 0x30, 0x19, 0xf1, 0x72, 0x26, 0x35 },
@@ -2493,6 +2599,7 @@ static crypto_test_reference_t aes_eia2_reference[] = {
*/
static crypto_test_reference_t zuc_eea3_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_ZUC_EEA3,
.cipher_key_length = ZUC_EEA3_KEY_LEN,
.cipher_key = { 0xe5, 0xbd, 0x3e, 0xa0, 0xeb, 0x55, 0xad, 0xe8,
0x66, 0xc6, 0xac, 0x58, 0xbd, 0x54, 0x30, 0x2a},
@@ -2531,6 +2638,7 @@ static crypto_test_reference_t zuc_eea3_reference[] = {
/* Privately generated test data */
{
+ .cipher = ODP_CIPHER_ALG_ZUC_EEA3,
.cipher_key_length = ZUC_EEA3_256_KEY_LEN,
.cipher_key = { 0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
@@ -2578,6 +2686,7 @@ static crypto_test_reference_t zuc_eea3_reference[] = {
},
/* Privately generated test data */
{
+ .cipher = ODP_CIPHER_ALG_ZUC_EEA3,
.cipher_key_length = ZUC_EEA3_256_KEY_LEN,
.cipher_key = { 0x1d, 0x0f, 0x0e, 0x75, 0x86, 0xb3, 0xfc, 0x65,
0x94, 0xbf, 0xaa, 0xa8, 0xf5, 0xd0, 0x0f, 0xe8,
@@ -2657,6 +2766,7 @@ static crypto_test_reference_t zuc_eea3_reference[] = {
static crypto_test_reference_t zuc_eia3_reference[] = {
{
+ .auth = ODP_AUTH_ALG_ZUC_EIA3,
.auth_key_length = ZUC_EIA3_KEY_LEN,
.auth_key = { 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a },
@@ -2690,6 +2800,7 @@ static crypto_test_reference_t zuc_eia3_reference[] = {
},
/* Privately generated test data */
{
+ .auth = ODP_AUTH_ALG_ZUC_EIA3,
.auth_key_length = ZUC_EIA3_256_KEY_LEN,
.auth_key = { 0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
@@ -2719,6 +2830,7 @@ static crypto_test_reference_t zuc_eia3_reference[] = {
},
/* Privately generated test data */
{
+ .auth = ODP_AUTH_ALG_ZUC_EIA3,
.auth_key_length = ZUC_EIA3_256_KEY_LEN,
.auth_key = { 0x6a, 0x7e, 0x4c, 0x7e, 0x51, 0x25, 0xb3, 0x48,
0x84, 0x53, 0x3a, 0x94, 0xfb, 0x31, 0x99, 0x90,
@@ -2831,6 +2943,7 @@ static crypto_test_reference_t zuc_eia3_reference[] = {
*/
static crypto_test_reference_t md5_reference[] = {
{
+ .auth = ODP_AUTH_ALG_MD5,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2839,6 +2952,7 @@ static crypto_test_reference_t md5_reference[] = {
0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72}
},
{
+ .auth = ODP_AUTH_ALG_MD5,
.length = 62,
.plaintext = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
@@ -2867,6 +2981,7 @@ static crypto_test_reference_t md5_reference[] = {
*/
static crypto_test_reference_t sha1_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA1,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2876,6 +2991,7 @@ static crypto_test_reference_t sha1_reference[] = {
0x9C, 0xD0, 0xD8, 0x9D},
},
{
+ .auth = ODP_AUTH_ALG_SHA1,
.length = 56,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
@@ -2900,6 +3016,7 @@ static crypto_test_reference_t sha1_reference[] = {
static crypto_test_reference_t sha224_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA224,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2910,6 +3027,7 @@ static crypto_test_reference_t sha224_reference[] = {
0xe3, 0x6c, 0x9d, 0xa7 },
},
{
+ .auth = ODP_AUTH_ALG_SHA224,
.length = 56,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
@@ -2935,6 +3053,7 @@ static crypto_test_reference_t sha224_reference[] = {
static crypto_test_reference_t sha256_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA256,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2945,6 +3064,7 @@ static crypto_test_reference_t sha256_reference[] = {
0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad},
},
{
+ .auth = ODP_AUTH_ALG_SHA256,
.length = 56,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
@@ -2970,6 +3090,7 @@ static crypto_test_reference_t sha256_reference[] = {
static crypto_test_reference_t sha384_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA384,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2982,6 +3103,7 @@ static crypto_test_reference_t sha384_reference[] = {
0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7},
},
{
+ .auth = ODP_AUTH_ALG_SHA384,
.length = 112,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
@@ -3023,6 +3145,7 @@ static crypto_test_reference_t sha384_reference[] = {
static crypto_test_reference_t sha512_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA512,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -3037,6 +3160,7 @@ static crypto_test_reference_t sha512_reference[] = {
0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f},
},
{
+ .auth = ODP_AUTH_ALG_SHA512,
.length = 112,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,