aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2012-09-19 02:42:49 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2012-09-27 01:32:16 -0400
commitf44d83d19d8fde77bc499131bc9c0bc8583785c8 (patch)
tree690b40a72aac42019e5f302abce46c0c54e35af8 /crypto
parenta5bbf6fa79abe0cb64aaebc3455f9ba779d6a36f (diff)
crypto: testmgr - allow non-multi page and multi page skcipher tests from same test template
Allow non-multi page and multi page skcipher tests to be run on same test template, to avoid duplicating data. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c2
-rw-r--r--crypto/testmgr.h170
2 files changed, 170 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 575b57c3244b..8183777a49b6 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -804,7 +804,7 @@ static int test_skcipher(struct crypto_ablkcipher *tfm, int enc,
804 else 804 else
805 memset(iv, 0, MAX_IVLEN); 805 memset(iv, 0, MAX_IVLEN);
806 806
807 if (!(template[i].np)) { 807 if (!(template[i].np) || (template[i].also_non_np)) {
808 j++; 808 j++;
809 809
810 ret = -EINVAL; 810 ret = -EINVAL;
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 6eb3ef5e3f88..70984f5341e2 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -53,6 +53,7 @@ struct cipher_testvec {
53 char *result; 53 char *result;
54 unsigned short tap[MAX_TAP]; 54 unsigned short tap[MAX_TAP];
55 int np; 55 int np;
56 unsigned char also_non_np;
56 unsigned char fail; 57 unsigned char fail;
57 unsigned char wk; /* weak key flag */ 58 unsigned char wk; /* weak key flag */
58 unsigned char klen; 59 unsigned char klen;
@@ -2468,6 +2469,9 @@ static struct cipher_testvec bf_enc_tv_template[] = {
2468 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40" 2469 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2469 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B", 2470 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2470 .rlen = 40, 2471 .rlen = 40,
2472 .also_non_np = 1,
2473 .np = 2,
2474 .tap = { 40 - 8, 8 },
2471 }, 2475 },
2472}; 2476};
2473 2477
@@ -2541,6 +2545,9 @@ static struct cipher_testvec bf_dec_tv_template[] = {
2541 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87" 2545 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2542 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9", 2546 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2543 .rlen = 40, 2547 .rlen = 40,
2548 .also_non_np = 1,
2549 .np = 2,
2550 .tap = { 40 - 8, 8 },
2544 }, 2551 },
2545}; 2552};
2546 2553
@@ -2579,6 +2586,9 @@ static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2579 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25" 2586 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2580 "\x01\x9C\x93\x63\x51\x60\x82\xD2", 2587 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2581 .rlen = 40, 2588 .rlen = 40,
2589 .also_non_np = 1,
2590 .np = 2,
2591 .tap = { 40 - 8, 8 },
2582 }, 2592 },
2583}; 2593};
2584 2594
@@ -2617,6 +2627,9 @@ static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2617 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87" 2627 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2618 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9", 2628 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2619 .rlen = 40, 2629 .rlen = 40,
2630 .also_non_np = 1,
2631 .np = 2,
2632 .tap = { 40 - 8, 8 },
2620 }, 2633 },
2621}; 2634};
2622 2635
@@ -2661,6 +2674,9 @@ static struct cipher_testvec bf_ctr_enc_tv_template[] = {
2661 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC" 2674 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2662 "\x3D\xA7\xE9", 2675 "\x3D\xA7\xE9",
2663 .rlen = 43, 2676 .rlen = 43,
2677 .also_non_np = 1,
2678 .np = 2,
2679 .tap = { 43 - 8, 8 },
2664 }, 2680 },
2665}; 2681};
2666 2682
@@ -2705,6 +2721,9 @@ static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2705 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9" 2721 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2706 "\x6D\x04\x9B", 2722 "\x6D\x04\x9B",
2707 .rlen = 43, 2723 .rlen = 43,
2724 .also_non_np = 1,
2725 .np = 2,
2726 .tap = { 43 - 8, 8 },
2708 }, 2727 },
2709}; 2728};
2710 2729
@@ -2884,6 +2903,9 @@ static struct cipher_testvec tf_enc_tv_template[] = {
2884 "\x58\x33\x9B\x78\xC7\x58\x48\x6B" 2903 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
2885 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5", 2904 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
2886 .rlen = 496, 2905 .rlen = 496,
2906 .also_non_np = 1,
2907 .np = 2,
2908 .tap = { 496 - 16, 16 },
2887 }, 2909 },
2888}; 2910};
2889 2911
@@ -3049,6 +3071,9 @@ static struct cipher_testvec tf_dec_tv_template[] = {
3049 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 3071 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3050 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 3072 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3051 .rlen = 496, 3073 .rlen = 496,
3074 .also_non_np = 1,
3075 .np = 2,
3076 .tap = { 496 - 16, 16 },
3052 }, 3077 },
3053}; 3078};
3054 3079
@@ -3229,6 +3254,9 @@ static struct cipher_testvec tf_cbc_enc_tv_template[] = {
3229 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0" 3254 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3230 "\x0A\xA3\x30\x10\x26\x25\x41\x2C", 3255 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3231 .rlen = 496, 3256 .rlen = 496,
3257 .also_non_np = 1,
3258 .np = 2,
3259 .tap = { 496 - 16, 16 },
3232 }, 3260 },
3233}; 3261};
3234 3262
@@ -3409,6 +3437,9 @@ static struct cipher_testvec tf_cbc_dec_tv_template[] = {
3409 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 3437 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3410 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 3438 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3411 .rlen = 496, 3439 .rlen = 496,
3440 .also_non_np = 1,
3441 .np = 2,
3442 .tap = { 496 - 16, 16 },
3412 }, 3443 },
3413}; 3444};
3414 3445
@@ -3683,6 +3714,9 @@ static struct cipher_testvec tf_ctr_enc_tv_template[] = {
3683 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF" 3714 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
3684 "\x6C\x82\x9D", 3715 "\x6C\x82\x9D",
3685 .rlen = 499, 3716 .rlen = 499,
3717 .also_non_np = 1,
3718 .np = 2,
3719 .tap = { 499 - 16, 16 },
3686 }, 3720 },
3687}; 3721};
3688 3722
@@ -3957,6 +3991,9 @@ static struct cipher_testvec tf_ctr_dec_tv_template[] = {
3957 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7" 3991 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3958 "\x2B\xC2\x59", 3992 "\x2B\xC2\x59",
3959 .rlen = 499, 3993 .rlen = 499,
3994 .also_non_np = 1,
3995 .np = 2,
3996 .tap = { 499 - 16, 16 },
3960 }, 3997 },
3961}; 3998};
3962 3999
@@ -4206,6 +4243,9 @@ static struct cipher_testvec tf_lrw_enc_tv_template[] = {
4206 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba" 4243 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
4207 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30", 4244 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
4208 .rlen = 512, 4245 .rlen = 512,
4246 .also_non_np = 1,
4247 .np = 2,
4248 .tap = { 512 - 16, 16 },
4209 }, 4249 },
4210}; 4250};
4211 4251
@@ -4456,6 +4496,9 @@ static struct cipher_testvec tf_lrw_dec_tv_template[] = {
4456 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" 4496 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4457 "\x21\xc4\xc2\x75\x67\x89\x37\x0a", 4497 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4458 .rlen = 512, 4498 .rlen = 512,
4499 .also_non_np = 1,
4500 .np = 2,
4501 .tap = { 512 - 16, 16 },
4459 }, 4502 },
4460}; 4503};
4461 4504
@@ -4795,6 +4838,9 @@ static struct cipher_testvec tf_xts_enc_tv_template[] = {
4795 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97" 4838 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
4796 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff", 4839 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
4797 .rlen = 512, 4840 .rlen = 512,
4841 .also_non_np = 1,
4842 .np = 2,
4843 .tap = { 512 - 16, 16 },
4798 }, 4844 },
4799}; 4845};
4800 4846
@@ -5135,6 +5181,9 @@ static struct cipher_testvec tf_xts_dec_tv_template[] = {
5135 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 5181 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5136 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 5182 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5137 .rlen = 512, 5183 .rlen = 512,
5184 .also_non_np = 1,
5185 .np = 2,
5186 .tap = { 512 - 16, 16 },
5138 }, 5187 },
5139}; 5188};
5140 5189
@@ -5242,6 +5291,9 @@ static struct cipher_testvec serpent_enc_tv_template[] = {
5242 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39" 5291 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5243 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6", 5292 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5244 .rlen = 144, 5293 .rlen = 144,
5294 .also_non_np = 1,
5295 .np = 2,
5296 .tap = { 144 - 16, 16 },
5245 }, 5297 },
5246}; 5298};
5247 5299
@@ -5377,6 +5429,9 @@ static struct cipher_testvec serpent_dec_tv_template[] = {
5377 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8" 5429 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5378 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A", 5430 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5379 .rlen = 144, 5431 .rlen = 144,
5432 .also_non_np = 1,
5433 .np = 2,
5434 .tap = { 144 - 16, 16 },
5380 }, 5435 },
5381}; 5436};
5382 5437
@@ -5468,6 +5523,9 @@ static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
5468 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A" 5523 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
5469 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C", 5524 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
5470 .rlen = 144, 5525 .rlen = 144,
5526 .also_non_np = 1,
5527 .np = 2,
5528 .tap = { 144 - 16, 16 },
5471 }, 5529 },
5472}; 5530};
5473 5531
@@ -5518,6 +5576,9 @@ static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
5518 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8" 5576 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5519 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A", 5577 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5520 .rlen = 144, 5578 .rlen = 144,
5579 .also_non_np = 1,
5580 .np = 2,
5581 .tap = { 144 - 16, 16 },
5521 }, 5582 },
5522}; 5583};
5523 5584
@@ -5616,6 +5677,9 @@ static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
5616 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9" 5677 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
5617 "\xE6\xD0\x97", 5678 "\xE6\xD0\x97",
5618 .rlen = 147, 5679 .rlen = 147,
5680 .also_non_np = 1,
5681 .np = 2,
5682 .tap = { 147 - 16, 16 },
5619 }, 5683 },
5620}; 5684};
5621 5685
@@ -5714,6 +5778,9 @@ static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
5714 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A" 5778 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5715 "\xF1\x65\xFC", 5779 "\xF1\x65\xFC",
5716 .rlen = 147, 5780 .rlen = 147,
5781 .also_non_np = 1,
5782 .np = 2,
5783 .tap = { 147 - 16, 16 },
5717 }, 5784 },
5718}; 5785};
5719 5786
@@ -5963,6 +6030,9 @@ static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
5963 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd" 6030 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
5964 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7", 6031 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
5965 .rlen = 512, 6032 .rlen = 512,
6033 .also_non_np = 1,
6034 .np = 2,
6035 .tap = { 512 - 16, 16 },
5966 }, 6036 },
5967}; 6037};
5968 6038
@@ -6213,6 +6283,9 @@ static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
6213 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" 6283 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6214 "\x21\xc4\xc2\x75\x67\x89\x37\x0a", 6284 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6215 .rlen = 512, 6285 .rlen = 512,
6286 .also_non_np = 1,
6287 .np = 2,
6288 .tap = { 512 - 16, 16 },
6216 }, 6289 },
6217}; 6290};
6218 6291
@@ -6552,6 +6625,9 @@ static struct cipher_testvec serpent_xts_enc_tv_template[] = {
6552 "\xaf\x43\x0b\xc5\x20\x41\x92\x20" 6625 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
6553 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1", 6626 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
6554 .rlen = 512, 6627 .rlen = 512,
6628 .also_non_np = 1,
6629 .np = 2,
6630 .tap = { 512 - 16, 16 },
6555 }, 6631 },
6556}; 6632};
6557 6633
@@ -6892,6 +6968,9 @@ static struct cipher_testvec serpent_xts_dec_tv_template[] = {
6892 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 6968 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6893 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 6969 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6894 .rlen = 512, 6970 .rlen = 512,
6971 .also_non_np = 1,
6972 .np = 2,
6973 .tap = { 512 - 16, 16 },
6895 }, 6974 },
6896}; 6975};
6897 6976
@@ -7072,6 +7151,9 @@ static struct cipher_testvec cast6_enc_tv_template[] = {
7072 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2" 7151 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
7073 "\x11\x74\x93\x57\xB4\x7E\xC6\x00", 7152 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
7074 .rlen = 496, 7153 .rlen = 496,
7154 .also_non_np = 1,
7155 .np = 2,
7156 .tap = { 496 - 16, 16 },
7075 }, 7157 },
7076}; 7158};
7077 7159
@@ -7240,6 +7322,9 @@ static struct cipher_testvec cast6_dec_tv_template[] = {
7240 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 7322 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7241 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 7323 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7242 .rlen = 496, 7324 .rlen = 496,
7325 .also_non_np = 1,
7326 .np = 2,
7327 .tap = { 496 - 16, 16 },
7243 }, 7328 },
7244}; 7329};
7245 7330
@@ -7378,6 +7463,9 @@ static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
7378 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92" 7463 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
7379 "\x22\x46\x89\x2D\x0F\x2B\x08\x24", 7464 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
7380 .rlen = 496, 7465 .rlen = 496,
7466 .also_non_np = 1,
7467 .np = 2,
7468 .tap = { 496 - 16, 16 },
7381 }, 7469 },
7382}; 7470};
7383 7471
@@ -7516,6 +7604,9 @@ static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
7516 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 7604 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7517 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 7605 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7518 .rlen = 496, 7606 .rlen = 496,
7607 .also_non_np = 1,
7608 .np = 2,
7609 .tap = { 496 - 16, 16 },
7519 }, 7610 },
7520}; 7611};
7521 7612
@@ -7654,6 +7745,9 @@ static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
7654 "\x0E\x74\x33\x30\x62\xB9\x89\xDF" 7745 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
7655 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB", 7746 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
7656 .rlen = 496, 7747 .rlen = 496,
7748 .also_non_np = 1,
7749 .np = 2,
7750 .tap = { 496 - 16, 16 },
7657 }, 7751 },
7658}; 7752};
7659 7753
@@ -7792,6 +7886,9 @@ static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
7792 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 7886 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7793 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 7887 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7794 .rlen = 496, 7888 .rlen = 496,
7889 .also_non_np = 1,
7890 .np = 2,
7891 .tap = { 496 - 16, 16 },
7795 }, 7892 },
7796}; 7893};
7797 7894
@@ -7936,6 +8033,9 @@ static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
7936 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7" 8033 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
7937 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46", 8034 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
7938 .rlen = 512, 8035 .rlen = 512,
8036 .also_non_np = 1,
8037 .np = 2,
8038 .tap = { 512 - 16, 16 },
7939 }, 8039 },
7940}; 8040};
7941 8041
@@ -8080,6 +8180,9 @@ static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
8080 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" 8180 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8081 "\x21\xc4\xc2\x75\x67\x89\x37\x0a", 8181 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8082 .rlen = 512, 8182 .rlen = 512,
8183 .also_non_np = 1,
8184 .np = 2,
8185 .tap = { 512 - 16, 16 },
8083 }, 8186 },
8084}; 8187};
8085 8188
@@ -8226,6 +8329,9 @@ static struct cipher_testvec cast6_xts_enc_tv_template[] = {
8226 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC" 8329 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
8227 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9", 8330 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
8228 .rlen = 512, 8331 .rlen = 512,
8332 .also_non_np = 1,
8333 .np = 2,
8334 .tap = { 512 - 16, 16 },
8229 }, 8335 },
8230}; 8336};
8231 8337
@@ -8372,6 +8478,9 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = {
8372 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 8478 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8373 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 8479 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8374 .rlen = 512, 8480 .rlen = 512,
8481 .also_non_np = 1,
8482 .np = 2,
8483 .tap = { 512 - 16, 16 },
8375 }, 8484 },
8376}; 8485};
8377 8486
@@ -9721,6 +9830,9 @@ static struct cipher_testvec aes_lrw_enc_tv_template[] = {
9721 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7" 9830 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
9722 "\x74\x3f\x7d\x58\x88\x75\xde\x3e", 9831 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
9723 .rlen = 512, 9832 .rlen = 512,
9833 .also_non_np = 1,
9834 .np = 2,
9835 .tap = { 512 - 16, 16 },
9724 } 9836 }
9725}; 9837};
9726 9838
@@ -9972,6 +10084,9 @@ static struct cipher_testvec aes_lrw_dec_tv_template[] = {
9972 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" 10084 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9973 "\x21\xc4\xc2\x75\x67\x89\x37\x0a", 10085 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9974 .rlen = 512, 10086 .rlen = 512,
10087 .also_non_np = 1,
10088 .np = 2,
10089 .tap = { 512 - 16, 16 },
9975 } 10090 }
9976}; 10091};
9977 10092
@@ -10313,6 +10428,9 @@ static struct cipher_testvec aes_xts_enc_tv_template[] = {
10313 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70" 10428 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
10314 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51", 10429 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
10315 .rlen = 512, 10430 .rlen = 512,
10431 .also_non_np = 1,
10432 .np = 2,
10433 .tap = { 512 - 16, 16 },
10316 } 10434 }
10317}; 10435};
10318 10436
@@ -10654,7 +10772,9 @@ static struct cipher_testvec aes_xts_dec_tv_template[] = {
10654 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 10772 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10655 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 10773 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10656 .rlen = 512, 10774 .rlen = 512,
10657 10775 .also_non_np = 1,
10776 .np = 2,
10777 .tap = { 512 - 16, 16 },
10658 } 10778 }
10659}; 10779};
10660 10780
@@ -13695,6 +13815,9 @@ static struct cipher_testvec cast5_enc_tv_template[] = {
13695 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57" 13815 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
13696 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C", 13816 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
13697 .rlen = 496, 13817 .rlen = 496,
13818 .also_non_np = 1,
13819 .np = 2,
13820 .tap = { 496 - 16, 16 },
13698 }, 13821 },
13699}; 13822};
13700 13823
@@ -13853,6 +13976,9 @@ static struct cipher_testvec cast5_dec_tv_template[] = {
13853 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 13976 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13854 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 13977 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13855 .rlen = 496, 13978 .rlen = 496,
13979 .also_non_np = 1,
13980 .np = 2,
13981 .tap = { 496 - 16, 16 },
13856 }, 13982 },
13857}; 13983};
13858 13984
@@ -13988,6 +14114,9 @@ static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
13988 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6" 14114 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
13989 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB", 14115 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
13990 .rlen = 496, 14116 .rlen = 496,
14117 .also_non_np = 1,
14118 .np = 2,
14119 .tap = { 496 - 16, 16 },
13991 }, 14120 },
13992}; 14121};
13993 14122
@@ -14123,6 +14252,9 @@ static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
14123 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 14252 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14124 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 14253 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14125 .rlen = 496, 14254 .rlen = 496,
14255 .also_non_np = 1,
14256 .np = 2,
14257 .tap = { 496 - 16, 16 },
14126 }, 14258 },
14127}; 14259};
14128 14260
@@ -14258,6 +14390,9 @@ static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
14258 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA" 14390 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
14259 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13", 14391 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
14260 .rlen = 496, 14392 .rlen = 496,
14393 .also_non_np = 1,
14394 .np = 2,
14395 .tap = { 496 - 16, 16 },
14261 }, 14396 },
14262}; 14397};
14263 14398
@@ -14393,6 +14528,9 @@ static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
14393 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45" 14528 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14394 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7", 14529 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14395 .rlen = 496, 14530 .rlen = 496,
14531 .also_non_np = 1,
14532 .np = 2,
14533 .tap = { 496 - 16, 16 },
14396 }, 14534 },
14397}; 14535};
14398 14536
@@ -15310,6 +15448,9 @@ static struct cipher_testvec camellia_enc_tv_template[] = {
15310 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9" 15448 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
15311 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A", 15449 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
15312 .rlen = 48, 15450 .rlen = 48,
15451 .also_non_np = 1,
15452 .np = 2,
15453 .tap = { 48 - 16, 16 },
15313 }, 15454 },
15314}; 15455};
15315 15456
@@ -15368,6 +15509,9 @@ static struct cipher_testvec camellia_dec_tv_template[] = {
15368 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9" 15509 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15369 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48", 15510 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15370 .rlen = 48, 15511 .rlen = 48,
15512 .also_non_np = 1,
15513 .np = 2,
15514 .tap = { 48 - 16, 16 },
15371 }, 15515 },
15372}; 15516};
15373 15517
@@ -15422,6 +15566,9 @@ static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
15422 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27" 15566 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
15423 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01", 15567 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
15424 .rlen = 48, 15568 .rlen = 48,
15569 .also_non_np = 1,
15570 .np = 2,
15571 .tap = { 48 - 16, 16 },
15425 }, 15572 },
15426}; 15573};
15427 15574
@@ -15476,6 +15623,9 @@ static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
15476 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9" 15623 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15477 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48", 15624 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15478 .rlen = 48, 15625 .rlen = 48,
15626 .also_non_np = 1,
15627 .np = 2,
15628 .tap = { 48 - 16, 16 },
15479 }, 15629 },
15480}; 15630};
15481 15631
@@ -15527,6 +15677,9 @@ static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
15527 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C" 15677 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
15528 "\x1E\x43\xEF", 15678 "\x1E\x43\xEF",
15529 .rlen = 51, 15679 .rlen = 51,
15680 .also_non_np = 1,
15681 .np = 2,
15682 .tap = { 51 - 16, 16 },
15530 }, 15683 },
15531}; 15684};
15532 15685
@@ -15578,6 +15731,9 @@ static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
15578 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48" 15731 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15579 "\xDF\x76\x0D", 15732 "\xDF\x76\x0D",
15580 .rlen = 51, 15733 .rlen = 51,
15734 .also_non_np = 1,
15735 .np = 2,
15736 .tap = { 51 - 16, 16 },
15581 }, 15737 },
15582 15738
15583}; 15739};
@@ -15828,6 +15984,9 @@ static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
15828 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9" 15984 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
15829 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95", 15985 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
15830 .rlen = 512, 15986 .rlen = 512,
15987 .also_non_np = 1,
15988 .np = 2,
15989 .tap = { 512 - 16, 16 },
15831 }, 15990 },
15832}; 15991};
15833 15992
@@ -16078,6 +16237,9 @@ static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
16078 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" 16237 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16079 "\x21\xc4\xc2\x75\x67\x89\x37\x0a", 16238 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16080 .rlen = 512, 16239 .rlen = 512,
16240 .also_non_np = 1,
16241 .np = 2,
16242 .tap = { 512 - 16, 16 },
16081 }, 16243 },
16082}; 16244};
16083 16245
@@ -16417,6 +16579,9 @@ static struct cipher_testvec camellia_xts_enc_tv_template[] = {
16417 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e" 16579 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
16418 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95", 16580 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
16419 .rlen = 512, 16581 .rlen = 512,
16582 .also_non_np = 1,
16583 .np = 2,
16584 .tap = { 512 - 16, 16 },
16420 }, 16585 },
16421}; 16586};
16422 16587
@@ -16757,6 +16922,9 @@ static struct cipher_testvec camellia_xts_dec_tv_template[] = {
16757 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 16922 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16758 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 16923 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16759 .rlen = 512, 16924 .rlen = 512,
16925 .also_non_np = 1,
16926 .np = 2,
16927 .tap = { 512 - 16, 16 },
16760 }, 16928 },
16761}; 16929};
16762 16930