summaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-02-01 02:51:46 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-08 02:30:09 -0500
commit4e7babba30d820c4195b1d58cf51dce3c22ecf2b (patch)
tree06905c2fe390c6f34e8489007ca3a7677c77737e /crypto/testmgr.h
parent25f9dddb928aee83effd18d6d3093f6c0beb65a4 (diff)
crypto: testmgr - convert skcipher testing to use testvec_configs
Convert alg_test_skcipher() to use the new test framework, adding a list of testvec_configs to test by default. When the extra self-tests are enabled, randomly generated testvec_configs are tested as well. This improves skcipher test coverage mainly because now all algorithms have a variety of data layouts tested, whereas before each algorithm was responsible for declaring its own chunked test cases which were often missing or provided poor test coverage. The new code also tests both the MAY_SLEEP and !MAY_SLEEP cases, different IV alignments, and buffers that cross pages. This has already found a bug in the arm64 ctr-aes-neonbs algorithm. It would have easily found many past bugs. I removed the skcipher chunked test vectors that were the same as non-chunked ones, but left the ones that were unique. 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.h253
1 files changed, 0 insertions, 253 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index d8f6035c7ff2..1a73af8a79f7 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -52,10 +52,6 @@ struct hash_testvec {
52 * @fail: If set to one, the test need to fail 52 * @fail: If set to one, the test need to fail
53 * @wk: Does the test need CRYPTO_TFM_REQ_FORBID_WEAK_KEYS? 53 * @wk: Does the test need CRYPTO_TFM_REQ_FORBID_WEAK_KEYS?
54 * ( e.g. test needs to fail due to a weak key ) 54 * ( e.g. test needs to fail due to a weak key )
55 * @np: numbers of SG to distribute data in (from 1 to MAX_TAP)
56 * @tap: How to distribute data in @np SGs
57 * @also_non_np: if set to 1, the test will be also done without
58 * splitting data in @np SGs
59 * @fips_skip: Skip the test vector in FIPS mode 55 * @fips_skip: Skip the test vector in FIPS mode
60 * @generates_iv: Encryption should ignore the given IV, and output @iv. 56 * @generates_iv: Encryption should ignore the given IV, and output @iv.
61 * Decryption takes @iv. Needed for AES Keywrap ("kw(aes)"). 57 * Decryption takes @iv. Needed for AES Keywrap ("kw(aes)").
@@ -65,9 +61,6 @@ struct cipher_testvec {
65 const char *iv; 61 const char *iv;
66 const char *ptext; 62 const char *ptext;
67 const char *ctext; 63 const char *ctext;
68 unsigned short tap[MAX_TAP];
69 int np;
70 unsigned char also_non_np;
71 bool fail; 64 bool fail;
72 unsigned char wk; /* weak key flag */ 65 unsigned char wk; /* weak key flag */
73 unsigned char klen; 66 unsigned char klen;
@@ -7011,18 +7004,6 @@ static const struct cipher_testvec des_tv_template[] = {
7011 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d" 7004 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
7012 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b", 7005 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
7013 .len = 16, 7006 .len = 16,
7014 .np = 2,
7015 .tap = { 8, 8 }
7016 }, {
7017 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7018 .klen = 8,
7019 .ptext = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
7020 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
7021 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
7022 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
7023 .len = 16,
7024 .np = 2,
7025 .tap = { 8, 8 }
7026 }, { 7007 }, {
7027 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", 7008 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7028 .klen = 8, 7009 .klen = 8,
@@ -7031,8 +7012,6 @@ static const struct cipher_testvec des_tv_template[] = {
7031 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d" 7012 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
7032 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b", 7013 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
7033 .len = 16, 7014 .len = 16,
7034 .np = 3,
7035 .tap = { 3, 12, 1 }
7036 }, { /* Four blocks -- for testing encryption with chunking */ 7015 }, { /* Four blocks -- for testing encryption with chunking */
7037 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", 7016 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7038 .klen = 8, 7017 .klen = 8,
@@ -7045,38 +7024,6 @@ static const struct cipher_testvec des_tv_template[] = {
7045 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90" 7024 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
7046 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b", 7025 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
7047 .len = 32, 7026 .len = 32,
7048 .np = 3,
7049 .tap = { 14, 10, 8 }
7050 }, {
7051 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7052 .klen = 8,
7053 .ptext = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
7054 "\x22\x33\x44\x55\x66\x77\x88\x99"
7055 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
7056 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
7057 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
7058 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
7059 .len = 24,
7060 .np = 4,
7061 .tap = { 2, 1, 3, 18 }
7062 }, {
7063 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7064 .klen = 8,
7065 .ptext = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
7066 "\x22\x33\x44\x55\x66\x77\x88\x99",
7067 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
7068 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
7069 .len = 16,
7070 .np = 5,
7071 .tap = { 2, 2, 2, 2, 8 }
7072 }, {
7073 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7074 .klen = 8,
7075 .ptext = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
7076 .ctext = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
7077 .len = 8,
7078 .np = 8,
7079 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
7080 }, { /* Generated with Crypto++ */ 7027 }, { /* Generated with Crypto++ */
7081 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", 7028 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
7082 .klen = 8, 7029 .klen = 8,
@@ -7143,9 +7090,6 @@ static const struct cipher_testvec des_tv_template[] = {
7143 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC" 7090 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
7144 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A", 7091 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
7145 .len = 248, 7092 .len = 248,
7146 .also_non_np = 1,
7147 .np = 3,
7148 .tap = { 248 - 10, 2, 8 },
7149 }, 7093 },
7150}; 7094};
7151 7095
@@ -7182,23 +7126,6 @@ static const struct cipher_testvec des_cbc_tv_template[] = {
7182 .ptext = "\x66\x6f\x72\x20\x61\x6c\x6c\x20", 7126 .ptext = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
7183 .ctext = "\x68\x37\x88\x49\x9a\x7c\x05\xf6", 7127 .ctext = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
7184 .len = 8, 7128 .len = 8,
7185 .np = 2,
7186 .tap = { 4, 4 },
7187 .also_non_np = 1,
7188 }, { /* Copy of openssl vector for chunk testing */
7189 /* From OpenSSL */
7190 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
7191 .klen = 8,
7192 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
7193 .ptext = "\x37\x36\x35\x34\x33\x32\x31\x20"
7194 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
7195 "\x68\x65\x20\x74\x69\x6d\x65\x20",
7196 .ctext = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
7197 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
7198 "\x46\x8e\x91\x15\x78\x88\xba\x68",
7199 .len = 24,
7200 .np = 2,
7201 .tap = { 13, 11 }
7202 }, { /* Generated with Crypto++ */ 7129 }, { /* Generated with Crypto++ */
7203 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", 7130 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
7204 .klen = 8, 7131 .klen = 8,
@@ -7266,9 +7193,6 @@ static const struct cipher_testvec des_cbc_tv_template[] = {
7266 "\x82\xA9\xBD\x6A\x31\x91\x39\x11" 7193 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
7267 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63", 7194 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
7268 .len = 248, 7195 .len = 248,
7269 .also_non_np = 1,
7270 .np = 3,
7271 .tap = { 248 - 10, 2, 8 },
7272 }, 7196 },
7273}; 7197};
7274 7198
@@ -7340,9 +7264,6 @@ static const struct cipher_testvec des_ctr_tv_template[] = {
7340 "\x19\x7F\x99\x19\x53\xCE\x1D\x14" 7264 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
7341 "\x69\x74\xA1\x06\x46\x0F\x4E\x75", 7265 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
7342 .len = 248, 7266 .len = 248,
7343 .also_non_np = 1,
7344 .np = 3,
7345 .tap = { 248 - 10, 2, 8 },
7346 }, { /* Generated with Crypto++ */ 7267 }, { /* Generated with Crypto++ */
7347 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", 7268 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
7348 .klen = 8, 7269 .klen = 8,
@@ -7410,9 +7331,6 @@ static const struct cipher_testvec des_ctr_tv_template[] = {
7410 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37" 7331 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
7411 "\x91\x45\x05\x3E\x58\xBF\x32", 7332 "\x91\x45\x05\x3E\x58\xBF\x32",
7412 .len = 247, 7333 .len = 247,
7413 .also_non_np = 1,
7414 .np = 2,
7415 .tap = { 247 - 8, 8 },
7416 }, 7334 },
7417}; 7335};
7418 7336
@@ -7571,9 +7489,6 @@ static const struct cipher_testvec des3_ede_tv_template[] = {
7571 "\x93\x03\xD7\x51\x09\xFA\xBE\x68" 7489 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
7572 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63", 7490 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
7573 .len = 496, 7491 .len = 496,
7574 .also_non_np = 1,
7575 .np = 3,
7576 .tap = { 496 - 20, 4, 16 },
7577 }, 7492 },
7578}; 7493};
7579 7494
@@ -7749,9 +7664,6 @@ static const struct cipher_testvec des3_ede_cbc_tv_template[] = {
7749 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F" 7664 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
7750 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5", 7665 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
7751 .len = 496, 7666 .len = 496,
7752 .also_non_np = 1,
7753 .np = 3,
7754 .tap = { 496 - 20, 4, 16 },
7755 }, 7667 },
7756}; 7668};
7757 7669
@@ -7888,9 +7800,6 @@ static const struct cipher_testvec des3_ede_ctr_tv_template[] = {
7888 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78" 7800 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
7889 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34", 7801 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
7890 .len = 496, 7802 .len = 496,
7891 .also_non_np = 1,
7892 .np = 3,
7893 .tap = { 496 - 20, 4, 16 },
7894 }, { /* Generated with Crypto++ */ 7803 }, { /* Generated with Crypto++ */
7895 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00" 7804 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
7896 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE" 7805 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
@@ -8025,9 +7934,6 @@ static const struct cipher_testvec des3_ede_ctr_tv_template[] = {
8025 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B" 7934 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
8026 "\xF2\x79\xD9", 7935 "\xF2\x79\xD9",
8027 .len = 499, 7936 .len = 499,
8028 .also_non_np = 1,
8029 .np = 2,
8030 .tap = { 499 - 16, 16 },
8031 }, 7937 },
8032}; 7938};
8033 7939
@@ -8213,9 +8119,6 @@ static const struct cipher_testvec bf_tv_template[] = {
8213 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5" 8119 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
8214 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4", 8120 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
8215 .len = 504, 8121 .len = 504,
8216 .also_non_np = 1,
8217 .np = 3,
8218 .tap = { 504 - 10, 2, 8 },
8219 }, 8122 },
8220}; 8123};
8221 8124
@@ -8368,9 +8271,6 @@ static const struct cipher_testvec bf_cbc_tv_template[] = {
8368 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0" 8271 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
8369 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4", 8272 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
8370 .len = 504, 8273 .len = 504,
8371 .also_non_np = 1,
8372 .np = 3,
8373 .tap = { 504 - 10, 2, 8 },
8374 }, 8274 },
8375}; 8275};
8376 8276
@@ -8643,9 +8543,6 @@ static const struct cipher_testvec bf_ctr_tv_template[] = {
8643 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2" 8543 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
8644 "\xF3\x71\xEF\xEB\x4E\xBB\x4D", 8544 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
8645 .len = 503, 8545 .len = 503,
8646 .also_non_np = 1,
8647 .np = 2,
8648 .tap = { 503 - 8, 8 },
8649 }, { /* Generated with Crypto++ */ 8546 }, { /* Generated with Crypto++ */
8650 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" 8547 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8651 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" 8548 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
@@ -8944,9 +8841,6 @@ static const struct cipher_testvec tf_tv_template[] = {
8944 "\x58\x33\x9B\x78\xC7\x58\x48\x6B" 8841 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
8945 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5", 8842 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
8946 .len = 496, 8843 .len = 496,
8947 .also_non_np = 1,
8948 .np = 3,
8949 .tap = { 496 - 20, 4, 16 },
8950 }, 8844 },
8951}; 8845};
8952 8846
@@ -9122,9 +9016,6 @@ static const struct cipher_testvec tf_cbc_tv_template[] = {
9122 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0" 9016 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
9123 "\x0A\xA3\x30\x10\x26\x25\x41\x2C", 9017 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
9124 .len = 496, 9018 .len = 496,
9125 .also_non_np = 1,
9126 .np = 3,
9127 .tap = { 496 - 20, 4, 16 },
9128 }, 9019 },
9129}; 9020};
9130 9021
@@ -9530,9 +9421,6 @@ static const struct cipher_testvec tf_ctr_tv_template[] = {
9530 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF" 9421 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
9531 "\x6C\x82\x9D", 9422 "\x6C\x82\x9D",
9532 .len = 499, 9423 .len = 499,
9533 .also_non_np = 1,
9534 .np = 2,
9535 .tap = { 499 - 16, 16 },
9536 }, 9424 },
9537}; 9425};
9538 9426
@@ -9774,9 +9662,6 @@ static const struct cipher_testvec tf_lrw_tv_template[] = {
9774 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba" 9662 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9775 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30", 9663 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9776 .len = 512, 9664 .len = 512,
9777 .also_non_np = 1,
9778 .np = 3,
9779 .tap = { 512 - 20, 4, 16 },
9780 }, 9665 },
9781}; 9666};
9782 9667
@@ -10111,9 +9996,6 @@ static const struct cipher_testvec tf_xts_tv_template[] = {
10111 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97" 9996 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
10112 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff", 9997 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
10113 .len = 512, 9998 .len = 512,
10114 .also_non_np = 1,
10115 .np = 3,
10116 .tap = { 512 - 20, 4, 16 },
10117 }, 9999 },
10118}; 10000};
10119 10001
@@ -10286,9 +10168,6 @@ static const struct cipher_testvec serpent_tv_template[] = {
10286 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C" 10168 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10287 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7", 10169 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10288 .len = 496, 10170 .len = 496,
10289 .also_non_np = 1,
10290 .np = 3,
10291 .tap = { 496 - 20, 4, 16 },
10292 }, 10171 },
10293}; 10172};
10294 10173
@@ -10505,9 +10384,6 @@ static const struct cipher_testvec serpent_cbc_tv_template[] = {
10505 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B" 10384 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10506 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1", 10385 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10507 .len = 496, 10386 .len = 496,
10508 .also_non_np = 1,
10509 .np = 3,
10510 .tap = { 496 - 20, 4, 16 },
10511 }, 10387 },
10512}; 10388};
10513 10389
@@ -10780,9 +10656,6 @@ static const struct cipher_testvec serpent_ctr_tv_template[] = {
10780 "\x40\x53\x77\x8C\x15\xF8\x8D\x13" 10656 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10781 "\x38\xE2\xE5", 10657 "\x38\xE2\xE5",
10782 .len = 499, 10658 .len = 499,
10783 .also_non_np = 1,
10784 .np = 2,
10785 .tap = { 499 - 16, 16 },
10786 }, { /* Generated with Crypto++ */ 10659 }, { /* Generated with Crypto++ */
10787 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" 10660 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10788 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" 10661 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
@@ -11157,9 +11030,6 @@ static const struct cipher_testvec serpent_lrw_tv_template[] = {
11157 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd" 11030 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11158 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7", 11031 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11159 .len = 512, 11032 .len = 512,
11160 .also_non_np = 1,
11161 .np = 3,
11162 .tap = { 512 - 20, 4, 16 },
11163 }, 11033 },
11164}; 11034};
11165 11035
@@ -11494,9 +11364,6 @@ static const struct cipher_testvec serpent_xts_tv_template[] = {
11494 "\xaf\x43\x0b\xc5\x20\x41\x92\x20" 11364 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
11495 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1", 11365 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
11496 .len = 512, 11366 .len = 512,
11497 .also_non_np = 1,
11498 .np = 3,
11499 .tap = { 512 - 20, 4, 16 },
11500 }, 11367 },
11501}; 11368};
11502 11369
@@ -11836,9 +11703,6 @@ static const struct cipher_testvec cast6_tv_template[] = {
11836 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2" 11703 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
11837 "\x11\x74\x93\x57\xB4\x7E\xC6\x00", 11704 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
11838 .len = 496, 11705 .len = 496,
11839 .also_non_np = 1,
11840 .np = 3,
11841 .tap = { 496 - 20, 4, 16 },
11842 }, 11706 },
11843}; 11707};
11844 11708
@@ -11976,9 +11840,6 @@ static const struct cipher_testvec cast6_cbc_tv_template[] = {
11976 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92" 11840 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
11977 "\x22\x46\x89\x2D\x0F\x2B\x08\x24", 11841 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
11978 .len = 496, 11842 .len = 496,
11979 .also_non_np = 1,
11980 .np = 3,
11981 .tap = { 496 - 20, 4, 16 },
11982 }, 11843 },
11983}; 11844};
11984 11845
@@ -12131,9 +11992,6 @@ static const struct cipher_testvec cast6_ctr_tv_template[] = {
12131 "\x0E\x74\x33\x30\x62\xB9\x89\xDF" 11992 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
12132 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB", 11993 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
12133 .len = 496, 11994 .len = 496,
12134 .also_non_np = 1,
12135 .np = 3,
12136 .tap = { 496 - 20, 4, 16 },
12137 }, 11995 },
12138}; 11996};
12139 11997
@@ -12277,9 +12135,6 @@ static const struct cipher_testvec cast6_lrw_tv_template[] = {
12277 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7" 12135 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
12278 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46", 12136 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
12279 .len = 512, 12137 .len = 512,
12280 .also_non_np = 1,
12281 .np = 3,
12282 .tap = { 512 - 20, 4, 16 },
12283 }, 12138 },
12284}; 12139};
12285 12140
@@ -12425,9 +12280,6 @@ static const struct cipher_testvec cast6_xts_tv_template[] = {
12425 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC" 12280 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
12426 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9", 12281 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
12427 .len = 512, 12282 .len = 512,
12428 .also_non_np = 1,
12429 .np = 3,
12430 .tap = { 512 - 20, 4, 16 },
12431 }, 12283 },
12432}; 12284};
12433 12285
@@ -12596,9 +12448,6 @@ static const struct cipher_testvec aes_tv_template[] = {
12596 "\x09\x79\xA0\x43\x5C\x0D\x08\x58" 12448 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
12597 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9", 12449 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
12598 .len = 496, 12450 .len = 496,
12599 .also_non_np = 1,
12600 .np = 3,
12601 .tap = { 496 - 20, 4, 16 },
12602 }, 12451 },
12603}; 12452};
12604 12453
@@ -12613,9 +12462,6 @@ static const struct cipher_testvec aes_cbc_tv_template[] = {
12613 .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" 12462 .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
12614 "\x27\x08\x94\x2d\xbe\x77\x18\x1a", 12463 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
12615 .len = 16, 12464 .len = 16,
12616 .also_non_np = 1,
12617 .np = 8,
12618 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
12619 }, { 12465 }, {
12620 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0" 12466 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
12621 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a", 12467 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
@@ -12813,9 +12659,6 @@ static const struct cipher_testvec aes_cbc_tv_template[] = {
12813 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65" 12659 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
12814 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02", 12660 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
12815 .len = 496, 12661 .len = 496,
12816 .also_non_np = 1,
12817 .np = 3,
12818 .tap = { 496 - 20, 4, 16 },
12819 }, 12662 },
12820}; 12663};
12821 12664
@@ -12892,9 +12735,6 @@ static const struct cipher_testvec aes_cfb_tv_template[] = {
12892 "\x75\xa3\x85\x74\x1a\xb9\xce\xf8" 12735 "\x75\xa3\x85\x74\x1a\xb9\xce\xf8"
12893 "\x20\x31\x62\x3d\x55\xb1\xe4\x71", 12736 "\x20\x31\x62\x3d\x55\xb1\xe4\x71",
12894 .len = 64, 12737 .len = 64,
12895 .also_non_np = 1,
12896 .np = 2,
12897 .tap = { 31, 33 },
12898 }, { /* > 16 bytes, not a multiple of 16 bytes */ 12738 }, { /* > 16 bytes, not a multiple of 16 bytes */
12899 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" 12739 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
12900 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", 12740 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
@@ -14795,9 +14635,6 @@ static const struct cipher_testvec aes_lrw_tv_template[] = {
14795 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7" 14635 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
14796 "\x74\x3f\x7d\x58\x88\x75\xde\x3e", 14636 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
14797 .len = 512, 14637 .len = 512,
14798 .also_non_np = 1,
14799 .np = 3,
14800 .tap = { 512 - 20, 4, 16 },
14801 } 14638 }
14802}; 14639};
14803 14640
@@ -15133,9 +14970,6 @@ static const struct cipher_testvec aes_xts_tv_template[] = {
15133 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70" 14970 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
15134 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51", 14971 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
15135 .len = 512, 14972 .len = 512,
15136 .also_non_np = 1,
15137 .np = 3,
15138 .tap = { 512 - 20, 4, 16 },
15139 } 14973 }
15140}; 14974};
15141 14975
@@ -15345,9 +15179,6 @@ static const struct cipher_testvec aes_ctr_tv_template[] = {
15345 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE" 15179 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
15346 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51", 15180 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
15347 .len = 496, 15181 .len = 496,
15348 .also_non_np = 1,
15349 .np = 3,
15350 .tap = { 496 - 20, 4, 16 },
15351 }, { /* Generated with Crypto++ */ 15182 }, { /* Generated with Crypto++ */
15352 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55" 15183 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15353 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B" 15184 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
@@ -15483,9 +15314,6 @@ static const struct cipher_testvec aes_ctr_tv_template[] = {
15483 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76" 15314 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
15484 "\xFB\xF2\x3F", 15315 "\xFB\xF2\x3F",
15485 .len = 499, 15316 .len = 499,
15486 .also_non_np = 1,
15487 .np = 2,
15488 .tap = { 499 - 16, 16 },
15489 }, 15317 },
15490}; 15318};
15491 15319
@@ -16609,8 +16437,6 @@ static const struct cipher_testvec aes_ctr_rfc3686_tv_template[] = {
16609 "\x4b\xef\x31\x18\xea\xac\xb1\x84" 16437 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
16610 "\x21\xed\xda\x86", 16438 "\x21\xed\xda\x86",
16611 .len = 4100, 16439 .len = 4100,
16612 .np = 2,
16613 .tap = { 4064, 36 },
16614 }, 16440 },
16615}; 16441};
16616 16442
@@ -16638,9 +16464,6 @@ static const struct cipher_testvec aes_ofb_tv_template[] = {
16638 "\x30\x4c\x65\x28\xf6\x59\xc7\x78" 16464 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
16639 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e", 16465 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
16640 .len = 64, 16466 .len = 64,
16641 .also_non_np = 1,
16642 .np = 2,
16643 .tap = { 31, 33 },
16644 }, { /* > 16 bytes, not a multiple of 16 bytes */ 16467 }, { /* > 16 bytes, not a multiple of 16 bytes */
16645 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" 16468 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
16646 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", 16469 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
@@ -23174,9 +22997,6 @@ static const struct cipher_testvec cast5_tv_template[] = {
23174 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57" 22997 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23175 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C", 22998 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23176 .len = 496, 22999 .len = 496,
23177 .also_non_np = 1,
23178 .np = 3,
23179 .tap = { 496 - 20, 4, 16 },
23180 }, 23000 },
23181}; 23001};
23182 23002
@@ -23311,9 +23131,6 @@ static const struct cipher_testvec cast5_cbc_tv_template[] = {
23311 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6" 23131 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
23312 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB", 23132 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
23313 .len = 496, 23133 .len = 496,
23314 .also_non_np = 1,
23315 .np = 3,
23316 .tap = { 496 - 20, 4, 16 },
23317 }, 23134 },
23318}; 23135};
23319 23136
@@ -23460,9 +23277,6 @@ static const struct cipher_testvec cast5_ctr_tv_template[] = {
23460 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA" 23277 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
23461 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13", 23278 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
23462 .len = 496, 23279 .len = 496,
23463 .also_non_np = 1,
23464 .np = 3,
23465 .tap = { 496 - 20, 4, 16 },
23466 }, 23280 },
23467}; 23281};
23468 23282
@@ -23835,20 +23649,6 @@ static const struct cipher_testvec fcrypt_pcbc_tv_template[] = {
23835 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94" 23649 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
23836 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f", 23650 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
23837 .len = 48, 23651 .len = 48,
23838 }, { /* split-page version */
23839 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
23840 .klen = 8,
23841 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
23842 .ptext = "The quick brown fox jumps over the lazy dogs.\0\0",
23843 .ctext = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
23844 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
23845 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
23846 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
23847 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
23848 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
23849 .len = 48,
23850 .np = 2,
23851 .tap = { 20, 28 },
23852 } 23652 }
23853}; 23653};
23854 23654
@@ -24145,9 +23945,6 @@ static const struct cipher_testvec camellia_tv_template[] = {
24145 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55" 23945 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
24146 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66", 23946 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
24147 .len = 1008, 23947 .len = 1008,
24148 .also_non_np = 1,
24149 .np = 3,
24150 .tap = { 1008 - 20, 4, 16 },
24151 }, 23948 },
24152}; 23949};
24153 23950
@@ -24438,9 +24235,6 @@ static const struct cipher_testvec camellia_cbc_tv_template[] = {
24438 "\x55\x01\xD4\x58\xB2\xF2\x85\x49" 24235 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
24439 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C", 24236 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
24440 .len = 1008, 24237 .len = 1008,
24441 .also_non_np = 1,
24442 .np = 3,
24443 .tap = { 1008 - 20, 4, 16 },
24444 }, 24238 },
24445}; 24239};
24446 24240
@@ -24841,9 +24635,6 @@ static const struct cipher_testvec camellia_ctr_tv_template[] = {
24841 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C" 24635 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
24842 "\xF1\x6B\xD9", 24636 "\xF1\x6B\xD9",
24843 .len = 1011, 24637 .len = 1011,
24844 .also_non_np = 1,
24845 .np = 2,
24846 .tap = { 1011 - 16, 16 },
24847 }, { /* Generated with Crypto++ */ 24638 }, { /* Generated with Crypto++ */
24848 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" 24639 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24849 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" 24640 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
@@ -25346,9 +25137,6 @@ static const struct cipher_testvec camellia_lrw_tv_template[] = {
25346 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9" 25137 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
25347 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95", 25138 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
25348 .len = 512, 25139 .len = 512,
25349 .also_non_np = 1,
25350 .np = 3,
25351 .tap = { 512 - 20, 4, 16 },
25352 }, 25140 },
25353}; 25141};
25354 25142
@@ -25683,9 +25471,6 @@ static const struct cipher_testvec camellia_xts_tv_template[] = {
25683 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e" 25471 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
25684 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95", 25472 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
25685 .len = 512, 25473 .len = 512,
25686 .also_non_np = 1,
25687 .np = 3,
25688 .tap = { 512 - 20, 4, 16 },
25689 }, 25474 },
25690}; 25475};
25691 25476
@@ -26889,8 +26674,6 @@ static const struct cipher_testvec salsa20_stream_tv_template[] = {
26889 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8" 26674 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
26890 "\xaf\xdf\x11\x95", 26675 "\xaf\xdf\x11\x95",
26891 .len = 4100, 26676 .len = 4100,
26892 .np = 2,
26893 .tap = { 4064, 36 },
26894 }, 26677 },
26895}; 26678};
26896 26679
@@ -27023,9 +26806,6 @@ static const struct cipher_testvec chacha20_tv_template[] = {
27023 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd" 26806 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
27024 "\xc4\xfd\x80\x6c\x22\xf2\x21", 26807 "\xc4\xfd\x80\x6c\x22\xf2\x21",
27025 .len = 375, 26808 .len = 375,
27026 .also_non_np = 1,
27027 .np = 3,
27028 .tap = { 375 - 20, 4, 16 },
27029 26809
27030 }, { /* RFC7539 A.2. Test Vector #3 */ 26810 }, { /* RFC7539 A.2. Test Vector #3 */
27031 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" 26811 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
@@ -27399,9 +27179,6 @@ static const struct cipher_testvec chacha20_tv_template[] = {
27399 "\xa1\xed\xad\xd5\x76\xfa\x24\x8f" 27179 "\xa1\xed\xad\xd5\x76\xfa\x24\x8f"
27400 "\x98", 27180 "\x98",
27401 .len = 1281, 27181 .len = 1281,
27402 .also_non_np = 1,
27403 .np = 3,
27404 .tap = { 1200, 1, 80 },
27405 }, 27182 },
27406}; 27183};
27407 27184
@@ -27594,9 +27371,6 @@ static const struct cipher_testvec xchacha20_tv_template[] = {
27594 "\xab\xff\x1f\x12\xc3\xee\xe5\x65" 27371 "\xab\xff\x1f\x12\xc3\xee\xe5\x65"
27595 "\x12\x8d\x7b\x61\xe5\x1f\x98", 27372 "\x12\x8d\x7b\x61\xe5\x1f\x98",
27596 .len = 375, 27373 .len = 375,
27597 .also_non_np = 1,
27598 .np = 3,
27599 .tap = { 375 - 20, 4, 16 },
27600 27374
27601 }, { /* Derived from a ChaCha20 test vector, via the process above */ 27375 }, { /* Derived from a ChaCha20 test vector, via the process above */
27602 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" 27376 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
@@ -27974,9 +27748,6 @@ static const struct cipher_testvec xchacha20_tv_template[] = {
27974 "\xba\xd0\x34\xc9\x2d\x91\xc5\x17" 27748 "\xba\xd0\x34\xc9\x2d\x91\xc5\x17"
27975 "\x11", 27749 "\x11",
27976 .len = 1281, 27750 .len = 1281,
27977 .also_non_np = 1,
27978 .np = 3,
27979 .tap = { 1200, 1, 80 },
27980 }, { /* test vector from https://tools.ietf.org/html/draft-arciszewski-xchacha-02#appendix-A.3.2 */ 27751 }, { /* test vector from https://tools.ietf.org/html/draft-arciszewski-xchacha-02#appendix-A.3.2 */
27981 .key = "\x80\x81\x82\x83\x84\x85\x86\x87" 27752 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
27982 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" 27753 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
@@ -28259,9 +28030,6 @@ static const struct cipher_testvec xchacha12_tv_template[] = {
28259 "\xda\x4e\xc9\xab\x9b\x8a\x7b", 28030 "\xda\x4e\xc9\xab\x9b\x8a\x7b",
28260 28031
28261 .len = 375, 28032 .len = 375,
28262 .also_non_np = 1,
28263 .np = 3,
28264 .tap = { 375 - 20, 4, 16 },
28265 28033
28266 }, { 28034 }, {
28267 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" 28035 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
@@ -28639,9 +28407,6 @@ static const struct cipher_testvec xchacha12_tv_template[] = {
28639 "\xf0\xfc\x5e\x1c\xf1\xf5\xf9\xf3" 28407 "\xf0\xfc\x5e\x1c\xf1\xf5\xf9\xf3"
28640 "\x5b", 28408 "\x5b",
28641 .len = 1281, 28409 .len = 1281,
28642 .also_non_np = 1,
28643 .np = 3,
28644 .tap = { 1200, 1, 80 },
28645 }, { 28410 }, {
28646 .key = "\x80\x81\x82\x83\x84\x85\x86\x87" 28411 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
28647 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" 28412 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
@@ -28749,9 +28514,6 @@ static const struct cipher_testvec adiantum_xchacha12_aes_tv_template[] = {
28749 .ctext = "\x6d\x32\x86\x18\x67\x86\x0f\x3f" 28514 .ctext = "\x6d\x32\x86\x18\x67\x86\x0f\x3f"
28750 "\x96\x7c\x9d\x28\x0d\x53\xec\x9f", 28515 "\x96\x7c\x9d\x28\x0d\x53\xec\x9f",
28751 .len = 16, 28516 .len = 16,
28752 .also_non_np = 1,
28753 .np = 2,
28754 .tap = { 14, 2 },
28755 }, { 28517 }, {
28756 .key = "\x36\x2b\x57\x97\xf8\x5d\xcd\x99" 28518 .key = "\x36\x2b\x57\x97\xf8\x5d\xcd\x99"
28757 "\x5f\x1a\x5a\x44\x1d\x92\x0f\x27" 28519 "\x5f\x1a\x5a\x44\x1d\x92\x0f\x27"
@@ -28814,9 +28576,6 @@ static const struct cipher_testvec adiantum_xchacha12_aes_tv_template[] = {
28814 "\x74\xa6\xaa\xa3\xac\xdc\xc2\xf5" 28576 "\x74\xa6\xaa\xa3\xac\xdc\xc2\xf5"
28815 "\x8d\xde\x34\x86\x78\x60\x75\x8d", 28577 "\x8d\xde\x34\x86\x78\x60\x75\x8d",
28816 .len = 128, 28578 .len = 128,
28817 .also_non_np = 1,
28818 .np = 4,
28819 .tap = { 104, 16, 4, 4 },
28820 }, { 28579 }, {
28821 .key = "\xd3\x81\x72\x18\x23\xff\x6f\x4a" 28580 .key = "\xd3\x81\x72\x18\x23\xff\x6f\x4a"
28822 "\x25\x74\x29\x0d\x51\x8a\x0e\x13" 28581 "\x25\x74\x29\x0d\x51\x8a\x0e\x13"
@@ -28956,9 +28715,6 @@ static const struct cipher_testvec adiantum_xchacha12_aes_tv_template[] = {
28956 "\x21\xb0\x21\x52\xba\xa7\x37\xaa" 28715 "\x21\xb0\x21\x52\xba\xa7\x37\xaa"
28957 "\xcc\xbf\x95\xa8\xf4\xd0\x91\xf6", 28716 "\xcc\xbf\x95\xa8\xf4\xd0\x91\xf6",
28958 .len = 512, 28717 .len = 512,
28959 .also_non_np = 1,
28960 .np = 2,
28961 .tap = { 144, 368 },
28962 } 28718 }
28963}; 28719};
28964 28720
@@ -28980,9 +28736,6 @@ static const struct cipher_testvec adiantum_xchacha20_aes_tv_template[] = {
28980 .ctext = "\xf6\x78\x97\xd6\xaa\x94\x01\x27" 28736 .ctext = "\xf6\x78\x97\xd6\xaa\x94\x01\x27"
28981 "\x2e\x4d\x83\xe0\x6e\x64\x9a\xdf", 28737 "\x2e\x4d\x83\xe0\x6e\x64\x9a\xdf",
28982 .len = 16, 28738 .len = 16,
28983 .also_non_np = 1,
28984 .np = 3,
28985 .tap = { 5, 2, 9 },
28986 }, { 28739 }, {
28987 .key = "\x36\x2b\x57\x97\xf8\x5d\xcd\x99" 28740 .key = "\x36\x2b\x57\x97\xf8\x5d\xcd\x99"
28988 "\x5f\x1a\x5a\x44\x1d\x92\x0f\x27" 28741 "\x5f\x1a\x5a\x44\x1d\x92\x0f\x27"
@@ -29002,9 +28755,6 @@ static const struct cipher_testvec adiantum_xchacha20_aes_tv_template[] = {
29002 "\x57\x72\xb5\xfd\xb5\x5d\xb8\x28" 28755 "\x57\x72\xb5\xfd\xb5\x5d\xb8\x28"
29003 "\x0c\x04\x91\x14\x91\xe9\x37", 28756 "\x0c\x04\x91\x14\x91\xe9\x37",
29004 .len = 31, 28757 .len = 31,
29005 .also_non_np = 1,
29006 .np = 2,
29007 .tap = { 16, 15 },
29008 }, { 28758 }, {
29009 .key = "\xa5\x28\x24\x34\x1a\x3c\xd8\xf7" 28759 .key = "\xa5\x28\x24\x34\x1a\x3c\xd8\xf7"
29010 "\x05\x91\x8f\xee\x85\x1f\x35\x7f" 28760 "\x05\x91\x8f\xee\x85\x1f\x35\x7f"
@@ -29048,9 +28798,6 @@ static const struct cipher_testvec adiantum_xchacha20_aes_tv_template[] = {
29048 "\x29\x62\x0d\xb2\xf6\x3c\x58\x57" 28798 "\x29\x62\x0d\xb2\xf6\x3c\x58\x57"
29049 "\xc1\xd5\x5a\xbb\xd6\xa6\x2a\xe5", 28799 "\xc1\xd5\x5a\xbb\xd6\xa6\x2a\xe5",
29050 .len = 128, 28800 .len = 128,
29051 .also_non_np = 1,
29052 .np = 4,
29053 .tap = { 112, 7, 8, 1 },
29054 }, { 28801 }, {
29055 .key = "\xd3\x81\x72\x18\x23\xff\x6f\x4a" 28802 .key = "\xd3\x81\x72\x18\x23\xff\x6f\x4a"
29056 "\x25\x74\x29\x0d\x51\x8a\x0e\x13" 28803 "\x25\x74\x29\x0d\x51\x8a\x0e\x13"