X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=twister%2Ftwister.c;h=b19c0d0f6257a91e0df023d37a8833b9238a3d3b;hb=701cee0d98aab48dd3192c8cc7c77eb42581bc56;hp=c82e22ea5dec05a9373eb67f87ac338bb2e86796;hpb=4f50c75ee5a6cc88bf7ea71957ed509e298e6c25;p=avr-crypto-lib.git diff --git a/twister/twister.c b/twister/twister.c index c82e22e..b19c0d0 100644 --- a/twister/twister.c +++ b/twister/twister.c @@ -26,7 +26,7 @@ #include "memxor.h" //#ifndef TWISTER_MUL_TABLE -# include "gf256mul.h" +# include "gf256mul/gf256mul.h" //#endif #define MDS(a,b) pgm_read_byte(&(twister_mds[(a)][(b)])) @@ -107,7 +107,7 @@ void twister_ctx2hash(void* dest, twister_state_t* ctx, uint16_t hashsize_b){ memxor(ctx->s, tmp, 64); twister_blank_round(ctx); for(j=0; j<4; ++j){ - *((uint8_t*)dest) = ctx->s[3-j][0] ^ tmp[3-j][0]; + *((uint8_t*)dest) = ctx->s[7-j][0] ^ tmp[7-j][0]; dest = (uint8_t*)dest + 1; } }