KVM: Give IRQFD its own separate enabling Kconfig option
[firefly-linux-kernel-4.4.55.git] / crypto / testmgr.h
index 3db83dbba1d939d19800cb2d7439417ddfece4ff..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 {
@@ -92,6 +92,21 @@ struct cprng_testvec {
        unsigned short loops;
 };
 
+struct drbg_testvec {
+       unsigned char *entropy;
+       size_t entropylen;
+       unsigned char *entpra;
+       unsigned char *entprb;
+       size_t entprlen;
+       unsigned char *addtla;
+       unsigned char *addtlb;
+       size_t addtllen;
+       unsigned char *pers;
+       size_t perslen;
+       unsigned char *expected;
+       size_t expectedlen;
+};
+
 static char zeroed_string[48];
 
 /*
@@ -487,10 +502,15 @@ static struct hash_testvec crct10dif_tv_template[] = {
  * SHA1 test vectors  from from FIPS PUB 180-1
  * Long vector from CAVS 5.0
  */
-#define SHA1_TEST_VECTORS      3
+#define SHA1_TEST_VECTORS      6
 
 static struct hash_testvec sha1_tv_template[] = {
        {
+               .plaintext = "",
+               .psize  = 0,
+               .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
+                         "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
+       }, {
                .plaintext = "abc",
                .psize  = 3,
                .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
@@ -529,6 +549,144 @@ static struct hash_testvec sha1_tv_template[] = {
                          "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
                .np     = 4,
                .tap    = { 63, 64, 31, 5 }
+       }, {
+               .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
+               .psize  = 64,
+               .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
+                         "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
+       }, {
+               .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
+                            "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
+                            "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
+                            "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
+                            "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
+                            "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
+                            "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
+                            "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
+                            "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
+                            "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
+                            "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
+                            "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
+                            "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
+                            "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
+                            "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
+                            "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
+                            "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
+                            "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
+                            "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
+                            "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
+                            "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
+                            "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
+                            "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
+                            "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
+                            "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
+                            "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
+                            "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
+                            "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
+                            "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
+                            "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
+                            "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
+                            "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
+                            "\x53\xea\x81\x18\x8c\x23\xba\x2e"
+                            "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
+                            "\x37\xce\x42\xd9\x70\x07\x7b\x12"
+                            "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
+                            "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
+                            "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
+                            "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
+                            "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
+                            "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
+                            "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
+                            "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
+                            "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
+                            "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
+                            "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
+                            "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
+                            "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
+                            "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
+                            "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
+                            "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
+                            "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
+                            "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
+                            "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
+                            "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
+                            "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
+                            "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
+                            "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
+                            "\x38\xcf\x43\xda\x71\x08\x7c\x13"
+                            "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
+                            "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
+                            "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
+                            "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
+                            "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
+                            "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
+                            "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
+                            "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
+                            "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
+                            "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
+                            "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
+                            "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
+                            "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
+                            "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
+                            "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
+                            "\xef\x63\xfa\x91\x05\x9c\x33\xca"
+                            "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
+                            "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
+                            "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
+                            "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
+                            "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
+                            "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
+                            "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
+                            "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
+                            "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
+                            "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
+                            "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
+                            "\xde\x75\x0c\x80\x17\xae\x22\xb9"
+                            "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
+                            "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
+                            "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
+                            "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
+                            "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
+                            "\x67\xfe\x72\x09\xa0\x14\xab\x42"
+                            "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
+                            "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
+                            "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
+                            "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
+                            "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
+                            "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
+                            "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
+                            "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
+                            "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
+                            "\x95\x09\xa0\x37\xce\x42\xd9\x70"
+                            "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
+                            "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
+                            "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
+                            "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
+                            "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
+                            "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
+                            "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
+                            "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
+                            "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
+                            "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
+                            "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
+                            "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
+                            "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
+                            "\x68\xff\x73\x0a\xa1\x15\xac\x43"
+                            "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
+                            "\x29\xc0\x57\xee\x62\xf9\x90\x04"
+                            "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
+                            "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
+                            "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
+                            "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
+                            "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
+                            "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
+                            "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
+                            "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
+                            "\x08\x7c\x13\xaa\x1e\xb5\x4c",
+               .psize     = 1023,
+               .digest    = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
+                            "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
+                            "\x30\xd6\xc9\x85",
        }
 };
 
@@ -536,10 +694,17 @@ static struct hash_testvec sha1_tv_template[] = {
 /*
  * SHA224 test vectors from from FIPS PUB 180-2
  */
-#define SHA224_TEST_VECTORS     2
+#define SHA224_TEST_VECTORS     5
 
 static struct hash_testvec sha224_tv_template[] = {
        {
+               .plaintext = "",
+               .psize  = 0,
+               .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
+                         "\x47\x61\x02\xbb\x28\x82\x34\xc4"
+                         "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
+                         "\xc5\xb3\xe4\x2f",
+       }, {
                .plaintext = "abc",
                .psize  = 3,
                .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
@@ -556,16 +721,164 @@ static struct hash_testvec sha224_tv_template[] = {
                          "\x52\x52\x25\x25",
                .np     = 2,
                .tap    = { 28, 28 }
+       }, {
+               .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
+               .psize  = 64,
+               .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
+                         "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
+                         "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
+                         "\xef\x3b\xcb\x0e",
+       }, {
+               .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
+                            "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
+                            "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
+                            "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
+                            "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
+                            "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
+                            "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
+                            "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
+                            "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
+                            "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
+                            "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
+                            "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
+                            "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
+                            "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
+                            "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
+                            "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
+                            "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
+                            "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
+                            "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
+                            "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
+                            "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
+                            "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
+                            "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
+                            "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
+                            "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
+                            "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
+                            "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
+                            "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
+                            "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
+                            "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
+                            "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
+                            "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
+                            "\x53\xea\x81\x18\x8c\x23\xba\x2e"
+                            "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
+                            "\x37\xce\x42\xd9\x70\x07\x7b\x12"
+                            "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
+                            "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
+                            "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
+                            "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
+                            "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
+                            "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
+                            "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
+                            "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
+                            "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
+                            "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
+                            "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
+                            "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
+                            "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
+                            "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
+                            "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
+                            "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
+                            "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
+                            "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
+                            "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
+                            "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
+                            "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
+                            "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
+                            "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
+                            "\x38\xcf\x43\xda\x71\x08\x7c\x13"
+                            "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
+                            "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
+                            "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
+                            "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
+                            "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
+                            "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
+                            "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
+                            "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
+                            "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
+                            "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
+                            "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
+                            "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
+                            "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
+                            "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
+                            "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
+                            "\xef\x63\xfa\x91\x05\x9c\x33\xca"
+                            "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
+                            "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
+                            "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
+                            "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
+                            "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
+                            "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
+                            "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
+                            "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
+                            "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
+                            "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
+                            "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
+                            "\xde\x75\x0c\x80\x17\xae\x22\xb9"
+                            "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
+                            "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
+                            "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
+                            "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
+                            "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
+                            "\x67\xfe\x72\x09\xa0\x14\xab\x42"
+                            "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
+                            "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
+                            "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
+                            "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
+                            "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
+                            "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
+                            "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
+                            "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
+                            "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
+                            "\x95\x09\xa0\x37\xce\x42\xd9\x70"
+                            "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
+                            "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
+                            "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
+                            "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
+                            "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
+                            "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
+                            "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
+                            "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
+                            "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
+                            "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
+                            "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
+                            "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
+                            "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
+                            "\x68\xff\x73\x0a\xa1\x15\xac\x43"
+                            "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
+                            "\x29\xc0\x57\xee\x62\xf9\x90\x04"
+                            "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
+                            "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
+                            "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
+                            "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
+                            "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
+                            "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
+                            "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
+                            "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
+                            "\x08\x7c\x13\xaa\x1e\xb5\x4c",
+               .psize     = 1023,
+               .digest    = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
+                            "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
+                            "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
+                            "\xe6\xf9\x4f\xcc",
        }
 };
 
 /*
  * SHA256 test vectors from from NIST
  */
-#define SHA256_TEST_VECTORS    2
+#define SHA256_TEST_VECTORS    5
 
 static struct hash_testvec sha256_tv_template[] = {
        {
+               .plaintext = "",
+               .psize  = 0,
+               .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
+                         "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
+                         "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
+                         "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
+       }, {
                .plaintext = "abc",
                .psize  = 3,
                .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
@@ -581,16 +894,166 @@ static struct hash_testvec sha256_tv_template[] = {
                          "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
                .np     = 2,
                .tap    = { 28, 28 }
-       },
+       }, {
+               .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
+               .psize  = 64,
+               .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
+                         "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
+                         "\xd6\xff\x94\xa3\x72\x91\x85\x66"
+                         "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
+       }, {
+               .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
+                            "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
+                            "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
+                            "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
+                            "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
+                            "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
+                            "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
+                            "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
+                            "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
+                            "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
+                            "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
+                            "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
+                            "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
+                            "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
+                            "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
+                            "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
+                            "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
+                            "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
+                            "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
+                            "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
+                            "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
+                            "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
+                            "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
+                            "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
+                            "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
+                            "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
+                            "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
+                            "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
+                            "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
+                            "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
+                            "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
+                            "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
+                            "\x53\xea\x81\x18\x8c\x23\xba\x2e"
+                            "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
+                            "\x37\xce\x42\xd9\x70\x07\x7b\x12"
+                            "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
+                            "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
+                            "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
+                            "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
+                            "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
+                            "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
+                            "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
+                            "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
+                            "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
+                            "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
+                            "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
+                            "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
+                            "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
+                            "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
+                            "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
+                            "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
+                            "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
+                            "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
+                            "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
+                            "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
+                            "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
+                            "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
+                            "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
+                            "\x38\xcf\x43\xda\x71\x08\x7c\x13"
+                            "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
+                            "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
+                            "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
+                            "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
+                            "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
+                            "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
+                            "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
+                            "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
+                            "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
+                            "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
+                            "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
+                            "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
+                            "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
+                            "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
+                            "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
+                            "\xef\x63\xfa\x91\x05\x9c\x33\xca"
+                            "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
+                            "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
+                            "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
+                            "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
+                            "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
+                            "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
+                            "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
+                            "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
+                            "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
+                            "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
+                            "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
+                            "\xde\x75\x0c\x80\x17\xae\x22\xb9"
+                            "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
+                            "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
+                            "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
+                            "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
+                            "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
+                            "\x67\xfe\x72\x09\xa0\x14\xab\x42"
+                            "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
+                            "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
+                            "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
+                            "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
+                            "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
+                            "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
+                            "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
+                            "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
+                            "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
+                            "\x95\x09\xa0\x37\xce\x42\xd9\x70"
+                            "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
+                            "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
+                            "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
+                            "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
+                            "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
+                            "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
+                            "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
+                            "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
+                            "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
+                            "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
+                            "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
+                            "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
+                            "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
+                            "\x68\xff\x73\x0a\xa1\x15\xac\x43"
+                            "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
+                            "\x29\xc0\x57\xee\x62\xf9\x90\x04"
+                            "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
+                            "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
+                            "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
+                            "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
+                            "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
+                            "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
+                            "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
+                            "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
+                            "\x08\x7c\x13\xaa\x1e\xb5\x4c",
+               .psize     = 1023,
+               .digest    = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
+                            "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
+                            "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
+                            "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
+       }
 };
 
 /*
  * SHA384 test vectors from from NIST and kerneli
  */
-#define SHA384_TEST_VECTORS    4
+#define SHA384_TEST_VECTORS    6
 
 static struct hash_testvec sha384_tv_template[] = {
        {
+               .plaintext = "",
+               .psize  = 0,
+               .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
+                         "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
+                         "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
+                         "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
+                         "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
+                         "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
+       }, {
                .plaintext= "abc",
                .psize  = 3,
                .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
@@ -630,16 +1093,163 @@ static struct hash_testvec sha384_tv_template[] = {
                          "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
                .np     = 4,
                .tap    = { 26, 26, 26, 26 }
-       },
+       }, {
+               .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
+                            "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
+                            "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
+                            "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
+                            "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
+                            "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
+                            "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
+                            "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
+                            "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
+                            "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
+                            "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
+                            "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
+                            "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
+                            "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
+                            "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
+                            "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
+                            "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
+                            "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
+                            "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
+                            "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
+                            "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
+                            "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
+                            "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
+                            "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
+                            "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
+                            "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
+                            "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
+                            "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
+                            "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
+                            "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
+                            "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
+                            "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
+                            "\x53\xea\x81\x18\x8c\x23\xba\x2e"
+                            "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
+                            "\x37\xce\x42\xd9\x70\x07\x7b\x12"
+                            "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
+                            "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
+                            "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
+                            "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
+                            "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
+                            "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
+                            "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
+                            "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
+                            "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
+                            "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
+                            "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
+                            "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
+                            "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
+                            "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
+                            "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
+                            "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
+                            "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
+                            "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
+                            "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
+                            "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
+                            "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
+                            "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
+                            "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
+                            "\x38\xcf\x43\xda\x71\x08\x7c\x13"
+                            "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
+                            "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
+                            "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
+                            "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
+                            "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
+                            "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
+                            "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
+                            "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
+                            "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
+                            "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
+                            "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
+                            "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
+                            "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
+                            "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
+                            "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
+                            "\xef\x63\xfa\x91\x05\x9c\x33\xca"
+                            "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
+                            "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
+                            "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
+                            "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
+                            "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
+                            "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
+                            "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
+                            "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
+                            "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
+                            "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
+                            "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
+                            "\xde\x75\x0c\x80\x17\xae\x22\xb9"
+                            "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
+                            "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
+                            "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
+                            "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
+                            "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
+                            "\x67\xfe\x72\x09\xa0\x14\xab\x42"
+                            "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
+                            "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
+                            "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
+                            "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
+                            "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
+                            "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
+                            "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
+                            "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
+                            "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
+                            "\x95\x09\xa0\x37\xce\x42\xd9\x70"
+                            "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
+                            "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
+                            "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
+                            "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
+                            "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
+                            "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
+                            "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
+                            "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
+                            "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
+                            "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
+                            "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
+                            "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
+                            "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
+                            "\x68\xff\x73\x0a\xa1\x15\xac\x43"
+                            "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
+                            "\x29\xc0\x57\xee\x62\xf9\x90\x04"
+                            "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
+                            "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
+                            "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
+                            "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
+                            "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
+                            "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
+                            "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
+                            "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
+                            "\x08\x7c\x13\xaa\x1e\xb5\x4c",
+               .psize     = 1023,
+               .digest    = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
+                            "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
+                            "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
+                            "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
+                            "\x75\x29\x62\x83\xae\x3f\x17\xab"
+                            "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
+       }
 };
 
 /*
  * SHA512 test vectors from from NIST and kerneli
  */
-#define SHA512_TEST_VECTORS    4
+#define SHA512_TEST_VECTORS    6
 
 static struct hash_testvec sha512_tv_template[] = {
        {
+               .plaintext = "",
+               .psize  = 0,
+               .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
+                         "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
+                         "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
+                         "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
+                         "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
+                         "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
+                         "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
+                         "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
+       }, {
                .plaintext = "abc",
                .psize  = 3,
                .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
@@ -687,7 +1297,145 @@ static struct hash_testvec sha512_tv_template[] = {
                          "\xed\xb4\x19\x87\x23\x28\x50\xc9",
                .np     = 4,
                .tap    = { 26, 26, 26, 26 }
-       },
+       }, {
+               .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
+                            "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
+                            "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
+                            "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
+                            "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
+                            "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
+                            "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
+                            "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
+                            "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
+                            "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
+                            "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
+                            "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
+                            "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
+                            "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
+                            "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
+                            "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
+                            "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
+                            "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
+                            "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
+                            "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
+                            "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
+                            "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
+                            "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
+                            "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
+                            "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
+                            "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
+                            "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
+                            "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
+                            "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
+                            "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
+                            "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
+                            "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
+                            "\x53\xea\x81\x18\x8c\x23\xba\x2e"
+                            "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
+                            "\x37\xce\x42\xd9\x70\x07\x7b\x12"
+                            "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
+                            "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
+                            "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
+                            "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
+                            "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
+                            "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
+                            "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
+                            "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
+                            "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
+                            "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
+                            "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
+                            "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
+                            "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
+                            "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
+                            "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
+                            "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
+                            "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
+                            "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
+                            "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
+                            "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
+                            "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
+                            "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
+                            "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
+                            "\x38\xcf\x43\xda\x71\x08\x7c\x13"
+                            "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
+                            "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
+                            "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
+                            "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
+                            "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
+                            "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
+                            "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
+                            "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
+                            "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
+                            "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
+                            "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
+                            "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
+                            "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
+                            "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
+                            "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
+                            "\xef\x63\xfa\x91\x05\x9c\x33\xca"
+                            "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
+                            "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
+                            "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
+                            "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
+                            "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
+                            "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
+                            "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
+                            "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
+                            "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
+                            "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
+                            "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
+                            "\xde\x75\x0c\x80\x17\xae\x22\xb9"
+                            "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
+                            "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
+                            "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
+                            "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
+                            "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
+                            "\x67\xfe\x72\x09\xa0\x14\xab\x42"
+                            "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
+                            "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
+                            "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
+                            "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
+                            "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
+                            "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
+                            "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
+                            "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
+                            "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
+                            "\x95\x09\xa0\x37\xce\x42\xd9\x70"
+                            "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
+                            "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
+                            "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
+                            "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
+                            "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
+                            "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
+                            "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
+                            "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
+                            "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
+                            "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
+                            "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
+                            "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
+                            "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
+                            "\x68\xff\x73\x0a\xa1\x15\xac\x43"
+                            "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
+                            "\x29\xc0\x57\xee\x62\xf9\x90\x04"
+                            "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
+                            "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
+                            "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
+                            "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
+                            "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
+                            "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
+                            "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
+                            "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
+                            "\x08\x7c\x13\xaa\x1e\xb5\x4c",
+               .psize     = 1023,
+               .digest    = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
+                            "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
+                            "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
+                            "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
+                            "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
+                            "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
+                            "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
+                            "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
+       }
 };
 
 
@@ -1074,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",
        },
 };
 
@@ -2364,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 },
        },
 };
 
