X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=main-serpent-test.c;h=2f0f22250313ee121d3d2106a586f42f801a4ed7;hb=222f3914d6308961e4e3d04ec0ea5e9ae652a1f9;hp=6e2ce8cc53c29e581544fc0528a6e5af0f12f91b;hpb=6725841b72687bd3ede509c41ac50746c6bd1828;p=avr-crypto-lib.git diff --git a/main-serpent-test.c b/main-serpent-test.c index 6e2ce8c..2f0f222 100644 --- a/main-serpent-test.c +++ b/main-serpent-test.c @@ -23,14 +23,14 @@ void serpent_genctx_dummy(uint8_t* key, uint16_t keysize, void* ctx){ serpent_genctx(key, keysize&0xff, ctx); } -void testrun_serpent(void){ +void testrun_nessie_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; + nessie_ctx.cipher_enc = (nessie_enc_fpt)serpent_enc; + nessie_ctx.cipher_dec = (nessie_dec_fpt)serpent_dec; + nessie_ctx.cipher_genctx = (nessie_gen_fpt)serpent_genctx_dummy; nessie_run(); @@ -60,14 +60,13 @@ int main (void){ 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"); } - }