[pycrypto] Base64 encoded output differs from pycrypto and as3crypto libraries.

Thorsten Behrens sbehrens at gmx.li
Wed Jan 12 14:32:44 CST 2011


Hey Lorenz,

I notice that we don't use Schneier's CBC test vector. All we use is ECB.
I tried adding CBC, and got errors. Running it manually, I get errors. 
Can you sanity-check that I'm not doing something stupid. If I'm 
invoking it right and it's failing, we need to review the CBC code.

 >>> B = 
Blowfish.new(binascii.a2b_hex('0123456789ABCDEFF0E1D2C3B4A59687'),Blowfish.MODE_CBC,binascii.a2b_hex('FEDCBA9876543210'))
 >>> S = 
binascii.a2b_hex('37363534333231204E6F77206973207468652074696D6520666F722000')
 >>> X = B.encrypt(S)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ValueError: Input strings must be a multiple of 8 in length

Thorsten



More information about the pycrypto mailing list