@@ -2474,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 },
        },
 };
 
@@ -2600,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 },
        },
 };
 
@@ -2709,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 },
        },
 };
 
@@ -2784,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,
@@ -2930,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,
@@ -3166,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 },
        },
 };
 
@@ -3331,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 },
        },
 };
 
@@ -3511,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 },
        },
 };
 
@@ -3691,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 },
        },
 };
 
@@ -3831,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"
@@ -4109,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"
@@ -4449,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 },
        },
 };
 
@@ -4641,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 },
        },
 };
 
@@ -4798,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 },
        },
 };
 
@@ -4955,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 },
        },
 };
 
@@ -5961,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 },
        },
 };
 
@@ -6129,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 },
        },
 };
 
@@ -6312,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 },
        },
 };
 
@@ -6495,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 },
        },
 };
 
@@ -7569,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 },
        },
 };
 
@@ -7822,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 },
        },
 };
 
@@ -8164,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 },
        },
 };
 
@@ -8507,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 },
        },
 };
 
@@ -8705,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 },
        },
 };
 
@@ -8931,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 },
        },
 };
 
@@ -9113,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 },
        },
 };
 
@@ -9254,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 },
        },
 };
 
@@ -10328,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 },
        },
 };
 
@@ -10581,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 },
        },
 };
 
