arenstar at gmail.com
Mon Feb 14 13:48:03 CST 2011
basically im either stupid or guessing something is wrong with the Mode_PGP of the Cipher AES class..
Let me explain..
I assumed that the class would follow the rfc 2440 ( OpenPGP Message Format)
Basically, in my laymans terms..
The IV is a random generated number, added as the first block of the ciphertext and used in CBC mode for the other blocks...
The IV added is zero's, The CBC continues finding the IV in the first block, which results in the following blocks to be deciphered correctly.. However when returning the plaintext it drops the first block of the plaintext garbage..
resulting in a correct message..
Im not sure if Pycrypto does this??? I tried and failed.. and i thought i should ask questions..
here is my basic code..
cipher = AES.new(secretkey,AES.MODE_PGP,vi)
cipher = AES.new(secretkey,AES.MODE_PGP)
Any suggestions on where to go????
More information about the pycrypto