X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/3e754886bcfe700a4fd29e9ec33fbbc1598eebf1..c8ade3a0564c33e550ca7d51195945fcebd76b4b:/LightweightARM/LWARM/lwarm.cpp?ds=sidebyside diff --git a/LightweightARM/LWARM/lwarm.cpp b/LightweightARM/LWARM/lwarm.cpp index 8bb9da4..8a736a4 100644 --- a/LightweightARM/LWARM/lwarm.cpp +++ b/LightweightARM/LWARM/lwarm.cpp @@ -418,7 +418,7 @@ void KeyExpansion(uchar *RoundKey, uchar *key, int NN ) } // All other round keys are found from the previous round keys. - while (i < 160) + while (i < 256) { for(j=0;j<4;j++) { @@ -710,7 +710,10 @@ int main(int argc, char** argv) { int NN=128; - unsigned char RoundKey[240]; + unsigned char RoundKey[256]; + for(int i=0;i<256;i++) { + RoundKey[i]=0; + } for(int i=1; i