diff options
author | Eric Biggers <ebiggers@google.com> | 2019-01-13 15:32:28 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-18 18:54:36 +0800 |
commit | a0d608ee5ebfa9a9da0e69784e7aa0f86644a02e (patch) | |
tree | cdc0f21287db759626681c1e857af2f4648af8ad /crypto/testmgr.h | |
parent | d7250b41531842cf7eaadf463053275a5d5a01f0 (diff) |
crypto: testmgr - unify the AEAD encryption and decryption test vectors
Currently testmgr has separate encryption and decryption test vectors
for AEADs. That's massively redundant, since usually the decryption
tests are identical to the encryption tests, just with the input/result
swapped. And for some algorithms it was forgotten to add decryption
test vectors, so for them currently only encryption is being tested.
Therefore, eliminate the redundancy by removing the AEAD decryption test
vectors and updating testmgr to test both AEAD encryption and decryption
using what used to be the encryption test vectors. Naming is adjusted
accordingly: each aead_testvec now has a 'ptext' (plaintext), 'plen'
(plaintext length), 'ctext' (ciphertext), and 'clen' (ciphertext length)
instead of an 'input', 'ilen', 'result', and 'rlen'. "Ciphertext" here
refers to the full ciphertext, including the authentication tag.
For now the scatterlist divisions are just given for the plaintext
length, not also the ciphertext length. For decryption, the last
scatterlist element is just extended by the authentication tag length.
In total, this removes over 5000 lines from testmgr.h, with no reduction
in test coverage since prior patches already copied the few unique
decryption test vectors into the encryption test vectors.
The testmgr.h portion of this patch was automatically generated using
the following awk script, except that I also manually updated the
definition of 'struct aead_testvec' and fixed the location of the
comment describing the AEGIS-128 test vectors.
BEGIN { OTHER = 0; ENCVEC = 1; DECVEC = 2; DECVEC_TAIL = 3; mode = OTHER }
/^static const struct aead_testvec.*_enc_/ { sub("_enc", ""); mode = ENCVEC }
/^static const struct aead_testvec.*_dec_/ { mode = DECVEC }
mode == ENCVEC {
sub(/\.input[[:space:]]*=/, ".ptext\t=")
sub(/\.result[[:space:]]*=/, ".ctext\t=")
sub(/\.ilen[[:space:]]*=/, ".plen\t=")
sub(/\.rlen[[:space:]]*=/, ".clen\t=")
print
}
mode == DECVEC_TAIL && /[^[:space:]]/ { mode = OTHER }
mode == OTHER { print }
mode == ENCVEC && /^};/ { mode = OTHER }
mode == DECVEC && /^};/ { mode = DECVEC_TAIL }
Note that git's default diff algorithm gets confused by the testmgr.h
portion of this patch, and reports too many lines added and removed.
It's better viewed with 'git diff --minimal' (or 'git show --minimal'),
which reports "2 files changed, 1235 insertions(+), 6491 deletions(-)".
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.h')
-rw-r--r-- | crypto/testmgr.h | 7466 |
1 files changed, 1134 insertions, 6332 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 8d1c2dfe3bec..95297240b0f1 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -76,23 +76,45 @@ struct cipher_testvec { bool generates_iv; }; +/* + * aead_testvec: structure to describe an AEAD test + * @key: Pointer to key + * @iv: Pointer to IV. If NULL, an all-zeroes IV is used. + * @ptext: Pointer to plaintext + * @assoc: Pointer to associated data + * @ctext: Pointer to the full authenticated ciphertext. For AEADs that + * produce a separate "ciphertext" and "authentication tag", these + * two parts are concatenated: ciphertext || tag. + * @tap: How to distribute ptext data in @np SGs + * @atap: How to distribute assoc data in @anp SGs + * @np: Numbers of SG to distribute ptext data in + * @anp: Numbers of SG to distribute assoc data in + * @fail: setkey() failure expected? + * @novrfy: Decryption verification failure expected? + * @wk: Does the test need CRYPTO_TFM_REQ_WEAK_KEY? + * (e.g. setkey() needs to fail due to a weak key) + * @klen: Length of @key in bytes + * @plen: Length of @ptext in bytes + * @alen: Length of @assoc in bytes + * @clen: Length of @ctext in bytes + */ struct aead_testvec { const char *key; const char *iv; - const char *input; + const char *ptext; const char *assoc; - const char *result; + const char *ctext; unsigned char tap[MAX_TAP]; unsigned char atap[MAX_TAP]; int np; int anp; bool fail; - unsigned char novrfy; /* ccm dec verification failure expected */ - unsigned char wk; /* weak key flag */ + unsigned char novrfy; + unsigned char wk; unsigned char klen; - unsigned short ilen; + unsigned short plen; + unsigned short clen; unsigned short alen; - unsigned short rlen; }; struct cprng_testvec { @@ -12898,7 +12920,7 @@ static const struct cipher_testvec aes_cfb_tv_template[] = { }, }; -static const struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = { +static const struct aead_testvec hmac_md5_ecb_cipher_null_tv_template[] = { { /* Input data from RFC 2410 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -12912,12 +12934,12 @@ static const struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = { "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8 + 16 + 0, .iv = "", - .input = "\x01\x23\x45\x67\x89\xab\xcd\xef", - .ilen = 8, - .result = "\x01\x23\x45\x67\x89\xab\xcd\xef" + .ptext = "\x01\x23\x45\x67\x89\xab\xcd\xef", + .plen = 8, + .ctext = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a" "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae", - .rlen = 8 + 16, + .clen = 8 + 16, }, { /* Input data from RFC 2410 Case 2 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -12931,58 +12953,16 @@ static const struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = { "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8 + 16 + 0, .iv = "", - .input = "Network Security People Have A Strange Sense Of Humor", - .ilen = 53, - .result = "Network Security People Have A Strange Sense Of Humor" - "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a" - "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23", - .rlen = 53 + 16, - }, -}; - -static const struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = { - { -#ifdef __LITTLE_ENDIAN - .key = "\x08\x00" /* rta length */ - "\x01\x00" /* rta type */ -#else - .key = "\x00\x08" /* rta length */ - "\x00\x01" /* rta type */ -#endif - "\x00\x00\x00\x00" /* enc key length */ - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00", - .klen = 8 + 16 + 0, - .iv = "", - .input = "\x01\x23\x45\x67\x89\xab\xcd\xef" - "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a" - "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae", - .ilen = 8 + 16, - .result = "\x01\x23\x45\x67\x89\xab\xcd\xef", - .rlen = 8, - }, { -#ifdef __LITTLE_ENDIAN - .key = "\x08\x00" /* rta length */ - "\x01\x00" /* rta type */ -#else - .key = "\x00\x08" /* rta length */ - "\x00\x01" /* rta type */ -#endif - "\x00\x00\x00\x00" /* enc key length */ - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00", - .klen = 8 + 16 + 0, - .iv = "", - .input = "Network Security People Have A Strange Sense Of Humor" + .ptext = "Network Security People Have A Strange Sense Of Humor", + .plen = 53, + .ctext = "Network Security People Have A Strange Sense Of Humor" "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a" "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23", - .ilen = 53 + 16, - .result = "Network Security People Have A Strange Sense Of Humor", - .rlen = 53, + .clen = 53 + 16, }, }; -static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha1_aes_cbc_tv_temp[] = { { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13003,14 +12983,14 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" "\xb4\x22\xda\x80\x2c\x9f\xac\x41", .alen = 16, - .input = "Single block msg", - .ilen = 16, - .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" + .ptext = "Single block msg", + .plen = 16, + .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" "\x27\x08\x94\x2d\xbe\x77\x18\x1a" "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c" "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5" "\x03\x71\xa2\x06", - .rlen = 16 + 20, + .clen = 16 + 20, }, { /* RFC 3602 Case 2 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13031,19 +13011,19 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28" "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", .alen = 16, - .input = "\x00\x01\x02\x03\x04\x05\x06\x07" + .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", - .ilen = 32, - .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" + .plen = 32, + .ctext = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a" "\x75\x86\x60\x2d\x25\x3c\xff\xf9" "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1" "\xad\x9b\x4c\x5c\x85\xe1\xda\xae" "\xee\x81\x4e\xd7\xdb\x74\xcf\x58" "\x65\x39\xf8\xde", - .rlen = 32 + 20, + .clen = 32 + 20, }, { /* RFC 3602 Case 3 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13064,9 +13044,9 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb" "\xd9\xcd\x27\xd8\x25\x68\x2c\x81", .alen = 16, - .input = "This is a 48-byte message (exactly 3 AES blocks)", - .ilen = 48, - .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" + .ptext = "This is a 48-byte message (exactly 3 AES blocks)", + .plen = 48, + .ctext = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" "\xd4\x93\x66\x5d\x33\xf0\xe8\x86" "\x2d\xea\x54\xcd\xb2\x93\xab\xc7" "\x50\x69\x39\x27\x67\x72\xf8\xd5" @@ -13075,7 +13055,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\xc2\xec\x0c\xf8\x7f\x05\xba\xca" "\xff\xee\x4c\xd0\x93\xe6\x36\x7f" "\x8d\x62\xf2\x1e", - .rlen = 48 + 20, + .clen = 48 + 20, }, { /* RFC 3602 Case 4 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13096,7 +13076,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c" "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", .alen = 16, - .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" + .ptext = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" @@ -13104,8 +13084,8 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", - .ilen = 64, - .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" + .plen = 64, + .ctext = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa" "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6" "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e" @@ -13116,7 +13096,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d" "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d" "\x1d\xbe\xc6\xe9", - .rlen = 64 + 20, + .clen = 64 + 20, }, { /* RFC 3602 Case 5 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13138,7 +13118,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\xe9\x6e\x8c\x08\xab\x46\x57\x63" "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93", .alen = 24, - .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" + .ptext = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" @@ -13148,8 +13128,8 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\x30\x31\x32\x33\x34\x35\x36\x37" "\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01", - .ilen = 80, - .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" + .plen = 80, + .ctext = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" "\xa9\x45\x3e\x19\x4e\x12\x08\x49" "\xa4\x87\x0b\x66\xcc\x6b\x99\x65" "\x33\x00\x13\xb4\x89\x8d\xc8\x56" @@ -13162,7 +13142,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c" "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8" "\x85\xe1\x59\xf7", - .rlen = 80 + 20, + .clen = 80 + 20, }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13184,7 +13164,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .alen = 16, - .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" + .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" @@ -13192,8 +13172,8 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - .ilen = 64, - .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" + .plen = 64, + .ctext = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" "\x71\x78\x18\x3a\x9f\xa0\x71\xe8" "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4" "\xe5\xe7\x38\x76\x3f\x69\x14\x5a" @@ -13204,7 +13184,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4" "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36" "\x47\x4c\xfc\x36", - .rlen = 64 + 20, + .clen = 64 + 20, }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13227,7 +13207,7 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .alen = 16, - .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" + .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" @@ -13235,8 +13215,8 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - .ilen = 64, - .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" + .plen = 64, + .ctext = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6" "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d" "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d" @@ -13247,11 +13227,11 @@ static const struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde" "\x1b\x9f\xc6\x81\x26\x43\x4a\x87" "\x51\xee\xd6\x4e", - .rlen = 64 + 20, + .clen = 64 + 20, }, }; -static const struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha1_ecb_cipher_null_tv_temp[] = { { /* Input data from RFC 2410 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13266,13 +13246,13 @@ static const struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = { "\x00\x00\x00\x00", .klen = 8 + 20 + 0, .iv = "", - .input = "\x01\x23\x45\x67\x89\xab\xcd\xef", - .ilen = 8, - .result = "\x01\x23\x45\x67\x89\xab\xcd\xef" + .ptext = "\x01\x23\x45\x67\x89\xab\xcd\xef", + .plen = 8, + .ctext = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab" "\x99\x5e\x19\x04\xd1\x72\xef\xb8" "\x8c\x5e\xe4\x08", - .rlen = 8 + 20, + .clen = 8 + 20, }, { /* Input data from RFC 2410 Case 2 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13287,63 +13267,17 @@ static const struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = { "\x00\x00\x00\x00", .klen = 8 + 20 + 0, .iv = "", - .input = "Network Security People Have A Strange Sense Of Humor", - .ilen = 53, - .result = "Network Security People Have A Strange Sense Of Humor" + .ptext = "Network Security People Have A Strange Sense Of Humor", + .plen = 53, + .ctext = "Network Security People Have A Strange Sense Of Humor" "\x75\x6f\x42\x1e\xf8\x50\x21\xd2" "\x65\x47\xee\x8e\x1a\xef\x16\xf6" "\x91\x56\xe4\xd6", - .rlen = 53 + 20, + .clen = 53 + 20, }, }; -static const struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = { - { -#ifdef __LITTLE_ENDIAN - .key = "\x08\x00" /* rta length */ - "\x01\x00" /* rta type */ -#else - .key = "\x00\x08" /* rta length */ - "\x00\x01" /* rta type */ -#endif - "\x00\x00\x00\x00" /* enc key length */ - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00", - .klen = 8 + 20 + 0, - .iv = "", - .input = "\x01\x23\x45\x67\x89\xab\xcd\xef" - "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab" - "\x99\x5e\x19\x04\xd1\x72\xef\xb8" - "\x8c\x5e\xe4\x08", - .ilen = 8 + 20, - .result = "\x01\x23\x45\x67\x89\xab\xcd\xef", - .rlen = 8, - }, { -#ifdef __LITTLE_ENDIAN - .key = "\x08\x00" /* rta length */ - "\x01\x00" /* rta type */ -#else - .key = "\x00\x08" /* rta length */ - "\x00\x01" /* rta type */ -#endif - "\x00\x00\x00\x00" /* enc key length */ - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00", - .klen = 8 + 20 + 0, - .iv = "", - .input = "Network Security People Have A Strange Sense Of Humor" - "\x75\x6f\x42\x1e\xf8\x50\x21\xd2" - "\x65\x47\xee\x8e\x1a\xef\x16\xf6" - "\x91\x56\xe4\xd6", - .ilen = 53 + 20, - .result = "Network Security People Have A Strange Sense Of Humor", - .rlen = 53, - }, -}; - -static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha256_aes_cbc_tv_temp[] = { { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13365,15 +13299,15 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" "\xb4\x22\xda\x80\x2c\x9f\xac\x41", .alen = 16, - .input = "Single block msg", - .ilen = 16, - .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" + .ptext = "Single block msg", + .plen = 16, + .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" "\x27\x08\x94\x2d\xbe\x77\x18\x1a" "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc" "\x38\x06\x38\x51\xb4\xb8\xf3\x5b" "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5" "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5", - .rlen = 16 + 32, + .clen = 16 + 32, }, { /* RFC 3602 Case 2 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13395,12 +13329,12 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28" "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", .alen = 16, - .input = "\x00\x01\x02\x03\x04\x05\x06\x07" + .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", - .ilen = 32, - .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" + .plen = 32, + .ctext = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a" "\x75\x86\x60\x2d\x25\x3c\xff\xf9" "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1" @@ -13408,7 +13342,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\x0e\x06\x58\x8f\xba\xf6\x06\xda" "\x49\x69\x0d\x5b\xd4\x36\x06\x62" "\x35\x5e\x54\x58\x53\x4d\xdf\xbf", - .rlen = 32 + 32, + .clen = 32 + 32, }, { /* RFC 3602 Case 3 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13430,9 +13364,9 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb" "\xd9\xcd\x27\xd8\x25\x68\x2c\x81", .alen = 16, - .input = "This is a 48-byte message (exactly 3 AES blocks)", - .ilen = 48, - .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" + .ptext = "This is a 48-byte message (exactly 3 AES blocks)", + .plen = 48, + .ctext = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" "\xd4\x93\x66\x5d\x33\xf0\xe8\x86" "\x2d\xea\x54\xcd\xb2\x93\xab\xc7" "\x50\x69\x39\x27\x67\x72\xf8\xd5" @@ -13442,7 +13376,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d" "\x24\x78\xfb\xbe\x02\xe0\x4f\x40" "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a", - .rlen = 48 + 32, + .clen = 48 + 32, }, { /* RFC 3602 Case 4 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13464,7 +13398,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c" "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", .alen = 16, - .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" + .ptext = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" @@ -13472,8 +13406,8 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", - .ilen = 64, - .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" + .plen = 64, + .ctext = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa" "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6" "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e" @@ -13485,7 +13419,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8" "\x3f\x54\xe2\x49\x39\xe3\x71\x25" "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64", - .rlen = 64 + 32, + .clen = 64 + 32, }, { /* RFC 3602 Case 5 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13508,7 +13442,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\xe9\x6e\x8c\x08\xab\x46\x57\x63" "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93", .alen = 24, - .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" + .ptext = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" @@ -13518,8 +13452,8 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\x30\x31\x32\x33\x34\x35\x36\x37" "\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01", - .ilen = 80, - .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" + .plen = 80, + .ctext = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" "\xa9\x45\x3e\x19\x4e\x12\x08\x49" "\xa4\x87\x0b\x66\xcc\x6b\x99\x65" "\x33\x00\x13\xb4\x89\x8d\xc8\x56" @@ -13533,7 +13467,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7" "\x73\xc3\x46\x20\x2c\xb1\xef\x68" "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf", - .rlen = 80 + 32, + .clen = 80 + 32, }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13556,7 +13490,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .alen = 16, - .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" + .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" @@ -13564,8 +13498,8 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - .ilen = 64, - .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" + .plen = 64, + .ctext = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" "\x71\x78\x18\x3a\x9f\xa0\x71\xe8" "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4" "\xe5\xe7\x38\x76\x3f\x69\x14\x5a" @@ -13577,7 +13511,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\x61\x81\x31\xea\x5b\x3d\x8e\xfb" "\xca\x71\x85\x93\xf7\x85\x55\x8b" "\x7a\xe4\x94\xca\x8b\xba\x19\x33", - .rlen = 64 + 32, + .clen = 64 + 32, }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13601,7 +13535,7 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .alen = 16, - .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" + .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" @@ -13609,8 +13543,8 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - .ilen = 64, - .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" + .plen = 64, + .ctext = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6" "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d" "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d" @@ -13622,11 +13556,11 @@ static const struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { "\x8f\x74\xbd\x17\x92\x03\xbe\x8f" "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0" "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f", - .rlen = 64 + 32, + .clen = 64 + 32, }, }; -static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha512_aes_cbc_tv_temp[] = { { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13652,9 +13586,9 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" "\xb4\x22\xda\x80\x2c\x9f\xac\x41", .alen = 16, - .input = "Single block msg", - .ilen = 16, - .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" + .ptext = "Single block msg", + .plen = 16, + .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" "\x27\x08\x94\x2d\xbe\x77\x18\x1a" "\x3f\xdc\xad\x90\x03\x63\x5e\x68" "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7" @@ -13664,7 +13598,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2" "\xfa\x20\x89\xdd\x9c\xac\x9e\x16" "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a", - .rlen = 16 + 64, + .clen = 16 + 64, }, { /* RFC 3602 Case 2 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13690,12 +13624,12 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28" "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", .alen = 16, - .input = "\x00\x01\x02\x03\x04\x05\x06\x07" + .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", - .ilen = 32, - .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" + .plen = 32, + .ctext = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a" "\x75\x86\x60\x2d\x25\x3c\xff\xf9" "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1" @@ -13707,7 +13641,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\x46\x32\x7c\x41\x9c\x59\x3e\xe9" "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8" "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d", - .rlen = 32 + 64, + .clen = 32 + 64, }, { /* RFC 3602 Case 3 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13733,9 +13667,9 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb" "\xd9\xcd\x27\xd8\x25\x68\x2c\x81", .alen = 16, - .input = "This is a 48-byte message (exactly 3 AES blocks)", - .ilen = 48, - .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" + .ptext = "This is a 48-byte message (exactly 3 AES blocks)", + .plen = 48, + .ctext = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" "\xd4\x93\x66\x5d\x33\xf0\xe8\x86" "\x2d\xea\x54\xcd\xb2\x93\xab\xc7" "\x50\x69\x39\x27\x67\x72\xf8\xd5" @@ -13749,7 +13683,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\x08\xea\x29\x6c\x74\x67\x3f\xb0" "\xac\x7f\x5c\x1d\xf5\xee\x22\x66" "\x27\xa6\xb6\x13\xba\xba\xf0\xc2", - .rlen = 48 + 64, + .clen = 48 + 64, }, { /* RFC 3602 Case 4 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13775,7 +13709,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c" "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", .alen = 16, - .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" + .ptext = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" @@ -13783,8 +13717,8 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", - .ilen = 64, - .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" + .plen = 64, + .ctext = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa" "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6" "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e" @@ -13800,7 +13734,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c" "\x62\x98\x14\xd7\x2f\x37\x8d\xdf" "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda", - .rlen = 64 + 64, + .clen = 64 + 64, }, { /* RFC 3602 Case 5 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13827,7 +13761,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xe9\x6e\x8c\x08\xab\x46\x57\x63" "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93", .alen = 24, - .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" + .ptext = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17" @@ -13837,8 +13771,8 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\x30\x31\x32\x33\x34\x35\x36\x37" "\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01", - .ilen = 80, - .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" + .plen = 80, + .ctext = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" "\xa9\x45\x3e\x19\x4e\x12\x08\x49" "\xa4\x87\x0b\x66\xcc\x6b\x99\x65" "\x33\x00\x13\xb4\x89\x8d\xc8\x56" @@ -13856,7 +13790,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\x92\x26\xc1\x76\x20\x11\xeb\xba" "\x62\x4f\x9a\x62\x25\xc3\x75\x80" "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14", - .rlen = 80 + 64, + .clen = 80 + 64, }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13883,7 +13817,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .alen = 16, - .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" + .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" @@ -13891,8 +13825,8 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - .ilen = 64, - .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" + .plen = 64, + .ctext = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" "\x71\x78\x18\x3a\x9f\xa0\x71\xe8" "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4" "\xe5\xe7\x38\x76\x3f\x69\x14\x5a" @@ -13908,7 +13842,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xba\x03\xd5\x32\xfa\x5f\x41\x58" "\x8d\x43\x98\xa7\x94\x16\x07\x02" "\x0f\xb6\x81\x50\x28\x95\x2e\x75", - .rlen = 64 + 64, + .clen = 64 + 64, }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13936,7 +13870,7 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", .alen = 16, - .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" + .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" @@ -13944,8 +13878,8 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", - .ilen = 64, - .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" + .plen = 64, + .ctext = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6" "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d" "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d" @@ -13961,11 +13895,11 @@ static const struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c" "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2" "\x2c\xb1\x62\x2c\x10\xca\xf1\x21", - .rlen = 64 + 64, + .clen = 64 + 64, }, }; -static const struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha1_des_cbc_tv_temp[] = { { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -13984,7 +13918,7 @@ static const struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01" "\x7D\x33\x88\x93\x0F\x93\xB2\x42", .alen = 16, - .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" + .ptext = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" "\x53\x20\x63\x65\x65\x72\x73\x74" "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" "\x20\x79\x65\x53\x72\x63\x74\x65" @@ -14000,8 +13934,8 @@ static const struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { "\x20\x6f\x61\x4d\x79\x6e\x53\x20" "\x63\x65\x65\x72\x73\x74\x54\x20" "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", - .ilen = 128, - .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" + .plen = 128, + .ctext = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" "\x54\x31\x85\x37\xed\x6b\x01\x8d" "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" "\x41\xaa\x33\x91\xa7\x7d\x99\x88" @@ -14020,11 +13954,11 @@ static const struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { "\x95\x16\x20\x09\xf5\x95\x19\xfd" "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa" "\x5c\x44\xa9\x37", - .rlen = 128 + 20, + .clen = 128 + 20, }, }; -static const struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha224_des_cbc_tv_temp[] = { { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -14043,7 +13977,7 @@ static const struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01" "\x7D\x33\x88\x93\x0F\x93\xB2\x42", .alen = 16, - .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" + .ptext = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" "\x53\x20\x63\x65\x65\x72\x73\x74" "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" "\x20\x79\x65\x53\x72\x63\x74\x65" @@ -14059,8 +13993,8 @@ static const struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { "\x20\x6f\x61\x4d\x79\x6e\x53\x20" "\x63\x65\x65\x72\x73\x74\x54\x20" "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", - .ilen = 128, - .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" + .plen = 128, + .ctext = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" "\x54\x31\x85\x37\xed\x6b\x01\x8d" "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" "\x41\xaa\x33\x91\xa7\x7d\x99\x88" @@ -14079,11 +14013,11 @@ static const struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { "\x9c\x2d\x7e\xee\x20\x34\x55\x0a" "\xce\xb5\x4e\x64\x53\xe7\xbf\x91" "\xab\xd4\xd9\xda\xc9\x12\xae\xf7", - .rlen = 128 + 24, + .clen = 128 + 24, }, }; -static const struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha256_des_cbc_tv_temp[] = { { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -14103,7 +14037,7 @@ static const struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01" "\x7D\x33\x88\x93\x0F\x93\xB2\x42", .alen = 16, - .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" + .ptext = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" "\x53\x20\x63\x65\x65\x72\x73\x74" "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" "\x20\x79\x65\x53\x72\x63\x74\x65" @@ -14119,8 +14053,8 @@ static const struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { "\x20\x6f\x61\x4d\x79\x6e\x53\x20" "\x63\x65\x65\x72\x73\x74\x54\x20" "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", - .ilen = 128, - .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" + .plen = 128, + .ctext = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" "\x54\x31\x85\x37\xed\x6b\x01\x8d" "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" "\x41\xaa\x33\x91\xa7\x7d\x99\x88" @@ -14140,11 +14074,11 @@ static const struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e" "\xde\x63\xde\x76\x52\xde\x9f\xba" "\x90\xcf\x15\xf2\xbb\x6e\x84\x00", - .rlen = 128 + 32, + .clen = 128 + 32, }, }; -static const struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { +static const struct aead_testvec hmac_sha384_des_cbc_tv_temp[] = { { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ @@ -14166,7 +14100,7 @@ static const struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01" "\x7D\x33\x88\x93\x0F\x93\xB2\x42", .alen = 16, - .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" + .ptext = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" "\x53\x20\x63\x65\x65\x72\x73\x74" "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" "\x20\x79\x65\x53\x72\x63\x74\x65" @@ -14182,8 +14116,8 @@ static const struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { "\x20\x6f\x61\x4d\x79\x6e\x53\x20" "\x63\x65\x65\x72\x73\x74\x54\x20" "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", - .ilen = 128, - .result = "\x70\ |