X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=twister%2Ftwister-large.c;h=36506be6d29231ff95cb38e4ebcc4aa0c5898e8d;hb=cc26d167f796adaa33ca3cbec8016f7915b6033b;hp=3455b5e8322b2b87c802d379d2d0bba10836b6e0;hpb=7b5401ab9ce23a5da1de8b6c7de3a1aa20ac4cf8;p=avr-crypto-lib.git diff --git a/twister/twister-large.c b/twister/twister-large.c index 3455b5e..36506be 100644 --- a/twister/twister-large.c +++ b/twister/twister-large.c @@ -19,7 +19,7 @@ #include #include -#include "memxor/memxor.h" +#include "memxor.h" #include "twister.h" #include "twister-large.h" @@ -109,7 +109,11 @@ void twister_large_nextBlock(twister_large_ctx_t* ctx, const void* msg){ /*********************************************************************/ void twister_inject_chksum(twister_large_ctx_t* ctx, uint8_t col){ - *((uint64_t*)(&ctx->state.s[7][0])) ^= *((uint64_t*)(&ctx->checksum[col][0])); + uint8_t i=7; + do{ + ctx->state.s[7][i] ^= ctx->checksum[col][i]; + + }while(i--); twister_blank_round(&ctx->state); }