@@ -10923,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 },
        },
 };
 
@@ -11266,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 },
        },
 };
 
@@ -11449,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 },
        },
 };
 
@@ -11620,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 },
        },
 };
 
@@ -11761,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 },
        },
 };
 
@@ -11902,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 },
        },
 };
 
@@ -12059,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 },
        },
 };
 
@@ -12216,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 },
        },
 };
 
@@ -12363,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 },
        },
 };
 
@@ -12510,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 },
        },
 };
 
@@ -12659,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 },
        },
 };
 
@@ -12808,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 },
        },
 };
 
@@ -12823,11 +13612,11 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = {
 #define AES_CBC_DEC_TEST_VECTORS 5
 #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
 #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
-#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
-#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
-#define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
-#define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
-#define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
+#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
+#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
+#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
+#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
+#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
 #define AES_LRW_ENC_TEST_VECTORS 8
 #define AES_LRW_DEC_TEST_VECTORS 8
 #define AES_XTS_ENC_TEST_VECTORS 5
@@ -12844,7 +13633,7 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = {
 #define AES_GCM_4106_DEC_TEST_VECTORS 7
 #define AES_GCM_4543_ENC_TEST_VECTORS 1
 #define AES_GCM_4543_DEC_TEST_VECTORS 2
-#define AES_CCM_ENC_TEST_VECTORS 7
+#define AES_CCM_ENC_TEST_VECTORS 8
 #define AES_CCM_DEC_TEST_VECTORS 7
 #define AES_CCM_4309_ENC_TEST_VECTORS 7
 #define AES_CCM_4309_DEC_TEST_VECTORS 10
@@ -13016,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 },
        },
 };
 
