]> git.cryptolib.org Git - avr-crypto-lib.git/commitdiff
[shavs-test-suite] fixing bug with wrong reported buffer size
authorbg <daniel.otte@rub.de>
Sun, 20 Jan 2013 21:51:18 +0000 (22:51 +0100)
committerbg <daniel.otte@rub.de>
Sun, 20 Jan 2013 21:51:18 +0000 (22:51 +0100)
test_src/main-keccak-test.c
test_src/shavs.c

index 501eb4b28e72234fafac0d94aa6698378f5c462b..127cb62d130297d4cb538ef586b034df768aae4f 100644 (file)
@@ -53,7 +53,7 @@ void test_256(void){
        keccak_ctx_t ctx;
        keccak256_init(&ctx);
        keccak_nextBlock(&ctx, null);
-       //      keccak_lastBlock(&ctx, data, 29);
+       keccak_lastBlock(&ctx, null, 29);
        keccak256_ctx2hash(hash, &ctx);
        cli_putstr_P(PSTR("\r\n testhash: "));
        cli_hexdump(hash, 32);
@@ -92,7 +92,7 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
        { NULL,                      NULL, NULL                      }
 };
 
-int main (void){
+int main(void){
     main_setup();
 
     shavs_algolist=(hfdesc_t**)algolist;
index 84cf9f2ce9de5aea5089ec5675c46ea99803d6c0..53fd488e6e24d798ae17a6e35c9ebeb827ab742e 100644 (file)
@@ -200,7 +200,7 @@ void shavs_test1(void){ /* KAT tests */
        shavs_ctx.buffersize_B=pgm_read_word(&(shavs_algo->blocksize_b))/8;
        uint8_t buffer[shavs_ctx.buffersize_B+5];
        shavs_ctx.buffer = buffer;
-       fprintf_P(shavs_out_file, PSTR("\nbuffer_size = 0x%04"PRIx16" bytes"));
+       fprintf_P(shavs_out_file, PSTR("\nbuffer_size = 0x%04"PRIx16" bytes"), shavs_ctx.buffersize_B);
        for(;;){
                shavs_ctx.blocks = 0;
                memset(buffer, 0, shavs_ctx.buffersize_B);