X-Git-Url: https://git.cryptolib.org/avr-crypto-lib.git?a=blobdiff_plain;f=jh%2Fjh_simple_small_core.c;h=5e5fe4f20b969709a8c1732ab684df51615b0d9b;hb=701cee0d98aab48dd3192c8cc7c77eb42581bc56;hp=907d48afdccc251ac3c0168e3748a3ec3002ab28;hpb=21bfb1fb168b3114f675f34e257b6acc557b2de8;p=avr-crypto-lib.git diff --git a/jh/jh_simple_small_core.c b/jh/jh_simple_small_core.c index 907d48a..5e5fe4f 100644 --- a/jh/jh_simple_small_core.c +++ b/jh/jh_simple_small_core.c @@ -30,12 +30,12 @@ #include "cli.h" #endif -static uint8_t sbox0[] PROGMEM = +const static uint8_t sbox0[] PROGMEM = { 9, 0, 4, 11, 13, 12, 3, 15, 1, 10, 2, 6, 7, 5, 8, 14 }; -static uint8_t sbox1[] PROGMEM = +const static uint8_t sbox1[] PROGMEM = { 3, 12, 6, 13, 5, 7, 1, 9, 15, 2, 0, 4, 11, 10, 14, 8 }; -static uint8_t round_const_0[] PROGMEM = { +const static uint8_t round_const_0[] PROGMEM = { 0x6a, 0x09, 0xe6, 0x67, 0xf3, 0xbc, 0xc9, 0x08, 0xb2, 0xfb, 0x13, 0x66, 0xea, 0x95, 0x7d, 0x3e, 0x3a, 0xde, 0xc1, 0x75, 0x12, 0x77, 0x50, 0x99, @@ -52,7 +52,7 @@ uint8_t jh_l(uint8_t v, uint8_t w){ static void jh_round(uint8_t* a, const uint8_t* rc){ uint8_t b[128]; - uint8_t i,r,x,y; + uint8_t i,r=0,x,y; for(i=0; i<128; ++i){ if(i%4==0){ r = rc[i/4];