@@ -13188,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 },
        },
 };
 
@@ -13407,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 },
        },
 };
 
@@ -13626,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 },
        },
 };
 
@@ -13715,7 +14504,7 @@ static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
        },
 };
 
-static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
+static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
        { /* RFC 3602 Case 1 */
 #ifdef __LITTLE_ENDIAN
                .key    = "\x08\x00"            /* rta length */
@@ -13964,7 +14753,7 @@ static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
        },
 };
 
-static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_template[] = {
+static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
        { /* Input data from RFC 2410 Case 1 */
 #ifdef __LITTLE_ENDIAN
                .key    = "\x08\x00"            /* rta length */
@@ -14010,7 +14799,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_template[] = {
        },
 };
 
-static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_template[] = {
+static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
        {
 #ifdef __LITTLE_ENDIAN
                .key    = "\x08\x00"            /* rta length */
@@ -14056,7 +14845,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_template[] = {
        },
 };
 
-static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
+static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
        { /* RFC 3602 Case 1 */
 #ifdef __LITTLE_ENDIAN
                .key    = "\x08\x00"            /* rta length */
@@ -14319,7 +15108,7 @@ static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
        },
 };
 
-static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
+static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
        { /* RFC 3602 Case 1 */
 #ifdef __LITTLE_ENDIAN
                .key    = "\x08\x00"            /* rta length */
@@ -14638,108 +15427,754 @@ static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
        },
 };
 
