Revert "ARM: tegra: tegratab: dummy change"
[linux-2.6.git] / crypto / testmgr.h
index 27de604..5213f91 100644 (file)
@@ -2444,10 +2444,12 @@ static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
 /*
  * Blowfish test vectors.
  */
-#define BF_ENC_TEST_VECTORS    6
-#define BF_DEC_TEST_VECTORS    6
-#define BF_CBC_ENC_TEST_VECTORS        1
-#define BF_CBC_DEC_TEST_VECTORS        1
+#define BF_ENC_TEST_VECTORS    7
+#define BF_DEC_TEST_VECTORS    7
+#define BF_CBC_ENC_TEST_VECTORS        2
+#define BF_CBC_DEC_TEST_VECTORS        2
+#define BF_CTR_ENC_TEST_VECTORS        2
+#define BF_CTR_DEC_TEST_VECTORS        2
 
 static struct cipher_testvec bf_enc_tv_template[] = {
        { /* DES test vectors from OpenSSL */
@@ -2501,6 +2503,24 @@ static struct cipher_testvec bf_enc_tv_template[] = {
                .ilen   = 8,
                .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
                .rlen   = 8,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .input  = "\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",
+               .ilen   = 40,
+               .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
+                         "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
+                         "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
+                         "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
+                         "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
+               .rlen   = 40,
        },
 };
 
@@ -2556,6 +2576,24 @@ static struct cipher_testvec bf_dec_tv_template[] = {
                .ilen   = 8,
                .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
                .rlen   = 8,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .input  = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
+                         "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
+                         "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
+                         "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
+                         "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
+               .ilen   = 40,
+               .result = "\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",
+               .rlen   = 40,
        },
 };
 
@@ -2575,6 +2613,25 @@ static struct cipher_testvec bf_cbc_enc_tv_template[] = {
                          "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
                          "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
                .rlen   = 32,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
+               .input  = "\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",
+               .ilen   = 40,
+               .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
+                         "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
+                         "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
+                         "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
+                         "\x01\x9C\x93\x63\x51\x60\x82\xD2",
+               .rlen   = 40,
        },
 };
 
@@ -2594,16 +2651,129 @@ static struct cipher_testvec bf_cbc_dec_tv_template[] = {
                          "\x68\x65\x20\x74\x69\x6d\x65\x20"
                          "\x66\x6f\x72\x20\x00\x00\x00\x00",
                .rlen   = 32,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
+               .input  = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
+                         "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
+                         "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
+                         "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
+                         "\x01\x9C\x93\x63\x51\x60\x82\xD2",
+               .ilen   = 40,
+               .result = "\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",
+               .rlen   = 40,
+       },
+};
+
+static struct cipher_testvec bf_ctr_enc_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
+               .input  = "\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",
+               .ilen   = 40,
+               .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
+                         "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
+                         "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
+                         "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
+                         "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
+               .rlen   = 40,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
+               .input  = "\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",
+               .ilen   = 43,
+               .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
+                         "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
+                         "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
+                         "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
+                         "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
+                         "\x3D\xA7\xE9",
+               .rlen   = 43,
+       },
+};
+
+static struct cipher_testvec bf_ctr_dec_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
+               .input  = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
+                         "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
+                         "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
+                         "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
+                         "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
+               .ilen   = 40,
+               .result = "\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",
+               .rlen   = 40,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
+               .input  = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
+                         "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
+                         "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
+                         "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
+                         "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
+                         "\x3D\xA7\xE9",
+               .ilen   = 43,
+               .result = "\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",
+               .rlen   = 43,
        },
 };
 
 /*
  * Twofish test vectors.
  */
-#define TF_ENC_TEST_VECTORS            3
-#define TF_DEC_TEST_VECTORS            3
-#define TF_CBC_ENC_TEST_VECTORS                4
-#define TF_CBC_DEC_TEST_VECTORS                4
+#define TF_ENC_TEST_VECTORS            4
+#define TF_DEC_TEST_VECTORS            4
+#define TF_CBC_ENC_TEST_VECTORS                5
+#define TF_CBC_DEC_TEST_VECTORS                5
+#define TF_CTR_ENC_TEST_VECTORS                2
+#define TF_CTR_DEC_TEST_VECTORS                2
+#define TF_LRW_ENC_TEST_VECTORS                8
+#define TF_LRW_DEC_TEST_VECTORS                8
+#define TF_XTS_ENC_TEST_VECTORS                5
+#define TF_XTS_DEC_TEST_VECTORS                5
 
 static struct cipher_testvec tf_enc_tv_template[] = {
        {
@@ -2635,6 +2805,30 @@ static struct cipher_testvec tf_enc_tv_template[] = {
                .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
                          "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
                .rlen   = 16,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
+                         "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
+                         "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
+                         "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
+               .klen   = 32,
+               .input  = "\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",
+               .ilen   = 64,
+               .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
+                         "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
+                         "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
+                         "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
+                         "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
+                         "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
+                         "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
+                         "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
+               .rlen   = 64,
        },
 };
 
@@ -2668,6 +2862,30 @@ static struct cipher_testvec tf_dec_tv_template[] = {
                .ilen   = 16,
                .result = zeroed_string,
                .rlen   = 16,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
+                         "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
+                         "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
+                         "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
+               .klen   = 32,
+               .input  = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
+                         "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
+                         "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
+                         "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
+                         "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
+                         "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
+                         "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
+                         "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
+               .ilen   = 64,
+               .result = "\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",
+               .rlen   = 64,
        },
 };
 
@@ -2714,6 +2932,32 @@ static struct cipher_testvec tf_cbc_enc_tv_template[] = {
                          "\x05\xef\x8c\x61\xa8\x11\x58\x26"
                          "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
                .rlen   = 48,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 64,
+               .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
+                         "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
+                         "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
+                         "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
+                         "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
+                         "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
+                         "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
+                         "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
+               .rlen   = 64,
        },
 };
 
