X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=groestl_small.c;h=e5a3d9422393761add7bd59f0f6ac2b5b658d449;hb=951a88cde69f595ef2c00ed941e89ccf1567e3a0;hp=caf368b1c6f67bbbac8a7bd3b9e5491171023ca9;hpb=dbbf324199b1aa27be910e00e1aad5e991d70e98;p=avr-crypto-lib.git diff --git a/groestl_small.c b/groestl_small.c index caf368b..e5a3d94 100644 --- a/groestl_small.c +++ b/groestl_small.c @@ -54,7 +54,7 @@ #define dump_m(m) #endif -uint8_t matrix[] PROGMEM = { +static uint8_t matrix[] PROGMEM = { 2, 2, 3, 4, 5, 3, 5, 7, 7, 2, 2, 3, 4, 5, 3, 5, 5, 7, 2, 2, 3, 4, 5, 3, @@ -131,7 +131,7 @@ void groestl256_init(groestl256_ctx_t* ctx){ } void groestl_small_nextBlock(groestl_small_ctx_t* ctx, const void* block){ - uint8_t tmp1[64], tmp2[65]; + uint8_t tmp1[64], tmp2[64]; /* for(i=0; i<8; ++i){ for(j=0; j<8; ++j){ tmp1[j*8+i] = ((uint8_t*)block)[i*8+j]; @@ -152,7 +152,7 @@ void groestl_small_lastBlock(groestl_small_ctx_t* ctx, const void* block, uint16 uint8_t buffer[64]; while(length_b>=GROESTL_SMALL_BLOCKSIZE){ groestl_small_nextBlock(ctx, block); - length_b -= GROESTL224_BLOCKSIZE; + length_b -= GROESTL_SMALL_BLOCKSIZE; block = (uint8_t*)block + GROESTL_SMALL_BLOCKSIZE_B; } memset(buffer, 0, 64);