2 * Written in 2013 by Gregor Pintar <grpintar@gmail.com>
4 * To the extent possible under law, the author(s) have dedicated
5 * all copyright and related and neighboring rights to this software
6 * to the public domain worldwide.
8 * This software is distributed without any warranty.
10 * You should have received a copy of the CC0 Public Domain Dedication.
11 * If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
17 #include <kripto/block/skipjack.h>
26 0x00, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11
30 0x33, 0x22, 0x11, 0x00, 0xDD, 0xCC, 0xBB, 0xAA
34 0x25, 0x87, 0xCA, 0xE2, 0x7A, 0x12, 0xD3, 0x00
37 puts("kripto_block_skipjack");
39 s
= kripto_block_create(kripto_block_skipjack
, 0, k
, 10);
42 kripto_block_encrypt(s
, pt
, t
);
43 for(i
= 0; i
< 8; i
++) if(t
[i
] != ct
[i
])
45 puts("encrypt: FAIL");
48 if(i
== 8) puts("encrypt: OK");
50 kripto_block_decrypt(s
, ct
, t
);
51 for(i
= 0; i
< 8; i
++) if(t
[i
] != pt
[i
])
53 puts("decrypt: FAIL");
56 if(i
== 8) puts("decrypt: OK");
58 kripto_block_destroy(s
);