PageRenderTime 109ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/crypto/testmgr.h

https://bitbucket.org/abioy/linux
C Header | 9555 lines | 9183 code | 190 blank | 182 comment | 0 complexity | cabf10221da7621ef57f0015bd45d0ed MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
  1. /*
  2. * Algorithm testing framework and tests.
  3. *
  4. * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  5. * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
  6. * Copyright (c) 2007 Nokia Siemens Networks
  7. * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the Free
  11. * Software Foundation; either version 2 of the License, or (at your option)
  12. * any later version.
  13. *
  14. */
  15. #ifndef _CRYPTO_TESTMGR_H
  16. #define _CRYPTO_TESTMGR_H
  17. #include <linux/netlink.h>
  18. #include <linux/zlib.h>
  19. #include <crypto/compress.h>
  20. #define MAX_DIGEST_SIZE 64
  21. #define MAX_TAP 8
  22. #define MAX_KEYLEN 56
  23. #define MAX_IVLEN 32
  24. struct hash_testvec {
  25. /* only used with keyed hash algorithms */
  26. char *key;
  27. char *plaintext;
  28. char *digest;
  29. unsigned char tap[MAX_TAP];
  30. unsigned char psize;
  31. unsigned char np;
  32. unsigned char ksize;
  33. };
  34. struct cipher_testvec {
  35. char *key;
  36. char *iv;
  37. char *input;
  38. char *result;
  39. unsigned short tap[MAX_TAP];
  40. int np;
  41. unsigned char fail;
  42. unsigned char wk; /* weak key flag */
  43. unsigned char klen;
  44. unsigned short ilen;
  45. unsigned short rlen;
  46. };
  47. struct aead_testvec {
  48. char *key;
  49. char *iv;
  50. char *input;
  51. char *assoc;
  52. char *result;
  53. unsigned char tap[MAX_TAP];
  54. unsigned char atap[MAX_TAP];
  55. int np;
  56. int anp;
  57. unsigned char fail;
  58. unsigned char novrfy; /* ccm dec verification failure expected */
  59. unsigned char wk; /* weak key flag */
  60. unsigned char klen;
  61. unsigned short ilen;
  62. unsigned short alen;
  63. unsigned short rlen;
  64. };
  65. struct cprng_testvec {
  66. char *key;
  67. char *dt;
  68. char *v;
  69. char *result;
  70. unsigned char klen;
  71. unsigned short dtlen;
  72. unsigned short vlen;
  73. unsigned short rlen;
  74. unsigned short loops;
  75. };
  76. static char zeroed_string[48];
  77. /*
  78. * MD4 test vectors from RFC1320
  79. */
  80. #define MD4_TEST_VECTORS 7
  81. static struct hash_testvec md4_tv_template [] = {
  82. {
  83. .plaintext = "",
  84. .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
  85. "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
  86. }, {
  87. .plaintext = "a",
  88. .psize = 1,
  89. .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
  90. "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
  91. }, {
  92. .plaintext = "abc",
  93. .psize = 3,
  94. .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
  95. "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
  96. }, {
  97. .plaintext = "message digest",
  98. .psize = 14,
  99. .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
  100. "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
  101. }, {
  102. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  103. .psize = 26,
  104. .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
  105. "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
  106. .np = 2,
  107. .tap = { 13, 13 },
  108. }, {
  109. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  110. .psize = 62,
  111. .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
  112. "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
  113. }, {
  114. .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
  115. "45678901234567890",
  116. .psize = 80,
  117. .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
  118. "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
  119. },
  120. };
  121. /*
  122. * MD5 test vectors from RFC1321
  123. */
  124. #define MD5_TEST_VECTORS 7
  125. static struct hash_testvec md5_tv_template[] = {
  126. {
  127. .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
  128. "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
  129. }, {
  130. .plaintext = "a",
  131. .psize = 1,
  132. .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
  133. "\x31\xc3\x99\xe2\x69\x77\x26\x61",
  134. }, {
  135. .plaintext = "abc",
  136. .psize = 3,
  137. .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
  138. "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
  139. }, {
  140. .plaintext = "message digest",
  141. .psize = 14,
  142. .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
  143. "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
  144. }, {
  145. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  146. .psize = 26,
  147. .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
  148. "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
  149. .np = 2,
  150. .tap = {13, 13}
  151. }, {
  152. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
  153. .psize = 62,
  154. .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
  155. "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
  156. }, {
  157. .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
  158. "345678901234567890",
  159. .psize = 80,
  160. .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
  161. "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
  162. }
  163. };
  164. /*
  165. * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
  166. */
  167. #define RMD128_TEST_VECTORS 10
  168. static struct hash_testvec rmd128_tv_template[] = {
  169. {
  170. .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
  171. "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
  172. }, {
  173. .plaintext = "a",
  174. .psize = 1,
  175. .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
  176. "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
  177. }, {
  178. .plaintext = "abc",
  179. .psize = 3,
  180. .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
  181. "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
  182. }, {
  183. .plaintext = "message digest",
  184. .psize = 14,
  185. .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
  186. "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
  187. }, {
  188. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  189. .psize = 26,
  190. .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
  191. "\x10\x71\x49\x22\xb3\x71\x83\x4e",
  192. }, {
  193. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  194. "fghijklmnopqrstuvwxyz0123456789",
  195. .psize = 62,
  196. .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
  197. "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
  198. }, {
  199. .plaintext = "1234567890123456789012345678901234567890"
  200. "1234567890123456789012345678901234567890",
  201. .psize = 80,
  202. .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
  203. "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
  204. }, {
  205. .plaintext = "abcdbcdecdefdefgefghfghighij"
  206. "hijkijkljklmklmnlmnomnopnopq",
  207. .psize = 56,
  208. .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
  209. "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
  210. .np = 2,
  211. .tap = { 28, 28 },
  212. }, {
  213. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  214. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  215. "lmnopqrsmnopqrstnopqrstu",
  216. .psize = 112,
  217. .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
  218. "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
  219. }, {
  220. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  221. .psize = 32,
  222. .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
  223. "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
  224. }
  225. };
  226. /*
  227. * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
  228. */
  229. #define RMD160_TEST_VECTORS 10
  230. static struct hash_testvec rmd160_tv_template[] = {
  231. {
  232. .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
  233. "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
  234. }, {
  235. .plaintext = "a",
  236. .psize = 1,
  237. .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
  238. "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
  239. }, {
  240. .plaintext = "abc",
  241. .psize = 3,
  242. .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
  243. "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
  244. }, {
  245. .plaintext = "message digest",
  246. .psize = 14,
  247. .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
  248. "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
  249. }, {
  250. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  251. .psize = 26,
  252. .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
  253. "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
  254. }, {
  255. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  256. "fghijklmnopqrstuvwxyz0123456789",
  257. .psize = 62,
  258. .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
  259. "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
  260. }, {
  261. .plaintext = "1234567890123456789012345678901234567890"
  262. "1234567890123456789012345678901234567890",
  263. .psize = 80,
  264. .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
  265. "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
  266. }, {
  267. .plaintext = "abcdbcdecdefdefgefghfghighij"
  268. "hijkijkljklmklmnlmnomnopnopq",
  269. .psize = 56,
  270. .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
  271. "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
  272. .np = 2,
  273. .tap = { 28, 28 },
  274. }, {
  275. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
  276. "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
  277. "lmnopqrsmnopqrstnopqrstu",
  278. .psize = 112,
  279. .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
  280. "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
  281. }, {
  282. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  283. .psize = 32,
  284. .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
  285. "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
  286. }
  287. };
  288. /*
  289. * RIPEMD-256 test vectors
  290. */
  291. #define RMD256_TEST_VECTORS 8
  292. static struct hash_testvec rmd256_tv_template[] = {
  293. {
  294. .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
  295. "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
  296. "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
  297. "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
  298. }, {
  299. .plaintext = "a",
  300. .psize = 1,
  301. .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
  302. "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
  303. "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
  304. "\xcd\x88\x3a\x91\x34\x69\x29\x25",
  305. }, {
  306. .plaintext = "abc",
  307. .psize = 3,
  308. .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
  309. "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
  310. "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
  311. "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
  312. }, {
  313. .plaintext = "message digest",
  314. .psize = 14,
  315. .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
  316. "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
  317. "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
  318. "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
  319. }, {
  320. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  321. .psize = 26,
  322. .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
  323. "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
  324. "\x78\x96\x11\x8a\x51\x97\x96\x87"
  325. "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
  326. }, {
  327. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  328. "fghijklmnopqrstuvwxyz0123456789",
  329. .psize = 62,
  330. .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
  331. "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
  332. "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
  333. "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
  334. }, {
  335. .plaintext = "1234567890123456789012345678901234567890"
  336. "1234567890123456789012345678901234567890",
  337. .psize = 80,
  338. .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
  339. "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
  340. "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
  341. "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
  342. }, {
  343. .plaintext = "abcdbcdecdefdefgefghfghighij"
  344. "hijkijkljklmklmnlmnomnopnopq",
  345. .psize = 56,
  346. .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
  347. "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
  348. "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
  349. "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
  350. .np = 2,
  351. .tap = { 28, 28 },
  352. }
  353. };
  354. /*
  355. * RIPEMD-320 test vectors
  356. */
  357. #define RMD320_TEST_VECTORS 8
  358. static struct hash_testvec rmd320_tv_template[] = {
  359. {
  360. .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
  361. "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
  362. "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
  363. "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
  364. }, {
  365. .plaintext = "a",
  366. .psize = 1,
  367. .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
  368. "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
  369. "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
  370. "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
  371. }, {
  372. .plaintext = "abc",
  373. .psize = 3,
  374. .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
  375. "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
  376. "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
  377. "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
  378. }, {
  379. .plaintext = "message digest",
  380. .psize = 14,
  381. .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
  382. "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
  383. "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
  384. "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
  385. }, {
  386. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  387. .psize = 26,
  388. .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
  389. "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
  390. "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
  391. "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
  392. }, {
  393. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
  394. "fghijklmnopqrstuvwxyz0123456789",
  395. .psize = 62,
  396. .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
  397. "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
  398. "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
  399. "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
  400. }, {
  401. .plaintext = "1234567890123456789012345678901234567890"
  402. "1234567890123456789012345678901234567890",
  403. .psize = 80,
  404. .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
  405. "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
  406. "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
  407. "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
  408. }, {
  409. .plaintext = "abcdbcdecdefdefgefghfghighij"
  410. "hijkijkljklmklmnlmnomnopnopq",
  411. .psize = 56,
  412. .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
  413. "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
  414. "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
  415. "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
  416. .np = 2,
  417. .tap = { 28, 28 },
  418. }
  419. };
  420. /*
  421. * SHA1 test vectors from from FIPS PUB 180-1
  422. */
  423. #define SHA1_TEST_VECTORS 2
  424. static struct hash_testvec sha1_tv_template[] = {
  425. {
  426. .plaintext = "abc",
  427. .psize = 3,
  428. .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
  429. "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
  430. }, {
  431. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  432. .psize = 56,
  433. .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
  434. "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
  435. .np = 2,
  436. .tap = { 28, 28 }
  437. }
  438. };
  439. /*
  440. * SHA224 test vectors from from FIPS PUB 180-2
  441. */
  442. #define SHA224_TEST_VECTORS 2
  443. static struct hash_testvec sha224_tv_template[] = {
  444. {
  445. .plaintext = "abc",
  446. .psize = 3,
  447. .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
  448. "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
  449. "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
  450. "\xE3\x6C\x9D\xA7",
  451. }, {
  452. .plaintext =
  453. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  454. .psize = 56,
  455. .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
  456. "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
  457. "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
  458. "\x52\x52\x25\x25",
  459. .np = 2,
  460. .tap = { 28, 28 }
  461. }
  462. };
  463. /*
  464. * SHA256 test vectors from from NIST
  465. */
  466. #define SHA256_TEST_VECTORS 2
  467. static struct hash_testvec sha256_tv_template[] = {
  468. {
  469. .plaintext = "abc",
  470. .psize = 3,
  471. .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
  472. "\x41\x41\x40\xde\x5d\xae\x22\x23"
  473. "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
  474. "\xb4\x10\xff\x61\xf2\x00\x15\xad",
  475. }, {
  476. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  477. .psize = 56,
  478. .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
  479. "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
  480. "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
  481. "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
  482. .np = 2,
  483. .tap = { 28, 28 }
  484. },
  485. };
  486. /*
  487. * SHA384 test vectors from from NIST and kerneli
  488. */
  489. #define SHA384_TEST_VECTORS 4
  490. static struct hash_testvec sha384_tv_template[] = {
  491. {
  492. .plaintext= "abc",
  493. .psize = 3,
  494. .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
  495. "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
  496. "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
  497. "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
  498. "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
  499. "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
  500. }, {
  501. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  502. .psize = 56,
  503. .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
  504. "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
  505. "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
  506. "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
  507. "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
  508. "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
  509. }, {
  510. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  511. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  512. .psize = 112,
  513. .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
  514. "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
  515. "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
  516. "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
  517. "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
  518. "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
  519. }, {
  520. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  521. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  522. .psize = 104,
  523. .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
  524. "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
  525. "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
  526. "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
  527. "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
  528. "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
  529. .np = 4,
  530. .tap = { 26, 26, 26, 26 }
  531. },
  532. };
  533. /*
  534. * SHA512 test vectors from from NIST and kerneli
  535. */
  536. #define SHA512_TEST_VECTORS 4
  537. static struct hash_testvec sha512_tv_template[] = {
  538. {
  539. .plaintext = "abc",
  540. .psize = 3,
  541. .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
  542. "\xcc\x41\x73\x49\xae\x20\x41\x31"
  543. "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
  544. "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
  545. "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
  546. "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
  547. "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
  548. "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
  549. }, {
  550. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  551. .psize = 56,
  552. .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
  553. "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
  554. "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
  555. "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
  556. "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
  557. "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
  558. "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
  559. "\x54\xec\x63\x12\x38\xca\x34\x45",
  560. }, {
  561. .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
  562. "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
  563. .psize = 112,
  564. .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
  565. "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
  566. "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
  567. "\x72\x99\xae\xad\xb6\x88\x90\x18"
  568. "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
  569. "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
  570. "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
  571. "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
  572. }, {
  573. .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
  574. "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
  575. .psize = 104,
  576. .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
  577. "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
  578. "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
  579. "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
  580. "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
  581. "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
  582. "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
  583. "\xed\xb4\x19\x87\x23\x28\x50\xc9",
  584. .np = 4,
  585. .tap = { 26, 26, 26, 26 }
  586. },
  587. };
  588. /*
  589. * WHIRLPOOL test vectors from Whirlpool package
  590. * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
  591. * submission
  592. */
  593. #define WP512_TEST_VECTORS 8
  594. static struct hash_testvec wp512_tv_template[] = {
  595. {
  596. .plaintext = "",
  597. .psize = 0,
  598. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  599. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  600. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  601. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  602. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  603. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
  604. "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
  605. "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
  606. }, {
  607. .plaintext = "a",
  608. .psize = 1,
  609. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  610. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  611. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  612. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  613. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  614. "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
  615. "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
  616. "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
  617. }, {
  618. .plaintext = "abc",
  619. .psize = 3,
  620. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  621. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  622. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  623. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  624. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  625. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
  626. "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
  627. "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
  628. }, {
  629. .plaintext = "message digest",
  630. .psize = 14,
  631. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  632. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  633. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  634. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  635. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  636. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
  637. "\x92\xED\x92\x00\x52\x83\x8F\x33"
  638. "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
  639. }, {
  640. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  641. .psize = 26,
  642. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  643. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  644. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  645. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  646. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  647. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
  648. "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
  649. "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
  650. }, {
  651. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  652. "abcdefghijklmnopqrstuvwxyz0123456789",
  653. .psize = 62,
  654. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  655. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  656. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  657. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  658. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  659. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
  660. "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
  661. "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
  662. }, {
  663. .plaintext = "1234567890123456789012345678901234567890"
  664. "1234567890123456789012345678901234567890",
  665. .psize = 80,
  666. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  667. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  668. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  669. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  670. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  671. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
  672. "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
  673. "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
  674. }, {
  675. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  676. .psize = 32,
  677. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  678. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  679. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  680. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  681. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  682. "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
  683. "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
  684. "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
  685. },
  686. };
  687. #define WP384_TEST_VECTORS 8
  688. static struct hash_testvec wp384_tv_template[] = {
  689. {
  690. .plaintext = "",
  691. .psize = 0,
  692. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  693. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  694. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  695. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
  696. "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
  697. "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
  698. }, {
  699. .plaintext = "a",
  700. .psize = 1,
  701. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  702. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  703. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  704. "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
  705. "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
  706. "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
  707. }, {
  708. .plaintext = "abc",
  709. .psize = 3,
  710. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  711. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  712. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  713. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
  714. "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
  715. "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
  716. }, {
  717. .plaintext = "message digest",
  718. .psize = 14,
  719. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  720. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  721. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  722. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
  723. "\x84\x21\x55\x76\x59\xEF\x55\xC1"
  724. "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
  725. }, {
  726. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  727. .psize = 26,
  728. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  729. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  730. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  731. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
  732. "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
  733. "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
  734. }, {
  735. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  736. "abcdefghijklmnopqrstuvwxyz0123456789",
  737. .psize = 62,
  738. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  739. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  740. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  741. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
  742. "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
  743. "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
  744. }, {
  745. .plaintext = "1234567890123456789012345678901234567890"
  746. "1234567890123456789012345678901234567890",
  747. .psize = 80,
  748. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  749. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  750. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  751. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
  752. "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
  753. "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
  754. }, {
  755. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  756. .psize = 32,
  757. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  758. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  759. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  760. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
  761. "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
  762. "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
  763. },
  764. };
  765. #define WP256_TEST_VECTORS 8
  766. static struct hash_testvec wp256_tv_template[] = {
  767. {
  768. .plaintext = "",
  769. .psize = 0,
  770. .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
  771. "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
  772. "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
  773. "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
  774. }, {
  775. .plaintext = "a",
  776. .psize = 1,
  777. .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
  778. "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
  779. "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
  780. "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
  781. }, {
  782. .plaintext = "abc",
  783. .psize = 3,
  784. .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
  785. "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
  786. "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
  787. "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
  788. }, {
  789. .plaintext = "message digest",
  790. .psize = 14,
  791. .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
  792. "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
  793. "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
  794. "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
  795. }, {
  796. .plaintext = "abcdefghijklmnopqrstuvwxyz",
  797. .psize = 26,
  798. .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
  799. "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
  800. "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
  801. "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
  802. }, {
  803. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  804. "abcdefghijklmnopqrstuvwxyz0123456789",
  805. .psize = 62,
  806. .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
  807. "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
  808. "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
  809. "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
  810. }, {
  811. .plaintext = "1234567890123456789012345678901234567890"
  812. "1234567890123456789012345678901234567890",
  813. .psize = 80,
  814. .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
  815. "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
  816. "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
  817. "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
  818. }, {
  819. .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
  820. .psize = 32,
  821. .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
  822. "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
  823. "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
  824. "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
  825. },
  826. };
  827. /*
  828. * TIGER test vectors from Tiger website
  829. */
  830. #define TGR192_TEST_VECTORS 6
  831. static struct hash_testvec tgr192_tv_template[] = {
  832. {
  833. .plaintext = "",
  834. .psize = 0,
  835. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  836. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  837. "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
  838. }, {
  839. .plaintext = "abc",
  840. .psize = 3,
  841. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  842. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  843. "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
  844. }, {
  845. .plaintext = "Tiger",
  846. .psize = 5,
  847. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  848. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  849. "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
  850. }, {
  851. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  852. .psize = 64,
  853. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  854. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  855. "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
  856. }, {
  857. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  858. .psize = 64,
  859. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  860. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  861. "\x57\x89\x65\x65\x97\x5f\x91\x97",
  862. }, {
  863. .plaintext = "Tiger - A Fast New Hash Function, "
  864. "by Ross Anderson and Eli Biham, "
  865. "proceedings of Fast Software Encryption 3, "
  866. "Cambridge, 1996.",
  867. .psize = 125,
  868. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  869. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  870. "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
  871. },
  872. };
  873. #define TGR160_TEST_VECTORS 6
  874. static struct hash_testvec tgr160_tv_template[] = {
  875. {
  876. .plaintext = "",
  877. .psize = 0,
  878. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  879. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
  880. "\xf3\x73\xde\x2d",
  881. }, {
  882. .plaintext = "abc",
  883. .psize = 3,
  884. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  885. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
  886. "\x93\x5f\x7b\x95",
  887. }, {
  888. .plaintext = "Tiger",
  889. .psize = 5,
  890. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  891. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
  892. "\x37\x79\x0c\x11",
  893. }, {
  894. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  895. .psize = 64,
  896. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  897. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
  898. "\xb5\x86\x44\x50",
  899. }, {
  900. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  901. .psize = 64,
  902. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  903. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
  904. "\x57\x89\x65\x65",
  905. }, {
  906. .plaintext = "Tiger - A Fast New Hash Function, "
  907. "by Ross Anderson and Eli Biham, "
  908. "proceedings of Fast Software Encryption 3, "
  909. "Cambridge, 1996.",
  910. .psize = 125,
  911. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  912. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
  913. "\xdd\x68\x15\x1d",
  914. },
  915. };
  916. #define TGR128_TEST_VECTORS 6
  917. static struct hash_testvec tgr128_tv_template[] = {
  918. {
  919. .plaintext = "",
  920. .psize = 0,
  921. .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
  922. "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
  923. }, {
  924. .plaintext = "abc",
  925. .psize = 3,
  926. .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
  927. "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
  928. }, {
  929. .plaintext = "Tiger",
  930. .psize = 5,
  931. .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
  932. "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
  933. }, {
  934. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
  935. .psize = 64,
  936. .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
  937. "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
  938. }, {
  939. .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
  940. .psize = 64,
  941. .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
  942. "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
  943. }, {
  944. .plaintext = "Tiger - A Fast New Hash Function, "
  945. "by Ross Anderson and Eli Biham, "
  946. "proceedings of Fast Software Encryption 3, "
  947. "Cambridge, 1996.",
  948. .psize = 125,
  949. .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
  950. "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
  951. },
  952. };
  953. #define GHASH_TEST_VECTORS 1
  954. static struct hash_testvec ghash_tv_template[] =
  955. {
  956. {
  957. .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
  958. .ksize = 16,
  959. .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
  960. .psize = 16,
  961. .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
  962. "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
  963. },
  964. };
  965. /*
  966. * HMAC-MD5 test vectors from RFC2202
  967. * (These need to be fixed to not use strlen).
  968. */
  969. #define HMAC_MD5_TEST_VECTORS 7
  970. static struct hash_testvec hmac_md5_tv_template[] =
  971. {
  972. {
  973. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  974. .ksize = 16,
  975. .plaintext = "Hi There",
  976. .psize = 8,
  977. .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
  978. "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
  979. }, {
  980. .key = "Jefe",
  981. .ksize = 4,
  982. .plaintext = "what do ya want for nothing?",
  983. .psize = 28,
  984. .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
  985. "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
  986. .np = 2,
  987. .tap = {14, 14}
  988. }, {
  989. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  990. .ksize = 16,
  991. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  992. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  993. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  994. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  995. .psize = 50,
  996. .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
  997. "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
  998. }, {
  999. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1000. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1001. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1002. .ksize = 25,
  1003. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1004. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1005. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1006. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1007. .psize = 50,
  1008. .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
  1009. "\x3a\x75\x16\x47\x46\xff\xaa\x79",
  1010. }, {
  1011. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1012. .ksize = 16,
  1013. .plaintext = "Test With Truncation",
  1014. .psize = 20,
  1015. .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
  1016. "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
  1017. }, {
  1018. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1019. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1020. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1021. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1022. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1023. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1024. "\xaa\xaa",
  1025. .ksize = 80,
  1026. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1027. .psize = 54,
  1028. .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
  1029. "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
  1030. }, {
  1031. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1032. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1033. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1034. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1035. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1036. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1037. "\xaa\xaa",
  1038. .ksize = 80,
  1039. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1040. "Block-Size Data",
  1041. .psize = 73,
  1042. .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
  1043. "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
  1044. },
  1045. };
  1046. /*
  1047. * HMAC-RIPEMD128 test vectors from RFC2286
  1048. */
  1049. #define HMAC_RMD128_TEST_VECTORS 7
  1050. static struct hash_testvec hmac_rmd128_tv_template[] = {
  1051. {
  1052. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1053. .ksize = 16,
  1054. .plaintext = "Hi There",
  1055. .psize = 8,
  1056. .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
  1057. "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
  1058. }, {
  1059. .key = "Jefe",
  1060. .ksize = 4,
  1061. .plaintext = "what do ya want for nothing?",
  1062. .psize = 28,
  1063. .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
  1064. "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
  1065. .np = 2,
  1066. .tap = { 14, 14 },
  1067. }, {
  1068. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1069. .ksize = 16,
  1070. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1071. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1072. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1073. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1074. .psize = 50,
  1075. .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
  1076. "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
  1077. }, {
  1078. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1079. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1080. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1081. .ksize = 25,
  1082. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1083. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1084. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1085. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1086. .psize = 50,
  1087. .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
  1088. "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
  1089. }, {
  1090. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1091. .ksize = 16,
  1092. .plaintext = "Test With Truncation",
  1093. .psize = 20,
  1094. .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
  1095. "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
  1096. }, {
  1097. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1098. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1099. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1100. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1101. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1102. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1103. "\xaa\xaa",
  1104. .ksize = 80,
  1105. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1106. .psize = 54,
  1107. .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
  1108. "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
  1109. }, {
  1110. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1111. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1112. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1113. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1114. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1115. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1116. "\xaa\xaa",
  1117. .ksize = 80,
  1118. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1119. "Block-Size Data",
  1120. .psize = 73,
  1121. .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
  1122. "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
  1123. },
  1124. };
  1125. /*
  1126. * HMAC-RIPEMD160 test vectors from RFC2286
  1127. */
  1128. #define HMAC_RMD160_TEST_VECTORS 7
  1129. static struct hash_testvec hmac_rmd160_tv_template[] = {
  1130. {
  1131. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1132. .ksize = 20,
  1133. .plaintext = "Hi There",
  1134. .psize = 8,
  1135. .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
  1136. "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
  1137. }, {
  1138. .key = "Jefe",
  1139. .ksize = 4,
  1140. .plaintext = "what do ya want for nothing?",
  1141. .psize = 28,
  1142. .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
  1143. "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
  1144. .np = 2,
  1145. .tap = { 14, 14 },
  1146. }, {
  1147. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1148. .ksize = 20,
  1149. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1150. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1151. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1152. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1153. .psize = 50,
  1154. .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
  1155. "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
  1156. }, {
  1157. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1158. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1159. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1160. .ksize = 25,
  1161. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1162. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1163. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1164. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1165. .psize = 50,
  1166. .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
  1167. "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
  1168. }, {
  1169. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1170. .ksize = 20,
  1171. .plaintext = "Test With Truncation",
  1172. .psize = 20,
  1173. .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
  1174. "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
  1175. }, {
  1176. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1177. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1178. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1179. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1180. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1181. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1182. "\xaa\xaa",
  1183. .ksize = 80,
  1184. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1185. .psize = 54,
  1186. .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
  1187. "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
  1188. }, {
  1189. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1190. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1191. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1192. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1193. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1194. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1195. "\xaa\xaa",
  1196. .ksize = 80,
  1197. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1198. "Block-Size Data",
  1199. .psize = 73,
  1200. .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
  1201. "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
  1202. },
  1203. };
  1204. /*
  1205. * HMAC-SHA1 test vectors from RFC2202
  1206. */
  1207. #define HMAC_SHA1_TEST_VECTORS 7
  1208. static struct hash_testvec hmac_sha1_tv_template[] = {
  1209. {
  1210. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
  1211. .ksize = 20,
  1212. .plaintext = "Hi There",
  1213. .psize = 8,
  1214. .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
  1215. "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
  1216. "\x46\xbe",
  1217. }, {
  1218. .key = "Jefe",
  1219. .ksize = 4,
  1220. .plaintext = "what do ya want for nothing?",
  1221. .psize = 28,
  1222. .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
  1223. "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
  1224. .np = 2,
  1225. .tap = { 14, 14 }
  1226. }, {
  1227. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1228. .ksize = 20,
  1229. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1230. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1231. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1232. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1233. .psize = 50,
  1234. .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
  1235. "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
  1236. }, {
  1237. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1238. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1239. "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
  1240. .ksize = 25,
  1241. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1242. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1243. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1244. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1245. .psize = 50,
  1246. .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
  1247. "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
  1248. }, {
  1249. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
  1250. .ksize = 20,
  1251. .plaintext = "Test With Truncation",
  1252. .psize = 20,
  1253. .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
  1254. "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
  1255. }, {
  1256. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1257. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1258. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1259. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1260. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1261. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1262. "\xaa\xaa",
  1263. .ksize = 80,
  1264. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1265. .psize = 54,
  1266. .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
  1267. "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
  1268. }, {
  1269. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1270. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1271. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1272. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1273. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1274. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1275. "\xaa\xaa",
  1276. .ksize = 80,
  1277. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
  1278. "Block-Size Data",
  1279. .psize = 73,
  1280. .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
  1281. "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
  1282. },
  1283. };
  1284. /*
  1285. * SHA224 HMAC test vectors from RFC4231
  1286. */
  1287. #define HMAC_SHA224_TEST_VECTORS 4
  1288. static struct hash_testvec hmac_sha224_tv_template[] = {
  1289. {
  1290. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1291. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1292. "\x0b\x0b\x0b\x0b",
  1293. .ksize = 20,
  1294. /* ("Hi There") */
  1295. .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
  1296. .psize = 8,
  1297. .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
  1298. "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
  1299. "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
  1300. "\x53\x68\x4b\x22",
  1301. }, {
  1302. .key = "Jefe",
  1303. .ksize = 4,
  1304. /* ("what do ya want for nothing?") */
  1305. .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
  1306. "\x79\x61\x20\x77\x61\x6e\x74\x20"
  1307. "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
  1308. "\x69\x6e\x67\x3f",
  1309. .psize = 28,
  1310. .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
  1311. "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
  1312. "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
  1313. "\x8f\xd0\x5e\x44",
  1314. .np = 4,
  1315. .tap = { 7, 7, 7, 7 }
  1316. }, {
  1317. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1318. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1319. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1320. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1321. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1322. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1323. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1324. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1325. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1326. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1327. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1328. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1329. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1330. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1331. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1332. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1333. "\xaa\xaa\xaa",
  1334. .ksize = 131,
  1335. /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
  1336. .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
  1337. "\x6e\x67\x20\x4c\x61\x72\x67\x65"
  1338. "\x72\x20\x54\x68\x61\x6e\x20\x42"
  1339. "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
  1340. "\x65\x20\x4b\x65\x79\x20\x2d\x20"
  1341. "\x48\x61\x73\x68\x20\x4b\x65\x79"
  1342. "\x20\x46\x69\x72\x73\x74",
  1343. .psize = 54,
  1344. .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
  1345. "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
  1346. "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
  1347. "\x3f\xa6\x87\x0e",
  1348. }, {
  1349. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1350. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1351. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1352. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1353. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1354. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1355. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1356. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1357. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1358. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1359. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1360. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1361. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1362. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1363. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1364. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1365. "\xaa\xaa\xaa",
  1366. .ksize = 131,
  1367. /* ("This is a test using a larger than block-size key and a")
  1368. (" larger than block-size data. The key needs to be")
  1369. (" hashed before being used by the HMAC algorithm.") */
  1370. .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
  1371. "\x61\x20\x74\x65\x73\x74\x20\x75"
  1372. "\x73\x69\x6e\x67\x20\x61\x20\x6c"
  1373. "\x61\x72\x67\x65\x72\x20\x74\x68"
  1374. "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
  1375. "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
  1376. "\x79\x20\x61\x6e\x64\x20\x61\x20"
  1377. "\x6c\x61\x72\x67\x65\x72\x20\x74"
  1378. "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
  1379. "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
  1380. "\x61\x74\x61\x2e\x20\x54\x68\x65"
  1381. "\x20\x6b\x65\x79\x20\x6e\x65\x65"
  1382. "\x64\x73\x20\x74\x6f\x20\x62\x65"
  1383. "\x20\x68\x61\x73\x68\x65\x64\x20"
  1384. "\x62\x65\x66\x6f\x72\x65\x20\x62"
  1385. "\x65\x69\x6e\x67\x20\x75\x73\x65"
  1386. "\x64\x20\x62\x79\x20\x74\x68\x65"
  1387. "\x20\x48\x4d\x41\x43\x20\x61\x6c"
  1388. "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
  1389. .psize = 152,
  1390. .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
  1391. "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
  1392. "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
  1393. "\xf6\xf5\x65\xd1",
  1394. },
  1395. };
  1396. /*
  1397. * HMAC-SHA256 test vectors from
  1398. * draft-ietf-ipsec-ciph-sha-256-01.txt
  1399. */
  1400. #define HMAC_SHA256_TEST_VECTORS 10
  1401. static struct hash_testvec hmac_sha256_tv_template[] = {
  1402. {
  1403. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1404. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1405. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1406. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1407. .ksize = 32,
  1408. .plaintext = "abc",
  1409. .psize = 3,
  1410. .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
  1411. "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
  1412. "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
  1413. "\x92\x75\x90\x21\xcf\xab\x81\x81",
  1414. }, {
  1415. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1416. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1417. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1418. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1419. .ksize = 32,
  1420. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1421. .psize = 56,
  1422. .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
  1423. "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
  1424. "\xe6\x98\xe3\x61\x19\x42\x11\x49"
  1425. "\xea\x8c\x71\x24\x56\x69\x7d\x30",
  1426. }, {
  1427. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1428. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1429. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1430. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
  1431. .ksize = 32,
  1432. .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
  1433. "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
  1434. .psize = 112,
  1435. .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
  1436. "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
  1437. "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
  1438. "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
  1439. }, {
  1440. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1441. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1442. "\x0b\x0b\x0b\x0b\x0b\x0b",
  1443. .ksize = 32,
  1444. .plaintext = "Hi There",
  1445. .psize = 8,
  1446. .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
  1447. "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
  1448. "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
  1449. "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
  1450. }, {
  1451. .key = "Jefe",
  1452. .ksize = 4,
  1453. .plaintext = "what do ya want for nothing?",
  1454. .psize = 28,
  1455. .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
  1456. "\x6a\x04\x24\x26\x08\x95\x75\xc7"
  1457. "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
  1458. "\x9d\xec\x58\xb9\x64\xec\x38\x43",
  1459. .np = 2,
  1460. .tap = { 14, 14 }
  1461. }, {
  1462. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1463. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1464. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
  1465. .ksize = 32,
  1466. .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1467. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1468. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
  1469. "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
  1470. .psize = 50,
  1471. .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
  1472. "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
  1473. "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
  1474. "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
  1475. }, {
  1476. .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
  1477. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  1478. "\x11\x12\x13\x14\x15\x16\x17\x18"
  1479. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  1480. "\x21\x22\x23\x24\x25",
  1481. .ksize = 37,
  1482. .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1483. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1484. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
  1485. "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
  1486. .psize = 50,
  1487. .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
  1488. "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
  1489. "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
  1490. "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
  1491. }, {
  1492. .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1493. "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
  1494. "\x0c\x0c\x0c\x0c\x0c\x0c",
  1495. .ksize = 32,
  1496. .plaintext = "Test With Truncation",
  1497. .psize = 20,
  1498. .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
  1499. "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
  1500. "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
  1501. "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
  1502. }, {
  1503. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1504. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1505. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1506. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1507. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1508. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1509. "\xaa\xaa",
  1510. .ksize = 80,
  1511. .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
  1512. .psize = 54,
  1513. .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
  1514. "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
  1515. "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
  1516. "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
  1517. }, {
  1518. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1519. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1520. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1521. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1522. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1523. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1524. "\xaa\xaa",
  1525. .ksize = 80,
  1526. .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
  1527. "One Block-Size Data",
  1528. .psize = 73,
  1529. .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
  1530. "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
  1531. "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
  1532. "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
  1533. },
  1534. };
  1535. #define XCBC_AES_TEST_VECTORS 6
  1536. static struct hash_testvec aes_xcbc128_tv_template[] = {
  1537. {
  1538. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1539. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1540. .plaintext = zeroed_string,
  1541. .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
  1542. "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
  1543. .psize = 0,
  1544. .ksize = 16,
  1545. }, {
  1546. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1547. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1548. .plaintext = "\x00\x01\x02",
  1549. .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
  1550. "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
  1551. .psize = 3,
  1552. .ksize = 16,
  1553. } , {
  1554. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1555. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1556. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1557. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1558. .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
  1559. "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
  1560. .psize = 16,
  1561. .ksize = 16,
  1562. }, {
  1563. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1564. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1565. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1566. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1567. "\x10\x11\x12\x13",
  1568. .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
  1569. "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
  1570. .tap = { 10, 10 },
  1571. .psize = 20,
  1572. .np = 2,
  1573. .ksize = 16,
  1574. }, {
  1575. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1576. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1577. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1578. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1579. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1580. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  1581. .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
  1582. "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
  1583. .psize = 32,
  1584. .ksize = 16,
  1585. }, {
  1586. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1587. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1588. .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1589. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  1590. "\x10\x11\x12\x13\x14\x15\x16\x17"
  1591. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  1592. "\x20\x21",
  1593. .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
  1594. "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
  1595. .tap = { 17, 17 },
  1596. .psize = 34,
  1597. .np = 2,
  1598. .ksize = 16,
  1599. }
  1600. };
  1601. #define VMAC_AES_TEST_VECTORS 1
  1602. static char vmac_string[128] = {'\x01', '\x01', '\x01', '\x01',
  1603. '\x02', '\x03', '\x02', '\x02',
  1604. '\x02', '\x04', '\x01', '\x07',
  1605. '\x04', '\x01', '\x04', '\x03',};
  1606. static struct hash_testvec aes_vmac128_tv_template[] = {
  1607. {
  1608. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  1609. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  1610. .plaintext = vmac_string,
  1611. .digest = "\xcb\xd7\x8a\xfd\xb7\x33\x79\xe7",
  1612. .psize = 128,
  1613. .ksize = 16,
  1614. },
  1615. };
  1616. /*
  1617. * SHA384 HMAC test vectors from RFC4231
  1618. */
  1619. #define HMAC_SHA384_TEST_VECTORS 4
  1620. static struct hash_testvec hmac_sha384_tv_template[] = {
  1621. {
  1622. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1623. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1624. "\x0b\x0b\x0b\x0b",
  1625. .ksize = 20,
  1626. .plaintext = "Hi There",
  1627. .psize = 8,
  1628. .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
  1629. "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
  1630. "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
  1631. "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
  1632. "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
  1633. "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
  1634. }, {
  1635. .key = "Jefe",
  1636. .ksize = 4,
  1637. .plaintext = "what do ya want for nothing?",
  1638. .psize = 28,
  1639. .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
  1640. "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
  1641. "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
  1642. "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
  1643. "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
  1644. "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
  1645. .np = 4,
  1646. .tap = { 7, 7, 7, 7 }
  1647. }, {
  1648. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1649. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1650. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1651. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1652. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1653. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1654. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1655. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1656. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1657. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1658. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1659. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1660. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1661. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1662. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1663. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1664. "\xaa\xaa\xaa",
  1665. .ksize = 131,
  1666. .plaintext = "Test Using Larger Than Block-Siz"
  1667. "e Key - Hash Key First",
  1668. .psize = 54,
  1669. .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
  1670. "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
  1671. "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
  1672. "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
  1673. "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
  1674. "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
  1675. }, {
  1676. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1677. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1678. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1679. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1680. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1681. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1682. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1683. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1684. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1685. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1686. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1687. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1688. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1689. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1690. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1691. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1692. "\xaa\xaa\xaa",
  1693. .ksize = 131,
  1694. .plaintext = "This is a test u"
  1695. "sing a larger th"
  1696. "an block-size ke"
  1697. "y and a larger t"
  1698. "han block-size d"
  1699. "ata. The key nee"
  1700. "ds to be hashed "
  1701. "before being use"
  1702. "d by the HMAC al"
  1703. "gorithm.",
  1704. .psize = 152,
  1705. .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
  1706. "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
  1707. "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
  1708. "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
  1709. "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
  1710. "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
  1711. },
  1712. };
  1713. /*
  1714. * SHA512 HMAC test vectors from RFC4231
  1715. */
  1716. #define HMAC_SHA512_TEST_VECTORS 4
  1717. static struct hash_testvec hmac_sha512_tv_template[] = {
  1718. {
  1719. .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1720. "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
  1721. "\x0b\x0b\x0b\x0b",
  1722. .ksize = 20,
  1723. .plaintext = "Hi There",
  1724. .psize = 8,
  1725. .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
  1726. "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
  1727. "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
  1728. "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
  1729. "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
  1730. "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
  1731. "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
  1732. "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
  1733. }, {
  1734. .key = "Jefe",
  1735. .ksize = 4,
  1736. .plaintext = "what do ya want for nothing?",
  1737. .psize = 28,
  1738. .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
  1739. "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
  1740. "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
  1741. "\x10\x27\x0c\xd7\xea\x25\x05\x54"
  1742. "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
  1743. "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
  1744. "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
  1745. "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
  1746. .np = 4,
  1747. .tap = { 7, 7, 7, 7 }
  1748. }, {
  1749. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1750. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1751. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1752. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1753. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1754. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1755. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1756. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1757. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1758. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1759. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1760. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1761. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1762. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1763. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1764. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1765. "\xaa\xaa\xaa",
  1766. .ksize = 131,
  1767. .plaintext = "Test Using Large"
  1768. "r Than Block-Siz"
  1769. "e Key - Hash Key"
  1770. " First",
  1771. .psize = 54,
  1772. .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
  1773. "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
  1774. "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
  1775. "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
  1776. "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
  1777. "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
  1778. "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
  1779. "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
  1780. }, {
  1781. .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1782. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1783. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1784. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1785. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1786. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1787. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1788. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1789. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1790. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1791. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1792. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1793. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1794. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1795. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1796. "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
  1797. "\xaa\xaa\xaa",
  1798. .ksize = 131,
  1799. .plaintext =
  1800. "This is a test u"
  1801. "sing a larger th"
  1802. "an block-size ke"
  1803. "y and a larger t"
  1804. "han block-size d"
  1805. "ata. The key nee"
  1806. "ds to be hashed "
  1807. "before being use"
  1808. "d by the HMAC al"
  1809. "gorithm.",
  1810. .psize = 152,
  1811. .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
  1812. "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
  1813. "\xde\xbd\x71\xf8\x86\x72\x89\x86"
  1814. "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
  1815. "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
  1816. "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
  1817. "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
  1818. "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
  1819. },
  1820. };
  1821. /*
  1822. * DES test vectors.
  1823. */
  1824. #define DES_ENC_TEST_VECTORS 10
  1825. #define DES_DEC_TEST_VECTORS 4
  1826. #define DES_CBC_ENC_TEST_VECTORS 5
  1827. #define DES_CBC_DEC_TEST_VECTORS 4
  1828. #define DES3_EDE_ENC_TEST_VECTORS 3
  1829. #define DES3_EDE_DEC_TEST_VECTORS 3
  1830. #define DES3_EDE_CBC_ENC_TEST_VECTORS 1
  1831. #define DES3_EDE_CBC_DEC_TEST_VECTORS 1
  1832. static struct cipher_testvec des_enc_tv_template[] = {
  1833. { /* From Applied Cryptography */
  1834. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1835. .klen = 8,
  1836. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1837. .ilen = 8,
  1838. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1839. .rlen = 8,
  1840. }, { /* Same key, different plaintext block */
  1841. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1842. .klen = 8,
  1843. .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
  1844. .ilen = 8,
  1845. .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1846. .rlen = 8,
  1847. }, { /* Sbox test from NBS */
  1848. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1849. .klen = 8,
  1850. .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1851. .ilen = 8,
  1852. .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1853. .rlen = 8,
  1854. }, { /* Three blocks */
  1855. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1856. .klen = 8,
  1857. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1858. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1859. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1860. .ilen = 24,
  1861. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1862. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1863. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1864. .rlen = 24,
  1865. }, { /* Weak key */
  1866. .fail = 1,
  1867. .wk = 1,
  1868. .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
  1869. .klen = 8,
  1870. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1871. .ilen = 8,
  1872. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1873. .rlen = 8,
  1874. }, { /* Two blocks -- for testing encryption across pages */
  1875. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1876. .klen = 8,
  1877. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1878. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1879. .ilen = 16,
  1880. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1881. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1882. .rlen = 16,
  1883. .np = 2,
  1884. .tap = { 8, 8 }
  1885. }, { /* Four blocks -- for testing encryption with chunking */
  1886. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1887. .klen = 8,
  1888. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1889. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1890. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
  1891. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1892. .ilen = 32,
  1893. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1894. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1895. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
  1896. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1897. .rlen = 32,
  1898. .np = 3,
  1899. .tap = { 14, 10, 8 }
  1900. }, {
  1901. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1902. .klen = 8,
  1903. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1904. "\x22\x33\x44\x55\x66\x77\x88\x99"
  1905. "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
  1906. .ilen = 24,
  1907. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1908. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
  1909. "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
  1910. .rlen = 24,
  1911. .np = 4,
  1912. .tap = { 2, 1, 3, 18 }
  1913. }, {
  1914. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1915. .klen = 8,
  1916. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1917. "\x22\x33\x44\x55\x66\x77\x88\x99",
  1918. .ilen = 16,
  1919. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1920. "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
  1921. .rlen = 16,
  1922. .np = 5,
  1923. .tap = { 2, 2, 2, 2, 8 }
  1924. }, {
  1925. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1926. .klen = 8,
  1927. .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1928. .ilen = 8,
  1929. .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1930. .rlen = 8,
  1931. .np = 8,
  1932. .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
  1933. },
  1934. };
  1935. static struct cipher_testvec des_dec_tv_template[] = {
  1936. { /* From Applied Cryptography */
  1937. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1938. .klen = 8,
  1939. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
  1940. .ilen = 8,
  1941. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
  1942. .rlen = 8,
  1943. }, { /* Sbox test from NBS */
  1944. .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
  1945. .klen = 8,
  1946. .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1947. .ilen = 8,
  1948. .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
  1949. .rlen = 8,
  1950. }, { /* Two blocks, for chunking test */
  1951. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1952. .klen = 8,
  1953. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1954. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1955. .ilen = 16,
  1956. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1957. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1958. .rlen = 16,
  1959. .np = 2,
  1960. .tap = { 8, 8 }
  1961. }, {
  1962. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1963. .klen = 8,
  1964. .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
  1965. "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
  1966. .ilen = 16,
  1967. .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
  1968. "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
  1969. .rlen = 16,
  1970. .np = 3,
  1971. .tap = { 3, 12, 1 }
  1972. },
  1973. };
  1974. static struct cipher_testvec des_cbc_enc_tv_template[] = {
  1975. { /* From OpenSSL */
  1976. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1977. .klen = 8,
  1978. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  1979. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  1980. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  1981. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  1982. .ilen = 24,
  1983. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  1984. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  1985. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  1986. .rlen = 24,
  1987. }, { /* FIPS Pub 81 */
  1988. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1989. .klen = 8,
  1990. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  1991. .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  1992. .ilen = 8,
  1993. .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1994. .rlen = 8,
  1995. }, {
  1996. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  1997. .klen = 8,
  1998. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  1999. .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2000. .ilen = 8,
  2001. .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2002. .rlen = 8,
  2003. }, {
  2004. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2005. .klen = 8,
  2006. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2007. .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2008. .ilen = 8,
  2009. .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2010. .rlen = 8,
  2011. }, { /* Copy of openssl vector for chunk testing */
  2012. /* From OpenSSL */
  2013. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2014. .klen = 8,
  2015. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2016. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2017. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2018. "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2019. .ilen = 24,
  2020. .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
  2021. "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
  2022. "\x46\x8e\x91\x15\x78\x88\xba\x68",
  2023. .rlen = 24,
  2024. .np = 2,
  2025. .tap = { 13, 11 }
  2026. },
  2027. };
  2028. static struct cipher_testvec des_cbc_dec_tv_template[] = {
  2029. { /* FIPS Pub 81 */
  2030. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2031. .klen = 8,
  2032. .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
  2033. .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2034. .ilen = 8,
  2035. .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
  2036. .rlen = 8,
  2037. }, {
  2038. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2039. .klen = 8,
  2040. .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
  2041. .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2042. .ilen = 8,
  2043. .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
  2044. .rlen = 8,
  2045. }, {
  2046. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2047. .klen = 8,
  2048. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2049. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2050. .ilen = 8,
  2051. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2052. .rlen = 8,
  2053. }, { /* Copy of above, for chunk testing */
  2054. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2055. .klen = 8,
  2056. .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
  2057. .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
  2058. .ilen = 8,
  2059. .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
  2060. .rlen = 8,
  2061. .np = 2,
  2062. .tap = { 4, 4 }
  2063. },
  2064. };
  2065. static struct cipher_testvec des3_ede_enc_tv_template[] = {
  2066. { /* These are from openssl */
  2067. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2068. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2069. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2070. .klen = 24,
  2071. .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2072. .ilen = 8,
  2073. .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2074. .rlen = 8,
  2075. }, {
  2076. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2077. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2078. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2079. .klen = 24,
  2080. .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2081. .ilen = 8,
  2082. .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2083. .rlen = 8,
  2084. }, {
  2085. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2086. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2087. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2088. .klen = 24,
  2089. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2090. .ilen = 8,
  2091. .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2092. .rlen = 8,
  2093. },
  2094. };
  2095. static struct cipher_testvec des3_ede_dec_tv_template[] = {
  2096. { /* These are from openssl */
  2097. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2098. "\x55\x55\x55\x55\x55\x55\x55\x55"
  2099. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2100. .klen = 24,
  2101. .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
  2102. .ilen = 8,
  2103. .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
  2104. .rlen = 8,
  2105. }, {
  2106. .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
  2107. "\x86\x02\x87\x66\x59\x08\x21\x98"
  2108. "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
  2109. .klen = 24,
  2110. .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
  2111. .ilen = 8,
  2112. .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
  2113. .rlen = 8,
  2114. }, {
  2115. .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
  2116. "\x91\x07\xd0\x15\x89\x19\x01\x01"
  2117. "\x19\x07\x92\x10\x98\x1a\x01\x01",
  2118. .klen = 24,
  2119. .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
  2120. .ilen = 8,
  2121. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2122. .rlen = 8,
  2123. },
  2124. };
  2125. static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
  2126. { /* Generated from openssl */
  2127. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2128. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2129. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2130. .klen = 24,
  2131. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2132. .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2133. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2134. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2135. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2136. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2137. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2138. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2139. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2140. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2141. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2142. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2143. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2144. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2145. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2146. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2147. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2148. .ilen = 128,
  2149. .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2150. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2151. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2152. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2153. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2154. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2155. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2156. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2157. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2158. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2159. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2160. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2161. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2162. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2163. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2164. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2165. .rlen = 128,
  2166. },
  2167. };
  2168. static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
  2169. { /* Generated from openssl */
  2170. .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
  2171. "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
  2172. "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
  2173. .klen = 24,
  2174. .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
  2175. .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
  2176. "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
  2177. "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
  2178. "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
  2179. "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
  2180. "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
  2181. "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
  2182. "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
  2183. "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
  2184. "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
  2185. "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
  2186. "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
  2187. "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
  2188. "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
  2189. "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
  2190. "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
  2191. .ilen = 128,
  2192. .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
  2193. "\x53\x20\x63\x65\x65\x72\x73\x74"
  2194. "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
  2195. "\x20\x79\x65\x53\x72\x63\x74\x65"
  2196. "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
  2197. "\x79\x6e\x53\x20\x63\x65\x65\x72"
  2198. "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
  2199. "\x6e\x61\x20\x79\x65\x53\x72\x63"
  2200. "\x74\x65\x20\x73\x6f\x54\x20\x6f"
  2201. "\x61\x4d\x79\x6e\x53\x20\x63\x65"
  2202. "\x65\x72\x73\x74\x54\x20\x6f\x6f"
  2203. "\x4d\x20\x6e\x61\x20\x79\x65\x53"
  2204. "\x72\x63\x74\x65\x20\x73\x6f\x54"
  2205. "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
  2206. "\x63\x65\x65\x72\x73\x74\x54\x20"
  2207. "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
  2208. .rlen = 128,
  2209. },
  2210. };
  2211. /*
  2212. * Blowfish test vectors.
  2213. */
  2214. #define BF_ENC_TEST_VECTORS 6
  2215. #define BF_DEC_TEST_VECTORS 6
  2216. #define BF_CBC_ENC_TEST_VECTORS 1
  2217. #define BF_CBC_DEC_TEST_VECTORS 1
  2218. static struct cipher_testvec bf_enc_tv_template[] = {
  2219. { /* DES test vectors from OpenSSL */
  2220. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2221. .klen = 8,
  2222. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2223. .ilen = 8,
  2224. .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2225. .rlen = 8,
  2226. }, {
  2227. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2228. .klen = 8,
  2229. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2230. .ilen = 8,
  2231. .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2232. .rlen = 8,
  2233. }, {
  2234. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2235. .klen = 8,
  2236. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2237. .ilen = 8,
  2238. .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2239. .rlen = 8,
  2240. }, { /* Vary the keylength... */
  2241. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2242. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2243. .klen = 16,
  2244. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2245. .ilen = 8,
  2246. .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2247. .rlen = 8,
  2248. }, {
  2249. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2250. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2251. "\x00\x11\x22\x33\x44",
  2252. .klen = 21,
  2253. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2254. .ilen = 8,
  2255. .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2256. .rlen = 8,
  2257. }, { /* Generated with bf488 */
  2258. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2259. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2260. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2261. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2262. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2263. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2264. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2265. .klen = 56,
  2266. .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2267. .ilen = 8,
  2268. .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2269. .rlen = 8,
  2270. },
  2271. };
  2272. static struct cipher_testvec bf_dec_tv_template[] = {
  2273. { /* DES test vectors from OpenSSL */
  2274. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2275. .klen = 8,
  2276. .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
  2277. .ilen = 8,
  2278. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  2279. .rlen = 8,
  2280. }, {
  2281. .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
  2282. .klen = 8,
  2283. .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
  2284. .ilen = 8,
  2285. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  2286. .rlen = 8,
  2287. }, {
  2288. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2289. .klen = 8,
  2290. .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
  2291. .ilen = 8,
  2292. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2293. .rlen = 8,
  2294. }, { /* Vary the keylength... */
  2295. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2296. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
  2297. .klen = 16,
  2298. .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
  2299. .ilen = 8,
  2300. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2301. .rlen = 8,
  2302. }, {
  2303. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2304. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2305. "\x00\x11\x22\x33\x44",
  2306. .klen = 21,
  2307. .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
  2308. .ilen = 8,
  2309. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2310. .rlen = 8,
  2311. }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
  2312. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
  2313. "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
  2314. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2315. "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
  2316. "\x58\x40\x23\x64\x1a\xba\x61\x76"
  2317. "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
  2318. "\xff\xff\xff\xff\xff\xff\xff\xff",
  2319. .klen = 56,
  2320. .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
  2321. .ilen = 8,
  2322. .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2323. .rlen = 8,
  2324. },
  2325. };
  2326. static struct cipher_testvec bf_cbc_enc_tv_template[] = {
  2327. { /* From OpenSSL */
  2328. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2329. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2330. .klen = 16,
  2331. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2332. .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2333. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2334. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2335. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2336. .ilen = 32,
  2337. .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2338. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2339. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2340. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2341. .rlen = 32,
  2342. },
  2343. };
  2344. static struct cipher_testvec bf_cbc_dec_tv_template[] = {
  2345. { /* From OpenSSL */
  2346. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2347. "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  2348. .klen = 16,
  2349. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  2350. .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
  2351. "\x05\xb1\x56\xe2\x74\x03\x97\x93"
  2352. "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
  2353. "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
  2354. .ilen = 32,
  2355. .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
  2356. "\x4e\x6f\x77\x20\x69\x73\x20\x74"
  2357. "\x68\x65\x20\x74\x69\x6d\x65\x20"
  2358. "\x66\x6f\x72\x20\x00\x00\x00\x00",
  2359. .rlen = 32,
  2360. },
  2361. };
  2362. /*
  2363. * Twofish test vectors.
  2364. */
  2365. #define TF_ENC_TEST_VECTORS 3
  2366. #define TF_DEC_TEST_VECTORS 3
  2367. #define TF_CBC_ENC_TEST_VECTORS 4
  2368. #define TF_CBC_DEC_TEST_VECTORS 4
  2369. static struct cipher_testvec tf_enc_tv_template[] = {
  2370. {
  2371. .key = zeroed_string,
  2372. .klen = 16,
  2373. .input = zeroed_string,
  2374. .ilen = 16,
  2375. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2376. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2377. .rlen = 16,
  2378. }, {
  2379. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2380. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2381. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2382. .klen = 24,
  2383. .input = zeroed_string,
  2384. .ilen = 16,
  2385. .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2386. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2387. .rlen = 16,
  2388. }, {
  2389. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2390. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2391. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2392. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2393. .klen = 32,
  2394. .input = zeroed_string,
  2395. .ilen = 16,
  2396. .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2397. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2398. .rlen = 16,
  2399. },
  2400. };
  2401. static struct cipher_testvec tf_dec_tv_template[] = {
  2402. {
  2403. .key = zeroed_string,
  2404. .klen = 16,
  2405. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2406. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2407. .ilen = 16,
  2408. .result = zeroed_string,
  2409. .rlen = 16,
  2410. }, {
  2411. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2412. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2413. "\x00\x11\x22\x33\x44\x55\x66\x77",
  2414. .klen = 24,
  2415. .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
  2416. "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
  2417. .ilen = 16,
  2418. .result = zeroed_string,
  2419. .rlen = 16,
  2420. }, {
  2421. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  2422. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  2423. "\x00\x11\x22\x33\x44\x55\x66\x77"
  2424. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2425. .klen = 32,
  2426. .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
  2427. "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
  2428. .ilen = 16,
  2429. .result = zeroed_string,
  2430. .rlen = 16,
  2431. },
  2432. };
  2433. static struct cipher_testvec tf_cbc_enc_tv_template[] = {
  2434. { /* Generated with Nettle */
  2435. .key = zeroed_string,
  2436. .klen = 16,
  2437. .iv = zeroed_string,
  2438. .input = zeroed_string,
  2439. .ilen = 16,
  2440. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2441. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2442. .rlen = 16,
  2443. }, {
  2444. .key = zeroed_string,
  2445. .klen = 16,
  2446. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2447. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2448. .input = zeroed_string,
  2449. .ilen = 16,
  2450. .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2451. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2452. .rlen = 16,
  2453. }, {
  2454. .key = zeroed_string,
  2455. .klen = 16,
  2456. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2457. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2458. .input = zeroed_string,
  2459. .ilen = 16,
  2460. .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2461. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2462. .rlen = 16,
  2463. }, {
  2464. .key = zeroed_string,
  2465. .klen = 16,
  2466. .iv = zeroed_string,
  2467. .input = zeroed_string,
  2468. .ilen = 48,
  2469. .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2470. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2471. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2472. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2473. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2474. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2475. .rlen = 48,
  2476. },
  2477. };
  2478. static struct cipher_testvec tf_cbc_dec_tv_template[] = {
  2479. { /* Reverse of the first four above */
  2480. .key = zeroed_string,
  2481. .klen = 16,
  2482. .iv = zeroed_string,
  2483. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2484. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2485. .ilen = 16,
  2486. .result = zeroed_string,
  2487. .rlen = 16,
  2488. }, {
  2489. .key = zeroed_string,
  2490. .klen = 16,
  2491. .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2492. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
  2493. .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2494. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2495. .ilen = 16,
  2496. .result = zeroed_string,
  2497. .rlen = 16,
  2498. }, {
  2499. .key = zeroed_string,
  2500. .klen = 16,
  2501. .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2502. "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
  2503. .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2504. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2505. .ilen = 16,
  2506. .result = zeroed_string,
  2507. .rlen = 16,
  2508. }, {
  2509. .key = zeroed_string,
  2510. .klen = 16,
  2511. .iv = zeroed_string,
  2512. .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
  2513. "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
  2514. "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
  2515. "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
  2516. "\x05\xef\x8c\x61\xa8\x11\x58\x26"
  2517. "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
  2518. .ilen = 48,
  2519. .result = zeroed_string,
  2520. .rlen = 48,
  2521. },
  2522. };
  2523. /*
  2524. * Serpent test vectors. These are backwards because Serpent writes
  2525. * octet sequences in right-to-left mode.
  2526. */
  2527. #define SERPENT_ENC_TEST_VECTORS 4
  2528. #define SERPENT_DEC_TEST_VECTORS 4
  2529. #define TNEPRES_ENC_TEST_VECTORS 4
  2530. #define TNEPRES_DEC_TEST_VECTORS 4
  2531. static struct cipher_testvec serpent_enc_tv_template[] = {
  2532. {
  2533. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2534. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2535. .ilen = 16,
  2536. .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2537. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2538. .rlen = 16,
  2539. }, {
  2540. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2541. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2542. .klen = 16,
  2543. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2544. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2545. .ilen = 16,
  2546. .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2547. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2548. .rlen = 16,
  2549. }, {
  2550. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2551. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2552. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2553. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2554. .klen = 32,
  2555. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2556. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2557. .ilen = 16,
  2558. .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2559. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2560. .rlen = 16,
  2561. }, {
  2562. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2563. .klen = 16,
  2564. .input = zeroed_string,
  2565. .ilen = 16,
  2566. .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2567. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2568. .rlen = 16,
  2569. },
  2570. };
  2571. static struct cipher_testvec tnepres_enc_tv_template[] = {
  2572. { /* KeySize=128, PT=0, I=1 */
  2573. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2574. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2575. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2576. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2577. .klen = 16,
  2578. .ilen = 16,
  2579. .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
  2580. "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
  2581. .rlen = 16,
  2582. }, { /* KeySize=192, PT=0, I=1 */
  2583. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2584. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2585. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2586. .klen = 24,
  2587. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2588. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2589. .ilen = 16,
  2590. .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
  2591. "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
  2592. .rlen = 16,
  2593. }, { /* KeySize=256, PT=0, I=1 */
  2594. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  2595. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2596. "\x00\x00\x00\x00\x00\x00\x00\x00"
  2597. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2598. .klen = 32,
  2599. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  2600. "\x00\x00\x00\x00\x00\x00\x00\x00",
  2601. .ilen = 16,
  2602. .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
  2603. "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
  2604. .rlen = 16,
  2605. }, { /* KeySize=256, I=257 */
  2606. .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
  2607. "\x17\x16\x15\x14\x13\x12\x11\x10"
  2608. "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2609. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2610. .klen = 32,
  2611. .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
  2612. "\x07\x06\x05\x04\x03\x02\x01\x00",
  2613. .ilen = 16,
  2614. .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
  2615. "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
  2616. .rlen = 16,
  2617. },
  2618. };
  2619. static struct cipher_testvec serpent_dec_tv_template[] = {
  2620. {
  2621. .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
  2622. "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
  2623. .ilen = 16,
  2624. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2625. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2626. .rlen = 16,
  2627. }, {
  2628. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2629. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2630. .klen = 16,
  2631. .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
  2632. "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
  2633. .ilen = 16,
  2634. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2635. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2636. .rlen = 16,
  2637. }, {
  2638. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2639. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2640. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2641. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2642. .klen = 32,
  2643. .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
  2644. "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
  2645. .ilen = 16,
  2646. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2647. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2648. .rlen = 16,
  2649. }, {
  2650. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2651. .klen = 16,
  2652. .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
  2653. "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
  2654. .ilen = 16,
  2655. .result = zeroed_string,
  2656. .rlen = 16,
  2657. },
  2658. };
  2659. static struct cipher_testvec tnepres_dec_tv_template[] = {
  2660. {
  2661. .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
  2662. "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
  2663. .ilen = 16,
  2664. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2665. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2666. .rlen = 16,
  2667. }, {
  2668. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2669. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2670. .klen = 16,
  2671. .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
  2672. "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
  2673. .ilen = 16,
  2674. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2675. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2676. .rlen = 16,
  2677. }, {
  2678. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2679. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2680. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2681. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2682. .klen = 32,
  2683. .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
  2684. "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
  2685. .ilen = 16,
  2686. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2687. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2688. .rlen = 16,
  2689. }, { /* KeySize=128, I=121 */
  2690. .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
  2691. .klen = 16,
  2692. .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
  2693. "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
  2694. .ilen = 16,
  2695. .result = zeroed_string,
  2696. .rlen = 16,
  2697. },
  2698. };
  2699. /* Cast6 test vectors from RFC 2612 */
  2700. #define CAST6_ENC_TEST_VECTORS 3
  2701. #define CAST6_DEC_TEST_VECTORS 3
  2702. static struct cipher_testvec cast6_enc_tv_template[] = {
  2703. {
  2704. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2705. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2706. .klen = 16,
  2707. .input = zeroed_string,
  2708. .ilen = 16,
  2709. .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2710. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2711. .rlen = 16,
  2712. }, {
  2713. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2714. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2715. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2716. .klen = 24,
  2717. .input = zeroed_string,
  2718. .ilen = 16,
  2719. .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2720. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2721. .rlen = 16,
  2722. }, {
  2723. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2724. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2725. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2726. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2727. .klen = 32,
  2728. .input = zeroed_string,
  2729. .ilen = 16,
  2730. .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2731. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2732. .rlen = 16,
  2733. },
  2734. };
  2735. static struct cipher_testvec cast6_dec_tv_template[] = {
  2736. {
  2737. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2738. "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
  2739. .klen = 16,
  2740. .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
  2741. "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
  2742. .ilen = 16,
  2743. .result = zeroed_string,
  2744. .rlen = 16,
  2745. }, {
  2746. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2747. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2748. "\xba\xc7\x7a\x77\x17\x94\x28\x63",
  2749. .klen = 24,
  2750. .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
  2751. "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
  2752. .ilen = 16,
  2753. .result = zeroed_string,
  2754. .rlen = 16,
  2755. }, {
  2756. .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
  2757. "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
  2758. "\x8d\x7c\x47\xce\x26\x49\x08\x46"
  2759. "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
  2760. .klen = 32,
  2761. .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
  2762. "\xc9\x87\x01\x36\x55\x33\x17\xfa",
  2763. .ilen = 16,
  2764. .result = zeroed_string,
  2765. .rlen = 16,
  2766. },
  2767. };
  2768. /*
  2769. * AES test vectors.
  2770. */
  2771. #define AES_ENC_TEST_VECTORS 3
  2772. #define AES_DEC_TEST_VECTORS 3
  2773. #define AES_CBC_ENC_TEST_VECTORS 4
  2774. #define AES_CBC_DEC_TEST_VECTORS 4
  2775. #define AES_LRW_ENC_TEST_VECTORS 8
  2776. #define AES_LRW_DEC_TEST_VECTORS 8
  2777. #define AES_XTS_ENC_TEST_VECTORS 4
  2778. #define AES_XTS_DEC_TEST_VECTORS 4
  2779. #define AES_CTR_ENC_TEST_VECTORS 3
  2780. #define AES_CTR_DEC_TEST_VECTORS 3
  2781. #define AES_CTR_3686_ENC_TEST_VECTORS 7
  2782. #define AES_CTR_3686_DEC_TEST_VECTORS 6
  2783. #define AES_GCM_ENC_TEST_VECTORS 9
  2784. #define AES_GCM_DEC_TEST_VECTORS 8
  2785. #define AES_CCM_ENC_TEST_VECTORS 7
  2786. #define AES_CCM_DEC_TEST_VECTORS 7
  2787. #define AES_CCM_4309_ENC_TEST_VECTORS 7
  2788. #define AES_CCM_4309_DEC_TEST_VECTORS 10
  2789. static struct cipher_testvec aes_enc_tv_template[] = {
  2790. { /* From FIPS-197 */
  2791. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2792. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2793. .klen = 16,
  2794. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2795. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2796. .ilen = 16,
  2797. .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2798. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2799. .rlen = 16,
  2800. }, {
  2801. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2802. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2803. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2804. .klen = 24,
  2805. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2806. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2807. .ilen = 16,
  2808. .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2809. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2810. .rlen = 16,
  2811. }, {
  2812. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2813. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2814. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2815. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2816. .klen = 32,
  2817. .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2818. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2819. .ilen = 16,
  2820. .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2821. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2822. .rlen = 16,
  2823. },
  2824. };
  2825. static struct cipher_testvec aes_dec_tv_template[] = {
  2826. { /* From FIPS-197 */
  2827. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2828. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2829. .klen = 16,
  2830. .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
  2831. "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
  2832. .ilen = 16,
  2833. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2834. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2835. .rlen = 16,
  2836. }, {
  2837. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2838. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2839. "\x10\x11\x12\x13\x14\x15\x16\x17",
  2840. .klen = 24,
  2841. .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
  2842. "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
  2843. .ilen = 16,
  2844. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2845. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2846. .rlen = 16,
  2847. }, {
  2848. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2849. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2850. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2851. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2852. .klen = 32,
  2853. .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
  2854. "\xea\xfc\x49\x90\x4b\x49\x60\x89",
  2855. .ilen = 16,
  2856. .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
  2857. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  2858. .rlen = 16,
  2859. },
  2860. };
  2861. static struct cipher_testvec aes_cbc_enc_tv_template[] = {
  2862. { /* From RFC 3602 */
  2863. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2864. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2865. .klen = 16,
  2866. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2867. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2868. .input = "Single block msg",
  2869. .ilen = 16,
  2870. .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2871. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2872. .rlen = 16,
  2873. }, {
  2874. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2875. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2876. .klen = 16,
  2877. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2878. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2879. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2880. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2881. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2882. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2883. .ilen = 32,
  2884. .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2885. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2886. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2887. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2888. .rlen = 32,
  2889. }, { /* From NIST SP800-38A */
  2890. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2891. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2892. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2893. .klen = 24,
  2894. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2895. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2896. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2897. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2898. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2899. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2900. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2901. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2902. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2903. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2904. .ilen = 64,
  2905. .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2906. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2907. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2908. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2909. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2910. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2911. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2912. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2913. .rlen = 64,
  2914. }, {
  2915. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2916. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2917. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2918. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  2919. .klen = 32,
  2920. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2921. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2922. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2923. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2924. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2925. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2926. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2927. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2928. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2929. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2930. .ilen = 64,
  2931. .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  2932. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  2933. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  2934. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  2935. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  2936. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  2937. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  2938. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  2939. .rlen = 64,
  2940. },
  2941. };
  2942. static struct cipher_testvec aes_cbc_dec_tv_template[] = {
  2943. { /* From RFC 3602 */
  2944. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  2945. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  2946. .klen = 16,
  2947. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  2948. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  2949. .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
  2950. "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
  2951. .ilen = 16,
  2952. .result = "Single block msg",
  2953. .rlen = 16,
  2954. }, {
  2955. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  2956. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  2957. .klen = 16,
  2958. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  2959. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  2960. .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
  2961. "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
  2962. "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
  2963. "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
  2964. .ilen = 32,
  2965. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2966. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  2967. "\x10\x11\x12\x13\x14\x15\x16\x17"
  2968. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  2969. .rlen = 32,
  2970. }, { /* From NIST SP800-38A */
  2971. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  2972. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  2973. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  2974. .klen = 24,
  2975. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  2976. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  2977. .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
  2978. "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
  2979. "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
  2980. "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
  2981. "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
  2982. "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
  2983. "\x08\xb0\xe2\x79\x88\x59\x88\x81"
  2984. "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
  2985. .ilen = 64,
  2986. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  2987. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  2988. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  2989. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  2990. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  2991. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  2992. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  2993. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  2994. .rlen = 64,
  2995. }, {
  2996. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  2997. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  2998. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  2999. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  3000. .klen = 32,
  3001. .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3002. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  3003. .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
  3004. "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
  3005. "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
  3006. "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
  3007. "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
  3008. "\xa5\x30\xe2\x63\x04\x23\x14\x61"
  3009. "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
  3010. "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
  3011. .ilen = 64,
  3012. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3013. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3014. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3015. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3016. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3017. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3018. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3019. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3020. .rlen = 64,
  3021. },
  3022. };
  3023. static struct cipher_testvec aes_lrw_enc_tv_template[] = {
  3024. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3025. { /* LRW-32-AES 1 */
  3026. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3027. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3028. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3029. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3030. .klen = 32,
  3031. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3032. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3033. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3034. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3035. .ilen = 16,
  3036. .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3037. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3038. .rlen = 16,
  3039. }, { /* LRW-32-AES 2 */
  3040. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3041. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3042. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3043. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3044. .klen = 32,
  3045. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3046. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3047. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3048. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3049. .ilen = 16,
  3050. .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3051. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3052. .rlen = 16,
  3053. }, { /* LRW-32-AES 3 */
  3054. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3055. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3056. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3057. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3058. .klen = 32,
  3059. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3060. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3061. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3062. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3063. .ilen = 16,
  3064. .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3065. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3066. .rlen = 16,
  3067. }, { /* LRW-32-AES 4 */
  3068. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3069. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3070. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3071. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3072. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3073. .klen = 40,
  3074. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3075. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3076. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3077. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3078. .ilen = 16,
  3079. .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3080. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3081. .rlen = 16,
  3082. }, { /* LRW-32-AES 5 */
  3083. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3084. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3085. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3086. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3087. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3088. .klen = 40,
  3089. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3090. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3091. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3092. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3093. .ilen = 16,
  3094. .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3095. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3096. .rlen = 16,
  3097. }, { /* LRW-32-AES 6 */
  3098. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3099. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3100. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3101. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3102. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3103. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3104. .klen = 48,
  3105. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3106. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3107. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3108. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3109. .ilen = 16,
  3110. .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3111. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3112. .rlen = 16,
  3113. }, { /* LRW-32-AES 7 */
  3114. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3115. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3116. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3117. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3118. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3119. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3120. .klen = 48,
  3121. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3122. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3123. .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3124. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3125. .ilen = 16,
  3126. .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3127. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3128. .rlen = 16,
  3129. }, {
  3130. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3131. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3132. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3133. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3134. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3135. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3136. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3137. .klen = 48,
  3138. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3139. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3140. .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3141. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3142. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3143. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3144. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3145. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3146. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3147. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3148. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3149. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3150. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3151. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3152. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3153. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3154. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3155. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3156. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3157. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3158. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3159. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3160. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3161. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3162. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3163. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3164. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3165. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3166. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3167. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3168. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3169. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3170. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3171. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3172. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3173. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3174. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3175. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3176. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3177. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3178. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3179. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3180. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3181. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3182. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3183. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3184. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3185. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3186. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3187. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3188. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3189. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3190. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3191. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3192. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3193. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3194. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3195. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3196. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3197. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3198. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3199. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3200. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3201. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3202. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3203. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3204. .ilen = 512,
  3205. .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3206. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3207. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3208. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3209. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3210. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3211. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3212. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3213. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3214. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3215. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3216. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3217. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3218. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3219. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3220. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3221. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3222. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3223. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3224. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3225. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3226. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3227. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3228. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3229. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3230. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3231. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3232. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3233. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3234. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3235. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3236. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3237. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3238. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3239. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3240. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3241. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3242. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3243. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3244. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3245. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3246. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3247. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3248. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3249. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3250. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3251. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3252. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3253. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3254. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3255. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3256. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3257. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3258. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3259. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3260. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3261. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3262. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3263. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3264. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3265. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3266. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3267. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3268. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3269. .rlen = 512,
  3270. }
  3271. };
  3272. static struct cipher_testvec aes_lrw_dec_tv_template[] = {
  3273. /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
  3274. /* same as enc vectors with input and result reversed */
  3275. { /* LRW-32-AES 1 */
  3276. .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
  3277. "\x4c\x26\x84\x14\xb5\x68\x01\x85"
  3278. "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
  3279. "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
  3280. .klen = 32,
  3281. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3282. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3283. .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
  3284. "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
  3285. .ilen = 16,
  3286. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3287. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3288. .rlen = 16,
  3289. }, { /* LRW-32-AES 2 */
  3290. .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
  3291. "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
  3292. "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
  3293. "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
  3294. .klen = 32,
  3295. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3296. "\x00\x00\x00\x00\x00\x00\x00\x02",
  3297. .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
  3298. "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
  3299. .ilen = 16,
  3300. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3301. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3302. .rlen = 16,
  3303. }, { /* LRW-32-AES 3 */
  3304. .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
  3305. "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
  3306. "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
  3307. "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
  3308. .klen = 32,
  3309. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3310. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3311. .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
  3312. "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
  3313. .ilen = 16,
  3314. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3315. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3316. .rlen = 16,
  3317. }, { /* LRW-32-AES 4 */
  3318. .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
  3319. "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
  3320. "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
  3321. "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
  3322. "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
  3323. .klen = 40,
  3324. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3325. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3326. .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
  3327. "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
  3328. .ilen = 16,
  3329. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3330. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3331. .rlen = 16,
  3332. }, { /* LRW-32-AES 5 */
  3333. .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
  3334. "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
  3335. "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
  3336. "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
  3337. "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
  3338. .klen = 40,
  3339. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3340. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3341. .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
  3342. "\xc8\x60\x48\x02\x87\xe3\x34\x06",
  3343. .ilen = 16,
  3344. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3345. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3346. .rlen = 16,
  3347. }, { /* LRW-32-AES 6 */
  3348. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3349. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3350. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3351. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3352. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3353. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3354. .klen = 48,
  3355. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3356. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3357. .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
  3358. "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
  3359. .ilen = 16,
  3360. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3361. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3362. .rlen = 16,
  3363. }, { /* LRW-32-AES 7 */
  3364. .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
  3365. "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
  3366. "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
  3367. "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
  3368. "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
  3369. "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
  3370. .klen = 48,
  3371. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3372. "\x00\x00\x00\x02\x00\x00\x00\x00",
  3373. .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
  3374. "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
  3375. .ilen = 16,
  3376. .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
  3377. "\x38\x39\x41\x42\x43\x44\x45\x46",
  3378. .rlen = 16,
  3379. }, {
  3380. /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
  3381. .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
  3382. "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
  3383. "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
  3384. "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
  3385. "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
  3386. "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
  3387. .klen = 48,
  3388. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3389. "\x00\x00\x00\x00\x00\x00\x00\x01",
  3390. .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
  3391. "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
  3392. "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
  3393. "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
  3394. "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
  3395. "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
  3396. "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
  3397. "\xe8\x58\x46\x97\x39\x51\x07\xde"
  3398. "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
  3399. "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
  3400. "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
  3401. "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
  3402. "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
  3403. "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
  3404. "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
  3405. "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
  3406. "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
  3407. "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
  3408. "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
  3409. "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
  3410. "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
  3411. "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
  3412. "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
  3413. "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
  3414. "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
  3415. "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
  3416. "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
  3417. "\x41\x30\x58\xc5\x62\x74\x52\x1d"
  3418. "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
  3419. "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
  3420. "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
  3421. "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
  3422. "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
  3423. "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
  3424. "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
  3425. "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
  3426. "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
  3427. "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
  3428. "\xb8\x79\x78\x97\x94\xff\x72\x13"
  3429. "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
  3430. "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
  3431. "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
  3432. "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
  3433. "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
  3434. "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
  3435. "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
  3436. "\x1e\x86\x53\x11\x53\x94\x00\xee"
  3437. "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
  3438. "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
  3439. "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
  3440. "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
  3441. "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
  3442. "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
  3443. "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
  3444. "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
  3445. "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
  3446. "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
  3447. "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
  3448. "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
  3449. "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
  3450. "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
  3451. "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
  3452. "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
  3453. "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
  3454. .ilen = 512,
  3455. .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
  3456. "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
  3457. "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
  3458. "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
  3459. "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
  3460. "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
  3461. "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
  3462. "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
  3463. "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
  3464. "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
  3465. "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
  3466. "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
  3467. "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
  3468. "\x4c\x96\x12\xed\x7c\x92\x03\x01"
  3469. "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
  3470. "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
  3471. "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
  3472. "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
  3473. "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
  3474. "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
  3475. "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
  3476. "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
  3477. "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
  3478. "\x76\x12\x73\x44\x1a\x56\xd7\x72"
  3479. "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
  3480. "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
  3481. "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
  3482. "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
  3483. "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
  3484. "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
  3485. "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
  3486. "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
  3487. "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
  3488. "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
  3489. "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
  3490. "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
  3491. "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
  3492. "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
  3493. "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
  3494. "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
  3495. "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
  3496. "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
  3497. "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
  3498. "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
  3499. "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
  3500. "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
  3501. "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
  3502. "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
  3503. "\x62\x73\x65\xfd\x46\x63\x25\x3d"
  3504. "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
  3505. "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
  3506. "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
  3507. "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
  3508. "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
  3509. "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
  3510. "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
  3511. "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
  3512. "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
  3513. "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
  3514. "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
  3515. "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
  3516. "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
  3517. "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
  3518. "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
  3519. .rlen = 512,
  3520. }
  3521. };
  3522. static struct cipher_testvec aes_xts_enc_tv_template[] = {
  3523. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3524. { /* XTS-AES 1 */
  3525. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3526. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3527. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3528. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3529. .klen = 32,
  3530. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3531. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3532. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3533. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3534. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3535. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3536. .ilen = 32,
  3537. .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3538. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3539. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3540. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3541. .rlen = 32,
  3542. }, { /* XTS-AES 2 */
  3543. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3544. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3545. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3546. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3547. .klen = 32,
  3548. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3549. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3550. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3551. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3552. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3553. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3554. .ilen = 32,
  3555. .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3556. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3557. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3558. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3559. .rlen = 32,
  3560. }, { /* XTS-AES 3 */
  3561. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3562. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3563. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3564. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3565. .klen = 32,
  3566. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3567. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3568. .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3569. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3570. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3571. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3572. .ilen = 32,
  3573. .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3574. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3575. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3576. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3577. .rlen = 32,
  3578. }, { /* XTS-AES 4 */
  3579. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3580. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3581. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3582. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3583. .klen = 32,
  3584. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3585. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3586. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3587. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3588. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3589. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3590. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3591. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3592. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3593. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3594. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3595. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3596. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3597. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3598. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3599. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3600. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3601. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3602. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3603. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3604. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3605. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3606. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3607. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3608. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3609. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3610. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3611. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3612. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3613. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3614. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3615. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3616. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3617. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3618. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3619. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3620. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3621. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3622. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3623. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3624. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3625. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3626. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3627. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3628. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3629. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3630. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3631. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3632. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3633. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3634. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3635. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3636. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3637. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3638. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3639. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3640. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3641. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3642. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3643. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3644. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3645. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3646. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3647. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3648. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3649. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3650. .ilen = 512,
  3651. .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3652. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3653. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3654. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3655. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3656. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3657. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3658. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3659. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3660. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3661. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3662. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3663. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3664. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3665. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3666. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3667. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3668. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3669. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3670. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3671. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3672. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3673. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3674. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3675. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3676. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3677. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3678. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3679. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3680. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3681. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3682. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3683. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3684. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3685. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3686. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3687. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3688. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3689. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3690. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3691. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3692. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3693. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3694. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3695. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3696. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3697. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3698. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3699. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3700. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3701. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3702. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3703. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3704. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3705. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3706. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3707. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3708. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3709. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3710. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3711. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3712. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3713. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3714. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3715. .rlen = 512,
  3716. }
  3717. };
  3718. static struct cipher_testvec aes_xts_dec_tv_template[] = {
  3719. /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
  3720. { /* XTS-AES 1 */
  3721. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3722. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3723. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3724. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3725. .klen = 32,
  3726. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3727. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3728. .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
  3729. "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
  3730. "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
  3731. "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
  3732. .ilen = 32,
  3733. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3734. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3735. "\x00\x00\x00\x00\x00\x00\x00\x00"
  3736. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3737. .rlen = 32,
  3738. }, { /* XTS-AES 2 */
  3739. .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
  3740. "\x11\x11\x11\x11\x11\x11\x11\x11"
  3741. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3742. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3743. .klen = 32,
  3744. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3745. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3746. .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
  3747. "\x39\x33\x40\x38\xac\xef\x83\x8b"
  3748. "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
  3749. "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
  3750. .ilen = 32,
  3751. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3752. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3753. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3754. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3755. .rlen = 32,
  3756. }, { /* XTS-AES 3 */
  3757. .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
  3758. "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
  3759. "\x22\x22\x22\x22\x22\x22\x22\x22"
  3760. "\x22\x22\x22\x22\x22\x22\x22\x22",
  3761. .klen = 32,
  3762. .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
  3763. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3764. .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
  3765. "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
  3766. "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
  3767. "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
  3768. .ilen = 32,
  3769. .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
  3770. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3771. "\x44\x44\x44\x44\x44\x44\x44\x44"
  3772. "\x44\x44\x44\x44\x44\x44\x44\x44",
  3773. .rlen = 32,
  3774. }, { /* XTS-AES 4 */
  3775. .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
  3776. "\x23\x53\x60\x28\x74\x71\x35\x26"
  3777. "\x31\x41\x59\x26\x53\x58\x97\x93"
  3778. "\x23\x84\x62\x64\x33\x83\x27\x95",
  3779. .klen = 32,
  3780. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  3781. "\x00\x00\x00\x00\x00\x00\x00\x00",
  3782. .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
  3783. "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
  3784. "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
  3785. "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
  3786. "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
  3787. "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
  3788. "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
  3789. "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
  3790. "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
  3791. "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
  3792. "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
  3793. "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
  3794. "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
  3795. "\x22\x97\x61\x46\xae\x20\xce\x84"
  3796. "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
  3797. "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
  3798. "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
  3799. "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
  3800. "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
  3801. "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
  3802. "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
  3803. "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
  3804. "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
  3805. "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
  3806. "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
  3807. "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
  3808. "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
  3809. "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
  3810. "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
  3811. "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
  3812. "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
  3813. "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
  3814. "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
  3815. "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
  3816. "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
  3817. "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
  3818. "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
  3819. "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
  3820. "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
  3821. "\x55\xef\x52\x97\xca\x67\xe9\xf3"
  3822. "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
  3823. "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
  3824. "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
  3825. "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
  3826. "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
  3827. "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
  3828. "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
  3829. "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
  3830. "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
  3831. "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
  3832. "\x18\x84\x69\x77\xae\x11\x9f\x7a"
  3833. "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
  3834. "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
  3835. "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
  3836. "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
  3837. "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
  3838. "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
  3839. "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
  3840. "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
  3841. "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
  3842. "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
  3843. "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
  3844. "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
  3845. "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
  3846. .ilen = 512,
  3847. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  3848. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3849. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3850. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3851. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3852. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3853. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3854. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3855. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3856. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3857. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3858. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3859. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3860. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3861. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3862. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3863. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3864. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3865. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3866. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3867. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3868. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3869. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3870. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3871. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3872. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3873. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3874. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3875. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3876. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3877. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3878. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  3879. "\x00\x01\x02\x03\x04\x05\x06\x07"
  3880. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  3881. "\x10\x11\x12\x13\x14\x15\x16\x17"
  3882. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  3883. "\x20\x21\x22\x23\x24\x25\x26\x27"
  3884. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  3885. "\x30\x31\x32\x33\x34\x35\x36\x37"
  3886. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  3887. "\x40\x41\x42\x43\x44\x45\x46\x47"
  3888. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  3889. "\x50\x51\x52\x53\x54\x55\x56\x57"
  3890. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  3891. "\x60\x61\x62\x63\x64\x65\x66\x67"
  3892. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  3893. "\x70\x71\x72\x73\x74\x75\x76\x77"
  3894. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  3895. "\x80\x81\x82\x83\x84\x85\x86\x87"
  3896. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  3897. "\x90\x91\x92\x93\x94\x95\x96\x97"
  3898. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  3899. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  3900. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  3901. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  3902. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  3903. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  3904. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  3905. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  3906. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  3907. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  3908. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  3909. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3910. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3911. .rlen = 512,
  3912. }
  3913. };
  3914. static struct cipher_testvec aes_ctr_enc_tv_template[] = {
  3915. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  3916. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  3917. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  3918. .klen = 16,
  3919. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3920. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3921. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3922. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3923. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3924. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3925. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3926. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3927. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3928. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3929. .ilen = 64,
  3930. .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  3931. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  3932. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  3933. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  3934. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  3935. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  3936. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  3937. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  3938. .rlen = 64,
  3939. }, {
  3940. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  3941. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  3942. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  3943. .klen = 24,
  3944. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3945. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3946. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3947. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3948. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3949. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3950. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3951. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3952. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3953. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3954. .ilen = 64,
  3955. .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  3956. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  3957. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  3958. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  3959. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  3960. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  3961. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  3962. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  3963. .rlen = 64,
  3964. }, {
  3965. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  3966. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  3967. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  3968. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  3969. .klen = 32,
  3970. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3971. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3972. .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  3973. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  3974. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  3975. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  3976. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  3977. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  3978. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  3979. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  3980. .ilen = 64,
  3981. .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  3982. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  3983. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  3984. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  3985. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  3986. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  3987. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  3988. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  3989. .rlen = 64,
  3990. }
  3991. };
  3992. static struct cipher_testvec aes_ctr_dec_tv_template[] = {
  3993. { /* From NIST Special Publication 800-38A, Appendix F.5 */
  3994. .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
  3995. "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
  3996. .klen = 16,
  3997. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  3998. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  3999. .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
  4000. "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
  4001. "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
  4002. "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
  4003. "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
  4004. "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
  4005. "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
  4006. "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
  4007. .ilen = 64,
  4008. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4009. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4010. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4011. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4012. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4013. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4014. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4015. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4016. .rlen = 64,
  4017. }, {
  4018. .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
  4019. "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
  4020. "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
  4021. .klen = 24,
  4022. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4023. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4024. .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
  4025. "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
  4026. "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
  4027. "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
  4028. "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
  4029. "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
  4030. "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
  4031. "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
  4032. .ilen = 64,
  4033. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4034. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4035. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4036. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4037. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4038. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4039. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4040. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4041. .rlen = 64,
  4042. }, {
  4043. .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
  4044. "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
  4045. "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
  4046. "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
  4047. .klen = 32,
  4048. .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4049. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
  4050. .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
  4051. "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
  4052. "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
  4053. "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
  4054. "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
  4055. "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
  4056. "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
  4057. "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
  4058. .ilen = 64,
  4059. .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
  4060. "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
  4061. "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
  4062. "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
  4063. "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
  4064. "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
  4065. "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
  4066. "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
  4067. .rlen = 64,
  4068. }
  4069. };
  4070. static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
  4071. { /* From RFC 3686 */
  4072. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  4073. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  4074. "\x00\x00\x00\x30",
  4075. .klen = 20,
  4076. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4077. .input = "Single block msg",
  4078. .ilen = 16,
  4079. .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  4080. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  4081. .rlen = 16,
  4082. }, {
  4083. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  4084. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  4085. "\x00\x6c\xb6\xdb",
  4086. .klen = 20,
  4087. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  4088. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4089. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4090. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4091. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4092. .ilen = 32,
  4093. .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  4094. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  4095. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  4096. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  4097. .rlen = 32,
  4098. }, {
  4099. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  4100. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  4101. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  4102. "\x00\x00\x00\x48",
  4103. .klen = 28,
  4104. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  4105. .input = "Single block msg",
  4106. .ilen = 16,
  4107. .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  4108. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  4109. .rlen = 16,
  4110. }, {
  4111. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  4112. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  4113. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  4114. "\x00\x96\xb0\x3b",
  4115. .klen = 28,
  4116. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  4117. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4118. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4119. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4120. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4121. .ilen = 32,
  4122. .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  4123. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  4124. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  4125. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  4126. .rlen = 32,
  4127. }, {
  4128. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  4129. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  4130. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  4131. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  4132. "\x00\x00\x00\x60",
  4133. .klen = 36,
  4134. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  4135. .input = "Single block msg",
  4136. .ilen = 16,
  4137. .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  4138. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  4139. .rlen = 16,
  4140. }, {
  4141. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  4142. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  4143. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  4144. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  4145. "\x00\xfa\xac\x24",
  4146. .klen = 36,
  4147. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  4148. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4149. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4150. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4151. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  4152. .ilen = 32,
  4153. .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  4154. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  4155. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  4156. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  4157. .rlen = 32,
  4158. }, {
  4159. // generated using Crypto++
  4160. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  4161. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4162. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4163. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4164. "\x00\x00\x00\x00",
  4165. .klen = 32 + 4,
  4166. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  4167. .input =
  4168. "\x00\x01\x02\x03\x04\x05\x06\x07"
  4169. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  4170. "\x10\x11\x12\x13\x14\x15\x16\x17"
  4171. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  4172. "\x20\x21\x22\x23\x24\x25\x26\x27"
  4173. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  4174. "\x30\x31\x32\x33\x34\x35\x36\x37"
  4175. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  4176. "\x40\x41\x42\x43\x44\x45\x46\x47"
  4177. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  4178. "\x50\x51\x52\x53\x54\x55\x56\x57"
  4179. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  4180. "\x60\x61\x62\x63\x64\x65\x66\x67"
  4181. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  4182. "\x70\x71\x72\x73\x74\x75\x76\x77"
  4183. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  4184. "\x80\x81\x82\x83\x84\x85\x86\x87"
  4185. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  4186. "\x90\x91\x92\x93\x94\x95\x96\x97"
  4187. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  4188. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  4189. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  4190. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  4191. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  4192. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  4193. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  4194. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  4195. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  4196. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  4197. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  4198. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  4199. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  4200. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  4201. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  4202. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  4203. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  4204. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  4205. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  4206. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  4207. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  4208. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  4209. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  4210. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  4211. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  4212. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  4213. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  4214. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  4215. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  4216. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  4217. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  4218. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  4219. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  4220. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  4221. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  4222. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  4223. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  4224. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  4225. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  4226. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  4227. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  4228. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  4229. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  4230. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  4231. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  4232. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  4233. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  4234. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  4235. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  4236. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  4237. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  4238. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  4239. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  4240. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  4241. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  4242. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  4243. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  4244. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  4245. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  4246. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  4247. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  4248. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  4249. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  4250. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  4251. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  4252. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  4253. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  4254. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  4255. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  4256. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  4257. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  4258. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  4259. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  4260. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  4261. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  4262. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  4263. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  4264. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  4265. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  4266. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  4267. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  4268. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  4269. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  4270. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  4271. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  4272. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  4273. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  4274. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  4275. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  4276. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  4277. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  4278. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  4279. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  4280. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  4281. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  4282. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  4283. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  4284. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  4285. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  4286. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  4287. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  4288. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  4289. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  4290. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  4291. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  4292. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  4293. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  4294. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  4295. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  4296. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  4297. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  4298. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  4299. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  4300. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  4301. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  4302. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  4303. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  4304. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  4305. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  4306. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  4307. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  4308. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  4309. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  4310. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  4311. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  4312. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  4313. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  4314. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  4315. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  4316. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  4317. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  4318. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  4319. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  4320. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  4321. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  4322. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  4323. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  4324. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  4325. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  4326. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  4327. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  4328. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  4329. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  4330. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  4331. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  4332. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  4333. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  4334. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  4335. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  4336. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  4337. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  4338. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  4339. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  4340. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  4341. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  4342. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  4343. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  4344. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  4345. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  4346. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  4347. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  4348. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  4349. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  4350. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  4351. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  4352. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  4353. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  4354. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  4355. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  4356. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  4357. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  4358. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  4359. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  4360. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  4361. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  4362. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  4363. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  4364. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  4365. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  4366. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  4367. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  4368. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  4369. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  4370. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  4371. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  4372. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  4373. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  4374. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  4375. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  4376. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  4377. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  4378. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  4379. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  4380. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  4381. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  4382. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  4383. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  4384. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  4385. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  4386. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  4387. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  4388. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  4389. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  4390. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  4391. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  4392. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  4393. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  4394. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  4395. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  4396. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  4397. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  4398. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  4399. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  4400. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  4401. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  4402. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  4403. "\x28\x37\x46\x55\x64\x73\x82\x91"
  4404. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  4405. "\x18\x27\x36\x45\x54\x63\x72\x81"
  4406. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  4407. "\x08\x17\x26\x35\x44\x53\x62\x71"
  4408. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  4409. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  4410. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  4411. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  4412. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  4413. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  4414. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  4415. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  4416. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  4417. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  4418. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  4419. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  4420. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  4421. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  4422. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  4423. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  4424. "\x00\x11\x22\x33\x44\x55\x66\x77"
  4425. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  4426. "\x10\x21\x32\x43\x54\x65\x76\x87"
  4427. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  4428. "\x20\x31\x42\x53\x64\x75\x86\x97"
  4429. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  4430. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  4431. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  4432. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  4433. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  4434. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  4435. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  4436. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  4437. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  4438. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  4439. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  4440. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  4441. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  4442. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  4443. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  4444. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  4445. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  4446. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  4447. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  4448. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  4449. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  4450. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  4451. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  4452. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  4453. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  4454. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  4455. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  4456. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  4457. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  4458. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  4459. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  4460. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  4461. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  4462. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  4463. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  4464. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  4465. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  4466. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  4467. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  4468. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  4469. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  4470. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  4471. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  4472. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  4473. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  4474. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  4475. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  4476. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  4477. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  4478. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  4479. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  4480. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  4481. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  4482. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  4483. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  4484. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  4485. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  4486. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  4487. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  4488. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  4489. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  4490. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  4491. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  4492. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  4493. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  4494. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  4495. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  4496. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  4497. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  4498. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  4499. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  4500. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  4501. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  4502. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  4503. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  4504. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  4505. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  4506. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  4507. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  4508. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  4509. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  4510. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  4511. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  4512. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  4513. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  4514. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  4515. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  4516. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  4517. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  4518. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  4519. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  4520. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  4521. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  4522. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  4523. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  4524. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  4525. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  4526. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  4527. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  4528. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  4529. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  4530. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  4531. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  4532. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  4533. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  4534. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  4535. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  4536. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  4537. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  4538. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  4539. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  4540. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  4541. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  4542. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  4543. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  4544. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  4545. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  4546. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  4547. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  4548. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  4549. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  4550. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  4551. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  4552. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  4553. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  4554. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  4555. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  4556. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  4557. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  4558. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  4559. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  4560. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  4561. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  4562. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  4563. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  4564. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  4565. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  4566. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  4567. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  4568. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  4569. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  4570. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  4571. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  4572. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  4573. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  4574. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  4575. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  4576. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  4577. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  4578. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  4579. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  4580. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  4581. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  4582. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  4583. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  4584. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  4585. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  4586. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  4587. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  4588. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  4589. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  4590. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  4591. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  4592. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  4593. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  4594. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  4595. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  4596. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  4597. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  4598. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  4599. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  4600. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  4601. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  4602. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  4603. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  4604. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  4605. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  4606. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  4607. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  4608. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  4609. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  4610. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  4611. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  4612. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  4613. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  4614. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  4615. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  4616. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  4617. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  4618. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  4619. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  4620. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  4621. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  4622. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  4623. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  4624. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  4625. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  4626. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  4627. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  4628. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  4629. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  4630. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  4631. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  4632. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  4633. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  4634. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  4635. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  4636. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  4637. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  4638. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  4639. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  4640. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  4641. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  4642. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  4643. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  4644. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  4645. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  4646. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  4647. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  4648. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  4649. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  4650. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  4651. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  4652. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  4653. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  4654. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  4655. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  4656. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  4657. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  4658. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  4659. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  4660. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  4661. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  4662. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  4663. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  4664. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  4665. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  4666. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  4667. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  4668. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  4669. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  4670. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  4671. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  4672. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  4673. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  4674. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  4675. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  4676. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  4677. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  4678. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  4679. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  4680. "\x00\x21\x42\x63",
  4681. .ilen = 4100,
  4682. .result =
  4683. "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
  4684. "\xae\xff\x91\x3a\x44\xcf\x38\x32"
  4685. "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
  4686. "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
  4687. "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
  4688. "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
  4689. "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
  4690. "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
  4691. "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
  4692. "\x18\xff\x75\x6d\x06\x2d\x00\xab"
  4693. "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
  4694. "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
  4695. "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
  4696. "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
  4697. "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
  4698. "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
  4699. "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
  4700. "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
  4701. "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
  4702. "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
  4703. "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
  4704. "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
  4705. "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
  4706. "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
  4707. "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
  4708. "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
  4709. "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
  4710. "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
  4711. "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
  4712. "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
  4713. "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
  4714. "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
  4715. "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
  4716. "\x6a\x25\x15\x33\x4e\x45\x08\xec"
  4717. "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
  4718. "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
  4719. "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
  4720. "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
  4721. "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
  4722. "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
  4723. "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
  4724. "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
  4725. "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
  4726. "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
  4727. "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
  4728. "\x04\x02\xef\xd3\x44\xde\x76\x31"
  4729. "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
  4730. "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
  4731. "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
  4732. "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
  4733. "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
  4734. "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
  4735. "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
  4736. "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
  4737. "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
  4738. "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
  4739. "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
  4740. "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
  4741. "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
  4742. "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
  4743. "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
  4744. "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
  4745. "\x32\x03\xed\xf0\x50\x1c\x56\x39"
  4746. "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
  4747. "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
  4748. "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
  4749. "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
  4750. "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
  4751. "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
  4752. "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
  4753. "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
  4754. "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
  4755. "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
  4756. "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
  4757. "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
  4758. "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
  4759. "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
  4760. "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
  4761. "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
  4762. "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
  4763. "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
  4764. "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
  4765. "\x69\x3a\x29\x23\xac\x86\x32\xa5"
  4766. "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
  4767. "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
  4768. "\x59\x6a\xd3\x50\x59\x43\x59\xde"
  4769. "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
  4770. "\x18\x34\x0d\x1a\x63\x33\xed\x10"
  4771. "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
  4772. "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
  4773. "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
  4774. "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
  4775. "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
  4776. "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
  4777. "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
  4778. "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
  4779. "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
  4780. "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
  4781. "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
  4782. "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
  4783. "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
  4784. "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
  4785. "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
  4786. "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
  4787. "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
  4788. "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
  4789. "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
  4790. "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
  4791. "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
  4792. "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
  4793. "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
  4794. "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
  4795. "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
  4796. "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
  4797. "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
  4798. "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
  4799. "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
  4800. "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
  4801. "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
  4802. "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
  4803. "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
  4804. "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
  4805. "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
  4806. "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
  4807. "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
  4808. "\x26\x39\x83\x94\xef\x27\xd8\x53"
  4809. "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
  4810. "\x43\x7c\x95\x0a\x53\xef\x66\xda"
  4811. "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
  4812. "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
  4813. "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
  4814. "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
  4815. "\x88\xee\x73\xcf\x66\x2f\x52\x56"
  4816. "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
  4817. "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
  4818. "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
  4819. "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
  4820. "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
  4821. "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
  4822. "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
  4823. "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
  4824. "\xba\x61\x34\x38\x7c\xda\x48\x3e"
  4825. "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
  4826. "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
  4827. "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
  4828. "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
  4829. "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
  4830. "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
  4831. "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
  4832. "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
  4833. "\x35\x12\xe3\x36\x28\x27\x36\x58"
  4834. "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
  4835. "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
  4836. "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
  4837. "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
  4838. "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
  4839. "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
  4840. "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
  4841. "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
  4842. "\x89\xf3\x78\x35\x44\x62\x78\x72"
  4843. "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
  4844. "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
  4845. "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
  4846. "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
  4847. "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
  4848. "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
  4849. "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
  4850. "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
  4851. "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
  4852. "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
  4853. "\xd2\x49\x77\x81\x6d\x90\x70\xae"
  4854. "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
  4855. "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
  4856. "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
  4857. "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
  4858. "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
  4859. "\x45\x42\x27\x75\x50\xe5\xee\xb8"
  4860. "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
  4861. "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
  4862. "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
  4863. "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
  4864. "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
  4865. "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
  4866. "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
  4867. "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
  4868. "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
  4869. "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
  4870. "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
  4871. "\xa9\x21\x2b\x92\x94\x87\x62\x57"
  4872. "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
  4873. "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
  4874. "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
  4875. "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
  4876. "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
  4877. "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
  4878. "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
  4879. "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
  4880. "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
  4881. "\x69\x34\x78\x61\x24\x21\x9c\x8a"
  4882. "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
  4883. "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
  4884. "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
  4885. "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
  4886. "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
  4887. "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
  4888. "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
  4889. "\xb1\x95\x28\x86\x20\xe9\x17\x49"
  4890. "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
  4891. "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
  4892. "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
  4893. "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
  4894. "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
  4895. "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
  4896. "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
  4897. "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
  4898. "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
  4899. "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
  4900. "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
  4901. "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
  4902. "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
  4903. "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
  4904. "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
  4905. "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
  4906. "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
  4907. "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
  4908. "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
  4909. "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
  4910. "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
  4911. "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
  4912. "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
  4913. "\x29\x90\x46\x30\x92\x69\x7d\x13"
  4914. "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
  4915. "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
  4916. "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
  4917. "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
  4918. "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
  4919. "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
  4920. "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
  4921. "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
  4922. "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
  4923. "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
  4924. "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
  4925. "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
  4926. "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
  4927. "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
  4928. "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
  4929. "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
  4930. "\x77\x65\x08\x60\x11\x76\x4c\x8d"
  4931. "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
  4932. "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
  4933. "\x03\xd1\x24\x95\xec\x6d\xab\x38"
  4934. "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
  4935. "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
  4936. "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
  4937. "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
  4938. "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
  4939. "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
  4940. "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
  4941. "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
  4942. "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
  4943. "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
  4944. "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
  4945. "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
  4946. "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
  4947. "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
  4948. "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
  4949. "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
  4950. "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
  4951. "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
  4952. "\xe5\x79\x81\x73\xcd\x43\x59\x68"
  4953. "\x73\x02\x3b\x78\x21\x72\x43\x00"
  4954. "\x49\x17\xf7\x00\xaf\x68\x24\x53"
  4955. "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
  4956. "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
  4957. "\x11\x94\x13\x69\x51\x09\x28\xde"
  4958. "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
  4959. "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
  4960. "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
  4961. "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
  4962. "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
  4963. "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
  4964. "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
  4965. "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
  4966. "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
  4967. "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
  4968. "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
  4969. "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
  4970. "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
  4971. "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
  4972. "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
  4973. "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
  4974. "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
  4975. "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
  4976. "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
  4977. "\x69\xdc\xab\x24\x57\x60\x47\xc1"
  4978. "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
  4979. "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
  4980. "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
  4981. "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
  4982. "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
  4983. "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
  4984. "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
  4985. "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
  4986. "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
  4987. "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
  4988. "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
  4989. "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
  4990. "\x85\x62\x82\x70\x18\xe2\x9a\x78"
  4991. "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
  4992. "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
  4993. "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
  4994. "\x35\xf3\x61\x06\x72\x84\xc4\x32"
  4995. "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
  4996. "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
  4997. "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
  4998. "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
  4999. "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
  5000. "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
  5001. "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
  5002. "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
  5003. "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
  5004. "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
  5005. "\x4f\x73\x38\x09\x75\x64\x48\xe0"
  5006. "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
  5007. "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
  5008. "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
  5009. "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
  5010. "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
  5011. "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
  5012. "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
  5013. "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
  5014. "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
  5015. "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
  5016. "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
  5017. "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
  5018. "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
  5019. "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
  5020. "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
  5021. "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
  5022. "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
  5023. "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
  5024. "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
  5025. "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
  5026. "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
  5027. "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
  5028. "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
  5029. "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
  5030. "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
  5031. "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
  5032. "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
  5033. "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
  5034. "\xce\x4d\x5f\x18\x60\xce\x87\x22"
  5035. "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
  5036. "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
  5037. "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
  5038. "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
  5039. "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
  5040. "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
  5041. "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
  5042. "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
  5043. "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
  5044. "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
  5045. "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
  5046. "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
  5047. "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
  5048. "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
  5049. "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
  5050. "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
  5051. "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
  5052. "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
  5053. "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
  5054. "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
  5055. "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
  5056. "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
  5057. "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
  5058. "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
  5059. "\xce\x54\xf9\x18\x58\xb5\xff\x44"
  5060. "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
  5061. "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
  5062. "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
  5063. "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
  5064. "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
  5065. "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
  5066. "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
  5067. "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
  5068. "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
  5069. "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
  5070. "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
  5071. "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
  5072. "\x0c\xd6\x04\x14\xde\x51\x74\x75"
  5073. "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
  5074. "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
  5075. "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
  5076. "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
  5077. "\x75\x46\x65\x4e\x07\x34\x37\xa3"
  5078. "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
  5079. "\x69\x24\x0e\x38\x67\x43\x8c\xde"
  5080. "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
  5081. "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
  5082. "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
  5083. "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
  5084. "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
  5085. "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
  5086. "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
  5087. "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
  5088. "\x91\x7d\x62\x64\x96\x72\xde\xfc"
  5089. "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
  5090. "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
  5091. "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
  5092. "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
  5093. "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
  5094. "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
  5095. "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
  5096. "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
  5097. "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
  5098. "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
  5099. "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
  5100. "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
  5101. "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
  5102. "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
  5103. "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
  5104. "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
  5105. "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
  5106. "\xae\xed\x39\x88\x42\x11\x3c\xed"
  5107. "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
  5108. "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
  5109. "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
  5110. "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
  5111. "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
  5112. "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
  5113. "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
  5114. "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
  5115. "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
  5116. "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
  5117. "\x34\x17\xde\xba\x47\xf1\x06\x18"
  5118. "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
  5119. "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
  5120. "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
  5121. "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
  5122. "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
  5123. "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
  5124. "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
  5125. "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
  5126. "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
  5127. "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
  5128. "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
  5129. "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
  5130. "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
  5131. "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
  5132. "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
  5133. "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
  5134. "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
  5135. "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
  5136. "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
  5137. "\x2c\x56\x39\x79\x0f\x69\x44\x75"
  5138. "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
  5139. "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
  5140. "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
  5141. "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
  5142. "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
  5143. "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
  5144. "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
  5145. "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
  5146. "\x63\x9b\xce\x61\x24\x79\xc0\x70"
  5147. "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
  5148. "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
  5149. "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
  5150. "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
  5151. "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
  5152. "\x74\x56\x58\x40\x02\x37\x52\x2c"
  5153. "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
  5154. "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
  5155. "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
  5156. "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
  5157. "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
  5158. "\xed\x38\x80\x36\x72\x43\x27\x49"
  5159. "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
  5160. "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
  5161. "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
  5162. "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
  5163. "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
  5164. "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
  5165. "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
  5166. "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
  5167. "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
  5168. "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
  5169. "\x12\xee\x30\xfe\xd8\x30\xef\x34"
  5170. "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
  5171. "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
  5172. "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
  5173. "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
  5174. "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
  5175. "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
  5176. "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
  5177. "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
  5178. "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
  5179. "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
  5180. "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
  5181. "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
  5182. "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
  5183. "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
  5184. "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
  5185. "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
  5186. "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
  5187. "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
  5188. "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
  5189. "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
  5190. "\x44\x12\xfb\x73\x77\xd4\x13\x39"
  5191. "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
  5192. "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
  5193. "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
  5194. "\x4b\xef\x31\x18\xea\xac\xb1\x84"
  5195. "\x21\xed\xda\x86",
  5196. .rlen = 4100,
  5197. .np = 2,
  5198. .tap = { 4064, 36 },
  5199. },
  5200. };
  5201. static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
  5202. { /* From RFC 3686 */
  5203. .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
  5204. "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
  5205. "\x00\x00\x00\x30",
  5206. .klen = 20,
  5207. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  5208. .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
  5209. "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
  5210. .ilen = 16,
  5211. .result = "Single block msg",
  5212. .rlen = 16,
  5213. }, {
  5214. .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
  5215. "\x43\xd6\xce\x1f\x32\x53\x91\x63"
  5216. "\x00\x6c\xb6\xdb",
  5217. .klen = 20,
  5218. .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
  5219. .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
  5220. "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
  5221. "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
  5222. "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
  5223. .ilen = 32,
  5224. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5225. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5226. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5227. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5228. .rlen = 32,
  5229. }, {
  5230. .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
  5231. "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
  5232. "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
  5233. "\x00\x00\x00\x48",
  5234. .klen = 28,
  5235. .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
  5236. .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
  5237. "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
  5238. .ilen = 16,
  5239. .result = "Single block msg",
  5240. .rlen = 16,
  5241. }, {
  5242. .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
  5243. "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
  5244. "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
  5245. "\x00\x96\xb0\x3b",
  5246. .klen = 28,
  5247. .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
  5248. .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
  5249. "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
  5250. "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
  5251. "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
  5252. .ilen = 32,
  5253. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5254. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5255. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5256. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5257. .rlen = 32,
  5258. }, {
  5259. .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
  5260. "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
  5261. "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
  5262. "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
  5263. "\x00\x00\x00\x60",
  5264. .klen = 36,
  5265. .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
  5266. .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
  5267. "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
  5268. .ilen = 16,
  5269. .result = "Single block msg",
  5270. .rlen = 16,
  5271. }, {
  5272. .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
  5273. "\x07\x96\x36\x58\x79\xef\xf8\x86"
  5274. "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
  5275. "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
  5276. "\x00\xfa\xac\x24",
  5277. .klen = 36,
  5278. .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
  5279. .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
  5280. "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
  5281. "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
  5282. "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
  5283. .ilen = 32,
  5284. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5285. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5286. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5287. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  5288. .rlen = 32,
  5289. },
  5290. };
  5291. static struct aead_testvec aes_gcm_enc_tv_template[] = {
  5292. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5293. .key = zeroed_string,
  5294. .klen = 16,
  5295. .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
  5296. "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
  5297. .rlen = 16,
  5298. }, {
  5299. .key = zeroed_string,
  5300. .klen = 16,
  5301. .input = zeroed_string,
  5302. .ilen = 16,
  5303. .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
  5304. "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
  5305. "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
  5306. "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
  5307. .rlen = 32,
  5308. }, {
  5309. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5310. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5311. .klen = 16,
  5312. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5313. "\xde\xca\xf8\x88",
  5314. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5315. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5316. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5317. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5318. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5319. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5320. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5321. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5322. .ilen = 64,
  5323. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5324. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5325. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5326. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5327. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5328. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5329. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5330. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5331. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5332. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5333. .rlen = 80,
  5334. }, {
  5335. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5336. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5337. .klen = 16,
  5338. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5339. "\xde\xca\xf8\x88",
  5340. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5341. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5342. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5343. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5344. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5345. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5346. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5347. "\xba\x63\x7b\x39",
  5348. .ilen = 60,
  5349. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5350. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5351. "\xab\xad\xda\xd2",
  5352. .alen = 20,
  5353. .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5354. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5355. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5356. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5357. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5358. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5359. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5360. "\x3d\x58\xe0\x91"
  5361. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5362. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5363. .rlen = 76,
  5364. }, {
  5365. .key = zeroed_string,
  5366. .klen = 24,
  5367. .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
  5368. "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
  5369. .rlen = 16,
  5370. }, {
  5371. .key = zeroed_string,
  5372. .klen = 24,
  5373. .input = zeroed_string,
  5374. .ilen = 16,
  5375. .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5376. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5377. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5378. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5379. .rlen = 32,
  5380. }, {
  5381. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5382. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5383. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5384. .klen = 24,
  5385. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5386. "\xde\xca\xf8\x88",
  5387. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5388. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5389. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5390. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5391. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5392. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5393. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5394. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5395. .ilen = 64,
  5396. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5397. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5398. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5399. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5400. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5401. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5402. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5403. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5404. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5405. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5406. .rlen = 80,
  5407. }, {
  5408. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5409. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5410. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5411. .klen = 24,
  5412. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5413. "\xde\xca\xf8\x88",
  5414. .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5415. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5416. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5417. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5418. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5419. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5420. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5421. "\xba\x63\x7b\x39",
  5422. .ilen = 60,
  5423. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5424. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5425. "\xab\xad\xda\xd2",
  5426. .alen = 20,
  5427. .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5428. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5429. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5430. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5431. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5432. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5433. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5434. "\xcc\xda\x27\x10"
  5435. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5436. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5437. .rlen = 76,
  5438. .np = 2,
  5439. .tap = { 32, 28 },
  5440. .anp = 2,
  5441. .atap = { 8, 12 }
  5442. }, {
  5443. .key = zeroed_string,
  5444. .klen = 32,
  5445. .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
  5446. "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
  5447. .rlen = 16,
  5448. }
  5449. };
  5450. static struct aead_testvec aes_gcm_dec_tv_template[] = {
  5451. { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
  5452. .key = zeroed_string,
  5453. .klen = 32,
  5454. .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
  5455. "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
  5456. "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
  5457. "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
  5458. .ilen = 32,
  5459. .result = zeroed_string,
  5460. .rlen = 16,
  5461. }, {
  5462. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5463. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5464. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5465. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5466. .klen = 32,
  5467. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5468. "\xde\xca\xf8\x88",
  5469. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5470. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5471. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5472. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5473. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5474. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5475. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5476. "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
  5477. "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
  5478. "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
  5479. .ilen = 80,
  5480. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5481. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5482. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5483. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5484. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5485. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5486. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5487. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5488. .rlen = 64,
  5489. }, {
  5490. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5491. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5492. "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5493. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5494. .klen = 32,
  5495. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5496. "\xde\xca\xf8\x88",
  5497. .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
  5498. "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
  5499. "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
  5500. "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
  5501. "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
  5502. "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
  5503. "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
  5504. "\xbc\xc9\xf6\x62"
  5505. "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
  5506. "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
  5507. .ilen = 76,
  5508. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5509. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5510. "\xab\xad\xda\xd2",
  5511. .alen = 20,
  5512. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5513. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5514. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5515. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5516. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5517. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5518. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5519. "\xba\x63\x7b\x39",
  5520. .rlen = 60,
  5521. .np = 2,
  5522. .tap = { 48, 28 },
  5523. .anp = 3,
  5524. .atap = { 8, 8, 4 }
  5525. }, {
  5526. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5527. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5528. .klen = 16,
  5529. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5530. "\xde\xca\xf8\x88",
  5531. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5532. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5533. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5534. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5535. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5536. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5537. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5538. "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
  5539. "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
  5540. "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
  5541. .ilen = 80,
  5542. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5543. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5544. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5545. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5546. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5547. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5548. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5549. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5550. .rlen = 64,
  5551. }, {
  5552. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5553. "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
  5554. .klen = 16,
  5555. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5556. "\xde\xca\xf8\x88",
  5557. .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
  5558. "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
  5559. "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
  5560. "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
  5561. "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
  5562. "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
  5563. "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
  5564. "\x3d\x58\xe0\x91"
  5565. "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
  5566. "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
  5567. .ilen = 76,
  5568. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5569. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5570. "\xab\xad\xda\xd2",
  5571. .alen = 20,
  5572. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5573. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5574. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5575. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5576. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5577. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5578. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5579. "\xba\x63\x7b\x39",
  5580. .rlen = 60,
  5581. }, {
  5582. .key = zeroed_string,
  5583. .klen = 24,
  5584. .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
  5585. "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
  5586. "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
  5587. "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
  5588. .ilen = 32,
  5589. .result = zeroed_string,
  5590. .rlen = 16,
  5591. }, {
  5592. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5593. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5594. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5595. .klen = 24,
  5596. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5597. "\xde\xca\xf8\x88",
  5598. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5599. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5600. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5601. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5602. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5603. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5604. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5605. "\xcc\xda\x27\x10\xac\xad\xe2\x56"
  5606. "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
  5607. "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
  5608. .ilen = 80,
  5609. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5610. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5611. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5612. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5613. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5614. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5615. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5616. "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
  5617. .rlen = 64,
  5618. }, {
  5619. .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
  5620. "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
  5621. "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
  5622. .klen = 24,
  5623. .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
  5624. "\xde\xca\xf8\x88",
  5625. .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
  5626. "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
  5627. "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
  5628. "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
  5629. "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
  5630. "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
  5631. "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
  5632. "\xcc\xda\x27\x10"
  5633. "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
  5634. "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
  5635. .ilen = 76,
  5636. .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5637. "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
  5638. "\xab\xad\xda\xd2",
  5639. .alen = 20,
  5640. .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
  5641. "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
  5642. "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
  5643. "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
  5644. "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
  5645. "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
  5646. "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
  5647. "\xba\x63\x7b\x39",
  5648. .rlen = 60,
  5649. }
  5650. };
  5651. static struct aead_testvec aes_ccm_enc_tv_template[] = {
  5652. { /* From RFC 3610 */
  5653. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5654. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5655. .klen = 16,
  5656. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5657. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5658. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5659. .alen = 8,
  5660. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5661. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5662. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5663. .ilen = 23,
  5664. .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5665. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5666. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5667. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5668. .rlen = 31,
  5669. }, {
  5670. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5671. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5672. .klen = 16,
  5673. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5674. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5675. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5676. "\x08\x09\x0a\x0b",
  5677. .alen = 12,
  5678. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5679. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5680. "\x1c\x1d\x1e\x1f",
  5681. .ilen = 20,
  5682. .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5683. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5684. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5685. "\x7d\x9c\x2d\x93",
  5686. .rlen = 28,
  5687. }, {
  5688. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5689. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5690. .klen = 16,
  5691. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5692. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5693. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5694. .alen = 8,
  5695. .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5696. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5697. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5698. "\x20",
  5699. .ilen = 25,
  5700. .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5701. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5702. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5703. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5704. "\x7e\x5f\x4e",
  5705. .rlen = 35,
  5706. }, {
  5707. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5708. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5709. .klen = 16,
  5710. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5711. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5712. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5713. "\x08\x09\x0a\x0b",
  5714. .alen = 12,
  5715. .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5716. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5717. "\x1c\x1d\x1e",
  5718. .ilen = 19,
  5719. .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5720. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5721. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5722. "\x4d\x99\x99\x88\xdd",
  5723. .rlen = 29,
  5724. }, {
  5725. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5726. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5727. .klen = 16,
  5728. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5729. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5730. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5731. .alen = 8,
  5732. .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5733. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5734. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5735. .ilen = 24,
  5736. .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5737. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5738. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5739. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5740. .rlen = 32,
  5741. }, {
  5742. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5743. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5744. .klen = 16,
  5745. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5746. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5747. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5748. "\x20\xea\x60\xc0",
  5749. .alen = 12,
  5750. .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5751. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5752. "\x3a\x80\x3b\xa8\x7f",
  5753. .ilen = 21,
  5754. .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5755. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5756. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5757. "\x5a\xe0\x70\x45\x51",
  5758. .rlen = 29,
  5759. }, {
  5760. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5761. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5762. .klen = 16,
  5763. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5764. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5765. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5766. .alen = 8,
  5767. .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5768. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5769. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5770. .ilen = 23,
  5771. .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5772. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5773. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5774. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5775. "\xba",
  5776. .rlen = 33,
  5777. },
  5778. };
  5779. static struct aead_testvec aes_ccm_dec_tv_template[] = {
  5780. { /* From RFC 3610 */
  5781. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5782. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5783. .klen = 16,
  5784. .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
  5785. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5786. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5787. .alen = 8,
  5788. .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
  5789. "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
  5790. "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
  5791. "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
  5792. .ilen = 31,
  5793. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5794. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5795. "\x18\x19\x1a\x1b\x1c\x1d\x1e",
  5796. .rlen = 23,
  5797. }, {
  5798. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5799. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5800. .klen = 16,
  5801. .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
  5802. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5803. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5804. "\x08\x09\x0a\x0b",
  5805. .alen = 12,
  5806. .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
  5807. "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
  5808. "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
  5809. "\x7d\x9c\x2d\x93",
  5810. .ilen = 28,
  5811. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5812. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5813. "\x1c\x1d\x1e\x1f",
  5814. .rlen = 20,
  5815. }, {
  5816. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5817. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5818. .klen = 16,
  5819. .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
  5820. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5821. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
  5822. .alen = 8,
  5823. .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
  5824. "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
  5825. "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
  5826. "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
  5827. "\x7e\x5f\x4e",
  5828. .ilen = 35,
  5829. .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  5830. "\x10\x11\x12\x13\x14\x15\x16\x17"
  5831. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  5832. "\x20",
  5833. .rlen = 25,
  5834. }, {
  5835. .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  5836. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
  5837. .klen = 16,
  5838. .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
  5839. "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
  5840. .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
  5841. "\x08\x09\x0a\x0b",
  5842. .alen = 12,
  5843. .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
  5844. "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
  5845. "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
  5846. "\x4d\x99\x99\x88\xdd",
  5847. .ilen = 29,
  5848. .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
  5849. "\x14\x15\x16\x17\x18\x19\x1a\x1b"
  5850. "\x1c\x1d\x1e",
  5851. .rlen = 19,
  5852. }, {
  5853. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5854. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5855. .klen = 16,
  5856. .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
  5857. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5858. .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
  5859. .alen = 8,
  5860. .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
  5861. "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
  5862. "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
  5863. "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
  5864. .ilen = 32,
  5865. .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
  5866. "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
  5867. "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
  5868. .rlen = 24,
  5869. }, {
  5870. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5871. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5872. .klen = 16,
  5873. .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
  5874. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5875. .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
  5876. "\x20\xea\x60\xc0",
  5877. .alen = 12,
  5878. .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
  5879. "\x55\x94\xc5\x92\x51\xe6\x03\x57"
  5880. "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
  5881. "\x5a\xe0\x70\x45\x51",
  5882. .ilen = 29,
  5883. .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
  5884. "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
  5885. "\x3a\x80\x3b\xa8\x7f",
  5886. .rlen = 21,
  5887. }, {
  5888. .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
  5889. "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
  5890. .klen = 16,
  5891. .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
  5892. "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
  5893. .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
  5894. .alen = 8,
  5895. .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
  5896. "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
  5897. "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
  5898. "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
  5899. "\xba",
  5900. .ilen = 33,
  5901. .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
  5902. "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
  5903. "\x98\x09\xd6\x7d\xbe\xdd\x18",
  5904. .rlen = 23,
  5905. },
  5906. };
  5907. /*
  5908. * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
  5909. * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
  5910. * Special Publication 800-38C's test vectors also use nonce lengths our
  5911. * implementation doesn't support. The following are taken from fips cavs
  5912. * fax files on hand at Red Hat.
  5913. *
  5914. * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
  5915. * part of the nonce which combine w/the iv, but need to be input this way.
  5916. */
  5917. static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
  5918. {
  5919. .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
  5920. "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
  5921. "\x96\xac\x59",
  5922. .klen = 19,
  5923. .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
  5924. .alen = 0,
  5925. .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
  5926. "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
  5927. "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
  5928. "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
  5929. .ilen = 32,
  5930. .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
  5931. "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
  5932. "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
  5933. "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
  5934. "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
  5935. "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
  5936. .rlen = 48,
  5937. }, {
  5938. .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
  5939. "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
  5940. "\x4f\xa3\x19",
  5941. .klen = 19,
  5942. .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
  5943. .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
  5944. "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
  5945. "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
  5946. "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
  5947. .alen = 32,
  5948. .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
  5949. "\xa9\x28\x63\xba\x12\xa3\x14\x85"
  5950. "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
  5951. "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
  5952. .ilen = 32,
  5953. .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
  5954. "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
  5955. "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
  5956. "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
  5957. "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
  5958. "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
  5959. .rlen = 48,
  5960. }, {
  5961. .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
  5962. "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
  5963. "\x53\x14\x73\x66\x8d\x88\xf6\x80"
  5964. "\xa0\x20\x35",
  5965. .klen = 27,
  5966. .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
  5967. .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
  5968. "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
  5969. "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
  5970. "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
  5971. .alen = 32,
  5972. .ilen = 0,
  5973. .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
  5974. "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
  5975. .rlen = 16,
  5976. }, {
  5977. .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
  5978. "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
  5979. "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
  5980. "\xd6\x3c\x8c",
  5981. .klen = 27,
  5982. .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
  5983. .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
  5984. "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
  5985. "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
  5986. "\xe3\x00\x73\x69\x84\x69\x87\x79",
  5987. .alen = 32,
  5988. .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
  5989. "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
  5990. "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
  5991. "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
  5992. .ilen = 32,
  5993. .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
  5994. "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
  5995. "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
  5996. "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
  5997. "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
  5998. "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
  5999. .rlen = 48,
  6000. }, {
  6001. .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
  6002. "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
  6003. "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
  6004. "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
  6005. "\x1e\x29\x91",
  6006. .klen = 35,
  6007. .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
  6008. .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
  6009. "\x78\x2b\x94\x02\x29\x0f\x42\x27"
  6010. "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
  6011. "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
  6012. .alen = 32,
  6013. .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
  6014. "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
  6015. "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
  6016. "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
  6017. .ilen = 32,
  6018. .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
  6019. "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
  6020. "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
  6021. "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
  6022. "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
  6023. .rlen = 40,
  6024. }, {
  6025. .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
  6026. "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
  6027. "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
  6028. "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
  6029. "\xf9\xd9\x4e",
  6030. .klen = 35,
  6031. .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
  6032. .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
  6033. "\x13\x02\x01\x0c\x83\x4c\x96\x35"
  6034. "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
  6035. "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
  6036. .alen = 32,
  6037. .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
  6038. "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
  6039. "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
  6040. "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
  6041. .ilen = 32,
  6042. .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
  6043. "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
  6044. "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
  6045. "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
  6046. "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
  6047. "\x7b\x72\x8a\xf7",
  6048. .rlen = 44,
  6049. }, {
  6050. .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
  6051. "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
  6052. "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
  6053. "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
  6054. "\x24\xa7\x8b",
  6055. .klen = 35,
  6056. .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
  6057. .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
  6058. "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
  6059. "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
  6060. "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
  6061. .alen = 32,
  6062. .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
  6063. "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
  6064. "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
  6065. "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
  6066. .ilen = 32,
  6067. .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
  6068. "\xef\xbb\x80\x21\x04\x6c\x58\x09"
  6069. "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
  6070. "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
  6071. "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
  6072. "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
  6073. .rlen = 48,
  6074. },
  6075. };
  6076. static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
  6077. {
  6078. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  6079. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  6080. "\xc6\xfb\x7d",
  6081. .klen = 19,
  6082. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  6083. .alen = 0,
  6084. .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
  6085. .ilen = 8,
  6086. .result = "\x00",
  6087. .rlen = 0,
  6088. .novrfy = 1,
  6089. }, {
  6090. .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
  6091. "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
  6092. "\xaf\x94\x87",
  6093. .klen = 19,
  6094. .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
  6095. .alen = 0,
  6096. .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
  6097. .ilen = 8,
  6098. .result = "\x00",
  6099. .rlen = 0,
  6100. }, {
  6101. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  6102. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  6103. "\xc6\xfb\x7d",
  6104. .klen = 19,
  6105. .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
  6106. .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
  6107. "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
  6108. "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
  6109. "\xd8\x94\x99\x91\x81\x54\x62\x57",
  6110. .alen = 32,
  6111. .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
  6112. "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
  6113. "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
  6114. "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
  6115. "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
  6116. "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
  6117. .ilen = 48,
  6118. .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
  6119. "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
  6120. "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
  6121. "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
  6122. .rlen = 32,
  6123. .novrfy = 1,
  6124. }, {
  6125. .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
  6126. "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
  6127. "\x05\xe0\xc9",
  6128. .klen = 19,
  6129. .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
  6130. .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
  6131. "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
  6132. "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
  6133. "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
  6134. .alen = 32,
  6135. .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
  6136. "\xad\x83\x52\x6d\x71\x03\x25\x1c"
  6137. "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
  6138. "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
  6139. "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
  6140. "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
  6141. .ilen = 48,
  6142. .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
  6143. "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
  6144. "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
  6145. "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
  6146. .rlen = 32,
  6147. }, {
  6148. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  6149. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  6150. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  6151. "\xee\x49\x83",
  6152. .klen = 27,
  6153. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6154. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  6155. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  6156. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  6157. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  6158. .alen = 32,
  6159. .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
  6160. .ilen = 8,
  6161. .result = "\x00",
  6162. .rlen = 0,
  6163. }, {
  6164. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6165. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6166. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6167. "\xee\x49\x83",
  6168. .klen = 27,
  6169. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6170. .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
  6171. "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
  6172. "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
  6173. "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
  6174. .alen = 32,
  6175. .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
  6176. "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
  6177. "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
  6178. "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
  6179. "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
  6180. .ilen = 40,
  6181. .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
  6182. "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
  6183. "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
  6184. "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
  6185. .rlen = 32,
  6186. }, {
  6187. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6188. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6189. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6190. "\xd1\xfc\x57",
  6191. .klen = 27,
  6192. .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
  6193. .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
  6194. "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
  6195. "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
  6196. "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
  6197. .alen = 32,
  6198. .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
  6199. "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
  6200. "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
  6201. "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
  6202. "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
  6203. "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
  6204. .ilen = 48,
  6205. .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
  6206. "\x99\x2a\xa8\xca\x04\x25\x45\x90"
  6207. "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
  6208. "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
  6209. .rlen = 32,
  6210. .novrfy = 1,
  6211. }, {
  6212. .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
  6213. "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
  6214. "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
  6215. "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
  6216. "\xee\x49\x83",
  6217. .klen = 35,
  6218. .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
  6219. .alen = 0,
  6220. .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
  6221. .ilen = 8,
  6222. .result = "\x00",
  6223. .rlen = 0,
  6224. }, {
  6225. .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
  6226. "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
  6227. "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
  6228. "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
  6229. "\x85\x34\x66",
  6230. .klen = 35,
  6231. .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
  6232. .alen = 0,
  6233. .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
  6234. "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
  6235. "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
  6236. "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
  6237. "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
  6238. "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
  6239. .ilen = 48,
  6240. .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
  6241. "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
  6242. "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
  6243. "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
  6244. .rlen = 32,
  6245. .novrfy = 1,
  6246. }, {
  6247. .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
  6248. "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
  6249. "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
  6250. "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
  6251. "\xcf\x76\x3f",
  6252. .klen = 35,
  6253. .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
  6254. .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
  6255. "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
  6256. "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
  6257. "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
  6258. .alen = 32,
  6259. .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
  6260. "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
  6261. "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
  6262. "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
  6263. "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
  6264. "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
  6265. .ilen = 48,
  6266. .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
  6267. "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
  6268. "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
  6269. "\x04\x49\x3b\x19\x93\x57\x25\x5d",
  6270. .rlen = 32,
  6271. },
  6272. };
  6273. /*
  6274. * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
  6275. * test vectors, taken from Appendix B.2.9 and B.2.10:
  6276. * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
  6277. * Only AES-128 is supported at this time.
  6278. */
  6279. #define ANSI_CPRNG_AES_TEST_VECTORS 6
  6280. static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
  6281. {
  6282. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6283. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6284. .klen = 16,
  6285. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6286. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
  6287. .dtlen = 16,
  6288. .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6289. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6290. .vlen = 16,
  6291. .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
  6292. "\x84\x79\x66\x85\xc1\x2f\x76\x41",
  6293. .rlen = 16,
  6294. .loops = 1,
  6295. }, {
  6296. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6297. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6298. .klen = 16,
  6299. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6300. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
  6301. .dtlen = 16,
  6302. .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
  6303. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6304. .vlen = 16,
  6305. .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
  6306. "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
  6307. .rlen = 16,
  6308. .loops = 1,
  6309. }, {
  6310. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6311. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6312. .klen = 16,
  6313. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6314. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
  6315. .dtlen = 16,
  6316. .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
  6317. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6318. .vlen = 16,
  6319. .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
  6320. "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
  6321. .rlen = 16,
  6322. .loops = 1,
  6323. }, {
  6324. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6325. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6326. .klen = 16,
  6327. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6328. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
  6329. .dtlen = 16,
  6330. .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
  6331. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6332. .vlen = 16,
  6333. .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
  6334. "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
  6335. .rlen = 16,
  6336. .loops = 1,
  6337. }, {
  6338. .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
  6339. "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
  6340. .klen = 16,
  6341. .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
  6342. "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
  6343. .dtlen = 16,
  6344. .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
  6345. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6346. .vlen = 16,
  6347. .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
  6348. "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
  6349. .rlen = 16,
  6350. .loops = 1,
  6351. }, { /* Monte Carlo Test */
  6352. .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
  6353. "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
  6354. .klen = 16,
  6355. .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
  6356. "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
  6357. .dtlen = 16,
  6358. .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
  6359. "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
  6360. .vlen = 16,
  6361. .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
  6362. "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
  6363. .rlen = 16,
  6364. .loops = 10000,
  6365. },
  6366. };
  6367. /* Cast5 test vectors from RFC 2144 */
  6368. #define CAST5_ENC_TEST_VECTORS 3
  6369. #define CAST5_DEC_TEST_VECTORS 3
  6370. static struct cipher_testvec cast5_enc_tv_template[] = {
  6371. {
  6372. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6373. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  6374. .klen = 16,
  6375. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6376. .ilen = 8,
  6377. .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  6378. .rlen = 8,
  6379. }, {
  6380. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6381. "\x23\x45",
  6382. .klen = 10,
  6383. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6384. .ilen = 8,
  6385. .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  6386. .rlen = 8,
  6387. }, {
  6388. .key = "\x01\x23\x45\x67\x12",
  6389. .klen = 5,
  6390. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6391. .ilen = 8,
  6392. .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  6393. .rlen = 8,
  6394. },
  6395. };
  6396. static struct cipher_testvec cast5_dec_tv_template[] = {
  6397. {
  6398. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6399. "\x23\x45\x67\x89\x34\x56\x78\x9a",
  6400. .klen = 16,
  6401. .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
  6402. .ilen = 8,
  6403. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6404. .rlen = 8,
  6405. }, {
  6406. .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
  6407. "\x23\x45",
  6408. .klen = 10,
  6409. .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
  6410. .ilen = 8,
  6411. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6412. .rlen = 8,
  6413. }, {
  6414. .key = "\x01\x23\x45\x67\x12",
  6415. .klen = 5,
  6416. .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
  6417. .ilen = 8,
  6418. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6419. .rlen = 8,
  6420. },
  6421. };
  6422. /*
  6423. * ARC4 test vectors from OpenSSL
  6424. */
  6425. #define ARC4_ENC_TEST_VECTORS 7
  6426. #define ARC4_DEC_TEST_VECTORS 7
  6427. static struct cipher_testvec arc4_enc_tv_template[] = {
  6428. {
  6429. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6430. .klen = 8,
  6431. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6432. .ilen = 8,
  6433. .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  6434. .rlen = 8,
  6435. }, {
  6436. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6437. .klen = 8,
  6438. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6439. .ilen = 8,
  6440. .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  6441. .rlen = 8,
  6442. }, {
  6443. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6444. .klen = 8,
  6445. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6446. .ilen = 8,
  6447. .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  6448. .rlen = 8,
  6449. }, {
  6450. .key = "\xef\x01\x23\x45",
  6451. .klen = 4,
  6452. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6453. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6454. "\x00\x00\x00\x00",
  6455. .ilen = 20,
  6456. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6457. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  6458. "\x36\xb6\x78\x58",
  6459. .rlen = 20,
  6460. }, {
  6461. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6462. .klen = 8,
  6463. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6464. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6465. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6466. "\x12\x34\x56\x78",
  6467. .ilen = 28,
  6468. .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  6469. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  6470. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  6471. "\x40\x01\x1e\xcf",
  6472. .rlen = 28,
  6473. }, {
  6474. .key = "\xef\x01\x23\x45",
  6475. .klen = 4,
  6476. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6477. "\x00\x00",
  6478. .ilen = 10,
  6479. .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6480. "\xbd\x61",
  6481. .rlen = 10,
  6482. }, {
  6483. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  6484. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6485. .klen = 16,
  6486. .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  6487. .ilen = 8,
  6488. .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  6489. .rlen = 8,
  6490. },
  6491. };
  6492. static struct cipher_testvec arc4_dec_tv_template[] = {
  6493. {
  6494. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6495. .klen = 8,
  6496. .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
  6497. .ilen = 8,
  6498. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6499. .rlen = 8,
  6500. }, {
  6501. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6502. .klen = 8,
  6503. .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
  6504. .ilen = 8,
  6505. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6506. .rlen = 8,
  6507. }, {
  6508. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6509. .klen = 8,
  6510. .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
  6511. .ilen = 8,
  6512. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6513. .rlen = 8,
  6514. }, {
  6515. .key = "\xef\x01\x23\x45",
  6516. .klen = 4,
  6517. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6518. "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
  6519. "\x36\xb6\x78\x58",
  6520. .ilen = 20,
  6521. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6522. "\x00\x00\x00\x00\x00\x00\x00\x00"
  6523. "\x00\x00\x00\x00",
  6524. .rlen = 20,
  6525. }, {
  6526. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
  6527. .klen = 8,
  6528. .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
  6529. "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
  6530. "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
  6531. "\x40\x01\x1e\xcf",
  6532. .ilen = 28,
  6533. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6534. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6535. "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
  6536. "\x12\x34\x56\x78",
  6537. .rlen = 28,
  6538. }, {
  6539. .key = "\xef\x01\x23\x45",
  6540. .klen = 4,
  6541. .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
  6542. "\xbd\x61",
  6543. .ilen = 10,
  6544. .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
  6545. "\x00\x00",
  6546. .rlen = 10,
  6547. }, {
  6548. .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
  6549. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6550. .klen = 16,
  6551. .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
  6552. .ilen = 8,
  6553. .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
  6554. .rlen = 8,
  6555. },
  6556. };
  6557. /*
  6558. * TEA test vectors
  6559. */
  6560. #define TEA_ENC_TEST_VECTORS 4
  6561. #define TEA_DEC_TEST_VECTORS 4
  6562. static struct cipher_testvec tea_enc_tv_template[] = {
  6563. {
  6564. .key = zeroed_string,
  6565. .klen = 16,
  6566. .input = zeroed_string,
  6567. .ilen = 8,
  6568. .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  6569. .rlen = 8,
  6570. }, {
  6571. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6572. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6573. .klen = 16,
  6574. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6575. .ilen = 8,
  6576. .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  6577. .rlen = 8,
  6578. }, {
  6579. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6580. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6581. .klen = 16,
  6582. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6583. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6584. .ilen = 16,
  6585. .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  6586. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  6587. .rlen = 16,
  6588. }, {
  6589. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6590. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6591. .klen = 16,
  6592. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6593. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6594. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6595. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6596. .ilen = 32,
  6597. .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  6598. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  6599. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  6600. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  6601. .rlen = 32,
  6602. }
  6603. };
  6604. static struct cipher_testvec tea_dec_tv_template[] = {
  6605. {
  6606. .key = zeroed_string,
  6607. .klen = 16,
  6608. .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
  6609. .ilen = 8,
  6610. .result = zeroed_string,
  6611. .rlen = 8,
  6612. }, {
  6613. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6614. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6615. .klen = 16,
  6616. .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
  6617. .ilen = 8,
  6618. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6619. .rlen = 8,
  6620. }, {
  6621. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6622. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6623. .klen = 16,
  6624. .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
  6625. "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
  6626. .ilen = 16,
  6627. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6628. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6629. .rlen = 16,
  6630. }, {
  6631. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6632. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6633. .klen = 16,
  6634. .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
  6635. "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
  6636. "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
  6637. "\x07\x89\x73\xc2\x45\x92\xc6\x90",
  6638. .ilen = 32,
  6639. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6640. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6641. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6642. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6643. .rlen = 32,
  6644. }
  6645. };
  6646. /*
  6647. * XTEA test vectors
  6648. */
  6649. #define XTEA_ENC_TEST_VECTORS 4
  6650. #define XTEA_DEC_TEST_VECTORS 4
  6651. static struct cipher_testvec xtea_enc_tv_template[] = {
  6652. {
  6653. .key = zeroed_string,
  6654. .klen = 16,
  6655. .input = zeroed_string,
  6656. .ilen = 8,
  6657. .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  6658. .rlen = 8,
  6659. }, {
  6660. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6661. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6662. .klen = 16,
  6663. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6664. .ilen = 8,
  6665. .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  6666. .rlen = 8,
  6667. }, {
  6668. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6669. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6670. .klen = 16,
  6671. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6672. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6673. .ilen = 16,
  6674. .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  6675. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  6676. .rlen = 16,
  6677. }, {
  6678. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6679. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6680. .klen = 16,
  6681. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6682. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6683. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6684. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6685. .ilen = 32,
  6686. .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  6687. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  6688. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  6689. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  6690. .rlen = 32,
  6691. }
  6692. };
  6693. static struct cipher_testvec xtea_dec_tv_template[] = {
  6694. {
  6695. .key = zeroed_string,
  6696. .klen = 16,
  6697. .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
  6698. .ilen = 8,
  6699. .result = zeroed_string,
  6700. .rlen = 8,
  6701. }, {
  6702. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  6703. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  6704. .klen = 16,
  6705. .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
  6706. .ilen = 8,
  6707. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  6708. .rlen = 8,
  6709. }, {
  6710. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  6711. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  6712. .klen = 16,
  6713. .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
  6714. "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
  6715. .ilen = 16,
  6716. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  6717. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  6718. .rlen = 16,
  6719. }, {
  6720. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  6721. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  6722. .klen = 16,
  6723. .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
  6724. "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
  6725. "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
  6726. "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
  6727. .ilen = 32,
  6728. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  6729. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  6730. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  6731. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  6732. .rlen = 32,
  6733. }
  6734. };
  6735. /*
  6736. * KHAZAD test vectors.
  6737. */
  6738. #define KHAZAD_ENC_TEST_VECTORS 5
  6739. #define KHAZAD_DEC_TEST_VECTORS 5
  6740. static struct cipher_testvec khazad_enc_tv_template[] = {
  6741. {
  6742. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6743. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6744. .klen = 16,
  6745. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6746. .ilen = 8,
  6747. .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  6748. .rlen = 8,
  6749. }, {
  6750. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  6751. "\x38\x38\x38\x38\x38\x38\x38\x38",
  6752. .klen = 16,
  6753. .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
  6754. .ilen = 8,
  6755. .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  6756. .rlen = 8,
  6757. }, {
  6758. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  6759. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6760. .klen = 16,
  6761. .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6762. .ilen = 8,
  6763. .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  6764. .rlen = 8,
  6765. }, {
  6766. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6767. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6768. .klen = 16,
  6769. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6770. .ilen = 8,
  6771. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6772. .rlen = 8,
  6773. }, {
  6774. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6775. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6776. .klen = 16,
  6777. .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6778. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6779. .ilen = 16,
  6780. .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  6781. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6782. .rlen = 16,
  6783. },
  6784. };
  6785. static struct cipher_testvec khazad_dec_tv_template[] = {
  6786. {
  6787. .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
  6788. "\x00\x00\x00\x00\x00\x00\x00\x00",
  6789. .klen = 16,
  6790. .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
  6791. .ilen = 8,
  6792. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  6793. .rlen = 8,
  6794. }, {
  6795. .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
  6796. "\x38\x38\x38\x38\x38\x38\x38\x38",
  6797. .klen = 16,
  6798. .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
  6799. .ilen = 8,
  6800. .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
  6801. .rlen = 8,
  6802. }, {
  6803. .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
  6804. "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6805. .klen = 16,
  6806. .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
  6807. .ilen = 8,
  6808. .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
  6809. .rlen = 8,
  6810. }, {
  6811. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6812. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6813. .klen = 16,
  6814. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6815. .ilen = 8,
  6816. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6817. .rlen = 8,
  6818. }, {
  6819. .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6820. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6821. .klen = 16,
  6822. .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
  6823. "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
  6824. .ilen = 16,
  6825. .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
  6826. "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
  6827. .rlen = 16,
  6828. },
  6829. };
  6830. /*
  6831. * Anubis test vectors.
  6832. */
  6833. #define ANUBIS_ENC_TEST_VECTORS 5
  6834. #define ANUBIS_DEC_TEST_VECTORS 5
  6835. #define ANUBIS_CBC_ENC_TEST_VECTORS 2
  6836. #define ANUBIS_CBC_DEC_TEST_VECTORS 2
  6837. static struct cipher_testvec anubis_enc_tv_template[] = {
  6838. {
  6839. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6840. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6841. .klen = 16,
  6842. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6843. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6844. .ilen = 16,
  6845. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6846. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6847. .rlen = 16,
  6848. }, {
  6849. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6850. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6851. "\x03\x03\x03\x03",
  6852. .klen = 20,
  6853. .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6854. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6855. .ilen = 16,
  6856. .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6857. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6858. .rlen = 16,
  6859. }, {
  6860. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6861. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6862. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6863. "\x24\x24\x24\x24",
  6864. .klen = 28,
  6865. .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6866. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6867. .ilen = 16,
  6868. .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6869. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6870. .rlen = 16,
  6871. }, {
  6872. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6873. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6874. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6875. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6876. .klen = 32,
  6877. .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6878. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6879. .ilen = 16,
  6880. .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6881. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6882. .rlen = 16,
  6883. }, {
  6884. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6885. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6886. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6887. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6888. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6889. .klen = 40,
  6890. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6891. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6892. .ilen = 16,
  6893. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6894. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6895. .rlen = 16,
  6896. },
  6897. };
  6898. static struct cipher_testvec anubis_dec_tv_template[] = {
  6899. {
  6900. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6901. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6902. .klen = 16,
  6903. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6904. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
  6905. .ilen = 16,
  6906. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6907. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6908. .rlen = 16,
  6909. }, {
  6910. .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6911. "\x03\x03\x03\x03\x03\x03\x03\x03"
  6912. "\x03\x03\x03\x03",
  6913. .klen = 20,
  6914. .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
  6915. "\x87\x41\x6f\x82\x0a\x98\x64\xae",
  6916. .ilen = 16,
  6917. .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
  6918. "\x03\x03\x03\x03\x03\x03\x03\x03",
  6919. .rlen = 16,
  6920. }, {
  6921. .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6922. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6923. "\x24\x24\x24\x24\x24\x24\x24\x24"
  6924. "\x24\x24\x24\x24",
  6925. .klen = 28,
  6926. .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
  6927. "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
  6928. .ilen = 16,
  6929. .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
  6930. "\x24\x24\x24\x24\x24\x24\x24\x24",
  6931. .rlen = 16,
  6932. }, {
  6933. .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6934. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6935. "\x25\x25\x25\x25\x25\x25\x25\x25"
  6936. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6937. .klen = 32,
  6938. .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
  6939. "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
  6940. .ilen = 16,
  6941. .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
  6942. "\x25\x25\x25\x25\x25\x25\x25\x25",
  6943. .rlen = 16,
  6944. }, {
  6945. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6946. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6947. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6948. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6949. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6950. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6951. "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
  6952. .klen = 40,
  6953. .ilen = 16,
  6954. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6955. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6956. .rlen = 16,
  6957. },
  6958. };
  6959. static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
  6960. {
  6961. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6962. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6963. .klen = 16,
  6964. .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6965. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6966. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6967. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6968. .ilen = 32,
  6969. .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6970. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  6971. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  6972. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  6973. .rlen = 32,
  6974. }, {
  6975. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6976. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6977. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6978. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6979. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6980. .klen = 40,
  6981. .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
  6982. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6983. "\x35\x35\x35\x35\x35\x35\x35\x35"
  6984. "\x35\x35\x35\x35\x35\x35\x35\x35",
  6985. .ilen = 32,
  6986. .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  6987. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  6988. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  6989. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  6990. .rlen = 32,
  6991. },
  6992. };
  6993. static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
  6994. {
  6995. .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  6996. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  6997. .klen = 16,
  6998. .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
  6999. "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
  7000. "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
  7001. "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
  7002. .ilen = 32,
  7003. .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  7004. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  7005. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
  7006. "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
  7007. .rlen = 32,
  7008. }, {
  7009. .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
  7010. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7011. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7012. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7013. "\x35\x35\x35\x35\x35\x35\x35\x35",
  7014. .klen = 40,
  7015. .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
  7016. "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
  7017. "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
  7018. "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
  7019. .ilen = 32,
  7020. .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
  7021. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7022. "\x35\x35\x35\x35\x35\x35\x35\x35"
  7023. "\x35\x35\x35\x35\x35\x35\x35\x35",
  7024. .rlen = 32,
  7025. },
  7026. };
  7027. /*
  7028. * XETA test vectors
  7029. */
  7030. #define XETA_ENC_TEST_VECTORS 4
  7031. #define XETA_DEC_TEST_VECTORS 4
  7032. static struct cipher_testvec xeta_enc_tv_template[] = {
  7033. {
  7034. .key = zeroed_string,
  7035. .klen = 16,
  7036. .input = zeroed_string,
  7037. .ilen = 8,
  7038. .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  7039. .rlen = 8,
  7040. }, {
  7041. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7042. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7043. .klen = 16,
  7044. .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7045. .ilen = 8,
  7046. .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  7047. .rlen = 8,
  7048. }, {
  7049. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7050. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7051. .klen = 16,
  7052. .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7053. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7054. .ilen = 16,
  7055. .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  7056. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  7057. .rlen = 16,
  7058. }, {
  7059. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7060. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7061. .klen = 16,
  7062. .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7063. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7064. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7065. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7066. .ilen = 32,
  7067. .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  7068. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  7069. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  7070. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  7071. .rlen = 32,
  7072. }
  7073. };
  7074. static struct cipher_testvec xeta_dec_tv_template[] = {
  7075. {
  7076. .key = zeroed_string,
  7077. .klen = 16,
  7078. .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
  7079. .ilen = 8,
  7080. .result = zeroed_string,
  7081. .rlen = 8,
  7082. }, {
  7083. .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
  7084. "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
  7085. .klen = 16,
  7086. .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
  7087. .ilen = 8,
  7088. .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
  7089. .rlen = 8,
  7090. }, {
  7091. .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
  7092. "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
  7093. .klen = 16,
  7094. .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
  7095. "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
  7096. .ilen = 16,
  7097. .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
  7098. "\x65\x73\x74\x5f\x76\x65\x63\x74",
  7099. .rlen = 16,
  7100. }, {
  7101. .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
  7102. "\x5d\x04\x16\x36\x15\x72\x63\x2f",
  7103. .klen = 16,
  7104. .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
  7105. "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
  7106. "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
  7107. "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
  7108. .ilen = 32,
  7109. .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
  7110. "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
  7111. "\x79\x6f\x75\x21\x21\x21\x20\x72"
  7112. "\x65\x61\x6c\x6c\x79\x21\x21\x21",
  7113. .rlen = 32,
  7114. }
  7115. };
  7116. /*
  7117. * FCrypt test vectors
  7118. */
  7119. #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
  7120. #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
  7121. static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
  7122. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  7123. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7124. .klen = 8,
  7125. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7126. .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7127. .ilen = 8,
  7128. .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  7129. .rlen = 8,
  7130. }, {
  7131. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  7132. .klen = 8,
  7133. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7134. .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  7135. .ilen = 8,
  7136. .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  7137. .rlen = 8,
  7138. }, { /* From Arla */
  7139. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7140. .klen = 8,
  7141. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7142. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  7143. .ilen = 48,
  7144. .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  7145. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  7146. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  7147. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  7148. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  7149. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  7150. .rlen = 48,
  7151. }, {
  7152. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7153. .klen = 8,
  7154. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7155. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  7156. .ilen = 48,
  7157. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7158. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7159. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7160. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7161. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7162. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7163. .rlen = 48,
  7164. }, { /* split-page version */
  7165. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7166. .klen = 8,
  7167. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7168. .input = "The quick brown fox jumps over the lazy dogs.\0\0",
  7169. .ilen = 48,
  7170. .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7171. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7172. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7173. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7174. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7175. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7176. .rlen = 48,
  7177. .np = 2,
  7178. .tap = { 20, 28 },
  7179. }
  7180. };
  7181. static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
  7182. { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
  7183. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7184. .klen = 8,
  7185. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7186. .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
  7187. .ilen = 8,
  7188. .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7189. .rlen = 8,
  7190. }, {
  7191. .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
  7192. .klen = 8,
  7193. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7194. .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
  7195. .ilen = 8,
  7196. .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
  7197. .rlen = 8,
  7198. }, { /* From Arla */
  7199. .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7200. .klen = 8,
  7201. .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7202. .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
  7203. "\xee\xac\x98\x62\x44\x51\xe4\x84"
  7204. "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
  7205. "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
  7206. "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
  7207. "\xf8\x91\x3c\xac\x44\x22\x92\xef",
  7208. .ilen = 48,
  7209. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  7210. .rlen = 48,
  7211. }, {
  7212. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7213. .klen = 8,
  7214. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7215. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7216. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7217. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7218. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7219. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7220. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7221. .ilen = 48,
  7222. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  7223. .rlen = 48,
  7224. }, { /* split-page version */
  7225. .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7226. .klen = 8,
  7227. .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
  7228. .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
  7229. "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
  7230. "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
  7231. "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
  7232. "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
  7233. "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
  7234. .ilen = 48,
  7235. .result = "The quick brown fox jumps over the lazy dogs.\0\0",
  7236. .rlen = 48,
  7237. .np = 2,
  7238. .tap = { 20, 28 },
  7239. }
  7240. };
  7241. /*
  7242. * CAMELLIA test vectors.
  7243. */
  7244. #define CAMELLIA_ENC_TEST_VECTORS 3
  7245. #define CAMELLIA_DEC_TEST_VECTORS 3
  7246. #define CAMELLIA_CBC_ENC_TEST_VECTORS 2
  7247. #define CAMELLIA_CBC_DEC_TEST_VECTORS 2
  7248. static struct cipher_testvec camellia_enc_tv_template[] = {
  7249. {
  7250. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7251. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7252. .klen = 16,
  7253. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7254. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7255. .ilen = 16,
  7256. .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
  7257. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  7258. .rlen = 16,
  7259. }, {
  7260. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7261. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7262. "\x00\x11\x22\x33\x44\x55\x66\x77",
  7263. .klen = 24,
  7264. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7265. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7266. .ilen = 16,
  7267. .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  7268. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  7269. .rlen = 16,
  7270. }, {
  7271. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7272. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7273. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7274. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  7275. .klen = 32,
  7276. .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7277. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7278. .ilen = 16,
  7279. .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  7280. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  7281. .rlen = 16,
  7282. },
  7283. };
  7284. static struct cipher_testvec camellia_dec_tv_template[] = {
  7285. {
  7286. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7287. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7288. .klen = 16,
  7289. .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
  7290. "\x08\x57\x06\x56\x48\xea\xbe\x43",
  7291. .ilen = 16,
  7292. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7293. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7294. .rlen = 16,
  7295. }, {
  7296. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7297. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7298. "\x00\x11\x22\x33\x44\x55\x66\x77",
  7299. .klen = 24,
  7300. .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
  7301. "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
  7302. .ilen = 16,
  7303. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7304. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7305. .rlen = 16,
  7306. }, {
  7307. .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7308. "\xfe\xdc\xba\x98\x76\x54\x32\x10"
  7309. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7310. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
  7311. .klen = 32,
  7312. .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
  7313. "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
  7314. .ilen = 16,
  7315. .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
  7316. "\xfe\xdc\xba\x98\x76\x54\x32\x10",
  7317. .rlen = 16,
  7318. },
  7319. };
  7320. static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
  7321. {
  7322. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7323. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7324. .klen = 16,
  7325. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7326. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7327. .input = "Single block msg",
  7328. .ilen = 16,
  7329. .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  7330. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  7331. .rlen = 16,
  7332. }, {
  7333. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7334. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7335. .klen = 16,
  7336. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7337. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7338. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7339. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7340. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7341. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7342. .ilen = 32,
  7343. .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  7344. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  7345. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  7346. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  7347. .rlen = 32,
  7348. },
  7349. };
  7350. static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
  7351. {
  7352. .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
  7353. "\x51\x2e\x03\xd5\x34\x12\x00\x06",
  7354. .klen = 16,
  7355. .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
  7356. "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
  7357. .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
  7358. "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
  7359. .ilen = 16,
  7360. .result = "Single block msg",
  7361. .rlen = 16,
  7362. }, {
  7363. .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
  7364. "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
  7365. .klen = 16,
  7366. .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
  7367. "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
  7368. .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
  7369. "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
  7370. "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
  7371. "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
  7372. .ilen = 32,
  7373. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7374. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7375. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7376. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7377. .rlen = 32,
  7378. },
  7379. };
  7380. /*
  7381. * SEED test vectors
  7382. */
  7383. #define SEED_ENC_TEST_VECTORS 4
  7384. #define SEED_DEC_TEST_VECTORS 4
  7385. static struct cipher_testvec seed_enc_tv_template[] = {
  7386. {
  7387. .key = zeroed_string,
  7388. .klen = 16,
  7389. .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7390. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7391. .ilen = 16,
  7392. .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  7393. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  7394. .rlen = 16,
  7395. }, {
  7396. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7397. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7398. .klen = 16,
  7399. .input = zeroed_string,
  7400. .ilen = 16,
  7401. .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  7402. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  7403. .rlen = 16,
  7404. }, {
  7405. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  7406. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  7407. .klen = 16,
  7408. .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  7409. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  7410. .ilen = 16,
  7411. .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  7412. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  7413. .rlen = 16,
  7414. }, {
  7415. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  7416. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  7417. .klen = 16,
  7418. .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  7419. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  7420. .ilen = 16,
  7421. .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  7422. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  7423. .rlen = 16,
  7424. }
  7425. };
  7426. static struct cipher_testvec seed_dec_tv_template[] = {
  7427. {
  7428. .key = zeroed_string,
  7429. .klen = 16,
  7430. .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
  7431. "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
  7432. .ilen = 16,
  7433. .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7434. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7435. .rlen = 16,
  7436. }, {
  7437. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7438. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
  7439. .klen = 16,
  7440. .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
  7441. "\x84\x48\x35\x97\xe4\x37\x0f\x43",
  7442. .ilen = 16,
  7443. .result = zeroed_string,
  7444. .rlen = 16,
  7445. }, {
  7446. .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
  7447. "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
  7448. .klen = 16,
  7449. .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
  7450. "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
  7451. .ilen = 16,
  7452. .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
  7453. "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
  7454. .rlen = 16,
  7455. }, {
  7456. .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
  7457. "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
  7458. .klen = 16,
  7459. .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
  7460. "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
  7461. .ilen = 16,
  7462. .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
  7463. "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
  7464. .rlen = 16,
  7465. }
  7466. };
  7467. #define SALSA20_STREAM_ENC_TEST_VECTORS 5
  7468. static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
  7469. /*
  7470. * Testvectors from verified.test-vectors submitted to ECRYPT.
  7471. * They are truncated to size 39, 64, 111, 129 to test a variety
  7472. * of input length.
  7473. */
  7474. { /* Set 3, vector 0 */
  7475. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7476. "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
  7477. .klen = 16,
  7478. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7479. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7480. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7481. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7482. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7483. "\x00\x00\x00\x00\x00\x00\x00",
  7484. .ilen = 39,
  7485. .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
  7486. "\x68\x02\x41\x0C\x68\x86\x88\x89"
  7487. "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
  7488. "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
  7489. "\x58\x3F\x52\x79\x70\xEB\xC1",
  7490. .rlen = 39,
  7491. }, { /* Set 5, vector 0 */
  7492. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7493. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7494. .klen = 16,
  7495. .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
  7496. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7497. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7498. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7499. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7500. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7501. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7502. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7503. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7504. .ilen = 64,
  7505. .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
  7506. "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
  7507. "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
  7508. "\x46\x26\xBF\x44\x3F\x21\x97\x76"
  7509. "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
  7510. "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
  7511. "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
  7512. "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
  7513. .rlen = 64,
  7514. }, { /* Set 3, vector 27 */
  7515. .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
  7516. "\x23\x24\x25\x26\x27\x28\x29\x2A"
  7517. "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
  7518. "\x33\x34\x35\x36\x37\x38\x39\x3A",
  7519. .klen = 32,
  7520. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
  7521. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7522. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7523. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7524. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7525. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7526. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7527. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7528. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7529. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7530. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7531. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7532. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7533. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7534. "\x00\x00\x00\x00\x00\x00\x00",
  7535. .ilen = 111,
  7536. .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
  7537. "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
  7538. "\x87\xD9\x47\xF8\x28\x91\x35\x98"
  7539. "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
  7540. "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
  7541. "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
  7542. "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
  7543. "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
  7544. "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
  7545. "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
  7546. "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
  7547. "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
  7548. "\x95\x46\x45\x54\xE9\x75\x03\x08"
  7549. "\x44\xAF\xE5\x8A\x81\x12\x09",
  7550. .rlen = 111,
  7551. }, { /* Set 5, vector 27 */
  7552. .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7553. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7554. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7555. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7556. .klen = 32,
  7557. .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
  7558. .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7559. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7560. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7561. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7562. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7563. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7564. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7565. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7566. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7567. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7568. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7569. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7570. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7571. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7572. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7573. "\x00\x00\x00\x00\x00\x00\x00\x00"
  7574. "\x00",
  7575. .ilen = 129,
  7576. .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
  7577. "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
  7578. "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
  7579. "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
  7580. "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
  7581. "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
  7582. "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
  7583. "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
  7584. "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
  7585. "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
  7586. "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
  7587. "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
  7588. "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
  7589. "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
  7590. "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
  7591. "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
  7592. "\x5A",
  7593. .rlen = 129,
  7594. }, { /* large test vector generated using Crypto++ */
  7595. .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
  7596. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7597. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7598. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
  7599. .klen = 32,
  7600. .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
  7601. "\x00\x00\x00\x00\x00\x00\x00\x00",
  7602. .input =
  7603. "\x00\x01\x02\x03\x04\x05\x06\x07"
  7604. "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
  7605. "\x10\x11\x12\x13\x14\x15\x16\x17"
  7606. "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
  7607. "\x20\x21\x22\x23\x24\x25\x26\x27"
  7608. "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
  7609. "\x30\x31\x32\x33\x34\x35\x36\x37"
  7610. "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
  7611. "\x40\x41\x42\x43\x44\x45\x46\x47"
  7612. "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
  7613. "\x50\x51\x52\x53\x54\x55\x56\x57"
  7614. "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
  7615. "\x60\x61\x62\x63\x64\x65\x66\x67"
  7616. "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
  7617. "\x70\x71\x72\x73\x74\x75\x76\x77"
  7618. "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
  7619. "\x80\x81\x82\x83\x84\x85\x86\x87"
  7620. "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
  7621. "\x90\x91\x92\x93\x94\x95\x96\x97"
  7622. "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
  7623. "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
  7624. "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
  7625. "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
  7626. "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
  7627. "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
  7628. "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
  7629. "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
  7630. "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
  7631. "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
  7632. "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
  7633. "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
  7634. "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
  7635. "\x00\x03\x06\x09\x0c\x0f\x12\x15"
  7636. "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
  7637. "\x30\x33\x36\x39\x3c\x3f\x42\x45"
  7638. "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
  7639. "\x60\x63\x66\x69\x6c\x6f\x72\x75"
  7640. "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
  7641. "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
  7642. "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
  7643. "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
  7644. "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
  7645. "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
  7646. "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
  7647. "\x20\x23\x26\x29\x2c\x2f\x32\x35"
  7648. "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
  7649. "\x50\x53\x56\x59\x5c\x5f\x62\x65"
  7650. "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
  7651. "\x80\x83\x86\x89\x8c\x8f\x92\x95"
  7652. "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
  7653. "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
  7654. "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
  7655. "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
  7656. "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
  7657. "\x10\x13\x16\x19\x1c\x1f\x22\x25"
  7658. "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
  7659. "\x40\x43\x46\x49\x4c\x4f\x52\x55"
  7660. "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
  7661. "\x70\x73\x76\x79\x7c\x7f\x82\x85"
  7662. "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
  7663. "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
  7664. "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
  7665. "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
  7666. "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
  7667. "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
  7668. "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
  7669. "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
  7670. "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
  7671. "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
  7672. "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
  7673. "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
  7674. "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
  7675. "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
  7676. "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
  7677. "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
  7678. "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
  7679. "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
  7680. "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
  7681. "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
  7682. "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
  7683. "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
  7684. "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
  7685. "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
  7686. "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
  7687. "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
  7688. "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
  7689. "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
  7690. "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
  7691. "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
  7692. "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
  7693. "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
  7694. "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
  7695. "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
  7696. "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
  7697. "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
  7698. "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
  7699. "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
  7700. "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
  7701. "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
  7702. "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
  7703. "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
  7704. "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
  7705. "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
  7706. "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
  7707. "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
  7708. "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
  7709. "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
  7710. "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
  7711. "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
  7712. "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
  7713. "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
  7714. "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
  7715. "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
  7716. "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
  7717. "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
  7718. "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
  7719. "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
  7720. "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
  7721. "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
  7722. "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
  7723. "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
  7724. "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
  7725. "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
  7726. "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
  7727. "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
  7728. "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
  7729. "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
  7730. "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
  7731. "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
  7732. "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
  7733. "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
  7734. "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
  7735. "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
  7736. "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
  7737. "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
  7738. "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
  7739. "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
  7740. "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
  7741. "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
  7742. "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
  7743. "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
  7744. "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
  7745. "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
  7746. "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
  7747. "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
  7748. "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
  7749. "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
  7750. "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
  7751. "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
  7752. "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
  7753. "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
  7754. "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
  7755. "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
  7756. "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
  7757. "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
  7758. "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
  7759. "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
  7760. "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
  7761. "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
  7762. "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
  7763. "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
  7764. "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
  7765. "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
  7766. "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
  7767. "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
  7768. "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
  7769. "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
  7770. "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
  7771. "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
  7772. "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
  7773. "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
  7774. "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
  7775. "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
  7776. "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
  7777. "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
  7778. "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
  7779. "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
  7780. "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
  7781. "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
  7782. "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
  7783. "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
  7784. "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
  7785. "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
  7786. "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
  7787. "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
  7788. "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
  7789. "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
  7790. "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
  7791. "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
  7792. "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
  7793. "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
  7794. "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
  7795. "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
  7796. "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
  7797. "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
  7798. "\x38\x45\x52\x5f\x6c\x79\x86\x93"
  7799. "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
  7800. "\x08\x15\x22\x2f\x3c\x49\x56\x63"
  7801. "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
  7802. "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
  7803. "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
  7804. "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
  7805. "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
  7806. "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
  7807. "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
  7808. "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
  7809. "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
  7810. "\x18\x25\x32\x3f\x4c\x59\x66\x73"
  7811. "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
  7812. "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
  7813. "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
  7814. "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
  7815. "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
  7816. "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
  7817. "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
  7818. "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
  7819. "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
  7820. "\x28\x35\x42\x4f\x5c\x69\x76\x83"
  7821. "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
  7822. "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
  7823. "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
  7824. "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
  7825. "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
  7826. "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
  7827. "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
  7828. "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
  7829. "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
  7830. "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
  7831. "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
  7832. "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
  7833. "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
  7834. "\x48\x57\x66\x75\x84\x93\xa2\xb1"
  7835. "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
  7836. "\x38\x47\x56\x65\x74\x83\x92\xa1"
  7837. "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
  7838. "\x28\x37\x46\x55\x64\x73\x82\x91"
  7839. "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
  7840. "\x18\x27\x36\x45\x54\x63\x72\x81"
  7841. "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
  7842. "\x08\x17\x26\x35\x44\x53\x62\x71"
  7843. "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
  7844. "\xf8\x07\x16\x25\x34\x43\x52\x61"
  7845. "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
  7846. "\xe8\xf7\x06\x15\x24\x33\x42\x51"
  7847. "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
  7848. "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
  7849. "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
  7850. "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
  7851. "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
  7852. "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
  7853. "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
  7854. "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
  7855. "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
  7856. "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
  7857. "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
  7858. "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
  7859. "\x00\x11\x22\x33\x44\x55\x66\x77"
  7860. "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
  7861. "\x10\x21\x32\x43\x54\x65\x76\x87"
  7862. "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
  7863. "\x20\x31\x42\x53\x64\x75\x86\x97"
  7864. "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
  7865. "\x30\x41\x52\x63\x74\x85\x96\xa7"
  7866. "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
  7867. "\x40\x51\x62\x73\x84\x95\xa6\xb7"
  7868. "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
  7869. "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
  7870. "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
  7871. "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
  7872. "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
  7873. "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
  7874. "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
  7875. "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
  7876. "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
  7877. "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
  7878. "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
  7879. "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
  7880. "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
  7881. "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
  7882. "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
  7883. "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
  7884. "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
  7885. "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
  7886. "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
  7887. "\xe0\xf1\x02\x13\x24\x35\x46\x57"
  7888. "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
  7889. "\xf0\x01\x12\x23\x34\x45\x56\x67"
  7890. "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
  7891. "\x00\x13\x26\x39\x4c\x5f\x72\x85"
  7892. "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
  7893. "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
  7894. "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
  7895. "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
  7896. "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
  7897. "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
  7898. "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
  7899. "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
  7900. "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
  7901. "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
  7902. "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
  7903. "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
  7904. "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
  7905. "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
  7906. "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
  7907. "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
  7908. "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
  7909. "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
  7910. "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
  7911. "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
  7912. "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
  7913. "\x10\x23\x36\x49\x5c\x6f\x82\x95"
  7914. "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
  7915. "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
  7916. "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
  7917. "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
  7918. "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
  7919. "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
  7920. "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
  7921. "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
  7922. "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
  7923. "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
  7924. "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
  7925. "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
  7926. "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
  7927. "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
  7928. "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
  7929. "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
  7930. "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
  7931. "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
  7932. "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
  7933. "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
  7934. "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
  7935. "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
  7936. "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
  7937. "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
  7938. "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
  7939. "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
  7940. "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
  7941. "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
  7942. "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
  7943. "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
  7944. "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
  7945. "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
  7946. "\x18\x2d\x42\x57\x6c\x81\x96\xab"
  7947. "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
  7948. "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
  7949. "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
  7950. "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
  7951. "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
  7952. "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
  7953. "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
  7954. "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
  7955. "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
  7956. "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
  7957. "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
  7958. "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
  7959. "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
  7960. "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
  7961. "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
  7962. "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
  7963. "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
  7964. "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
  7965. "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
  7966. "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
  7967. "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
  7968. "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
  7969. "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
  7970. "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
  7971. "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
  7972. "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
  7973. "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
  7974. "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
  7975. "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
  7976. "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
  7977. "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
  7978. "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
  7979. "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
  7980. "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
  7981. "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
  7982. "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
  7983. "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
  7984. "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
  7985. "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
  7986. "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
  7987. "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
  7988. "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
  7989. "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
  7990. "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
  7991. "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
  7992. "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
  7993. "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
  7994. "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
  7995. "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
  7996. "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
  7997. "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
  7998. "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
  7999. "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
  8000. "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
  8001. "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
  8002. "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
  8003. "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
  8004. "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
  8005. "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
  8006. "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
  8007. "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
  8008. "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
  8009. "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
  8010. "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
  8011. "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
  8012. "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
  8013. "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
  8014. "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
  8015. "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
  8016. "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
  8017. "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
  8018. "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
  8019. "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
  8020. "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
  8021. "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
  8022. "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
  8023. "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
  8024. "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
  8025. "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
  8026. "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
  8027. "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
  8028. "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
  8029. "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
  8030. "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
  8031. "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
  8032. "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
  8033. "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
  8034. "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
  8035. "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
  8036. "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
  8037. "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
  8038. "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
  8039. "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
  8040. "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
  8041. "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
  8042. "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
  8043. "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
  8044. "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
  8045. "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
  8046. "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
  8047. "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
  8048. "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
  8049. "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
  8050. "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
  8051. "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
  8052. "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
  8053. "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
  8054. "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
  8055. "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
  8056. "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
  8057. "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
  8058. "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
  8059. "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
  8060. "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
  8061. "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
  8062. "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
  8063. "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
  8064. "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
  8065. "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
  8066. "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
  8067. "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
  8068. "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
  8069. "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
  8070. "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
  8071. "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
  8072. "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
  8073. "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
  8074. "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
  8075. "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
  8076. "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
  8077. "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
  8078. "\x78\x95\xb2\xcf\xec\x09\x26\x43"
  8079. "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
  8080. "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
  8081. "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
  8082. "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
  8083. "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
  8084. "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
  8085. "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
  8086. "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
  8087. "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
  8088. "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
  8089. "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
  8090. "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
  8091. "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
  8092. "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
  8093. "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
  8094. "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
  8095. "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
  8096. "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
  8097. "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
  8098. "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
  8099. "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
  8100. "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
  8101. "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
  8102. "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
  8103. "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
  8104. "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
  8105. "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
  8106. "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
  8107. "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
  8108. "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
  8109. "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
  8110. "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
  8111. "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
  8112. "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
  8113. "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
  8114. "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
  8115. "\x00\x21\x42\x63",
  8116. .ilen = 4100,
  8117. .result =
  8118. "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
  8119. "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
  8120. "\x29\x01\xce\x98\x55\x53\xf9\x0c"
  8121. "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
  8122. "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
  8123. "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
  8124. "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
  8125. "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
  8126. "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
  8127. "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
  8128. "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
  8129. "\xbb\xde\x56\x86\xab\x65\x21\x30"
  8130. "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
  8131. "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
  8132. "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
  8133. "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
  8134. "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
  8135. "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
  8136. "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
  8137. "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
  8138. "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
  8139. "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
  8140. "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
  8141. "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
  8142. "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
  8143. "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
  8144. "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
  8145. "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
  8146. "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
  8147. "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
  8148. "\x45\xff\x3f\xce\x55\xf6\x95\x10"
  8149. "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
  8150. "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
  8151. "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
  8152. "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
  8153. "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
  8154. "\x62\x08\x18\x7a\x25\x49\x28\xac"
  8155. "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
  8156. "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
  8157. "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
  8158. "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
  8159. "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
  8160. "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
  8161. "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
  8162. "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
  8163. "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
  8164. "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
  8165. "\x33\xee\x14\x19\x22\x52\x89\xa7"
  8166. "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
  8167. "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
  8168. "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
  8169. "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
  8170. "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
  8171. "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
  8172. "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
  8173. "\x04\x07\x08\x52\xe6\xc0\xda\x93"
  8174. "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
  8175. "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
  8176. "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
  8177. "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
  8178. "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
  8179. "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
  8180. "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
  8181. "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
  8182. "\x5a\x90\xae\x75\x0a\x74\x18\x89"
  8183. "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
  8184. "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
  8185. "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
  8186. "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
  8187. "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
  8188. "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
  8189. "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
  8190. "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
  8191. "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
  8192. "\x49\x97\x33\xab\x36\x14\x0a\x70"
  8193. "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
  8194. "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
  8195. "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
  8196. "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
  8197. "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
  8198. "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
  8199. "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
  8200. "\x47\x13\x28\x73\x3c\xbb\x00\x90"
  8201. "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
  8202. "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
  8203. "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
  8204. "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
  8205. "\xad\x04\x07\xae\x22\x90\x4a\x93"
  8206. "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
  8207. "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
  8208. "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
  8209. "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
  8210. "\x53\xf9\x80\x10\xde\x80\xa2\x41"
  8211. "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
  8212. "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
  8213. "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
  8214. "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
  8215. "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
  8216. "\xde\xff\x07\x44\xdd\x56\x1b\xad"
  8217. "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
  8218. "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
  8219. "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
  8220. "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
  8221. "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
  8222. "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
  8223. "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
  8224. "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
  8225. "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
  8226. "\x23\xf8\x66\x18\x14\x28\x34\x0f"
  8227. "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
  8228. "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
  8229. "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
  8230. "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
  8231. "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
  8232. "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
  8233. "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
  8234. "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
  8235. "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
  8236. "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
  8237. "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
  8238. "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
  8239. "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
  8240. "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
  8241. "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
  8242. "\xca\x8e\x61\x87\xde\xad\x80\xd2"
  8243. "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
  8244. "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
  8245. "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
  8246. "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
  8247. "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
  8248. "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
  8249. "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
  8250. "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
  8251. "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
  8252. "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
  8253. "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
  8254. "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
  8255. "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
  8256. "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
  8257. "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
  8258. "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
  8259. "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
  8260. "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
  8261. "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
  8262. "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
  8263. "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
  8264. "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
  8265. "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
  8266. "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
  8267. "\x54\xda\x24\x6a\xc4\x41\x65\x46"
  8268. "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
  8269. "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
  8270. "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
  8271. "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
  8272. "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
  8273. "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
  8274. "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
  8275. "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
  8276. "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
  8277. "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
  8278. "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
  8279. "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
  8280. "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
  8281. "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
  8282. "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
  8283. "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
  8284. "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
  8285. "\xef\xcc\xa7\xec\xab\x43\x09\x18"
  8286. "\xd3\xab\x68\xd1\x07\x99\x44\x47"
  8287. "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
  8288. "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
  8289. "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
  8290. "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
  8291. "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
  8292. "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
  8293. "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
  8294. "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
  8295. "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
  8296. "\x71\x6e\x9f\x58\x15\x67\x72\x87"
  8297. "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
  8298. "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
  8299. "\xba\x41\x54\xac\xf0\xfc\x59\x12"
  8300. "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
  8301. "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
  8302. "\x2e\x53\x49\x97\x94\x33\xae\x40"
  8303. "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
  8304. "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
  8305. "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
  8306. "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
  8307. "\xce\x87\xad\xcc\x72\x05\x00\x29"
  8308. "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
  8309. "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
  8310. "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
  8311. "\xac\xc0\x79\x50\x69\xca\x59\x32"
  8312. "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
  8313. "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
  8314. "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
  8315. "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
  8316. "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
  8317. "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
  8318. "\x05\x68\x6b\xab\xe3\x41\x49\xed"
  8319. "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
  8320. "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
  8321. "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
  8322. "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
  8323. "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
  8324. "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
  8325. "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
  8326. "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
  8327. "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
  8328. "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
  8329. "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
  8330. "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
  8331. "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
  8332. "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
  8333. "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
  8334. "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
  8335. "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
  8336. "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
  8337. "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
  8338. "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
  8339. "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
  8340. "\x85\x75\xe6\x43\xf6\x87\x08\x68"
  8341. "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
  8342. "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
  8343. "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
  8344. "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
  8345. "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
  8346. "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
  8347. "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
  8348. "\xaf\x55\xeb\x22\xac\x93\x68\x32"
  8349. "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
  8350. "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
  8351. "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
  8352. "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
  8353. "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
  8354. "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
  8355. "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
  8356. "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
  8357. "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
  8358. "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
  8359. "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
  8360. "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
  8361. "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
  8362. "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
  8363. "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
  8364. "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
  8365. "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
  8366. "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
  8367. "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
  8368. "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
  8369. "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
  8370. "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
  8371. "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
  8372. "\x38\x55\xab\x33\x26\xef\x9f\x43"
  8373. "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
  8374. "\x58\x09\x09\x1b\xc3\x65\x46\x46"
  8375. "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
  8376. "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
  8377. "\x63\x86\xf2\x03\x67\x45\xd2\x72"
  8378. "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
  8379. "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
  8380. "\x2b\x82\x39\xbd\x69\x54\xed\x62"
  8381. "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
  8382. "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
  8383. "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
  8384. "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
  8385. "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
  8386. "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
  8387. "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
  8388. "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
  8389. "\x55\xad\xa4\xd1\x22\x54\x70\x94"
  8390. "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
  8391. "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
  8392. "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
  8393. "\x62\x36\x43\xb2\x82\x15\x75\x50"
  8394. "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
  8395. "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
  8396. "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
  8397. "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
  8398. "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
  8399. "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
  8400. "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
  8401. "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
  8402. "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
  8403. "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
  8404. "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
  8405. "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
  8406. "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
  8407. "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
  8408. "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
  8409. "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
  8410. "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
  8411. "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
  8412. "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
  8413. "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
  8414. "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
  8415. "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
  8416. "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
  8417. "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
  8418. "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
  8419. "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
  8420. "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
  8421. "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
  8422. "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
  8423. "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
  8424. "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
  8425. "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
  8426. "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
  8427. "\x42\x19\x23\x7d\xc8\x73\xee\x25"
  8428. "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
  8429. "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
  8430. "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
  8431. "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
  8432. "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
  8433. "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
  8434. "\xdb\x87\xee\xef\x55\x89\x2a\x59"
  8435. "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
  8436. "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
  8437. "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
  8438. "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
  8439. "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
  8440. "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
  8441. "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
  8442. "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
  8443. "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
  8444. "\xae\xab\x86\x09\x89\xc9\xc2\x40"
  8445. "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
  8446. "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
  8447. "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
  8448. "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
  8449. "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
  8450. "\x95\xd9\x34\x34\x86\xc6\x41\x94"
  8451. "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
  8452. "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
  8453. "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
  8454. "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
  8455. "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
  8456. "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
  8457. "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
  8458. "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
  8459. "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
  8460. "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
  8461. "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
  8462. "\xa7\x33\x34\x86\xca\xe4\x96\x23"
  8463. "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
  8464. "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
  8465. "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
  8466. "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
  8467. "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
  8468. "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
  8469. "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
  8470. "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
  8471. "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
  8472. "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
  8473. "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
  8474. "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
  8475. "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
  8476. "\x68\xc8\x7f\x51\x22\x42\xef\x49"
  8477. "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
  8478. "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
  8479. "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
  8480. "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
  8481. "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
  8482. "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
  8483. "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
  8484. "\x73\x2e\x71\x79\x16\x06\x63\x28"
  8485. "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
  8486. "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
  8487. "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
  8488. "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
  8489. "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
  8490. "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
  8491. "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
  8492. "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
  8493. "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
  8494. "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
  8495. "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
  8496. "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
  8497. "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
  8498. "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
  8499. "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
  8500. "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
  8501. "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
  8502. "\x19\x07\xaf\x90\x62\x5c\x68\x98"
  8503. "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
  8504. "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
  8505. "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
  8506. "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
  8507. "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
  8508. "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
  8509. "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
  8510. "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
  8511. "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
  8512. "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
  8513. "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
  8514. "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
  8515. "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
  8516. "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
  8517. "\x21\x33\x44\xfe\x7f\x35\x32\x93"
  8518. "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
  8519. "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
  8520. "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
  8521. "\x64\xf0\x48\xe5\x57\x99\xee\x75"
  8522. "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
  8523. "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
  8524. "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
  8525. "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
  8526. "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
  8527. "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
  8528. "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
  8529. "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
  8530. "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
  8531. "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
  8532. "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
  8533. "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
  8534. "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
  8535. "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
  8536. "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
  8537. "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
  8538. "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
  8539. "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
  8540. "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
  8541. "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
  8542. "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
  8543. "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
  8544. "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
  8545. "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
  8546. "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
  8547. "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
  8548. "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
  8549. "\x56\xf5\x4e\x01\x35\x27\x45\x77"
  8550. "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
  8551. "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
  8552. "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
  8553. "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
  8554. "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
  8555. "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
  8556. "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
  8557. "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
  8558. "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
  8559. "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
  8560. "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
  8561. "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
  8562. "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
  8563. "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
  8564. "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
  8565. "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
  8566. "\x87\x8f\x03\x21\x28\x95\x0c\x89"
  8567. "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
  8568. "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
  8569. "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
  8570. "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
  8571. "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
  8572. "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
  8573. "\x85\x73\x78\x45\x20\x7f\xae\x13"
  8574. "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
  8575. "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
  8576. "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
  8577. "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
  8578. "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
  8579. "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
  8580. "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
  8581. "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
  8582. "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
  8583. "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
  8584. "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
  8585. "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
  8586. "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
  8587. "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
  8588. "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
  8589. "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
  8590. "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
  8591. "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
  8592. "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
  8593. "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
  8594. "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
  8595. "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
  8596. "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
  8597. "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
  8598. "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
  8599. "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
  8600. "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
  8601. "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
  8602. "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
  8603. "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
  8604. "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
  8605. "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
  8606. "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
  8607. "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
  8608. "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
  8609. "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
  8610. "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
  8611. "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
  8612. "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
  8613. "\x6e\x12\x17\x72\x63\x57\xc7\xba"
  8614. "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
  8615. "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
  8616. "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
  8617. "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
  8618. "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
  8619. "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
  8620. "\x0c\x24\x43\x31\x40\x57\xf1\x72"
  8621. "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
  8622. "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
  8623. "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
  8624. "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
  8625. "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
  8626. "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
  8627. "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
  8628. "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
  8629. "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
  8630. "\xaf\xdf\x11\x95",
  8631. .rlen = 4100,
  8632. .np = 2,
  8633. .tap = { 4064, 36 },
  8634. },
  8635. };
  8636. /*
  8637. * CTS (Cipher Text Stealing) mode tests
  8638. */
  8639. #define CTS_MODE_ENC_TEST_VECTORS 6
  8640. #define CTS_MODE_DEC_TEST_VECTORS 6
  8641. static struct cipher_testvec cts_mode_enc_tv_template[] = {
  8642. { /* from rfc3962 */
  8643. .klen = 16,
  8644. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8645. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8646. .ilen = 17,
  8647. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8648. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8649. "\x20",
  8650. .rlen = 17,
  8651. .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  8652. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  8653. "\x97",
  8654. }, {
  8655. .klen = 16,
  8656. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8657. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8658. .ilen = 31,
  8659. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8660. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8661. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8662. "\x20\x47\x61\x75\x27\x73\x20",
  8663. .rlen = 31,
  8664. .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  8665. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  8666. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8667. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  8668. }, {
  8669. .klen = 16,
  8670. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8671. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8672. .ilen = 32,
  8673. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8674. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8675. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8676. "\x20\x47\x61\x75\x27\x73\x20\x43",
  8677. .rlen = 32,
  8678. .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8679. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8680. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8681. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  8682. }, {
  8683. .klen = 16,
  8684. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8685. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8686. .ilen = 47,
  8687. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8688. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8689. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8690. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8691. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8692. "\x70\x6c\x65\x61\x73\x65\x2c",
  8693. .rlen = 47,
  8694. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8695. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8696. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  8697. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  8698. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8699. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  8700. }, {
  8701. .klen = 16,
  8702. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8703. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8704. .ilen = 48,
  8705. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8706. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8707. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8708. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8709. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8710. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  8711. .rlen = 48,
  8712. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8713. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8714. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8715. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  8716. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8717. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  8718. }, {
  8719. .klen = 16,
  8720. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8721. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8722. .ilen = 64,
  8723. .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8724. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8725. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8726. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8727. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8728. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  8729. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  8730. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  8731. .rlen = 64,
  8732. .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8733. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8734. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8735. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8736. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  8737. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  8738. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8739. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  8740. }
  8741. };
  8742. static struct cipher_testvec cts_mode_dec_tv_template[] = {
  8743. { /* from rfc3962 */
  8744. .klen = 16,
  8745. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8746. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8747. .rlen = 17,
  8748. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8749. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8750. "\x20",
  8751. .ilen = 17,
  8752. .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
  8753. "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
  8754. "\x97",
  8755. }, {
  8756. .klen = 16,
  8757. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8758. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8759. .rlen = 31,
  8760. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8761. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8762. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8763. "\x20\x47\x61\x75\x27\x73\x20",
  8764. .ilen = 31,
  8765. .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
  8766. "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
  8767. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8768. "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
  8769. }, {
  8770. .klen = 16,
  8771. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8772. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8773. .rlen = 32,
  8774. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8775. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8776. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8777. "\x20\x47\x61\x75\x27\x73\x20\x43",
  8778. .ilen = 32,
  8779. .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8780. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8781. "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8782. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
  8783. }, {
  8784. .klen = 16,
  8785. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8786. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8787. .rlen = 47,
  8788. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8789. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8790. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8791. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8792. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8793. "\x70\x6c\x65\x61\x73\x65\x2c",
  8794. .ilen = 47,
  8795. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8796. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8797. "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
  8798. "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
  8799. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8800. "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
  8801. }, {
  8802. .klen = 16,
  8803. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8804. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8805. .rlen = 48,
  8806. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8807. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8808. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8809. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8810. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8811. "\x70\x6c\x65\x61\x73\x65\x2c\x20",
  8812. .ilen = 48,
  8813. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8814. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8815. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8816. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
  8817. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8818. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
  8819. }, {
  8820. .klen = 16,
  8821. .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
  8822. "\x74\x65\x72\x69\x79\x61\x6b\x69",
  8823. .rlen = 64,
  8824. .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
  8825. "\x6c\x69\x6b\x65\x20\x74\x68\x65"
  8826. "\x20\x47\x65\x6e\x65\x72\x61\x6c"
  8827. "\x20\x47\x61\x75\x27\x73\x20\x43"
  8828. "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
  8829. "\x70\x6c\x65\x61\x73\x65\x2c\x20"
  8830. "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
  8831. "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
  8832. .ilen = 64,
  8833. .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
  8834. "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
  8835. "\x39\x31\x25\x23\xa7\x86\x62\xd5"
  8836. "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
  8837. "\x48\x07\xef\xe8\x36\xee\x89\xa5"
  8838. "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
  8839. "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
  8840. "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
  8841. }
  8842. };
  8843. /*
  8844. * Compression stuff.
  8845. */
  8846. #define COMP_BUF_SIZE 512
  8847. struct comp_testvec {
  8848. int inlen, outlen;
  8849. char input[COMP_BUF_SIZE];
  8850. char output[COMP_BUF_SIZE];
  8851. };
  8852. struct pcomp_testvec {
  8853. void *params;
  8854. unsigned int paramsize;
  8855. int inlen, outlen;
  8856. char input[COMP_BUF_SIZE];
  8857. char output[COMP_BUF_SIZE];
  8858. };
  8859. /*
  8860. * Deflate test vectors (null-terminated strings).
  8861. * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
  8862. */
  8863. #define DEFLATE_COMP_TEST_VECTORS 2
  8864. #define DEFLATE_DECOMP_TEST_VECTORS 2
  8865. static struct comp_testvec deflate_comp_tv_template[] = {
  8866. {
  8867. .inlen = 70,
  8868. .outlen = 38,
  8869. .input = "Join us now and share the software "
  8870. "Join us now and share the software ",
  8871. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8872. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8873. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8874. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8875. "\x71\xbc\x08\x2b\x01\x00",
  8876. }, {
  8877. .inlen = 191,
  8878. .outlen = 122,
  8879. .input = "This document describes a compression method based on the DEFLATE"
  8880. "compression algorithm. This document defines the application of "
  8881. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8882. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8883. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8884. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8885. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8886. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8887. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8888. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8889. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8890. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8891. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8892. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8893. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8894. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8895. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8896. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8897. "\xfa\x02",
  8898. },
  8899. };
  8900. static struct comp_testvec deflate_decomp_tv_template[] = {
  8901. {
  8902. .inlen = 122,
  8903. .outlen = 191,
  8904. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  8905. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  8906. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  8907. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  8908. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  8909. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  8910. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  8911. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  8912. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  8913. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  8914. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  8915. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  8916. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  8917. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  8918. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  8919. "\xfa\x02",
  8920. .output = "This document describes a compression method based on the DEFLATE"
  8921. "compression algorithm. This document defines the application of "
  8922. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  8923. }, {
  8924. .inlen = 38,
  8925. .outlen = 70,
  8926. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8927. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8928. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8929. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8930. "\x71\xbc\x08\x2b\x01\x00",
  8931. .output = "Join us now and share the software "
  8932. "Join us now and share the software ",
  8933. },
  8934. };
  8935. #define ZLIB_COMP_TEST_VECTORS 2
  8936. #define ZLIB_DECOMP_TEST_VECTORS 2
  8937. static const struct {
  8938. struct nlattr nla;
  8939. int val;
  8940. } deflate_comp_params[] = {
  8941. {
  8942. .nla = {
  8943. .nla_len = NLA_HDRLEN + sizeof(int),
  8944. .nla_type = ZLIB_COMP_LEVEL,
  8945. },
  8946. .val = Z_DEFAULT_COMPRESSION,
  8947. }, {
  8948. .nla = {
  8949. .nla_len = NLA_HDRLEN + sizeof(int),
  8950. .nla_type = ZLIB_COMP_METHOD,
  8951. },
  8952. .val = Z_DEFLATED,
  8953. }, {
  8954. .nla = {
  8955. .nla_len = NLA_HDRLEN + sizeof(int),
  8956. .nla_type = ZLIB_COMP_WINDOWBITS,
  8957. },
  8958. .val = -11,
  8959. }, {
  8960. .nla = {
  8961. .nla_len = NLA_HDRLEN + sizeof(int),
  8962. .nla_type = ZLIB_COMP_MEMLEVEL,
  8963. },
  8964. .val = MAX_MEM_LEVEL,
  8965. }, {
  8966. .nla = {
  8967. .nla_len = NLA_HDRLEN + sizeof(int),
  8968. .nla_type = ZLIB_COMP_STRATEGY,
  8969. },
  8970. .val = Z_DEFAULT_STRATEGY,
  8971. }
  8972. };
  8973. static const struct {
  8974. struct nlattr nla;
  8975. int val;
  8976. } deflate_decomp_params[] = {
  8977. {
  8978. .nla = {
  8979. .nla_len = NLA_HDRLEN + sizeof(int),
  8980. .nla_type = ZLIB_DECOMP_WINDOWBITS,
  8981. },
  8982. .val = -11,
  8983. }
  8984. };
  8985. static struct pcomp_testvec zlib_comp_tv_template[] = {
  8986. {
  8987. .params = &deflate_comp_params,
  8988. .paramsize = sizeof(deflate_comp_params),
  8989. .inlen = 70,
  8990. .outlen = 38,
  8991. .input = "Join us now and share the software "
  8992. "Join us now and share the software ",
  8993. .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  8994. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  8995. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  8996. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  8997. "\x71\xbc\x08\x2b\x01\x00",
  8998. }, {
  8999. .params = &deflate_comp_params,
  9000. .paramsize = sizeof(deflate_comp_params),
  9001. .inlen = 191,
  9002. .outlen = 122,
  9003. .input = "This document describes a compression method based on the DEFLATE"
  9004. "compression algorithm. This document defines the application of "
  9005. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  9006. .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  9007. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  9008. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  9009. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  9010. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  9011. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  9012. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  9013. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  9014. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  9015. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  9016. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  9017. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  9018. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  9019. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  9020. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  9021. "\xfa\x02",
  9022. },
  9023. };
  9024. static struct pcomp_testvec zlib_decomp_tv_template[] = {
  9025. {
  9026. .params = &deflate_decomp_params,
  9027. .paramsize = sizeof(deflate_decomp_params),
  9028. .inlen = 122,
  9029. .outlen = 191,
  9030. .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
  9031. "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
  9032. "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
  9033. "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
  9034. "\x68\x12\x51\xae\x76\x67\xd6\x27"
  9035. "\x19\x88\x1a\xde\x85\xab\x21\xf2"
  9036. "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
  9037. "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
  9038. "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
  9039. "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
  9040. "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
  9041. "\x52\x37\xed\x0e\x52\x6b\x59\x02"
  9042. "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
  9043. "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
  9044. "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
  9045. "\xfa\x02",
  9046. .output = "This document describes a compression method based on the DEFLATE"
  9047. "compression algorithm. This document defines the application of "
  9048. "the DEFLATE algorithm to the IP Payload Compression Protocol.",
  9049. }, {
  9050. .params = &deflate_decomp_params,
  9051. .paramsize = sizeof(deflate_decomp_params),
  9052. .inlen = 38,
  9053. .outlen = 70,
  9054. .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
  9055. "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
  9056. "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
  9057. "\x48\x55\x28\xce\x4f\x2b\x29\x07"
  9058. "\x71\xbc\x08\x2b\x01\x00",
  9059. .output = "Join us now and share the software "
  9060. "Join us now and share the software ",
  9061. },
  9062. };
  9063. /*
  9064. * LZO test vectors (null-terminated strings).
  9065. */
  9066. #define LZO_COMP_TEST_VECTORS 2
  9067. #define LZO_DECOMP_TEST_VECTORS 2
  9068. static struct comp_testvec lzo_comp_tv_template[] = {
  9069. {
  9070. .inlen = 70,
  9071. .outlen = 46,
  9072. .input = "Join us now and share the software "
  9073. "Join us now and share the software ",
  9074. .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  9075. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  9076. "\x64\x20\x73\x68\x61\x72\x65\x20"
  9077. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  9078. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  9079. "\x3d\x88\x00\x11\x00\x00",
  9080. }, {
  9081. .inlen = 159,
  9082. .outlen = 133,
  9083. .input = "This document describes a compression method based on the LZO "
  9084. "compression algorithm. This document defines the application of "
  9085. "the LZO algorithm used in UBIFS.",
  9086. .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  9087. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  9088. "\x64\x65\x73\x63\x72\x69\x62\x65"
  9089. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  9090. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  9091. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  9092. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  9093. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  9094. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  9095. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  9096. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  9097. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  9098. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  9099. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  9100. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  9101. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  9102. "\x53\x2e\x11\x00\x00",
  9103. },
  9104. };
  9105. static struct comp_testvec lzo_decomp_tv_template[] = {
  9106. {
  9107. .inlen = 133,
  9108. .outlen = 159,
  9109. .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
  9110. "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
  9111. "\x64\x65\x73\x63\x72\x69\x62\x65"
  9112. "\x73\x20\x61\x20\x63\x6f\x6d\x70"
  9113. "\x72\x65\x73\x73\x69\x6f\x6e\x20"
  9114. "\x6d\x65\x74\x68\x6f\x64\x20\x62"
  9115. "\x61\x73\x65\x64\x20\x6f\x6e\x20"
  9116. "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
  9117. "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
  9118. "\x69\x74\x68\x6d\x2e\x20\x20\x54"
  9119. "\x68\x69\x73\x2a\x54\x01\x02\x66"
  9120. "\x69\x6e\x65\x73\x94\x06\x05\x61"
  9121. "\x70\x70\x6c\x69\x63\x61\x74\x76"
  9122. "\x0a\x6f\x66\x88\x02\x60\x09\x27"
  9123. "\xf0\x00\x0c\x20\x75\x73\x65\x64"
  9124. "\x20\x69\x6e\x20\x55\x42\x49\x46"
  9125. "\x53\x2e\x11\x00\x00",
  9126. .output = "This document describes a compression method based on the LZO "
  9127. "compression algorithm. This document defines the application of "
  9128. "the LZO algorithm used in UBIFS.",
  9129. }, {
  9130. .inlen = 46,
  9131. .outlen = 70,
  9132. .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
  9133. "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
  9134. "\x64\x20\x73\x68\x61\x72\x65\x20"
  9135. "\x74\x68\x65\x20\x73\x6f\x66\x74"
  9136. "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
  9137. "\x3d\x88\x00\x11\x00\x00",
  9138. .output = "Join us now and share the software "
  9139. "Join us now and share the software ",
  9140. },
  9141. };
  9142. /*
  9143. * Michael MIC test vectors from IEEE 802.11i
  9144. */
  9145. #define MICHAEL_MIC_TEST_VECTORS 6
  9146. static struct hash_testvec michael_mic_tv_template[] = {
  9147. {
  9148. .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
  9149. .ksize = 8,
  9150. .plaintext = zeroed_string,
  9151. .psize = 0,
  9152. .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  9153. },
  9154. {
  9155. .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
  9156. .ksize = 8,
  9157. .plaintext = "M",
  9158. .psize = 1,
  9159. .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  9160. },
  9161. {
  9162. .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
  9163. .ksize = 8,
  9164. .plaintext = "Mi",
  9165. .psize = 2,
  9166. .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  9167. },
  9168. {
  9169. .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
  9170. .ksize = 8,
  9171. .plaintext = "Mic",
  9172. .psize = 3,
  9173. .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  9174. },
  9175. {
  9176. .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
  9177. .ksize = 8,
  9178. .plaintext = "Mich",
  9179. .psize = 4,
  9180. .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  9181. },
  9182. {
  9183. .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
  9184. .ksize = 8,
  9185. .plaintext = "Michael",
  9186. .psize = 7,
  9187. .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
  9188. }
  9189. };
  9190. /*
  9191. * CRC32C test vectors
  9192. */
  9193. #define CRC32C_TEST_VECTORS 14
  9194. static struct hash_testvec crc32c_tv_template[] = {
  9195. {
  9196. .psize = 0,
  9197. .digest = "\x00\x00\x00\x00",
  9198. },
  9199. {
  9200. .key = "\x87\xa9\xcb\xed",
  9201. .ksize = 4,
  9202. .psize = 0,
  9203. .digest = "\x78\x56\x34\x12",
  9204. },
  9205. {
  9206. .key = "\xff\xff\xff\xff",
  9207. .ksize = 4,
  9208. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  9209. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  9210. "\x11\x12\x13\x14\x15\x16\x17\x18"
  9211. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  9212. "\x21\x22\x23\x24\x25\x26\x27\x28",
  9213. .psize = 40,
  9214. .digest = "\x7f\x15\x2c\x0e",
  9215. },
  9216. {
  9217. .key = "\xff\xff\xff\xff",
  9218. .ksize = 4,
  9219. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9220. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9221. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9222. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9223. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  9224. .psize = 40,
  9225. .digest = "\xf6\xeb\x80\xe9",
  9226. },
  9227. {
  9228. .key = "\xff\xff\xff\xff",
  9229. .ksize = 4,
  9230. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  9231. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9232. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9233. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9234. "\x71\x72\x73\x74\x75\x76\x77\x78",
  9235. .psize = 40,
  9236. .digest = "\xed\xbd\x74\xde",
  9237. },
  9238. {
  9239. .key = "\xff\xff\xff\xff",
  9240. .ksize = 4,
  9241. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9242. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9243. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9244. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9245. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  9246. .psize = 40,
  9247. .digest = "\x62\xc8\x79\xd5",
  9248. },
  9249. {
  9250. .key = "\xff\xff\xff\xff",
  9251. .ksize = 4,
  9252. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9253. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9254. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9255. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9256. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  9257. .psize = 40,
  9258. .digest = "\xd0\x9a\x97\xba",
  9259. },
  9260. {
  9261. .key = "\xff\xff\xff\xff",
  9262. .ksize = 4,
  9263. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9264. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9265. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9266. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9267. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9268. .psize = 40,
  9269. .digest = "\x13\xd9\x29\x2b",
  9270. },
  9271. {
  9272. .key = "\x80\xea\xd3\xf1",
  9273. .ksize = 4,
  9274. .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9275. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9276. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9277. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9278. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
  9279. .psize = 40,
  9280. .digest = "\x0c\xb5\xe2\xa2",
  9281. },
  9282. {
  9283. .key = "\xf3\x4a\x1d\x5d",
  9284. .ksize = 4,
  9285. .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
  9286. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9287. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9288. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9289. "\x71\x72\x73\x74\x75\x76\x77\x78",
  9290. .psize = 40,
  9291. .digest = "\xd1\x7f\xfb\xa6",
  9292. },
  9293. {
  9294. .key = "\x2e\x80\x04\x59",
  9295. .ksize = 4,
  9296. .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9297. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9298. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9299. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9300. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
  9301. .psize = 40,
  9302. .digest = "\x59\x33\xe6\x7a",
  9303. },
  9304. {
  9305. .key = "\xa6\xcc\x19\x85",
  9306. .ksize = 4,
  9307. .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9308. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9309. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9310. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9311. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
  9312. .psize = 40,
  9313. .digest = "\xbe\x03\x01\xd2",
  9314. },
  9315. {
  9316. .key = "\x41\xfc\xfe\x2d",
  9317. .ksize = 4,
  9318. .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9319. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9320. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9321. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9322. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9323. .psize = 40,
  9324. .digest = "\x75\xd3\xc5\x24",
  9325. },
  9326. {
  9327. .key = "\xff\xff\xff\xff",
  9328. .ksize = 4,
  9329. .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
  9330. "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
  9331. "\x11\x12\x13\x14\x15\x16\x17\x18"
  9332. "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
  9333. "\x21\x22\x23\x24\x25\x26\x27\x28"
  9334. "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
  9335. "\x31\x32\x33\x34\x35\x36\x37\x38"
  9336. "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
  9337. "\x41\x42\x43\x44\x45\x46\x47\x48"
  9338. "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
  9339. "\x51\x52\x53\x54\x55\x56\x57\x58"
  9340. "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
  9341. "\x61\x62\x63\x64\x65\x66\x67\x68"
  9342. "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
  9343. "\x71\x72\x73\x74\x75\x76\x77\x78"
  9344. "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
  9345. "\x81\x82\x83\x84\x85\x86\x87\x88"
  9346. "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
  9347. "\x91\x92\x93\x94\x95\x96\x97\x98"
  9348. "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
  9349. "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
  9350. "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
  9351. "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
  9352. "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
  9353. "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
  9354. "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
  9355. "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
  9356. "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
  9357. "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
  9358. "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
  9359. .psize = 240,
  9360. .digest = "\x75\xd3\xc5\x24",
  9361. .np = 2,
  9362. .tap = { 31, 209 }
  9363. },
  9364. };
  9365. #endif /* _CRYPTO_TESTMGR_H */