@@ -2760,6 +3004,1326 @@ static struct cipher_testvec tf_cbc_dec_tv_template[] = {
                .ilen   = 48,
                .result = zeroed_string,
                .rlen   = 48,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
+                         "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
+                         "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
+                         "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
+                         "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
+                         "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
+                         "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
+                         "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
+               .ilen   = 64,
+               .result = "\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",
+               .rlen   = 64,
+       },
+};
+
+static struct cipher_testvec tf_ctr_enc_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 64,
+               .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
+                         "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
+                         "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
+                         "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
+                         "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
+                         "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
+                         "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
+                         "\x01\x41\x21\x12\x38\xAB\x52\x4F",
+               .rlen   = 64,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 67,
+               .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
+                         "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
+                         "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
+                         "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
+                         "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
+                         "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
+                         "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
+                         "\x01\x41\x21\x12\x38\xAB\x52\x4F"
+                         "\xA8\x57\x20",
+               .rlen   = 67,
+       },
+};
+
+static struct cipher_testvec tf_ctr_dec_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
+                         "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
+                         "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
+                         "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
+                         "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
+                         "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
+                         "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
+                         "\x01\x41\x21\x12\x38\xAB\x52\x4F",
+               .ilen   = 64,
+               .result = "\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",
+               .rlen   = 64,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
+                         "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
+                         "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
+                         "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
+                         "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
+                         "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
+                         "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
+                         "\x01\x41\x21\x12\x38\xAB\x52\x4F"
+                         "\xA8\x57\x20",
+               .ilen   = 67,
+               .result = "\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",
+               .rlen   = 67,
+       },
+};
+
+static struct cipher_testvec tf_lrw_enc_tv_template[] = {
+       /* Generated from AES-LRW test vectors */
+       {
+               .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 = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
+                         "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
+               .rlen   = 16,
+       }, {
+               .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 = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
+                         "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
+               .rlen   = 16,
+       }, {
+               .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 = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
+                         "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
+               .rlen   = 16,
+       }, {
+               .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 = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
+                         "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
+               .rlen   = 16,
+       }, {
+               .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 = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
+                         "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
+               .rlen   = 16,
+       }, {
+               .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 = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
+                         "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
+               .rlen   = 16,
+       }, {
+               .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 = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
+                         "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
+               .rlen   = 16,
+       }, {
+               .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  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
+                         "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
+                         "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
+                         "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
+                         "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
+                         "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
+                         "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
+                         "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
+                         "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
+                         "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
+                         "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
+                         "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
+                         "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
+                         "\x4c\x96\x12\xed\x7c\x92\x03\x01"
+                         "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
+                         "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
+                         "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
+                         "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
+                         "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
+                         "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
+                         "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
+                         "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
+                         "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
+                         "\x76\x12\x73\x44\x1a\x56\xd7\x72"
+                         "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
+                         "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
+                         "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
+                         "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
+                         "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
+                         "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
+                         "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
+                         "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
+                         "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
+                         "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
+                         "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
+                         "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
+                         "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
+                         "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
+                         "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
+                         "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
+                         "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
+                         "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
+                         "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
+                         "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
+                         "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
+                         "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
+                         "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
+                         "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
+                         "\x62\x73\x65\xfd\x46\x63\x25\x3d"
+                         "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
+                         "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
+                         "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
+                         "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
+                         "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
+                         "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
+                         "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
+                         "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
+                         "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
+                         "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
+                         "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
+                         "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
+                         "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
+                         "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
+                         "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
+               .ilen   = 512,
+               .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
+                         "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
+                         "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
+                         "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
+                         "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
+                         "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
+                         "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
+                         "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
+                         "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
+                         "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
+                         "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
+                         "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
+                         "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
+                         "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
+                         "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
+                         "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
+                         "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
+                         "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
+                         "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
+                         "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
+                         "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
+                         "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
+                         "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
+                         "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
+                         "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
+                         "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
+                         "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
+                         "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
+                         "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
+                         "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
+                         "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
+                         "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
+                         "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
+                         "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
+                         "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
+                         "\x3e\xae\x71\x90\x07\x70\x1c\x38"
+                         "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
+                         "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
+                         "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
+                         "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
+                         "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
+                         "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
+                         "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
+                         "\x93\x51\x1d\x3d\x62\x59\x83\x82"
+                         "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
+                         "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
+                         "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
+                         "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
+                         "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
+                         "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
+                         "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
+                         "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
+                         "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
+                         "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
+                         "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
+                         "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
+                         "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
+                         "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
+                         "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
+                         "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
+                         "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
+                         "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
+                         "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
+                         "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec tf_lrw_dec_tv_template[] = {
+       /* Generated from AES-LRW test vectors */
+       /* same as enc vectors with input and result reversed */
+       {
+               .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  = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
+                         "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
+                         "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
+                         "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
+                         "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
+                         "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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\xaf\x26\x05\x9d\x5d\x0a\x58"
+                         "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
+                         "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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\x38\xeb\xaf\x12\x43\x1a\x89"
+                         "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
+                         "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
+                         "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
+                         "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
+                         "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
+                         "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
+                         "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
+                         "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
+                         "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
+                         "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
+                         "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
+                         "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
+                         "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
+                         "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
+                         "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
+                         "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
+                         "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
+                         "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
+                         "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
+                         "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
+                         "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
+                         "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
+                         "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
+                         "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
+                         "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
+                         "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
+                         "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
+                         "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
+                         "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
+                         "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
+                         "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
+                         "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
+                         "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
+                         "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
+                         "\x3e\xae\x71\x90\x07\x70\x1c\x38"
+                         "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
+                         "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
+                         "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
+                         "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
+                         "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
+                         "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
+                         "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
+                         "\x93\x51\x1d\x3d\x62\x59\x83\x82"
+                         "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
+                         "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
+                         "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
+                         "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
+                         "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
+                         "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
+                         "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
+                         "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
+                         "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
+                         "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
+                         "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
+                         "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
+                         "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
+                         "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
+                         "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
+                         "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
+                         "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
+                         "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
+                         "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
+                         "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
+               .ilen   = 512,
+               .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
+                         "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
+                         "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
+                         "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
+                         "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
+                         "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
+                         "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
+                         "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
+                         "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
+                         "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
+                         "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
+                         "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
+                         "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
+                         "\x4c\x96\x12\xed\x7c\x92\x03\x01"
+                         "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
+                         "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
+                         "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
+                         "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
+                         "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
+                         "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
+                         "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
+                         "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
+                         "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
+                         "\x76\x12\x73\x44\x1a\x56\xd7\x72"
+                         "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
+                         "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
+                         "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
+                         "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
+                         "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
+                         "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
+                         "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
+                         "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
+                         "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
+                         "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
+                         "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
+                         "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
+                         "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
+                         "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
+                         "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
+                         "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
+                         "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
+                         "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
+                         "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
+                         "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
+                         "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
+                         "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
+                         "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
+                         "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
+                         "\x62\x73\x65\xfd\x46\x63\x25\x3d"
+                         "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
+                         "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
+                         "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
+                         "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
+                         "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
+                         "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
+                         "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
+                         "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
+                         "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
+                         "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
+                         "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
+                         "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
+                         "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
+                         "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
+                         "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec tf_xts_enc_tv_template[] = {
+       /* Generated from AES-XTS test vectors */
+{
+               .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .ilen   = 32,
+               .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
+                         "\x30\x74\xe4\x44\x52\x77\x97\x43"
+                         "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
+                         "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
+               .rlen   = 32,
+       }, {
+               .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .ilen   = 32,
+               .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
+                         "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
+                         "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
+                         "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
+               .rlen   = 32,
+       }, {
+               .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+                         "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .ilen   = 32,
+               .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
+                         "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
+                         "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
+                         "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
+               .rlen   = 32,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .ilen   = 512,
+               .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
+                         "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
+                         "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
+                         "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
+                         "\xea\x35\x35\x8c\xb2\x46\x61\x06"
+                         "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
+                         "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
+                         "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
+                         "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
+                         "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
+                         "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
+                         "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
+                         "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
+                         "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
+                         "\x01\x73\x68\x32\x25\x19\xfa\xfb"
+                         "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
+                         "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
+                         "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
+                         "\x39\x80\x39\x09\x97\x65\xf2\x83"
+                         "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
+                         "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
+                         "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
+                         "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
+                         "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
+                         "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
+                         "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
+                         "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
+                         "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
+                         "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
+                         "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
+                         "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
+                         "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
+                         "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
+                         "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
+                         "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
+                         "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
+                         "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
+                         "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
+                         "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
+                         "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
+                         "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
+                         "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
+                         "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
+                         "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
+                         "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
+                         "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
+                         "\x04\x39\x73\x32\xb2\x86\x79\xe7"
+                         "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
+                         "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
+                         "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
+                         "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
+                         "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
+                         "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
+                         "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
+                         "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
+                         "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
+                         "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
+                         "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
+                         "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
+                         "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
+                         "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
+                         "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
+                         "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
+                         "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
+               .rlen   = 512,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x62\x49\x77\x57\x24\x70\x93\x69"
+                         "\x99\x59\x57\x49\x66\x96\x76\x27"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95"
+                         "\x02\x88\x41\x97\x16\x93\x99\x37"
+                         "\x51\x05\x82\x09\x74\x94\x45\x92",
+               .klen   = 64,
+               .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .ilen   = 512,
+               .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
+                         "\x35\x39\x71\x88\x76\x1e\xc9\xea"
+                         "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
+                         "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
+                         "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
+                         "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
+                         "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
+                         "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
+                         "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
+                         "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
+                         "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
+                         "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
+                         "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
+                         "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
+                         "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
+                         "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
+                         "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
+                         "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
+                         "\x69\x35\x61\x86\xf8\x86\xb9\x89"
+                         "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
+                         "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
+                         "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
+                         "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
+                         "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
+                         "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
+                         "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
+                         "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
+                         "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
+                         "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
+                         "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
+                         "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
+                         "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
+                         "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
+                         "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
+                         "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
+                         "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
+                         "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
+                         "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
+                         "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
+                         "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
+                         "\xad\x12\x32\x31\x03\xf7\x21\xbe"
+                         "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
+                         "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
+                         "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
+                         "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
+                         "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
+                         "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
+                         "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
+                         "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
+                         "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
+                         "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
+                         "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
+                         "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
+                         "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
+                         "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
+                         "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
+                         "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
+                         "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
+                         "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
+                         "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
+                         "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
+                         "\xf3\xea\x67\x52\x78\xc2\xce\x70"
+                         "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
+                         "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec tf_xts_dec_tv_template[] = {
+       /* Generated from AES-XTS test vectors */
+       /* same as enc vectors with input and result reversed */
+       {
+               .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
+                         "\x30\x74\xe4\x44\x52\x77\x97\x43"
+                         "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
+                         "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
+               .ilen   = 32,
+               .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .rlen   = 32,
+       }, {
+               .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
+                         "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
+                         "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
+                         "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
+               .ilen   = 32,
+               .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .rlen   = 32,
+       }, {
+               .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+                         "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
+                         "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
+                         "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
+                         "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
+               .ilen   = 32,
+               .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .rlen   = 32,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
+                         "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
+                         "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
+                         "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
+                         "\xea\x35\x35\x8c\xb2\x46\x61\x06"
+                         "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
+                         "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
+                         "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
+                         "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
+                         "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
+                         "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
+                         "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
+                         "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
+                         "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
+                         "\x01\x73\x68\x32\x25\x19\xfa\xfb"
+                         "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
+                         "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
+                         "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
+                         "\x39\x80\x39\x09\x97\x65\xf2\x83"
+                         "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
+                         "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
+                         "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
+                         "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
+                         "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
+                         "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
+                         "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
+                         "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
+                         "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
+                         "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
+                         "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
+                         "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
+                         "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
+                         "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
+                         "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
+                         "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
+                         "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
+                         "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
+                         "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
+                         "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
+                         "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
+                         "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
+                         "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
+                         "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
+                         "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
+                         "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
+                         "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
+                         "\x04\x39\x73\x32\xb2\x86\x79\xe7"
+                         "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
+                         "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
+                         "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
+                         "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
+                         "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
+                         "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
+                         "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
+                         "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
+                         "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
+                         "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
+                         "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
+                         "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
+                         "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
+                         "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
+                         "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
+                         "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
+                         "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
+               .ilen   = 512,
+               .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .rlen   = 512,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x62\x49\x77\x57\x24\x70\x93\x69"
+                         "\x99\x59\x57\x49\x66\x96\x76\x27"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95"
+                         "\x02\x88\x41\x97\x16\x93\x99\x37"
+                         "\x51\x05\x82\x09\x74\x94\x45\x92",
+               .klen   = 64,
+               .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
+                         "\x35\x39\x71\x88\x76\x1e\xc9\xea"
+                         "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
+                         "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
+                         "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
+                         "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
+                         "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
+                         "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
+                         "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
+                         "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
+                         "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
+                         "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
+                         "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
+                         "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
+                         "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
+                         "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
+                         "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
+                         "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
+                         "\x69\x35\x61\x86\xf8\x86\xb9\x89"
+                         "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
+                         "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
+                         "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
+                         "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
+                         "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
+                         "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
+                         "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
+                         "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
+                         "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
+                         "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
+                         "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
+                         "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
+                         "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
+                         "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
+                         "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
+                         "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
+                         "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
+                         "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
+                         "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
+                         "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
+                         "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
+                         "\xad\x12\x32\x31\x03\xf7\x21\xbe"
+                         "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
+                         "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
+                         "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
+                         "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
+                         "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
+                         "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
+                         "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
+                         "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
+                         "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
+                         "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
+                         "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
+                         "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
+                         "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
+                         "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
+                         "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
+                         "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
+                         "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
+                         "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
+                         "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
+                         "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
+                         "\xf3\xea\x67\x52\x78\xc2\xce\x70"
+                         "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
+                         "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
+               .ilen   = 512,
+               .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .rlen   = 512,
        },
 };
 
@@ -2767,12 +4331,24 @@ static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  * Serpent test vectors.  These are backwards because Serpent writes
  * octet sequences in right-to-left mode.
  */
-#define SERPENT_ENC_TEST_VECTORS       4
-#define SERPENT_DEC_TEST_VECTORS       4
+#define SERPENT_ENC_TEST_VECTORS       5
+#define SERPENT_DEC_TEST_VECTORS       5
 
 #define TNEPRES_ENC_TEST_VECTORS       4
 #define TNEPRES_DEC_TEST_VECTORS       4
 
+#define SERPENT_CBC_ENC_TEST_VECTORS   1
+#define SERPENT_CBC_DEC_TEST_VECTORS   1
+
+#define SERPENT_CTR_ENC_TEST_VECTORS   2
+#define SERPENT_CTR_DEC_TEST_VECTORS   2
+
+#define SERPENT_LRW_ENC_TEST_VECTORS   8
+#define SERPENT_LRW_DEC_TEST_VECTORS   8
+
+#define SERPENT_XTS_ENC_TEST_VECTORS   5
+#define SERPENT_XTS_DEC_TEST_VECTORS   5
+
 static struct cipher_testvec serpent_enc_tv_template[] = {
        {
                .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
@@ -2811,6 +4387,50 @@ static struct cipher_testvec serpent_enc_tv_template[] = {
                .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
                          "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
                .rlen   = 16,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .input  = "\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",
+               .ilen   = 144,
+               .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
+                         "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
+                         "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
+                         "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
+                         "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
+                         "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
+                         "\x99\x34\x89\x5B\x54\xE9\x12\x13"
+                         "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
+                         "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
+                         "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
+                         "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
+                         "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
+                         "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
+                         "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
+                         "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
+                         "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
+                         "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
+                         "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
+               .rlen   = 144,
        },
 };
 
@@ -2902,6 +4522,50 @@ static struct cipher_testvec serpent_dec_tv_template[] = {
                .ilen   = 16,
                .result = zeroed_string,
                .rlen   = 16,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .input  = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
+                         "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
+                         "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
+                         "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
+                         "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
+                         "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
+                         "\x99\x34\x89\x5B\x54\xE9\x12\x13"
+                         "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
+                         "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
+                         "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
+                         "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
+                         "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
+                         "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
+                         "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
+                         "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
+                         "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
+                         "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
+                         "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
+               .ilen   = 144,
+               .result = "\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",
+               .rlen   = 144,
        },
 };
 
@@ -2946,6 +4610,1479 @@ static struct cipher_testvec tnepres_dec_tv_template[] = {
        },
 };
 
+static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 144,
+               .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
+                         "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
+                         "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
+                         "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
+                         "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
+                         "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
+                         "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
+                         "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
+                         "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
+                         "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
+                         "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
+                         "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
+                         "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
+                         "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
+                         "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
+                         "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
+                         "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
+                         "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
+               .rlen   = 144,
+       },
+};
+
+static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
+                         "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
+                         "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
+                         "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
+                         "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
+                         "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
+                         "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
+                         "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
+                         "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
+                         "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
+                         "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
+                         "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
+                         "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
+                         "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
+                         "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
+                         "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
+                         "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
+                         "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
+               .ilen   = 144,
+               .result = "\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",
+               .rlen   = 144,
+       },
+};
+
+static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 144,
+               .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
+                         "\x37\x69\xE3\x3A\x22\x85\x48\x46"
+                         "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
+                         "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
+                         "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
+                         "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
+                         "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
+                         "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
+                         "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
+                         "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
+                         "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
+                         "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
+                         "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
+                         "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
+                         "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
+                         "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
+                         "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
+                         "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
+               .rlen   = 144,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 147,
+               .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
+                         "\x37\x69\xE3\x3A\x22\x85\x48\x46"
+                         "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
+                         "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
+                         "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
+                         "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
+                         "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
+                         "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
+                         "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
+                         "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
+                         "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
+                         "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
+                         "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
+                         "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
+                         "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
+                         "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
+                         "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
+                         "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
+                         "\xE6\xD0\x97",
+               .rlen   = 147,
+       },
+};
+
+static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
+                         "\x37\x69\xE3\x3A\x22\x85\x48\x46"
+                         "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
+                         "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
+                         "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
+                         "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
+                         "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
+                         "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
+                         "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
+                         "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
+                         "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
+                         "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
+                         "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
+                         "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
+                         "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
+                         "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
+                         "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
+                         "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
+               .ilen   = 144,
+               .result = "\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",
+               .rlen   = 144,
+       }, { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
+                         "\x37\x69\xE3\x3A\x22\x85\x48\x46"
+                         "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
+                         "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
+                         "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
+                         "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
+                         "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
+                         "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
+                         "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
+                         "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
+                         "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
+                         "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
+                         "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
+                         "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
+                         "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
+                         "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
+                         "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
+                         "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
+                         "\xE6\xD0\x97",
+               .ilen   = 147,
+               .result = "\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",
+               .rlen   = 147,
+       },
+};
+
+static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
+       /* Generated from AES-LRW test vectors */
+       {
+               .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 = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
+                         "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
+               .rlen   = 16,
+       }, {
+               .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 = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
+                         "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
+               .rlen   = 16,
+       }, {
+               .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 = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
+                         "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
+               .rlen   = 16,
+       }, {
+               .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 = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
+                         "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
+               .rlen   = 16,
+       }, {
+               .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 = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
+                         "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
+               .rlen   = 16,
+       }, {
+               .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 = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
+                         "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
+               .rlen   = 16,
+       }, {
+               .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 = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
+                         "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
+               .rlen   = 16,
+       }, {
+               .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  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
+                         "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
+                         "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
+                         "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
+                         "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
+                         "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
+                         "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
+                         "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
+                         "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
+                         "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
+                         "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
+                         "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
+                         "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
+                         "\x4c\x96\x12\xed\x7c\x92\x03\x01"
+                         "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
+                         "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
+                         "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
+                         "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
+                         "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
+                         "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
+                         "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
+                         "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
+                         "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
+                         "\x76\x12\x73\x44\x1a\x56\xd7\x72"
+                         "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
+                         "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
+                         "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
+                         "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
+                         "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
+                         "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
+                         "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
+                         "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
+                         "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
+                         "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
+                         "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
+                         "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
+                         "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
+                         "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
+                         "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
+                         "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
+                         "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
+                         "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
+                         "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
+                         "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
+                         "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
+                         "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
+                         "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
+                         "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
+                         "\x62\x73\x65\xfd\x46\x63\x25\x3d"
+                         "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
+                         "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
+                         "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
+                         "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
+                         "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
+                         "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
+                         "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
+                         "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
+                         "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
+                         "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
+                         "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
+                         "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
+                         "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
+                         "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
+                         "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
+               .ilen   = 512,
+               .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
+                         "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
+                         "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
+                         "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
+                         "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
+                         "\xce\xab\xda\x33\x30\x20\x12\xfa"
+                         "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
+                         "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
+                         "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
+                         "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
+                         "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
+                         "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
+                         "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
+                         "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
+                         "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
+                         "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
+                         "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
+                         "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
+                         "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
+                         "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
+                         "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
+                         "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
+                         "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
+                         "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
+                         "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
+                         "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
+                         "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
+                         "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
+                         "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
+                         "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
+                         "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
+                         "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
+                         "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
+                         "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
+                         "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
+                         "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
+                         "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
+                         "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
+                         "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
+                         "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
+                         "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
+                         "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
+                         "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
+                         "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
+                         "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
+                         "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
+                         "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
+                         "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
+                         "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
+                         "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
+                         "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
+                         "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
+                         "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
+                         "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
+                         "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
+                         "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
+                         "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
+                         "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
+                         "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
+                         "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
+                         "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
+                         "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
+                         "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
+                         "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
+       /* Generated from AES-LRW test vectors */
+       /* same as enc vectors with input and result reversed */
+       {
+               .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  = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
+                         "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
+                         "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
+                         "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
+                         "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
+                         "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
+                         "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
+                         "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
+                         "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
+                         "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
+                         "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
+                         "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
+                         "\xce\xab\xda\x33\x30\x20\x12\xfa"
+                         "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
+                         "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
+                         "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
+                         "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
+                         "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
+                         "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
+                         "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
+                         "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
+                         "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
+                         "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
+                         "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
+                         "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
+                         "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
+                         "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
+                         "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
+                         "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
+                         "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
+                         "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
+                         "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
+                         "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
+                         "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
+                         "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
+                         "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
+                         "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
+                         "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
+                         "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
+                         "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
+                         "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
+                         "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
+                         "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
+                         "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
+                         "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
+                         "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
+                         "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
+                         "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
+                         "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
+                         "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
+                         "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
+                         "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
+                         "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
+                         "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
+                         "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
+                         "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
+                         "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
+                         "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
+                         "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
+                         "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
+                         "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
+                         "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
+                         "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
+                         "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
+                         "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
+                         "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
+                         "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
+                         "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
+                         "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
+                         "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
+                         "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
+               .ilen   = 512,
+               .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
+                         "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
+                         "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
+                         "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
+                         "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
+                         "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
+                         "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
+                         "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
+                         "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
+                         "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
+                         "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
+                         "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
+                         "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
+                         "\x4c\x96\x12\xed\x7c\x92\x03\x01"
+                         "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
+                         "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
+                         "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
+                         "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
+                         "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
+                         "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
+                         "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
+                         "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
+                         "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
+                         "\x76\x12\x73\x44\x1a\x56\xd7\x72"
+                         "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
+                         "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
+                         "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
+                         "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
+                         "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
+                         "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
+                         "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
+                         "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
+                         "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
+                         "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
+                         "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
+                         "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
+                         "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
+                         "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
+                         "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
+                         "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
+                         "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
+                         "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
+                         "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
+                         "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
+                         "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
+                         "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
+                         "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
+                         "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
+                         "\x62\x73\x65\xfd\x46\x63\x25\x3d"
+                         "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
+                         "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
+                         "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
+                         "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
+                         "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
+                         "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
+                         "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
+                         "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
+                         "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
+                         "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
+                         "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
+                         "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
+                         "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
+                         "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
+                         "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec serpent_xts_enc_tv_template[] = {
+       /* Generated from AES-XTS test vectors */
+       {
+               .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .ilen   = 32,
+               .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
+                         "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
+                         "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
+                         "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
+               .rlen   = 32,
+       }, {
+               .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .ilen   = 32,
+               .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
+                         "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
+                         "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
+                         "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
+               .rlen   = 32,
+       }, {
+               .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+                         "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .ilen   = 32,
+               .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
+                         "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
+                         "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
+                         "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
+               .rlen   = 32,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .ilen   = 512,
+               .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
+                         "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
+                         "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
+                         "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
+                         "\x00\x5c\x75\x14\x06\xd6\x25\x82"
+                         "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
+                         "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
+                         "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
+                         "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
+                         "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
+                         "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
+                         "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
+                         "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
+                         "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
+                         "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
+                         "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
+                         "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
+                         "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
+                         "\x58\xfa\x43\x91\x16\x85\x40\xbb"
+                         "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
+                         "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
+                         "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
+                         "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
+                         "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
+                         "\x6e\x29\x60\xbd\x10\x14\x84\x82"
+                         "\x83\x82\x0c\x63\x73\x92\x02\x7c"
+                         "\x55\x37\x20\x80\x17\x51\xc8\xbc"
+                         "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
+                         "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
+                         "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
+                         "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
+                         "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
+                         "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
+                         "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
+                         "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
+                         "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
+                         "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
+                         "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
+                         "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
+                         "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
+                         "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
+                         "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
+                         "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
+                         "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
+                         "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
+                         "\x43\x42\x35\xd0\xcf\xec\x77\x67"
+                         "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
+                         "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
+                         "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
+                         "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
+                         "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
+                         "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
+                         "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
+                         "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
+                         "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
+                         "\x03\x57\xe6\x98\x52\x2f\x61\x62"
+                         "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
+                         "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
+                         "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
+                         "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
+                         "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
+                         "\xef\x91\x64\x1d\x18\x07\x4e\x31"
+                         "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
+                         "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
+               .rlen   = 512,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x62\x49\x77\x57\x24\x70\x93\x69"
+                         "\x99\x59\x57\x49\x66\x96\x76\x27"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95"
+                         "\x02\x88\x41\x97\x16\x93\x99\x37"
+                         "\x51\x05\x82\x09\x74\x94\x45\x92",
+               .klen   = 64,
+               .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .ilen   = 512,
+               .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
+                         "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
+                         "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
+                         "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
+                         "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
+                         "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
+                         "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
+                         "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
+                         "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
+                         "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
+                         "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
+                         "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
+                         "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
+                         "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
+                         "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
+                         "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
+                         "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
+                         "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
+                         "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
+                         "\xec\x9a\xda\x64\x96\xb5\x61\xff"
+                         "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
+                         "\x81\x85\x14\xa8\x59\xac\x8c\x94"
+                         "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
+                         "\x82\xc6\x4d\xca\x86\xea\x53\x28"
+                         "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
+                         "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
+                         "\x05\xca\x81\x7b\xda\xa2\xde\x63"
+                         "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
+                         "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
+                         "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
+                         "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
+                         "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
+                         "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
+                         "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
+                         "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
+                         "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
+                         "\xfd\x43\x7d\xda\x42\x51\x87\x43"
+                         "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
+                         "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
+                         "\x27\x5f\x11\xac\x71\xc7\x48\x46"
+                         "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
+                         "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
+                         "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
+                         "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
+                         "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
+                         "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
+                         "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
+                         "\x50\x88\x97\x40\x69\xb1\x37\xf5"
+                         "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
+                         "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
+                         "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
+                         "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
+                         "\xc1\x16\x73\x50\x77\xba\xa6\x65"
+                         "\x20\x2d\xb0\x02\x27\x89\xda\x99"
+                         "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
+                         "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
+                         "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
+                         "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
+                         "\xa3\x0e\x33\x74\x40\x18\x39\x72"
+                         "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
+                         "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
+                         "\x30\x05\xc8\x92\x98\x80\xff\x7a"
+                         "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
+                         "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec serpent_xts_dec_tv_template[] = {
+       /* Generated from AES-XTS test vectors */
+       /* same as enc vectors with input and result reversed */
+       {
+               .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
+                         "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
+                         "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
+                         "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
+               .ilen   = 32,
+               .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .rlen   = 32,
+       }, {
+               .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
+                         "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
+                         "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
+                         "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
+               .ilen   = 32,
+               .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .rlen   = 32,
+       }, {
+               .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+                         "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
+                         "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
+                         "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
+                         "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
+               .ilen   = 32,
+               .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .rlen   = 32,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
+                         "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
+                         "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
+                         "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
+                         "\x00\x5c\x75\x14\x06\xd6\x25\x82"
+                         "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
+                         "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
+                         "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
+                         "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
+                         "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
+                         "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
+                         "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
+                         "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
+                         "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
+                         "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
+                         "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
+                         "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
+                         "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
+                         "\x58\xfa\x43\x91\x16\x85\x40\xbb"
+                         "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
+                         "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
+                         "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
+                         "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
+                         "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
+                         "\x6e\x29\x60\xbd\x10\x14\x84\x82"
+                         "\x83\x82\x0c\x63\x73\x92\x02\x7c"
+                         "\x55\x37\x20\x80\x17\x51\xc8\xbc"
+                         "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
+                         "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
+                         "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
+                         "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
+                         "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
+                         "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
+                         "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
+                         "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
+                         "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
+                         "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
+                         "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
+                         "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
+                         "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
+                         "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
+                         "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
+                         "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
+                         "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
+                         "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
+                         "\x43\x42\x35\xd0\xcf\xec\x77\x67"
+                         "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
+                         "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
+                         "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
+                         "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
+                         "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
+                         "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
+                         "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
+                         "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
+                         "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
+                         "\x03\x57\xe6\x98\x52\x2f\x61\x62"
+                         "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
+                         "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
+                         "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
+                         "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
+                         "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
+                         "\xef\x91\x64\x1d\x18\x07\x4e\x31"
+                         "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
+                         "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
+               .ilen   = 512,
+               .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .rlen   = 512,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x62\x49\x77\x57\x24\x70\x93\x69"
+                         "\x99\x59\x57\x49\x66\x96\x76\x27"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95"
+                         "\x02\x88\x41\x97\x16\x93\x99\x37"
+                         "\x51\x05\x82\x09\x74\x94\x45\x92",
+               .klen   = 64,
+               .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
+                         "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
+                         "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
+                         "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
+                         "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
+                         "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
+                         "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
+                         "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
+                         "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
+                         "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
+                         "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
+                         "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
+                         "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
+                         "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
+                         "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
+                         "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
+                         "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
+                         "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
+                         "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
+                         "\xec\x9a\xda\x64\x96\xb5\x61\xff"
+                         "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
+                         "\x81\x85\x14\xa8\x59\xac\x8c\x94"
+                         "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
+                         "\x82\xc6\x4d\xca\x86\xea\x53\x28"
+                         "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
+                         "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
+                         "\x05\xca\x81\x7b\xda\xa2\xde\x63"
+                         "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
+                         "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
+                         "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
+                         "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
+                         "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
+                         "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
+                         "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
+                         "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
+                         "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
+                         "\xfd\x43\x7d\xda\x42\x51\x87\x43"
+                         "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
+                         "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
+                         "\x27\x5f\x11\xac\x71\xc7\x48\x46"
+                         "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
+                         "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
+                         "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
+                         "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
+                         "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
+                         "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
+                         "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
+                         "\x50\x88\x97\x40\x69\xb1\x37\xf5"
+                         "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
+                         "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
+                         "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
+                         "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
+                         "\xc1\x16\x73\x50\x77\xba\xa6\x65"
+                         "\x20\x2d\xb0\x02\x27\x89\xda\x99"
+                         "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
+                         "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
+                         "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
+                         "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
+                         "\xa3\x0e\x33\x74\x40\x18\x39\x72"
+                         "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
+                         "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
+                         "\x30\x05\xc8\x92\x98\x80\xff\x7a"
+                         "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
+                         "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
+               .ilen   = 512,
+               .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .rlen   = 512,
+       },
+};
 
 /* Cast6 test vectors from RFC 2612 */
 #define CAST6_ENC_TEST_VECTORS 3
@@ -3033,8 +6170,8 @@ static struct cipher_testvec cast6_dec_tv_template[] = {
 #define AES_XTS_DEC_TEST_VECTORS 5
 #define AES_CTR_ENC_TEST_VECTORS 3
 #define AES_CTR_DEC_TEST_VECTORS 3
-#define AES_OFB_ENC_TEST_VECTORS 1
-#define AES_OFB_DEC_TEST_VECTORS 1
+#define AES_OFB_ENC_TEST_VECTORS 3
+#define AES_OFB_DEC_TEST_VECTORS 3
 #define AES_CTR_3686_ENC_TEST_VECTORS 7
 #define AES_CTR_3686_DEC_TEST_VECTORS 6
 #define AES_GCM_ENC_TEST_VECTORS 9
@@ -4467,6 +7604,8 @@ static struct cipher_testvec aes_xts_dec_tv_template[] = {
 
        }
 };
+
+
 static struct cipher_testvec aes_ctr_enc_tv_template[] = {
        { /* From NIST Special Publication 800-38A, Appendix F.5 */
                .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
@@ -6006,64 +9145,6 @@ static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
        },
 };
 
-static struct cipher_testvec aes_ofb_enc_tv_template[] = {
-        /* From NIST Special Publication 800-38A, Appendix F.5 */
-       {
-               .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
-                         "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
-               .klen   = 16,
-               .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
-                         "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
-               .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
-                         "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
-                         "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
-                         "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
-                         "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
-                         "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
-                         "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
-                         "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
-               .ilen   = 64,
-               .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
-                         "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
-                         "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
-                         "\x3c\x52\xda\xc5\x4e\xd8\x25"
-                         "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
-                         "\x44\xf7\xa8\x22\x60\xed\xcc"
-                         "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
-                         "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
-               .rlen   = 64,
-       }
-};
-
-static struct cipher_testvec aes_ofb_dec_tv_template[] = {
-        /* From NIST Special Publication 800-38A, Appendix F.5 */
-       {
-               .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
-                         "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
-               .klen   = 16,
-               .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
-                         "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
-               .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
-                         "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
-                         "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
-                         "\x3c\x52\xda\xc5\x4e\xd8\x25"
-                         "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
-                         "\x44\xf7\xa8\x22\x60\xed\xcc"
-                         "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
-                         "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
-               .ilen   = 64,
-               .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
-                         "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
-                         "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
-                         "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
-                         "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
-                         "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
-                         "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
-                         "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
-               .rlen   = 64,
-       }
-};
-
 static struct aead_testvec aes_gcm_enc_tv_template[] = {
        { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
                .key    = zeroed_string,
@@ -8404,10 +11485,16 @@ static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
 /*
  * CAMELLIA test vectors.
  */
-#define CAMELLIA_ENC_TEST_VECTORS 3
-#define CAMELLIA_DEC_TEST_VECTORS 3
-#define CAMELLIA_CBC_ENC_TEST_VECTORS 2
-#define CAMELLIA_CBC_DEC_TEST_VECTORS 2
+#define CAMELLIA_ENC_TEST_VECTORS 4
+#define CAMELLIA_DEC_TEST_VECTORS 4
+#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
+#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
+#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
+#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
+#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
+#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
+#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
+#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
 
 static struct cipher_testvec camellia_enc_tv_template[] = {
        {
@@ -8444,6 +11531,27 @@ static struct cipher_testvec camellia_enc_tv_template[] = {
                          "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
                .rlen   = 16,
        },
+       { /* Generated with Crypto++ */
+               .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
+                         "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
+                         "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
+                         "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
+               .klen   = 32,
+               .input  = "\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",
+               .ilen   = 48,
+               .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
+                         "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
+                         "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
+                         "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
+                         "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
+                         "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
+               .rlen   = 48,
+       },
 };
 
 static struct cipher_testvec camellia_dec_tv_template[] = {
@@ -8481,6 +11589,27 @@ static struct cipher_testvec camellia_dec_tv_template[] = {
                          "\xfe\xdc\xba\x98\x76\x54\x32\x10",
                .rlen   = 16,
        },
+       { /* Generated with Crypto++ */
+               .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
+                         "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
+                         "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
+                         "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
+               .klen   = 32,
+               .input  = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
+                         "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
+                         "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
+                         "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
+                         "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
+                         "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
+               .ilen   = 48,
+               .result = "\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",
+               .rlen   = 48,
+       },
 };
 
 static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
@@ -8512,6 +11641,29 @@ static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
                          "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
                .rlen   = 32,
        },
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 48,
+               .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
+                         "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
+                         "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
+                         "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
+                         "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
+                         "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
+               .rlen   = 48,
+       },
 };
 
 static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
@@ -8543,6 +11695,1310 @@ static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
                          "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
                .rlen   = 32,
        },
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
+                         "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
+                         "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
+                         "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
+                         "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
+                         "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
+               .ilen   = 48,
+               .result = "\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",
+               .rlen   = 48,
+       },
+};
+
+static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 48,
+               .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
+                         "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
+                         "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
+                         "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
+                         "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
+                         "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
+               .rlen   = 48,
+       },
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\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",
+               .ilen   = 51,
+               .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
+                         "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
+                         "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
+                         "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
+                         "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
+                         "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
+                         "\x1E\x43\xEF",
+               .rlen   = 51,
+       },
+};
+
+static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
+                         "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
+                         "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
+                         "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
+                         "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
+                         "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
+               .ilen   = 48,
+               .result = "\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",
+               .rlen   = 48,
+       },
+       { /* Generated with Crypto++ */
+               .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
+                         "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
+                         "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
+                         "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
+               .klen   = 32,
+               .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
+                         "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
+               .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
+                         "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
+                         "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
+                         "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
+                         "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
+                         "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
+                         "\x1E\x43\xEF",
+               .ilen   = 51,
+               .result = "\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",
+               .rlen   = 51,
+       },
+
+};
+
+static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
+       /* Generated from AES-LRW test vectors */
+       {
+               .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 = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
+                         "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
+               .rlen   = 16,
+       }, {
+               .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 = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
+                         "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
+               .rlen   = 16,
+       }, {
+               .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 = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
+                         "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
+               .rlen   = 16,
+       }, {
+               .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 = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
+                         "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
+               .rlen   = 16,
+       }, {
+               .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 = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
+                         "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
+               .rlen   = 16,
+       }, {
+               .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 = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
+                         "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
+               .rlen   = 16,
+       }, {
+               .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 = "\x04\xab\x28\x37\x31\x7a\x26\xab"
+                         "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
+               .rlen   = 16,
+       }, {
+               .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  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
+                         "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
+                         "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
+                         "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
+                         "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
+                         "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
+                         "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
+                         "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
+                         "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
+                         "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
+                         "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
+                         "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
+                         "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
+                         "\x4c\x96\x12\xed\x7c\x92\x03\x01"
+                         "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
+                         "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
+                         "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
+                         "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
+                         "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
+                         "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
+                         "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
+                         "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
+                         "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
+                         "\x76\x12\x73\x44\x1a\x56\xd7\x72"
+                         "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
+                         "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
+                         "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
+                         "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
+                         "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
+                         "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
+                         "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
+                         "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
+                         "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
+                         "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
+                         "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
+                         "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
+                         "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
+                         "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
+                         "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
+                         "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
+                         "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
+                         "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
+                         "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
+                         "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
+                         "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
+                         "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
+                         "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
+                         "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
+                         "\x62\x73\x65\xfd\x46\x63\x25\x3d"
+                         "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
+                         "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
+                         "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
+                         "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
+                         "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
+                         "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
+                         "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
+                         "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
+                         "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
+                         "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
+                         "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
+                         "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
+                         "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
+                         "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
+                         "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
+               .ilen   = 512,
+               .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
+                         "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
+                         "\x67\x76\xac\x2c\xd2\x63\x18\x93"
+                         "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
+                         "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
+                         "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
+                         "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
+                         "\x62\xdd\x78\x81\xea\x1d\xef\x04"
+                         "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
+                         "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
+                         "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
+                         "\x40\x41\x69\xaa\x71\xc0\x37\xec"
+                         "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
+                         "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
+                         "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
+                         "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
+                         "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
+                         "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
+                         "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
+                         "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
+                         "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
+                         "\x42\x08\x40\x82\x06\x1c\x2d\x55"
+                         "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
+                         "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
+                         "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
+                         "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
+                         "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
+                         "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
+                         "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
+                         "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
+                         "\xed\x14\xa9\x57\x19\x63\x40\x04"
+                         "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
+                         "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
+                         "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
+                         "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
+                         "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
+                         "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
+                         "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
+                         "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
+                         "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
+                         "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
+                         "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
+                         "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
+                         "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
+                         "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
+                         "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
+                         "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
+                         "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
+                         "\x35\xa5\x83\x04\x84\x01\x99\x56"
+                         "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
+                         "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
+                         "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
+                         "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
+                         "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
+                         "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
+                         "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
+                         "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
+                         "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
+                         "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
+                         "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
+                         "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
+                         "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
+                         "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
+                         "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
+       /* Generated from AES-LRW test vectors */
+       /* same as enc vectors with input and result reversed */
+       {
+               .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  = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
+                         "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
+                         "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
+                         "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
+                         "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
+                         "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
+                         "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x04\xab\x28\x37\x31\x7a\x26\xab"
+                         "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
+               .ilen   = 16,
+               .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x41\x42\x43\x44\x45\x46",
+               .rlen   = 16,
+       }, {
+               .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  = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
+                         "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
+                         "\x67\x76\xac\x2c\xd2\x63\x18\x93"
+                         "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
+                         "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
+                         "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
+                         "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
+                         "\x62\xdd\x78\x81\xea\x1d\xef\x04"
+                         "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
+                         "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
+                         "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
+                         "\x40\x41\x69\xaa\x71\xc0\x37\xec"
+                         "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
+                         "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
+                         "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
+                         "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
+                         "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
+                         "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
+                         "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
+                         "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
+                         "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
+                         "\x42\x08\x40\x82\x06\x1c\x2d\x55"
+                         "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
+                         "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
+                         "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
+                         "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
+                         "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
+                         "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
+                         "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
+                         "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
+                         "\xed\x14\xa9\x57\x19\x63\x40\x04"
+                         "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
+                         "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
+                         "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
+                         "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
+                         "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
+                         "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
+                         "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
+                         "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
+                         "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
+                         "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
+                         "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
+                         "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
+                         "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
+                         "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
+                         "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
+                         "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
+                         "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
+                         "\x35\xa5\x83\x04\x84\x01\x99\x56"
+                         "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
+                         "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
+                         "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
+                         "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
+                         "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
+                         "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
+                         "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
+                         "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
+                         "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
+                         "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
+                         "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
+                         "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
+                         "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
+                         "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
+                         "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
+               .ilen   = 512,
+               .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
+                         "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
+                         "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
+                         "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
+                         "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
+                         "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
+                         "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
+                         "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
+                         "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
+                         "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
+                         "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
+                         "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
+                         "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
+                         "\x4c\x96\x12\xed\x7c\x92\x03\x01"
+                         "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
+                         "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
+                         "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
+                         "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
+                         "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
+                         "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
+                         "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
+                         "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
+                         "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
+                         "\x76\x12\x73\x44\x1a\x56\xd7\x72"
+                         "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
+                         "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
+                         "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
+                         "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
+                         "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
+                         "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
+                         "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
+                         "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
+                         "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
+                         "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
+                         "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
+                         "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
+                         "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
+                         "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
+                         "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
+                         "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
+                         "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
+                         "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
+                         "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
+                         "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
+                         "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
+                         "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
+                         "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
+                         "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
+                         "\x62\x73\x65\xfd\x46\x63\x25\x3d"
+                         "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
+                         "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
+                         "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
+                         "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
+                         "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
+                         "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
+                         "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
+                         "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
+                         "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
+                         "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
+                         "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
+                         "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
+                         "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
+                         "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
+                         "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec camellia_xts_enc_tv_template[] = {
+       /* Generated from AES-XTS test vectors */
+       {
+               .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .ilen   = 32,
+               .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
+                         "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
+                         "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
+                         "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
+               .rlen   = 32,
+       }, {
+               .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .ilen   = 32,
+               .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
+                         "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
+                         "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
+                         "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
+               .rlen   = 32,
+       }, {
+               .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+                         "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .ilen   = 32,
+               .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
+                         "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
+                         "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
+                         "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
+               .rlen   = 32,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .ilen   = 512,
+               .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
+                         "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
+                         "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
+                         "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
+                         "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
+                         "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
+                         "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
+                         "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
+                         "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
+                         "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
+                         "\x08\xda\x76\x00\x65\xcf\x7b\x31"
+                         "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
+                         "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
+                         "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
+                         "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
+                         "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
+                         "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
+                         "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
+                         "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
+                         "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
+                         "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
+                         "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
+                         "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
+                         "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
+                         "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
+                         "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
+                         "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
+                         "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
+                         "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
+                         "\x16\x31\xb2\x47\x91\x67\xaa\x28"
+                         "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
+                         "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
+                         "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
+                         "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
+                         "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
+                         "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
+                         "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
+                         "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
+                         "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
+                         "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
+                         "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
+                         "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
+                         "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
+                         "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
+                         "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
+                         "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
+                         "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
+                         "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
+                         "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
+                         "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
+                         "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
+                         "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
+                         "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
+                         "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
+                         "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
+                         "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
+                         "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
+                         "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
+                         "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
+                         "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
+                         "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
+                         "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
+                         "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
+                         "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
+               .rlen   = 512,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x62\x49\x77\x57\x24\x70\x93\x69"
+                         "\x99\x59\x57\x49\x66\x96\x76\x27"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95"
+                         "\x02\x88\x41\x97\x16\x93\x99\x37"
+                         "\x51\x05\x82\x09\x74\x94\x45\x92",
+               .klen   = 64,
+               .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .ilen   = 512,
+               .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
+                         "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
+                         "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
+                         "\xf1\x74\xac\x96\x05\x7b\x32\xca"
+                         "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
+                         "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
+                         "\x97\x07\x82\xf0\x07\x12\x38\x0a"
+                         "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
+                         "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
+                         "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
+                         "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
+                         "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
+                         "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
+                         "\x41\x82\x0c\x45\x39\x35\xa8\x75"
+                         "\x03\x29\x01\x84\x8c\xab\x48\xbe"
+                         "\x11\x56\x22\x67\xb7\x67\x1a\x09"
+                         "\xa1\x72\x25\x41\x3c\x39\x65\x80"
+                         "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
+                         "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
+                         "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
+                         "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
+                         "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
+                         "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
+                         "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
+                         "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
+                         "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
+                         "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
+                         "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
+                         "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
+                         "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
+                         "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
+                         "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
+                         "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
+                         "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
+                         "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
+                         "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
+                         "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
+                         "\xef\x38\x52\x18\x0e\x29\x7e\xef"
+                         "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
+                         "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
+                         "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
+                         "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
+                         "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
+                         "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
+                         "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
+                         "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
+                         "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
+                         "\x21\x17\xf8\x59\x15\x24\x64\x22"
+                         "\x57\x48\x80\xd5\x3d\x92\x30\x07"
+                         "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
+                         "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
+                         "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
+                         "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
+                         "\x6b\x84\xf3\x00\xba\x52\x05\x02"
+                         "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
+                         "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
+                         "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
+                         "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
+                         "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
+                         "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
+                         "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
+                         "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
+                         "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
+                         "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
+               .rlen   = 512,
+       },
+};
+
+static struct cipher_testvec camellia_xts_dec_tv_template[] = {
+       /* Generated from AES-XTS test vectors */
+       /* same as enc vectors with input and result reversed */
+       {
+               .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
+                         "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
+                         "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
+                         "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
+               .ilen   = 32,
+               .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .rlen   = 32,
+       }, {
+               .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x11\x11\x11\x11\x11\x11\x11\x11"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
+                         "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
+                         "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
+                         "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
+               .ilen   = 32,
+               .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .rlen   = 32,
+       }, {
+               .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
+                         "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22"
+                         "\x22\x22\x22\x22\x22\x22\x22\x22",
+               .klen   = 32,
+               .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
+                         "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
+                         "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
+                         "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
+               .ilen   = 32,
+               .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44"
+                         "\x44\x44\x44\x44\x44\x44\x44\x44",
+               .rlen   = 32,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95",
+               .klen   = 32,
+               .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
+                         "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
+                         "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
+                         "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
+                         "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
+                         "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
+                         "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
+                         "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
+                         "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
+                         "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
+                         "\x08\xda\x76\x00\x65\xcf\x7b\x31"
+                         "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
+                         "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
+                         "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
+                         "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
+                         "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
+                         "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
+                         "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
+                         "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
+                         "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
+                         "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
+                         "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
+                         "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
+                         "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
+                         "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
+                         "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
+                         "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
+                         "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
+                         "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
+                         "\x16\x31\xb2\x47\x91\x67\xaa\x28"
+                         "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
+                         "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
+                         "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
+                         "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
+                         "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
+                         "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
+                         "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
+                         "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
+                         "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
+                         "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
+                         "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
+                         "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
+                         "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
+                         "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
+                         "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
+                         "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
+                         "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
+                         "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
+                         "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
+                         "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
+                         "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
+                         "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
+                         "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
+                         "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
+                         "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
+                         "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
+                         "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
+                         "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
+                         "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
+                         "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
+                         "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
+                         "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
+                         "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
+                         "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
+               .ilen   = 512,
+               .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .rlen   = 512,
+       }, {
+               .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
+                         "\x23\x53\x60\x28\x74\x71\x35\x26"
+                         "\x62\x49\x77\x57\x24\x70\x93\x69"
+                         "\x99\x59\x57\x49\x66\x96\x76\x27"
+                         "\x31\x41\x59\x26\x53\x58\x97\x93"
+                         "\x23\x84\x62\x64\x33\x83\x27\x95"
+                         "\x02\x88\x41\x97\x16\x93\x99\x37"
+                         "\x51\x05\x82\x09\x74\x94\x45\x92",
+               .klen   = 64,
+               .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
+                         "\x00\x00\x00\x00\x00\x00\x00\x00",
+               .input  = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
+                         "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
+                         "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
+                         "\xf1\x74\xac\x96\x05\x7b\x32\xca"
+                         "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
+                         "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
+                         "\x97\x07\x82\xf0\x07\x12\x38\x0a"
+                         "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
+                         "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
+                         "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
+                         "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
+                         "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
+                         "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
+                         "\x41\x82\x0c\x45\x39\x35\xa8\x75"
+                         "\x03\x29\x01\x84\x8c\xab\x48\xbe"
+                         "\x11\x56\x22\x67\xb7\x67\x1a\x09"
+                         "\xa1\x72\x25\x41\x3c\x39\x65\x80"
+                         "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
+                         "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
+                         "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
+                         "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
+                         "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
+                         "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
+                         "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
+                         "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
+                         "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
+                         "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
+                         "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
+                         "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
+                         "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
+                         "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
+                         "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
+                         "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
+                         "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
+                         "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
+                         "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
+                         "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
+                         "\xef\x38\x52\x18\x0e\x29\x7e\xef"
+                         "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
+                         "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
+                         "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
+                         "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
+                         "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
+                         "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
+                         "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
+                         "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
+                         "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
+                         "\x21\x17\xf8\x59\x15\x24\x64\x22"
+                         "\x57\x48\x80\xd5\x3d\x92\x30\x07"
+                         "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
+                         "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
+                         "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
+                         "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
+                         "\x6b\x84\xf3\x00\xba\x52\x05\x02"
+                         "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
+                         "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
+                         "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
+                         "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
+                         "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
+                         "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
+                         "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
+                         "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
+                         "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
+                         "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
+               .ilen   = 512,
+               .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+                         "\x00\x01\x02\x03\x04\x05\x06\x07"
+                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+                         "\x10\x11\x12\x13\x14\x15\x16\x17"
+                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+                         "\x20\x21\x22\x23\x24\x25\x26\x27"
+                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+                         "\x30\x31\x32\x33\x34\x35\x36\x37"
+                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+                         "\x40\x41\x42\x43\x44\x45\x46\x47"
+                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+                         "\x50\x51\x52\x53\x54\x55\x56\x57"
+                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+                         "\x60\x61\x62\x63\x64\x65\x66\x67"
+                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+                         "\x70\x71\x72\x73\x74\x75\x76\x77"
+                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+                         "\x80\x81\x82\x83\x84\x85\x86\x87"
+                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+                         "\x90\x91\x92\x93\x94\x95\x96\x97"
+                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
+                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
+                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
+                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
+                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
+                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
+                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
+               .rlen   = 512,
+       },
 };
 
 /*