[pycrypto] PyCrypto's output doesn't match OpenSSL's result

Webie assie181 at gmail.com
Tue Jun 5 01:29:25 EDT 2012


On Mon, Jun 4, 2012 at 10:56 PM, Legrandin
<gooksankoo at hoiptorrow.mailexpire.com> wrote:
> 2012/6/4 Webie <assie181 at gmail.com>
>> PyCrypto's output doesn't match OpenSSL when decrypting a file in
>> Blowfish CFB mode. To reproduce this, download and test
>> http://dl.dropbox.com/u/1522424/PyCrypto-strange.tar.
>>
>
> Both are correct. The fact is that they use different default segment sizes
> for CFB:
> PyCrypto uses 8 bits, and OpenSSL 64 bits.
>
> With:
>
> bf = Blowfish.new(key = key, mode = Blowfish.MODE_CFB, IV = iv,
>        segment_size=64)
>
> You will get the same result.


Using "segment_size=64" solved the problem. Thanks!


More information about the pycrypto mailing list