-static struct cipher_testvec aes_lrw_enc_tv_template[] = {
-       /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
-       { /* LRW-32-AES 1 */
-               .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
-                         "\x4c\x26\x84\x14\xb5\x68\x01\x85"
-                         "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
-                         "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
-               .klen   = 32,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x00\x00\x00\x00\x01",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
-               .ilen   = 16,
-               .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
-                         "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
-               .rlen   = 16,
-       }, { /* LRW-32-AES 2 */
-               .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
-                         "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
-                         "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
-                         "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
-               .klen   = 32,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x00\x00\x00\x00\x02",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
-               .ilen   = 16,
-               .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
-                         "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
-               .rlen   = 16,
-       }, { /* LRW-32-AES 3 */
-               .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
-                         "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
-                         "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
-                         "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
-               .klen   = 32,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x02\x00\x00\x00\x00",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
-               .ilen   = 16,
-               .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
-                         "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
-               .rlen   = 16,
-       }, { /* LRW-32-AES 4 */
-               .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
-                         "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
-                         "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
-                         "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
-                         "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
-               .klen   = 40,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x00\x00\x00\x00\x01",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
-               .ilen   = 16,
-               .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
-                         "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
-               .rlen   = 16,
-       }, { /* LRW-32-AES 5 */
-               .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
-                         "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
-                         "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
-                         "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
-                         "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
-               .klen   = 40,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x02\x00\x00\x00\x00",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
-               .ilen   = 16,
-               .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
-                         "\xc8\x60\x48\x02\x87\xe3\x34\x06",
-               .rlen   = 16,
-       }, { /* LRW-32-AES 6 */
-               .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
-                         "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
-                         "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
-                         "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
-                         "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
-                         "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
-               .klen   = 48,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x00\x00\x00\x00\x01",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
-               .ilen   = 16,
-               .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
-                         "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
-               .rlen   = 16,
-       }, { /* LRW-32-AES 7 */
-               .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
-                         "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
-                         "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
-                         "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
-                         "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
-                         "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
-               .klen   = 48,
-               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
-                         "\x00\x00\x00\x02\x00\x00\x00\x00",
-               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
-                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
+
+static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x08"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
+               .klen   = 8 + 20 + 8,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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"
+                         "\x54\x31\x85\x37\xed\x6b\x01\x8d"
+                         "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
+                         "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
+                         "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
+                         "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
+                         "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
+                         "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
+                         "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
+                         "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
+                         "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
+                         "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
+                         "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
+                         "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
+                         "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
+                         "\x53\xba\xe1\x76\xe3\x82\x07\x86"
+                         "\x95\x16\x20\x09\xf5\x95\x19\xfd"
+                         "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
+                         "\x5c\x44\xa9\x37",
+                         .rlen = 128 + 20,
+       },
+};
+
+#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC       1
+
+static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x08"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                 "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
+               .klen   = 8 + 24 + 8,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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"
+                         "\x54\x31\x85\x37\xed\x6b\x01\x8d"
+                         "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
+                         "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
+                         "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
+                         "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
+                         "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
+                         "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
+                         "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
+                         "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
+                         "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
+                         "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
+                 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
+                         "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
+                         "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
+                         "\x53\xba\xe1\x76\xe3\x82\x07\x86"
+                         "\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,
+       },
+};
+
+#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC       1
+
+static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x08"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
+               .klen   = 8 + 32 + 8,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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"
+                         "\x54\x31\x85\x37\xed\x6b\x01\x8d"
+                         "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
+                         "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
+                         "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
+                         "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
+                         "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
+                         "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
+                         "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
+                         "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
+                         "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
+                 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
+                         "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
+                 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
+                 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
+                         "\x53\xba\xe1\x76\xe3\x82\x07\x86"
+                         "\xc6\x58\xa1\x60\x70\x91\x39\x36"
+                         "\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,
+       },
+};
+
+#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC       1
+
+static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x08"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
+                         "\x33\x44\x55\x66\x77\x88\x99\xaa"
+                         "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
+               .klen   = 8 + 48 + 8,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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"
+                         "\x54\x31\x85\x37\xed\x6b\x01\x8d"
+                         "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
+                         "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
+                         "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
+                         "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
+                         "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
+                         "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
+                         "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
+                         "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
+                         "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
+                         "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
+                         "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
+                         "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
+                         "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
+                         "\x53\xba\xe1\x76\xe3\x82\x07\x86"
+                         "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
+                         "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
+                         "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
+                         "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
+                         "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
+                         "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
+               .rlen   = 128 + 48,
+       },
+};
+
+#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC       1
+
+static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x08"    /* enc key length */
+                 "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
+                         "\x33\x44\x55\x66\x77\x88\x99\xaa"
+                         "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
+                         "\x44\x55\x66\x77\x88\x99\xaa\xbb"
+                         "\xcc\xdd\xee\xff\x11\x22\x33\x44"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
+               .klen   = 8 + 64 + 8,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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"
+                         "\x54\x31\x85\x37\xed\x6b\x01\x8d"
+                         "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
+                         "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
+                         "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
+                         "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
+                         "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
+                 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
+                         "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
+                 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
+                         "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
+                         "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
+                         "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
+                         "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
+                 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
+                         "\x53\xba\xe1\x76\xe3\x82\x07\x86"
+                         "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
+                         "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
+                         "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
+                         "\x58\x83\xda\x67\xfb\x21\x24\xa2"
+                         "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
+                         "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
+                         "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
+                         "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
+               .rlen   = 128 + 64,
+       },
+};
+
+#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC    1
+
+static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x18"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55"
+                 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
+                         "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
+                         "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
+               .klen   = 8 + 20 + 24,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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 = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
+                         "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
+                 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
+                 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
+                 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
+                         "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
+                         "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
+                         "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
+                 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
+                         "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
+                         "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
+                         "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
+                         "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
+                         "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
+                         "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
+                         "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
+                         "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
+                         "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
+                         "\xd1\x60\x91\xb3",
+                         .rlen = 128 + 20,
+       },
+};
+
+#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC  1
+
+static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x18"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
+                         "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
+                         "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
+               .klen   = 8 + 24 + 24,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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 = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
+                 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
+                         "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
+                         "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
+                         "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
+                         "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
+                         "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
+                 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
+                         "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
+                         "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
+                         "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
+                         "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
+                         "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
+                 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
+                         "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
+                 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
+                         "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
+                         "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
+                         "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
+                         .rlen = 128 + 24,
+       },
+};
+
+#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC  1
+
+static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x18"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
+                         "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
+                         "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
+               .klen   = 8 + 32 + 24,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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 = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
+                         "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
+                         "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
+                         "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
+                         "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
+                         "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
+                         "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
+                         "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
+                         "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
+                         "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
+                         "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
+                         "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
+                         "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
+                         "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
+                         "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
+                         "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
+                         "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
+                         "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
+                         "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
+                         "\xca\x43\x95\xdf\x80\x61\x81\xa9",
+               .rlen   = 128 + 32,
+       },
+};
+
+#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC  1
+
+static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x18"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
+                         "\x33\x44\x55\x66\x77\x88\x99\xaa"
+                         "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
+                         "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
+                         "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
+               .klen   = 8 + 48 + 24,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+       .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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 = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
+                         "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
+                         "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
+                         "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
+                         "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
+                         "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
+                         "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
+                         "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
+                         "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
+                         "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
+                         "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
+                         "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
+                         "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
+                         "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
+                         "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
+                         "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
+                         "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
+                 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
+                         "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
+                         "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
+                         "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
+                         "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
+               .rlen   = 128 + 48,
+       },
+};
+
+#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC  1
+
+static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
+       { /*Generated with cryptopp*/
+#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\x18"    /* enc key length */
+                         "\x11\x22\x33\x44\x55\x66\x77\x88"
+                         "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
+                         "\x22\x33\x44\x55\x66\x77\x88\x99"
+                         "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
+                         "\x33\x44\x55\x66\x77\x88\x99\xaa"
+                         "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
+                         "\x44\x55\x66\x77\x88\x99\xaa\xbb"
+                         "\xcc\xdd\xee\xff\x11\x22\x33\x44"
+                         "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
+                 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
+                         "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
+               .klen   = 8 + 64 + 24,
+               .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
+               .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
+               .alen   = 8,
+               .input  = "\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"
+                         "\x20\x73\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\x20\x73\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\x20\x73\x6f\x54"
+                         "\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 = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
+                         "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
+                         "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
+                         "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
+                         "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
+                         "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
+                         "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
+                         "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
+                         "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
+                         "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
+                         "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
+                         "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
+                         "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
+                         "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
+                         "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
+                         "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
+                         "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
+                         "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
+                         "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
+                         "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
+                         "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
+                         "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
+                         "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
+                         "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
+               .rlen   = 128 + 64,
+       },
+};
+
+static struct cipher_testvec aes_lrw_enc_tv_template[] = {
+       /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
+       { /* LRW-32-AES 1 */
+               .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
+                         "\x4c\x26\x84\x14\xb5\x68\x01\x85"
+                         "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
+                         "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x01",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .ilen   = 16,
+               .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
+                         "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
+               .rlen   = 16,
+       }, { /* LRW-32-AES 2 */
+               .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
+                         "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
+                         "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
+                         "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x02",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .ilen   = 16,
+               .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
+                         "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
+               .rlen   = 16,
+       }, { /* LRW-32-AES 3 */
+               .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
+                         "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
+                         "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
+                         "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x02\x00\x00\x00\x00",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .ilen   = 16,
+               .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
+                         "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
+               .rlen   = 16,
+       }, { /* LRW-32-AES 4 */
+               .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
+                         "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
+                         "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
+                         "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
+                         "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
+               .klen   = 40,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x01",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .ilen   = 16,
+               .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
+                         "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
+               .rlen   = 16,
+       }, { /* LRW-32-AES 5 */
+               .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
+                         "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
+                         "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
+                         "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
+                         "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
+               .klen   = 40,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x02\x00\x00\x00\x00",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .ilen   = 16,
+               .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
+                         "\xc8\x60\x48\x02\x87\xe3\x34\x06",
+               .rlen   = 16,
+       }, { /* LRW-32-AES 6 */
+               .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
+                         "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
+                         "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
+                         "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
+                         "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
+                         "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
+               .klen   = 48,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x01",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .ilen   = 16,
+               .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
+                         "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
+               .rlen   = 16,
+       }, { /* LRW-32-AES 7 */
+               .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
+                         "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
+                         "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
+                         "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
+                         "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
+                         "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
+               .klen   = 48,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x02\x00\x00\x00\x00",
+               .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
                .ilen   = 16,
                .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
                          "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
@@ -14886,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 },
        }
 };
 
