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_bc_ctx.blocksize_B = 16;
28 nessie_bc_ctx.keysize_b = 128;
29 nessie_bc_ctx.name = cipher_name;
30 nessie_bc_ctx.ctx_size_B = sizeof(serpent_ctx_t);
31 nessie_bc_ctx.cipher_enc = (nessie_bc_enc_fpt)serpent_enc;
32 nessie_bc_ctx.cipher_dec = (nessie_bc_dec_fpt)serpent_dec;
33 nessie_bc_ctx.cipher_genctx = (nessie_bc_gen_fpt)serpent_genctx_dummy;
37 nessie_bc_ctx.keysize_b = 192;
40 nessie_bc_ctx.keysize_b = 256;
46 /*****************************************************************************
48 *****************************************************************************/
55 uart_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
56 uart_putstr(cipher_name);
57 uart_putstr_P(PSTR(")\r\nloaded and running\r\n"));
61 if (!getnextwordn(str,20)) {DEBUG_S("DBG: W1\r\n"); goto error;}
62 if (strcmp(str, "nessie")) {DEBUG_S("DBG: 1b\r\n"); goto error;}
63 testrun_nessie_serpent();
67 uart_putstr("ERROR\r\n");