7 #include "serial-tools.h"
12 #include "nessie_bc_test.h"
17 char* cipher_name = "Serpent";
19 /*****************************************************************************
20 * additional validation-functions *
21 *****************************************************************************/
22 void serpent_genctx_dummy(uint8_t* key, uint16_t keysize, void* ctx){
23 serpent_genctx(key, keysize&0xff, ctx);
26 void testrun_nessie_serpent(void){
27 nessie_ctx.blocksize_B = 16;
28 nessie_ctx.keysize = 128;
29 nessie_ctx.name = cipher_name;
30 nessie_ctx.ctx_size_B = sizeof(serpent_ctx_t);
31 nessie_ctx.cipher_enc = (nessie_enc_fpt)serpent_enc;
32 nessie_ctx.cipher_dec = (nessie_dec_fpt)serpent_dec;
33 nessie_ctx.cipher_genctx = (nessie_gen_fpt)serpent_genctx_dummy;
37 nessie_ctx.keysize = 192;
40 nessie_ctx.keysize = 256;
47 /*****************************************************************************
49 *****************************************************************************/
56 uart_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
57 uart_putstr(cipher_name);
58 uart_putstr_P(PSTR(")\r\nloaded and running\r\n"));
62 if (!getnextwordn(str,20)) {DEBUG_S("DBG: W1\r\n"); goto error;}
63 if (strcmp(str, "nessie")) {DEBUG_S("DBG: 1b\r\n"); goto error;}
64 testrun_nessie_serpent();
68 uart_putstr("ERROR\r\n");