KVM: Give IRQFD its own separate enabling Kconfig option
[firefly-linux-kernel-4.4.55.git] / crypto / testmgr.h
index b13aa69274847ed1bdb33f31c843aca656655815..6597203eccfab74c1a94eef5420b33dddf6aabb3 100644 (file)
@@ -32,7 +32,7 @@
 #define MAX_DIGEST_SIZE                64
 #define MAX_TAP                        8
 
-#define MAX_KEYLEN             56
+#define MAX_KEYLEN             160
 #define MAX_IVLEN              32
 
 struct hash_testvec {
@@ -1822,18 +1822,59 @@ static struct hash_testvec tgr128_tv_template[] = {
        },
 };
 
-#define GHASH_TEST_VECTORS 1
+#define GHASH_TEST_VECTORS 5
 
 static struct hash_testvec ghash_tv_template[] =
 {
        {
-
-               .key    = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
+               .key    = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
+                         "\xff\xca\xff\x95\xf8\x30\xf0\x61",
                .ksize  = 16,
-               .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
+               .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
+                            "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
                .psize  = 16,
                .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
                          "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
+       }, {
+               .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+                         "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+               .ksize  = 16,
+               .plaintext = "what do ya want for nothing?",
+               .psize  = 28,
+               .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
+                         "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
+               .np     = 2,
+               .tap    = {14, 14}
+       }, {
+               .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
+               .ksize  = 16,
+               .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+                       "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+                       "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+                       "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
+               .psize  = 50,
+               .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
+                         "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
+       }, {
+               .key    = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
+                         "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
+               .ksize  = 16,
+               .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+                       "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+                       "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+                       "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
+               .psize  = 50,
+               .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
+                         "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
+       }, {
+               .key    = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
+                         "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
+               .ksize  = 16,
+               .plaintext = "Test With Truncation",
+               .psize  = 20,
+               .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
+                         "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
        },
 };
 
@@ -3112,8 +3153,8 @@ static struct cipher_testvec des_enc_tv_template[] = {
                          "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
                .rlen   = 248,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 248 - 8, 8 },
+               .np     = 3,
+               .tap    = { 248 - 10, 2, 8 },
        },
 };
 
@@ -3222,8 +3263,8 @@ static struct cipher_testvec des_dec_tv_template[] = {
                          "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
                .rlen   = 248,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 248 - 8, 8 },
+               .np     = 3,
+               .tap    = { 248 - 10, 2, 8 },
        },
 };
 
@@ -3348,8 +3389,8 @@ static struct cipher_testvec des_cbc_enc_tv_template[] = {
                          "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
                .rlen   = 248,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 248 - 8, 8 },
+               .np     = 3,
+               .tap    = { 248 - 10, 2, 8 },
        },
 };
 
@@ -3457,8 +3498,8 @@ static struct cipher_testvec des_cbc_dec_tv_template[] = {
                          "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
                .rlen   = 248,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 248 - 8, 8 },
+               .np     = 3,
+               .tap    = { 248 - 10, 2, 8 },
        },
 };
 
@@ -3532,8 +3573,8 @@ static struct cipher_testvec des_ctr_enc_tv_template[] = {
                          "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
                .rlen   = 248,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 248 - 8, 8 },
+               .np     = 3,
+               .tap    = { 248 - 10, 2, 8 },
        }, { /* Generated with Crypto++ */
                .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
                .klen   = 8,
@@ -3678,8 +3719,8 @@ static struct cipher_testvec des_ctr_dec_tv_template[] = {
                          "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
                .rlen   = 248,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 248 - 8, 8 },
+               .np     = 3,
+               .tap    = { 248 - 10, 2, 8 },
        }, { /* Generated with Crypto++ */
                .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
                .klen   = 8,
@@ -3914,8 +3955,8 @@ static struct cipher_testvec des3_ede_enc_tv_template[] = {
                          "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -4079,8 +4120,8 @@ static struct cipher_testvec des3_ede_dec_tv_template[] = {
                          "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -4259,8 +4300,8 @@ static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
                          "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -4439,8 +4480,8 @@ static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
                          "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -4579,8 +4620,8 @@ static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
                          "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        }, { /* Generated with Crypto++ */
                .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
                          "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
@@ -4857,8 +4898,8 @@ static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
                          "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        }, { /* Generated with Crypto++ */
                .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
                          "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
@@ -5197,8 +5238,8 @@ static struct cipher_testvec bf_enc_tv_template[] = {
                          "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
                .rlen   = 504,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 504 - 8, 8 },
+               .np     = 3,
+               .tap    = { 504 - 10, 2, 8 },
        },
 };
 
@@ -5389,8 +5430,8 @@ static struct cipher_testvec bf_dec_tv_template[] = {
                          "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
                .rlen   = 504,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 504 - 8, 8 },
+               .np     = 3,
+               .tap    = { 504 - 10, 2, 8 },
        },
 };
 
@@ -5546,8 +5587,8 @@ static struct cipher_testvec bf_cbc_enc_tv_template[] = {
                          "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
                .rlen   = 504,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 504 - 8, 8 },
+               .np     = 3,
+               .tap    = { 504 - 10, 2, 8 },
        },
 };
 
@@ -5703,8 +5744,8 @@ static struct cipher_testvec bf_cbc_dec_tv_template[] = {
                          "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
                .rlen   = 504,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 504 - 8, 8 },
+               .np     = 3,
+               .tap    = { 504 - 10, 2, 8 },
        },
 };
 
