serpent_genctx(key, keysize&0xff, ctx);
}
-void testrun_serpent(void){
- nessie_ctx.blocksize_B = 16;
- nessie_ctx.keysize = 128;
- nessie_ctx.name = cipher_name;
- nessie_ctx.ctx_size_B = sizeof(serpent_ctx_t);
- nessie_ctx.cipher_enc = serpent_enc;
- nessie_ctx.cipher_dec = serpent_dec;
- nessie_ctx.cipher_genctx = serpent_genctx_dummy;
+void testrun_nessie_serpent(void){
+ nessie_bc_ctx.blocksize_B = 16;
+ nessie_bc_ctx.keysize_b = 128;
+ nessie_bc_ctx.name = cipher_name;
+ nessie_bc_ctx.ctx_size_B = sizeof(serpent_ctx_t);
+ nessie_bc_ctx.cipher_enc = (nessie_bc_enc_fpt)serpent_enc;
+ nessie_bc_ctx.cipher_dec = (nessie_bc_dec_fpt)serpent_dec;
+ nessie_bc_ctx.cipher_genctx = (nessie_bc_gen_fpt)serpent_genctx_dummy;
- nessie_run();
+ nessie_bc_run();
- nessie_ctx.keysize = 192;
- nessie_run();
-
- nessie_ctx.keysize = 256;
- nessie_run();
+ nessie_bc_ctx.keysize_b = 192;
+ nessie_bc_run();
+ nessie_bc_ctx.keysize_b = 256;
+ nessie_bc_run();
}
restart:
while(1){
if (!getnextwordn(str,20)) {DEBUG_S("DBG: W1\r\n"); goto error;}
- if (strcmp(str, "test")) {DEBUG_S("DBG: 1b\r\n"); goto error;}
- testrun_serpent();
+ if (strcmp(str, "nessie")) {DEBUG_S("DBG: 1b\r\n"); goto error;}
+ testrun_nessie_serpent();
goto restart;
continue;
error:
uart_putstr("ERROR\r\n");
}
-
}