@@ -15140,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 },
        }
 };
 
@@ -15482,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 },
        }
 };
 
@@ -15824,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 },
        }
 };
 
@@ -16041,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"
@@ -16396,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"
@@ -18746,7 +20181,29 @@ static struct aead_testvec aes_ccm_enc_tv_template[] = {
                          "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
                          "\xba",
                .rlen   = 33,
-       },
+       }, {
+               /*
+                * This is the same vector as aes_ccm_rfc4309_enc_tv_template[0]
+                * below but rewritten to use the ccm algorithm directly.
+                */
+               .key    = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
+                         "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
+               .klen   = 16,
+               .iv     = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
+               .alen   = 0,
+               .input  = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
+                         "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
+                         "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
+                         "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
+               .ilen   = 32,
+               .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
+                         "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
+                         "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
+                         "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
+                         "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
+                         "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
+               .rlen   = 48,
+       }
 };
 
 static struct aead_testvec aes_ccm_dec_tv_template[] = {
@@ -19342,6 +20799,834 @@ static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
        },
 };
 
+/*
+ * SP800-90A DRBG Test vectors from
+ * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
+ *
+ * Test vectors for DRBG with prediction resistance. All types of DRBGs
+ * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
+ * w/o personalization string, w/ and w/o additional input string).
+ */
+static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
+                       "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
+                       "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
+                       "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
+                       "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
+                       "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
+               .entprb = (unsigned char *)
+                       "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
+                       "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
+                       "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
+                       "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
+                       "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
+                       "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
+                       "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
+                       "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
+                       "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
+                       "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
+                       "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
+                       "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
+                       "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
+                       "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
+                       "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
+                       "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
+                       "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
+                       "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
+               .entprb = (unsigned char *)
+                       "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
+                       "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
+                       "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
+                       "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
+                       "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
+                       "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
+                       "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
+                       "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
+                       "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
+                       "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
+                       "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
+                       "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
+                       "\x50\x47\xa3\x63\x81\x16\xaf\x19",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
+                       "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
+                       "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
+               .addtlb = (unsigned char *)
+                       "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
+                       "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
+                       "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
+               .addtllen = 32,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
+                       "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
+                       "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
+                       "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
+                       "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
+                       "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
+               .entprb = (unsigned char *)
+                       "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
+                       "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
+                       "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
+                       "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
+                       "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
+                       "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
+                       "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
+                       "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
+                       "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
+                       "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
+                       "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
+                       "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
+                       "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = (unsigned char *)
+                       "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
+                       "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
+                       "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
+               .perslen = 32,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
+                       "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
+                       "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
+                       "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
+                       "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
+                       "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
+               .entprb = (unsigned char *)
+                       "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
+                       "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
+                       "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
+                       "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
+                       "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
+                       "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
+                       "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
+                       "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
+                       "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
+                       "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
+                       "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
+                       "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
+                       "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
+                       "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
+                       "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
+               .addtlb = (unsigned char *)
+                       "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
+                       "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
+                       "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
+               .addtllen = 32,
+               .pers = (unsigned char *)
+                       "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
+                       "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
+                       "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
+               .perslen = 32,
+       },
+};
+
+static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
+                       "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
+                       "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
+                       "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
+                       "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
+                       "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
+               .entprb = (unsigned char *)
+                       "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
+                       "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
+                       "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
+                       "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
+                       "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
+                       "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
+                       "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
+                       "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
+                       "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
+                       "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
+                       "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
+                       "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
+                       "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
+                       "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
+                       "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
+                       "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
+                       "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
+                       "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
+               .entprb = (unsigned char *)
+                       "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
+                       "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
+                       "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
+                       "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
+                       "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
+                       "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
+                       "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
+                       "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
+                       "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
+                       "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
+                       "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
+                       "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
+                       "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
+                       "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
+                       "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
+               .addtlb = (unsigned char *)
+                       "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
+                       "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
+                       "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
+               .addtllen = 32,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
+                       "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
+                       "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
+                       "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
+                       "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
+                       "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
+               .entprb = (unsigned char *)
+                       "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
+                       "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
+                       "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
+                       "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
+                       "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
+                       "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
+                       "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
+                       "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
+                       "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
+                       "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
+                       "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
+                       "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
+                       "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = (unsigned char *)
+                       "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
+                       "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
+                       "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
+               .perslen = 32,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
+                       "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
+                       "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
+                       "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
+               .entropylen = 48,
+               .entpra = (unsigned char *)
+                       "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
+                       "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
+                       "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
+               .entprb = (unsigned char *)
+                       "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
+                       "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
+                       "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
+               .entprlen = 32,
+               .expected = (unsigned char *)
+                       "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
+                       "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
+                       "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
+                       "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
+                       "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
+                       "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
+                       "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
+                       "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
+                       "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
+                       "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
+                       "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
+                       "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
+                       "\x86\x88\x55\x28\xc1\x69\xdd\x76",
+               .addtlb = (unsigned char *)
+                       "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
+                       "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
+                       "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
+               .addtllen = 32,
+               .pers = (unsigned char *)
+                       "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
+                       "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
+                       "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
+               .perslen = 32,
+       },
+};
+
+static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
+                       "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
+               .entropylen = 24,
+               .entpra = (unsigned char *)
+                       "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
+                       "\xb4\xec\x80\xb1",
+               .entprb = (unsigned char *)
+                       "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
+                       "\x28\x07\xeb\xc2",
+               .entprlen = 16,
+               .expected = (unsigned char *)
+                       "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
+                       "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
+                       "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
+                       "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
+                       "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
+                       "\x8a\xf1\x23\xa8",
+               .expectedlen = 64,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
+                       "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
+               .entropylen = 24,
+               .entpra = (unsigned char *)
+                       "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
+                       "\x67\xd1\x08\xf8",
+               .entprb = (unsigned char *)
+                       "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
+                       "\xd4\xba\x04\x58",
+               .entprlen = 16,
+               .expected = (unsigned char *)
+                       "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
+                       "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
+                       "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
+                       "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
+                       "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
+                       "\xc1\x02\x41\x82",
+               .expectedlen = 64,
+               .addtla = (unsigned char *)
+                       "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
+                       "\xeb\xb3\x01\x76",
+               .addtlb = (unsigned char *)
+                       "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
+                       "\xd0\x7f\xcc\x43",
+               .addtllen = 16,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
+                       "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
+               .entropylen = 24,
+               .entpra = (unsigned char *)
+                       "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
+                       "\xc3\x0f\xe3\xb0",
+               .entprb = (unsigned char *)
+                       "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
+                       "\xd6\x9c\x9d\xe8",
+               .entprlen = 16,
+               .expected = (unsigned char *)
+                       "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
+                       "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
+                       "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
+                       "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
+                       "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
+                       "\x72\x82\x0c\xcf",
+               .expectedlen = 64,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = (unsigned char *)
+                       "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
+                       "\x21\x52\xb3\xad",
+               .perslen = 16,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
+                       "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
+               .entropylen = 24,
+               .entpra = (unsigned char *)
+                       "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
+                       "\xc4\x2c\xe8\x10",
+               .entprb = (unsigned char *)
+                       "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
+                       "\x08\xf7\xa5\x01",
+               .entprlen = 16,
+               .expected = (unsigned char *)
+                       "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
+                       "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
+                       "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
+                       "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
+                       "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
+                       "\x23\xc5\x1f\x68",
+               .expectedlen = 64,
+               .addtla = (unsigned char *)
+                       "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
+                       "\x23\x6d\xad\x1d",
+               .addtlb = (unsigned char *)
+                       "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
+                       "\xbc\x59\x31\x8c",
+               .addtllen = 16,
+               .pers = (unsigned char *)
+                       "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
+                       "\x37\x3c\x5c\x0b",
+               .perslen = 16,
+       },
+};
+
+/*
+ * SP800-90A DRBG Test vectors from
+ * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
+ *
+ * Test vectors for DRBG without prediction resistance. All types of DRBGs
+ * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
+ * w/o personalization string, w/ and w/o additional input string).
+ */
+static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
+                       "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
+                       "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
+                       "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
+                       "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
+                       "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
+                       "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
+                       "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
+                       "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
+                       "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
+                       "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
+                       "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
+                       "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
+                       "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
+                       "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
+                       "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
+                       "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
+                       "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
+                       "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
+                       "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
+                       "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
+                       "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
+                       "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
+                       "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
+                       "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
+                       "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
+                       "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
+                       "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
+                       "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
+               .addtlb = (unsigned char *)
+                       "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
+                       "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
+                       "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
+               .addtllen = 32,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
+                       "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
+                       "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
+                       "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
+                       "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
+                       "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
+                       "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
+                       "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
+                       "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
+                       "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
+                       "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
+                       "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
+                       "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
+                       "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = (unsigned char *)
+                       "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
+                       "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
+                       "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
+               .perslen = 32,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
+                       "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
+                       "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
+                       "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
+                       "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
+                       "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
+                       "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
+                       "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
+                       "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
+                       "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
+                       "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
+                       "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
+                       "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
+                       "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
+                       "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
+                       "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
+               .addtlb = (unsigned char *)
+                       "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
+                       "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
+                       "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
+               .addtllen = 32,
+               .pers = (unsigned char *)
+                       "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
+                       "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
+                       "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
+               .perslen = 32,
+       },
+};
+
+static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
+                       "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
+                       "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
+                       "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
+                       "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
+                       "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
+                       "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
+                       "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
+                       "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
+                       "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
+                       "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
+                       "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
+                       "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
+                       "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
+                       "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
+                       "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
+                       "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
+                       "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
+                       "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
+                       "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
+                       "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
+                       "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
+                       "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
+                       "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
+                       "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
+                       "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
+                       "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
+                       "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
+                       "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
+               .addtlb = (unsigned char *)
+                       "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
+                       "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
+                       "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
+               .addtllen = 32,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
+                       "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
+                       "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
+                       "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
+                       "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
+                       "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
+                       "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
+                       "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
+                       "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
+                       "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
+                       "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
+                       "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
+                       "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
+                       "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
+               .expectedlen = 128,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = (unsigned char *)
+                       "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
+                       "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
+                       "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
+               .perslen = 32,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
+                       "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
+                       "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
+                       "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
+                       "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
+                       "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
+                       "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
+                       "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
+                       "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
+                       "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
+                       "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
+                       "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
+                       "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
+                       "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
+               .expectedlen = 128,
+               .addtla = (unsigned char *)
+                       "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
+                       "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
+                       "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
+               .addtlb = (unsigned char *)
+                       "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
+                       "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
+                       "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
+               .addtllen = 32,
+               .pers = (unsigned char *)
+                       "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
+                       "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
+                       "\x36\x60\x3b\xca\x37\xc9\xee\x29",
+               .perslen = 32,
+       },
+};
+
+static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
+                       "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
+                       "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
+                       "\xac\x9b\xbb\x00",
+               .entropylen = 40,
+               .expected = (unsigned char *)
+                       "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
+                       "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
+                       "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
+                       "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
+                       "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
+                       "\x9a\x9d\xf1\x0d",
+               .expectedlen = 64,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       },
+};
+
+static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
+                       "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
+                       "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
+                       "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
+               .entropylen = 48,
+               .expected = (unsigned char *)
+                       "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
+                       "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
+                       "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
+                       "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
+                       "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
+                       "\xb4\xf0\x7e\x1d",
+               .expectedlen = 64,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       },
+};
+
+static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
+       {
+               .entropy = (unsigned char *)
+                       "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
+                       "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
+               .entropylen = 24,
+               .expected = (unsigned char *)
+                       "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
+                       "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
+                       "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
+                       "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
+                       "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
+                       "\xcb\x2d\xd6\xb0",
+               .expectedlen = 64,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
+                       "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
+               .entropylen = 24,
+               .expected = (unsigned char *)
+                       "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
+                       "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
+                       "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
+                       "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
+                       "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
+                       "\xc3\xdf\xb3\x81",
+               .expectedlen = 64,
+               .addtla = (unsigned char *)
+                       "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
+                       "\x91\x4d\x81\x56",
+               .addtlb = (unsigned char *)
+                       "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
+                       "\x4a\x55\xd1\xc6",
+               .addtllen = 16,
+               .pers = NULL,
+               .perslen = 0,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
+                       "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
+               .entropylen = 24,
+               .expected = (unsigned char *)
+                       "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
+                       "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
+                       "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
+                       "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
+                       "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
+                       "\x34\x30\x0c\x3d",
+               .expectedlen = 64,
+               .addtla = NULL,
+               .addtlb = NULL,
+               .addtllen = 0,
+               .pers = (unsigned char *)
+                       "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
+                       "\x0b\xc6\x97\x54",
+               .perslen = 16,
+       }, {
+               .entropy = (unsigned char *)
+                       "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
+                       "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
+               .entropylen = 24,
+               .expected = (unsigned char *)
+                       "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
+                       "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
+                       "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
+                       "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
+                       "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
+                       "\x2b\x49\x1e\x5c",
+               .expectedlen = 64,
+               .addtla = (unsigned char *)
+                       "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
+                       "\x44\x85\xe7\xfe",
+               .addtlb = (unsigned char *)
+                       "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
+                       "\x82\x16\x62\x7f",
+               .addtllen = 16,
+               .pers = (unsigned char *)
+                       "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
+                       "\x8e\xcf\xe0\x02",
+               .perslen = 16,
+       },
+};
+
 /* Cast5 test vectors from RFC 2144 */
 #define CAST5_ENC_TEST_VECTORS         4
 #define CAST5_DEC_TEST_VECTORS         4
@@ -19506,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 },
        },
 };
 
@@ -19667,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 },
        },
 };
 
@@ -19805,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 },
        },
 };
 
@@ -19943,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 },
        },
 };
 
@@ -20094,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 },
        },
 };
 
@@ -20245,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 },
        },
 };
 
@@ -21404,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 },
        },
 };
 
@@ -21704,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 },
        },
 };
 
@@ -22000,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 },
        },
 };
 
@@ -22296,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 },
        },
 };
 
@@ -23882,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 },
        },
 };
 
@@ -24135,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 },
        },
 };
 
@@ -24477,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 },
        },
 };
 
@@ -24820,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 },
        },
 };