7 #include "serial-tools.h"
17 /*****************************************************************************
18 * additional validation-functions *
19 *****************************************************************************/
21 /*****************************************************************************
23 *****************************************************************************/
25 void testencrypt(uint8_t* block, uint8_t* key){
26 uart_putstr("\r\n==testy-encrypt==\r\n key: ");
28 uart_putstr("\r\n plain: ");
29 uart_hexdump(block,8);
30 skipjack_enc(block,key);
31 uart_putstr("\r\n crypt: ");
32 uart_hexdump(block,8);
35 void testdecrypt(uint8_t* block, uint8_t* key){
36 uart_putstr("\r\n==testy-decrypt==\r\n key: ");
38 uart_putstr("\r\n crypt: ");
39 uart_hexdump(block,8);
40 skipjack_dec(block,key);
41 uart_putstr("\r\n plain: ");
42 uart_hexdump(block,8);
45 void testrun_skipjack(void){
46 uint8_t key[]={ 0x00, 0x99, 0x88, 0x77, 0x66,
47 0x55, 0x44, 0x33, 0x22, 0x11};
48 uint8_t data[]={ 0x33, 0x22, 0x11, 0x00, 0xdd, 0xcc, 0xbb, 0xaa};
49 testencrypt(data,key);
50 testdecrypt(data,key);
55 /*****************************************************************************
57 *****************************************************************************/
65 uart_putstr("\r\n\r\nCrypto-VS (skipjack)\r\nloaded and running\r\n");
69 if (!getnextwordn(str,20)) {DEBUG_S("DBG: W1\r\n"); goto error;}
70 if (strcmp(str, "test")) {DEBUG_S("DBG: 1b\r\n"); goto error;}
75 uart_putstr("ERROR\r\n");