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

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


Got it, Schneier padded his test vector with NULLs. Will retest.

On 1/12/2011 3:32 PM, Thorsten Behrens wrote:
> 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
>
> _______________________________________________
> pycrypto mailing list
> pycrypto at lists.dlitz.net
> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>



More information about the pycrypto mailing list