Fork of François Berder Crypto, fixed AES CBC and small rework

Dependents:   AES_example shaun_larada Smartage

Fork of Crypto by Francois Berder

Files at this revision

API Documentation at this revision

Comitter:
Geremia
Date:
Wed Jan 28 17:55:13 2015 +0000
Parent:
15:6093fc19aad6
Commit message:
AES: bugfixed CBC, added PCBC (i could add CFB and OFB if needed), added public setIV(), moved keyExpansion() to public, in and out buffers can be the same

Changed in this revision

cipher/BlockCipher.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6093fc19aad6 -r 4399e2e6260b cipher/BlockCipher.cpp
--- a/cipher/BlockCipher.cpp	Wed Jan 28 17:15:32 2015 +0000
+++ b/cipher/BlockCipher.cpp	Wed Jan 28 17:55:13 2015 +0000
@@ -82,7 +82,6 @@
             memcpy(tmpIV, IV, blockSize);
             for(uint32_t i = 0; i < length; i += blockSize)
             {
-              //  if(mode==PCBC_MODE) memcpy(tmpdata, in+i, blockSize);
                 memcpy(tmpdatain, in+i, blockSize);
                 decryptBlock(out+i, tmpdatain);
                 for(int j = 0; j < blockSize; ++j) out[i+j] ^= tmpIV[j];