46 #define DES_VALUE(value) { \ 47 ( ( ( ( uint64_t ) (value) ) >> 56 ) & 0xff ), \ 48 ( ( ( ( uint64_t ) (value) ) >> 48 ) & 0xff ), \ 49 ( ( ( ( uint64_t ) (value) ) >> 40 ) & 0xff ), \ 50 ( ( ( ( uint64_t ) (value) ) >> 32 ) & 0xff ), \ 51 ( ( ( ( uint64_t ) (value) ) >> 24 ) & 0xff ), \ 52 ( ( ( ( uint64_t ) (value) ) >> 16 ) & 0xff ), \ 53 ( ( ( ( uint64_t ) (value) ) >> 8 ) & 0xff ), \ 54 ( ( ( ( uint64_t ) (value) ) >> 0 ) & 0xff ) \ 58 #define DES_TEST( name, key, plaintext, ciphertext ) \ 59 CIPHER_TEST ( name, &des_ecb_algorithm, DES_VALUE ( key ), \ 60 IV(), ADDITIONAL(), DES_VALUE ( plaintext ), \ 61 DES_VALUE ( ciphertext ), AUTH() ) 65 0x10316e028c8f3b4a, 0x0000000000000000, 0x82dcbafbdeab6602 );
74 0x0101010101010101, 0x8000000000000000, 0x95f8a5e5dd31d900 );
76 0x0101010101010101, 0x4000000000000000, 0xdd7f121ca5015619 );
78 0x0101010101010101, 0x2000000000000000, 0x2e8653104f3834ea );
80 0x0101010101010101, 0x1000000000000000, 0x4bd388ff6cd81d4f );
82 0x0101010101010101, 0x0800000000000000, 0x20b9e767b2fb1456 );
84 0x0101010101010101, 0x0400000000000000, 0x55579380d77138ef );
86 0x0101010101010101, 0x0200000000000000, 0x6cc5defaaf04512f );
88 0x0101010101010101, 0x0100000000000000, 0x0d9f279ba5d87260 );
90 0x0101010101010101, 0x0080000000000000, 0xd9031b0271bd5a0a );
92 0x0101010101010101, 0x0040000000000000, 0x424250b37c3dd951 );
94 0x0101010101010101, 0x0020000000000000, 0xb8061b7ecd9a21e5 );
96 0x0101010101010101, 0x0010000000000000, 0xf15d0f286b65bd28 );
98 0x0101010101010101, 0x0008000000000000, 0xadd0cc8d6e5deba1 );
100 0x0101010101010101, 0x0004000000000000, 0xe6d5f82752ad63d1 );
102 0x0101010101010101, 0x0002000000000000, 0xecbfe3bd3f591a5e );
104 0x0101010101010101, 0x0001000000000000, 0xf356834379d165cd );
106 0x0101010101010101, 0x0000800000000000, 0x2b9f982f20037fa9 );
108 0x0101010101010101, 0x0000400000000000, 0x889de068a16f0be6 );
110 0x0101010101010101, 0x0000200000000000, 0xe19e275d846a1298 );
112 0x0101010101010101, 0x0000100000000000, 0x329a8ed523d71aec );
114 0x0101010101010101, 0x0000080000000000, 0xe7fce22557d23c97 );
116 0x0101010101010101, 0x0000040000000000, 0x12a9f5817ff2d65d );
118 0x0101010101010101, 0x0000020000000000, 0xa484c3ad38dc9c19 );
120 0x0101010101010101, 0x0000010000000000, 0xfbe00a8a1ef8ad72 );
122 0x0101010101010101, 0x0000008000000000, 0x750d079407521363 );
124 0x0101010101010101, 0x0000004000000000, 0x64feed9c724c2faf );
126 0x0101010101010101, 0x0000002000000000, 0xf02b263b328e2b60 );
128 0x0101010101010101, 0x0000001000000000, 0x9d64555a9a10b852 );
130 0x0101010101010101, 0x0000000800000000, 0xd106ff0bed5255d7 );
132 0x0101010101010101, 0x0000000400000000, 0xe1652c6b138c64a5 );
134 0x0101010101010101, 0x0000000200000000, 0xe428581186ec8f46 );
136 0x0101010101010101, 0x0000000100000000, 0xaeb5f5ede22d1a36 );
138 0x0101010101010101, 0x0000000080000000, 0xe943d7568aec0c5c );
140 0x0101010101010101, 0x0000000040000000, 0xdf98c8276f54b04b );
142 0x0101010101010101, 0x0000000020000000, 0xb160e4680f6c696f );
144 0x0101010101010101, 0x0000000010000000, 0xfa0752b07d9c4ab8 );
146 0x0101010101010101, 0x0000000008000000, 0xca3a2b036dbc8502 );
148 0x0101010101010101, 0x0000000004000000, 0x5e0905517bb59bcf );
150 0x0101010101010101, 0x0000000002000000, 0x814eeb3b91d90726 );
152 0x0101010101010101, 0x0000000001000000, 0x4d49db1532919c9f );
154 0x0101010101010101, 0x0000000000800000, 0x25eb5fc3f8cf0621 );
156 0x0101010101010101, 0x0000000000400000, 0xab6a20c0620d1c6f );
158 0x0101010101010101, 0x0000000000200000, 0x79e90dbc98f92cca );
160 0x0101010101010101, 0x0000000000100000, 0x866ecedd8072bb0e );
162 0x0101010101010101, 0x0000000000080000, 0x8b54536f2f3e64a8 );
164 0x0101010101010101, 0x0000000000040000, 0xea51d3975595b86b );
166 0x0101010101010101, 0x0000000000020000, 0xcaffc6ac4542de31 );
168 0x0101010101010101, 0x0000000000010000, 0x8dd45a2ddf90796c );
170 0x0101010101010101, 0x0000000000008000, 0x1029d55e880ec2d0 );
172 0x0101010101010101, 0x0000000000004000, 0x5d86cb23639dbea9 );
174 0x0101010101010101, 0x0000000000002000, 0x1d1ca853ae7c0c5f );
176 0x0101010101010101, 0x0000000000001000, 0xce332329248f3228 );
178 0x0101010101010101, 0x0000000000000800, 0x8405d1abe24fb942 );
180 0x0101010101010101, 0x0000000000000400, 0xe643d78090ca4207 );
182 0x0101010101010101, 0x0000000000000200, 0x48221b9937748a23 );
184 0x0101010101010101, 0x0000000000000100, 0xdd7c0bbd61fafd54 );
186 0x0101010101010101, 0x0000000000000080, 0x2fbc291a570db5c4 );
188 0x0101010101010101, 0x0000000000000040, 0xe07c30d7e4e26e12 );
190 0x0101010101010101, 0x0000000000000020, 0x0953e2258e8e90a1 );
192 0x0101010101010101, 0x0000000000000010, 0x5b711bc4ceebf2ee );
194 0x0101010101010101, 0x0000000000000008, 0xcc083f1e6d9e85f6 );
196 0x0101010101010101, 0x0000000000000004, 0xd2fd8867d50d2dfe );
198 0x0101010101010101, 0x0000000000000002, 0x06e7ea22ce92708f );
200 0x0101010101010101, 0x0000000000000001, 0x166b40b44aba4bd6 );
209 0x0101010101010101, 0x95f8a5e5dd31d900, 0x8000000000000000 );
211 0x0101010101010101, 0xdd7f121ca5015619, 0x4000000000000000 );
213 0x0101010101010101, 0x2e8653104f3834ea, 0x2000000000000000 );
215 0x0101010101010101, 0x4bd388ff6cd81d4f, 0x1000000000000000 );
217 0x0101010101010101, 0x20b9e767b2fb1456, 0x0800000000000000 );
219 0x0101010101010101, 0x55579380d77138ef, 0x0400000000000000 );
221 0x0101010101010101, 0x6cc5defaaf04512f, 0x0200000000000000 );
223 0x0101010101010101, 0x0d9f279ba5d87260, 0x0100000000000000 );
225 0x0101010101010101, 0xd9031b0271bd5a0a, 0x0080000000000000 );
227 0x0101010101010101, 0x424250b37c3dd951, 0x0040000000000000 );
229 0x0101010101010101, 0xb8061b7ecd9a21e5, 0x0020000000000000 );
231 0x0101010101010101, 0xf15d0f286b65bd28, 0x0010000000000000 );
233 0x0101010101010101, 0xadd0cc8d6e5deba1, 0x0008000000000000 );
235 0x0101010101010101, 0xe6d5f82752ad63d1, 0x0004000000000000 );
237 0x0101010101010101, 0xecbfe3bd3f591a5e, 0x0002000000000000 );
239 0x0101010101010101, 0xf356834379d165cd, 0x0001000000000000 );
241 0x0101010101010101, 0x2b9f982f20037fa9, 0x0000800000000000 );
243 0x0101010101010101, 0x889de068a16f0be6, 0x0000400000000000 );
245 0x0101010101010101, 0xe19e275d846a1298, 0x0000200000000000 );
247 0x0101010101010101, 0x329a8ed523d71aec, 0x0000100000000000 );
249 0x0101010101010101, 0xe7fce22557d23c97, 0x0000080000000000 );
251 0x0101010101010101, 0x12a9f5817ff2d65d, 0x0000040000000000 );
253 0x0101010101010101, 0xa484c3ad38dc9c19, 0x0000020000000000 );
255 0x0101010101010101, 0xfbe00a8a1ef8ad72, 0x0000010000000000 );
257 0x0101010101010101, 0x750d079407521363, 0x0000008000000000 );
259 0x0101010101010101, 0x64feed9c724c2faf, 0x0000004000000000 );
261 0x0101010101010101, 0xf02b263b328e2b60, 0x0000002000000000 );
263 0x0101010101010101, 0x9d64555a9a10b852, 0x0000001000000000 );
265 0x0101010101010101, 0xd106ff0bed5255d7, 0x0000000800000000 );
267 0x0101010101010101, 0xe1652c6b138c64a5, 0x0000000400000000 );
269 0x0101010101010101, 0xe428581186ec8f46, 0x0000000200000000 );
271 0x0101010101010101, 0xaeb5f5ede22d1a36, 0x0000000100000000 );
273 0x0101010101010101, 0xe943d7568aec0c5c, 0x0000000080000000 );
275 0x0101010101010101, 0xdf98c8276f54b04b, 0x0000000040000000 );
277 0x0101010101010101, 0xb160e4680f6c696f, 0x0000000020000000 );
279 0x0101010101010101, 0xfa0752b07d9c4ab8, 0x0000000010000000 );
281 0x0101010101010101, 0xca3a2b036dbc8502, 0x0000000008000000 );
283 0x0101010101010101, 0x5e0905517bb59bcf, 0x0000000004000000 );
285 0x0101010101010101, 0x814eeb3b91d90726, 0x0000000002000000 );
287 0x0101010101010101, 0x4d49db1532919c9f, 0x0000000001000000 );
289 0x0101010101010101, 0x25eb5fc3f8cf0621, 0x0000000000800000 );
291 0x0101010101010101, 0xab6a20c0620d1c6f, 0x0000000000400000 );
293 0x0101010101010101, 0x79e90dbc98f92cca, 0x0000000000200000 );
295 0x0101010101010101, 0x866ecedd8072bb0e, 0x0000000000100000 );
297 0x0101010101010101, 0x8b54536f2f3e64a8, 0x0000000000080000 );
299 0x0101010101010101, 0xea51d3975595b86b, 0x0000000000040000 );
301 0x0101010101010101, 0xcaffc6ac4542de31, 0x0000000000020000 );
303 0x0101010101010101, 0x8dd45a2ddf90796c, 0x0000000000010000 );
305 0x0101010101010101, 0x1029d55e880ec2d0, 0x0000000000008000 );
307 0x0101010101010101, 0x5d86cb23639dbea9, 0x0000000000004000 );
309 0x0101010101010101, 0x1d1ca853ae7c0c5f, 0x0000000000002000 );
311 0x0101010101010101, 0xce332329248f3228, 0x0000000000001000 );
313 0x0101010101010101, 0x8405d1abe24fb942, 0x0000000000000800 );
315 0x0101010101010101, 0xe643d78090ca4207, 0x0000000000000400 );
317 0x0101010101010101, 0x48221b9937748a23, 0x0000000000000200 );
319 0x0101010101010101, 0xdd7c0bbd61fafd54, 0x0000000000000100 );
321 0x0101010101010101, 0x2fbc291a570db5c4, 0x0000000000000080 );
323 0x0101010101010101, 0xe07c30d7e4e26e12, 0x0000000000000040 );
325 0x0101010101010101, 0x0953e2258e8e90a1, 0x0000000000000020 );
327 0x0101010101010101, 0x5b711bc4ceebf2ee, 0x0000000000000010 );
329 0x0101010101010101, 0xcc083f1e6d9e85f6, 0x0000000000000008 );
331 0x0101010101010101, 0xd2fd8867d50d2dfe, 0x0000000000000004 );
333 0x0101010101010101, 0x06e7ea22ce92708f, 0x0000000000000002 );
335 0x0101010101010101, 0x166b40b44aba4bd6, 0x0000000000000001 );
344 0x1046913489980131, 0x0000000000000000, 0x88d55e54f54c97b4 );
346 0x1007103489988020, 0x0000000000000000, 0x0c0cc00c83ea48fd );
348 0x10071034c8980120, 0x0000000000000000, 0x83bc8ef3a6570183 );
350 0x1046103489988020, 0x0000000000000000, 0xdf725dcad94ea2e9 );
352 0x1086911519190101, 0x0000000000000000, 0xe652b53b550be8b0 );
354 0x1086911519580101, 0x0000000000000000, 0xaf527120c485cbb0 );
356 0x5107b01519580101, 0x0000000000000000, 0x0f04ce393db926d5 );
358 0x1007b01519190101, 0x0000000000000000, 0xc9f00ffc74079067 );
360 0x3107915498080101, 0x0000000000000000, 0x7cfd82a593252b4e );
362 0x3107919498080101, 0x0000000000000000, 0xcb49a2f9e91363e3 );
364 0x10079115b9080140, 0x0000000000000000, 0x00b588be70d23f56 );
366 0x3107911598080140, 0x0000000000000000, 0x406a9a6ab43399ae );
368 0x1007d01589980101, 0x0000000000000000, 0x6cb773611dca9ada );
370 0x9107911589980101, 0x0000000000000000, 0x67fd21c17dbb5d70 );
372 0x9107d01589190101, 0x0000000000000000, 0x9592cb4110430787 );
374 0x1007d01598980120, 0x0000000000000000, 0xa6b7ff68a318ddd3 );
376 0x1007940498190101, 0x0000000000000000, 0x4d102196c914ca16 );
378 0x0107910491190401, 0x0000000000000000, 0x2dfa9f4573594965 );
380 0x0107910491190101, 0x0000000000000000, 0xb46604816c0e0774 );
382 0x0107940491190401, 0x0000000000000000, 0x6e7e6221a4f34e87 );
384 0x19079210981a0101, 0x0000000000000000, 0xaa85e74643233199 );
386 0x1007911998190801, 0x0000000000000000, 0x2e5a19db4d1962d6 );
388 0x10079119981a0801, 0x0000000000000000, 0x23a866a809d30894 );
390 0x1007921098190101, 0x0000000000000000, 0xd812d961f017d320 );
392 0x100791159819010b, 0x0000000000000000, 0x055605816e58608f );
394 0x1004801598190101, 0x0000000000000000, 0xabd88e8b1b7716f1 );
396 0x1004801598190102, 0x0000000000000000, 0x537ac95be69da1e1 );
398 0x1004801598190108, 0x0000000000000000, 0xaed0f6ae3c25cdd8 );
400 0x1002911498100104, 0x0000000000000000, 0xb3e35a5ee53e7b8d );
402 0x1002911598190104, 0x0000000000000000, 0x61c79c71921a2ef8 );
404 0x1002911598100201, 0x0000000000000000, 0xe2f5728f0995013c );
406 0x1002911698100101, 0x0000000000000000, 0x1aeac39a61f0a464 );
420 0x8001010101010101, 0x0000000000000000, 0x95a8d72813daa94d );
422 0x4001010101010101, 0x0000000000000000, 0x0eec1487dd8c26d5 );
424 0x2001010101010101, 0x0000000000000000, 0x7ad16ffb79c45926 );
426 0x1001010101010101, 0x0000000000000000, 0xd3746294ca6a6cf3 );
428 0x0801010101010101, 0x0000000000000000, 0x809f5f873c1fd761 );
430 0x0401010101010101, 0x0000000000000000, 0xc02faffec989d1fc );
432 0x0201010101010101, 0x0000000000000000, 0x4615aa1d33e72f10 );
434 0x0180010101010101, 0x0000000000000000, 0x2055123350c00858 );
436 0x0140010101010101, 0x0000000000000000, 0xdf3b99d6577397c8 );
438 0x0120010101010101, 0x0000000000000000, 0x31fe17369b5288c9 );
440 0x0110010101010101, 0x0000000000000000, 0xdfdd3cc64dae1642 );
442 0x0108010101010101, 0x0000000000000000, 0x178c83ce2b399d94 );
444 0x0104010101010101, 0x0000000000000000, 0x50f636324a9b7f80 );
446 0x0102010101010101, 0x0000000000000000, 0xa8468ee3bc18f06d );
448 0x0101800101010101, 0x0000000000000000, 0xa2dc9e92fd3cde92 );
450 0x0101400101010101, 0x0000000000000000, 0xcac09f797d031287 );
452 0x0101200101010101, 0x0000000000000000, 0x90ba680b22aeb525 );
454 0x0101100101010101, 0x0000000000000000, 0xce7a24f350e280b6 );
456 0x0101080101010101, 0x0000000000000000, 0x882bff0aa01a0b87 );
458 0x0101040101010101, 0x0000000000000000, 0x25610288924511c2 );
460 0x0101020101010101, 0x0000000000000000, 0xc71516c29c75d170 );
462 0x0101018001010101, 0x0000000000000000, 0x5199c29a52c9f059 );
464 0x0101014001010101, 0x0000000000000000, 0xc22f0a294a71f29f );
466 0x0101012001010101, 0x0000000000000000, 0xee371483714c02ea );
468 0x0101011001010101, 0x0000000000000000, 0xa81fbd448f9e522f );
470 0x0101010801010101, 0x0000000000000000, 0x4f644c92e192dfed );
472 0x0101010401010101, 0x0000000000000000, 0x1afa9a66a6df92ae );
474 0x0101010201010101, 0x0000000000000000, 0xb3c1cc715cb879d8 );
476 0x0101010180010101, 0x0000000000000000, 0x19d032e64ab0bd8b );
478 0x0101010140010101, 0x0000000000000000, 0x3cfaa7a7dc8720dc );
480 0x0101010120010101, 0x0000000000000000, 0xb7265f7f447ac6f3 );
482 0x0101010110010101, 0x0000000000000000, 0x9db73b3c0d163f54 );
484 0x0101010108010101, 0x0000000000000000, 0x8181b65babf4a975 );
486 0x0101010104010101, 0x0000000000000000, 0x93c9b64042eaa240 );
488 0x0101010102010101, 0x0000000000000000, 0x5570530829705592 );
490 0x0101010101800101, 0x0000000000000000, 0x8638809e878787a0 );
492 0x0101010101400101, 0x0000000000000000, 0x41b9a79af79ac208 );
494 0x0101010101200101, 0x0000000000000000, 0x7a9be42f2009a892 );
496 0x0101010101100101, 0x0000000000000000, 0x29038d56ba6d2745 );
498 0x0101010101080101, 0x0000000000000000, 0x5495c6abf1e5df51 );
500 0x0101010101040101, 0x0000000000000000, 0xae13dbd561488933 );
502 0x0101010101020101, 0x0000000000000000, 0x024d1ffa8904e389 );
504 0x0101010101018001, 0x0000000000000000, 0xd1399712f99bf02e );
506 0x0101010101014001, 0x0000000000000000, 0x14c1d7c1cffec79e );
508 0x0101010101012001, 0x0000000000000000, 0x1de5279dae3bed6f );
510 0x0101010101011001, 0x0000000000000000, 0xe941a33f85501303 );
512 0x0101010101010801, 0x0000000000000000, 0xda99dbbc9a03f379 );
514 0x0101010101010401, 0x0000000000000000, 0xb7fc92f91d8e92e9 );
516 0x0101010101010201, 0x0000000000000000, 0xae8e5caa3ca04e85 );
518 0x0101010101010180, 0x0000000000000000, 0x9cc62df43b6eed74 );
520 0x0101010101010140, 0x0000000000000000, 0xd863dbb5c59a91a0 );
522 0x0101010101010120, 0x0000000000000000, 0xa1ab2190545b91d7 );
524 0x0101010101010110, 0x0000000000000000, 0x0875041e64c570f7 );
526 0x0101010101010108, 0x0000000000000000, 0x5a594528bebef1cc );
528 0x0101010101010104, 0x0000000000000000, 0xfcdb3291de21f0c0 );
530 0x0101010101010102, 0x0000000000000000, 0x869efd7f9f265a09 );
540 0x7ca110454a1a6e57, 0x01a1d6d039776742, 0x690f5b0d9a26939b );
542 0x0131d9619dc1376e, 0x5cd54ca83def57da, 0x7a389d10354bd271 );
544 0x07a1133e4a0b2686, 0x0248d43806f67172, 0x868ebb51cab4599a );
546 0x3849674c2602319e, 0x51454b582ddf440a, 0x7178876e01f19b2a );
548 0x04b915ba43feb5b6, 0x42fd443059577fa2, 0xaf37fb421f8c4095 );
550 0x0113b970fd34f2ce, 0x059b5e0851cf143a, 0x86a560f10ec6d85b );
552 0x0170f175468fb5e6, 0x0756d8e0774761d2, 0x0cd3da020021dc09 );
554 0x43297fad38e373fe, 0x762514b829bf486a, 0xea676b2cb7db2b7a );
556 0x07a7137045da2a16, 0x3bdd119049372802, 0xdfd64a815caf1a0f );
558 0x04689104c2fd3b2f, 0x26955f6835af609a, 0x5c513c9c4886c088 );
560 0x37d06bb516cb7546, 0x164d5e404f275232, 0x0a2aeeae3ff4ab77 );
562 0x1f08260d1ac2465e, 0x6b056e18759f5cca, 0xef1bf03e5dfa575a );
564 0x584023641aba6176, 0x004bd6ef09176062, 0x88bf0db6d70dee56 );
566 0x025816164629b007, 0x480d39006ee762f2, 0xa1f9915541020b56 );
568 0x49793ebc79b3258f, 0x437540c8698f3cfa, 0x6fbf1cafcffd0556 );
570 0x4fb05e1515ab73a7, 0x072d43a077075292, 0x2f22e49bab7ca1ac );
572 0x49e95d6d4ca229bf, 0x02fe55778117f12a, 0x5a6b612cc26cce4a );
574 0x018310dc409b26d6, 0x1d9d5c5018f728c2, 0x5f4c038ed12b2e41 );
576 0x1c587f1c13924fef, 0x305532286d6f295a, 0x63fac0d034d9f793 );
584 KEY ( 0x6e, 0x6f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79 ),
586 PLAINTEXT ( 0x53, 0x6f, 0x20, 0x63, 0x75, 0x74, 0x65, 0x20,
587 0x74, 0x6f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x61,
588 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
589 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77,
590 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x6f,
591 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x63, 0x74,
592 0x75, 0x61, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65,
593 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x21, 0x21 ),
594 CIPHERTEXT ( 0x1a, 0x02, 0x17, 0xcb, 0x93, 0xa3, 0xd2, 0xf2,
595 0xf9, 0x45, 0x71, 0x1c, 0x33, 0xb1, 0x5c, 0xa4,
596 0x8b, 0x6b, 0x11, 0x7a, 0x7c, 0x86, 0x7c, 0x7f,
597 0x9f, 0x56, 0x61, 0x46, 0x7f, 0xa6, 0xae, 0xf1,
598 0x49, 0xf7, 0x53, 0xe0, 0xbc, 0x15, 0x6a, 0x30,
599 0xe7, 0xf8, 0xf3, 0x29, 0x11, 0xd8, 0x7d, 0x04,
600 0x62, 0x5a, 0xaa, 0xa1, 0x89, 0x61, 0x4c, 0xf6,
601 0x5a, 0x47, 0x3b, 0xc6, 0x04, 0x15, 0xce, 0xf6 ),
604 KEY ( 0x6e, 0x6f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79 ),
605 IV ( 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 ),
607 PLAINTEXT ( 0x53, 0x6f, 0x20, 0x63, 0x75, 0x74, 0x65, 0x20,
608 0x74, 0x6f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x61,
609 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
610 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77,
611 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x6f,
612 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x63, 0x74,
613 0x75, 0x61, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65,
614 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x21, 0x21 ),
615 CIPHERTEXT ( 0x4c, 0x5f, 0x62, 0xfc, 0xf4, 0x93, 0x09, 0xb5,
616 0x1d, 0x52, 0x25, 0xec, 0xc7, 0x42, 0x3c, 0x29,
617 0x33, 0x67, 0xf5, 0xe9, 0xd6, 0x3c, 0x27, 0x5b,
618 0x49, 0x69, 0xc5, 0xa9, 0x08, 0xa3, 0x14, 0x66,
619 0x3c, 0x95, 0x33, 0x30, 0xcf, 0x3c, 0x7c, 0xaf,
620 0xa3, 0xe4, 0xf8, 0x2e, 0xc3, 0x55, 0x57, 0x81,
621 0x33, 0xd9, 0x90, 0xe2, 0x99, 0xdc, 0x32, 0x10,
622 0x13, 0x21, 0xb6, 0xc1, 0x6b, 0x0f, 0x22, 0xa9 ),
884 DBG (
"DES-ECB encryption required %ld cycles per byte\n",
886 DBG (
"DES-ECB decryption required %ld cycles per byte\n",
888 DBG (
"DES-CBC encryption required %ld cycles per byte\n",
890 DBG (
"DES-CBC decryption required %ld cycles per byte\n",
#define AUTH(...)
Define inline authentication tag.
#define IV(...)
Define inline initialisation vector.
#define DES_TEST(name, key, plaintext, ciphertext)
Define a DES test.
#define CIPHERTEXT(...)
Define inline ciphertext data.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define PLAINTEXT(...)
Define inline plaintext data.
Self-test infrastructure.
const char * name
Test set name.
struct cipher_algorithm des_cbc_algorithm
CIPHER_TEST(des_unofficial_ecb, &des_ecb_algorithm, KEY(0x6e, 0x6f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79), IV(), ADDITIONAL(), PLAINTEXT(0x53, 0x6f, 0x20, 0x63, 0x75, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x21, 0x21), CIPHERTEXT(0x1a, 0x02, 0x17, 0xcb, 0x93, 0xa3, 0xd2, 0xf2, 0xf9, 0x45, 0x71, 0x1c, 0x33, 0xb1, 0x5c, 0xa4, 0x8b, 0x6b, 0x11, 0x7a, 0x7c, 0x86, 0x7c, 0x7f, 0x9f, 0x56, 0x61, 0x46, 0x7f, 0xa6, 0xae, 0xf1, 0x49, 0xf7, 0x53, 0xe0, 0xbc, 0x15, 0x6a, 0x30, 0xe7, 0xf8, 0xf3, 0x29, 0x11, 0xd8, 0x7d, 0x04, 0x62, 0x5a, 0xaa, 0xa1, 0x89, 0x61, 0x4c, 0xf6, 0x5a, 0x47, 0x3b, 0xc6, 0x04, 0x15, 0xce, 0xf6), AUTH())
unsigned long cipher_cost_decrypt(struct cipher_algorithm *cipher, size_t key_len)
Calculate cipher decryption cost.
#define KEY(...)
Define inline key.
static void des_test_exec(void)
Perform DES self-test.
struct cipher_algorithm des_ecb_algorithm
#define cipher_ok(test)
Report a cipher encryption and decryption test result.
struct self_test des_test __self_test
DES self-test.
#define ADDITIONAL(...)
Define inline additional data.
#define DBG(...)
Print a debugging message.
unsigned long cipher_cost_encrypt(struct cipher_algorithm *cipher, size_t key_len)
Calculate cipher encryption cost.