X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=cscipher%2Fcscipher_small.c;h=640bcf271bb373408f08d61436d82bf276dc8c67;hb=701cee0d98aab48dd3192c8cc7c77eb42581bc56;hp=9e8b297f7598154b7fc778806699b34e20a4dceb;hpb=548902530e99ffda615113aee335956ea92aab7c;p=avr-crypto-lib.git diff --git a/cscipher/cscipher_small.c b/cscipher/cscipher_small.c index 9e8b297..640bcf2 100644 --- a/cscipher/cscipher_small.c +++ b/cscipher/cscipher_small.c @@ -57,11 +57,11 @@ uint8_t p(uint8_t a){ #define P(a) pgm_read_byte(cscipher_sbox+(a)) #endif -static uint8_t round_const[] PROGMEM = { +static const uint8_t round_const[] PROGMEM = { 0xb7, 0xe1, 0x51, 0x62, 0x8a, 0xed, 0x2a, 0x6a, 0xbf, 0x71, 0x58, 0x80, 0x9c, 0xf4, 0xf3, 0xc7 }; -static uint8_t ks_const[] PROGMEM = { +static const uint8_t ks_const[] PROGMEM = { 0x29,0x0d,0x61,0x40,0x9c,0xeb,0x9e,0x8f, 0x1f,0x85,0x5f,0x58,0x5b,0x01,0x39,0x86, 0x97,0x2e,0xd7,0xd6,0x35,0xae,0x17,0x16, @@ -148,7 +148,7 @@ void cscipher_dec(void* buffer, const cscipher_ctx_t* ctx){ void cscipher_init(const void* key, cscipher_ctx_t* ctx){ uint8_t tmp_key[16], tmp[8]; - uint8_t i,j,k,t; + uint8_t i,j,k,t=0; memcpy(tmp_key, key, 16); for(i=0; i<9; ++i){ #if DEBUG