X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fnessie_stream_test.c;h=662259da15d44a48f686665e9362148f2aa0cb4c;hb=66c915087d1f7b8eb7280be43c16e9588faf2e55;hp=9aecdbee3ba97ca29e968ed7467c0acc9485c3bd;hpb=17332291e15183d71d88ed868275e3cb53917180;p=avr-crypto-lib.git diff --git a/test_src/nessie_stream_test.c b/test_src/nessie_stream_test.c index 9aecdbe..662259d 100644 --- a/test_src/nessie_stream_test.c +++ b/test_src/nessie_stream_test.c @@ -1,6 +1,6 @@ /* nessie_stream_test.c */ /* - This file is part of the This file is part of the AVR-Crypto-Lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -29,22 +29,13 @@ #include #include "nessie_stream_test.h" #include "nessie_common.h" -#include "uart.h" +#include "memxor.h" nessie_stream_ctx_t nessie_stream_ctx; #define BLOCKSIZE_B 64 -static -void memxor(void* dest, void* src, uint8_t length){ - while(length--){ - *((uint8_t*)dest) ^= *((uint8_t*)src); - dest = (uint8_t*)dest +1; - src = (uint8_t*)src +1; - } -} - static void nessie_gen_block(void* ctx, uint8_t* block){ @@ -118,6 +109,7 @@ void nessie_stream_enc_large(uint8_t* key){ for(i=0; i<((65472-0)/BLOCKSIZE_B-1); ++i){ nessie_gen_block(ctx, buffer); memxor(xorbuffer, buffer, BLOCKSIZE_B); + NESSIE_SEND_ALIVE_A(i); } nessie_gen_block(ctx, buffer); @@ -131,6 +123,7 @@ void nessie_stream_enc_large(uint8_t* key){ for(i=0; i<((131008-65536)/BLOCKSIZE_B-1); ++i){ nessie_gen_block(ctx, buffer); memxor(xorbuffer, buffer, BLOCKSIZE_B); + NESSIE_SEND_ALIVE_A(i); } nessie_gen_block(ctx, buffer);