@@ -6709,8 +6750,8 @@ static struct cipher_testvec tf_enc_tv_template[] = {
                          "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -6877,8 +6918,8 @@ static struct cipher_testvec tf_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -7060,8 +7101,8 @@ static struct cipher_testvec tf_cbc_enc_tv_template[] = {
                          "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -7243,8 +7284,8 @@ static struct cipher_testvec tf_cbc_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -8317,8 +8358,8 @@ static struct cipher_testvec tf_lrw_enc_tv_template[] = {
                          "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -8570,8 +8611,8 @@ static struct cipher_testvec tf_lrw_dec_tv_template[] = {
                          "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -8912,8 +8953,8 @@ static struct cipher_testvec tf_xts_enc_tv_template[] = {
                          "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -9255,8 +9296,8 @@ static struct cipher_testvec tf_xts_dec_tv_template[] = {
                          "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -9453,8 +9494,8 @@ static struct cipher_testvec serpent_enc_tv_template[] = {
                          "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -9679,8 +9720,8 @@ static struct cipher_testvec serpent_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -9861,8 +9902,8 @@ static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
                          "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -10002,8 +10043,8 @@ static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -11076,8 +11117,8 @@ static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
                          "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -11329,8 +11370,8 @@ static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
                          "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -11671,8 +11712,8 @@ static struct cipher_testvec serpent_xts_enc_tv_template[] = {
                          "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -12014,8 +12055,8 @@ static struct cipher_testvec serpent_xts_dec_tv_template[] = {
                          "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -12197,8 +12238,8 @@ static struct cipher_testvec cast6_enc_tv_template[] = {
                          "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -12368,8 +12409,8 @@ static struct cipher_testvec cast6_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -12509,8 +12550,8 @@ static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
                          "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -12650,8 +12691,8 @@ static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -12807,8 +12848,8 @@ static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
                          "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -12964,8 +13005,8 @@ static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -13111,8 +13152,8 @@ static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
                          "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -13258,8 +13299,8 @@ static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
                          "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -13407,8 +13448,8 @@ static struct cipher_testvec cast6_xts_enc_tv_template[] = {
                          "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -13556,8 +13597,8 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = {
                          "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -13764,8 +13805,8 @@ static struct cipher_testvec aes_enc_tv_template[] = {
                          "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -13936,8 +13977,8 @@ static struct cipher_testvec aes_dec_tv_template[] = {
                          "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -14155,8 +14196,8 @@ static struct cipher_testvec aes_cbc_enc_tv_template[] = {
                          "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -14374,8 +14415,8 @@ static struct cipher_testvec aes_cbc_dec_tv_template[] = {
                          "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -16280,8 +16321,8 @@ static struct cipher_testvec aes_lrw_enc_tv_template[] = {
                          "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        }
 };
 
@@ -16534,8 +16575,8 @@ static struct cipher_testvec aes_lrw_dec_tv_template[] = {
                          "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        }
 };
 
@@ -16876,8 +16917,8 @@ static struct cipher_testvec aes_xts_enc_tv_template[] = {
                          "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        }
 };
 
@@ -17218,8 +17259,8 @@ static struct cipher_testvec aes_xts_dec_tv_template[] = {
                          "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        }
 };
 
@@ -17435,8 +17476,8 @@ static struct cipher_testvec aes_ctr_enc_tv_template[] = {
                          "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        }, { /* Generated with Crypto++ */
                .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
                          "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
@@ -17790,8 +17831,8 @@ static struct cipher_testvec aes_ctr_dec_tv_template[] = {
                          "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        }, { /* Generated with Crypto++ */
                .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
                          "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
@@ -21750,8 +21791,8 @@ static struct cipher_testvec cast5_enc_tv_template[] = {
                          "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -21911,8 +21952,8 @@ static struct cipher_testvec cast5_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -22049,8 +22090,8 @@ static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
                          "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -22187,8 +22228,8 @@ static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -22338,8 +22379,8 @@ static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
                          "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -22489,8 +22530,8 @@ static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
                          "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
                .rlen   = 496,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 496 - 16, 16 },
+               .np     = 3,
+               .tap    = { 496 - 20, 4, 16 },
        },
 };
 
@@ -23648,8 +23689,8 @@ static struct cipher_testvec camellia_enc_tv_template[] = {
                          "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
                .rlen   = 1008,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 1008 - 16, 16 },
+               .np     = 3,
+               .tap    = { 1008 - 20, 4, 16 },
        },
 };
 
@@ -23948,8 +23989,8 @@ static struct cipher_testvec camellia_dec_tv_template[] = {
                          "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
                .rlen   = 1008,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 1008 - 16, 16 },
+               .np     = 3,
+               .tap    = { 1008 - 20, 4, 16 },
        },
 };
 
@@ -24244,8 +24285,8 @@ static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
                          "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
                .rlen   = 1008,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 1008 - 16, 16 },
+               .np     = 3,
+               .tap    = { 1008 - 20, 4, 16 },
        },
 };
 
@@ -24540,8 +24581,8 @@ static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
                          "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
                .rlen   = 1008,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 1008 - 16, 16 },
+               .np     = 3,
+               .tap    = { 1008 - 20, 4, 16 },
        },
 };
 
@@ -26126,8 +26167,8 @@ static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
                          "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -26379,8 +26420,8 @@ static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
                          "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -26721,8 +26762,8 @@ static struct cipher_testvec camellia_xts_enc_tv_template[] = {
                          "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };
 
@@ -27064,8 +27105,8 @@ static struct cipher_testvec camellia_xts_dec_tv_template[] = {
                          "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
                .rlen   = 512,
                .also_non_np = 1,
-               .np     = 2,
-               .tap    = { 512 - 16, 16 },
+               .np     = 3,
+               .tap    = { 512 - 20, 4, 16 },
        },
 };