DES3-CBC gotcha encrypt/decrypt on same object

Bug #673120 reported by ine ya
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

I just spent quite a while trying to use the same object to encrypt something and decrypt the result. As I later figured out, this doesn't work and although this is not a bug, I would kindly ask to mention this in documentation, possibly to include example similar to one below.


from Crypto.Cipher import DES3'a'*16, DES3.MODE_CBC)
plain="Guido van Rossum is a space alien."

print repr(ciph)'a'*16, DES3.MODE_CBC)

print obj.decrypt(ciph) # doesn't work -> avoid!
print obj2.decrypt(ciph) # works

Revision history for this message
Darsey Litzenberger (dlitz) wrote :
Changed in pycrypto:
status: New → Fix Committed
Revision history for this message
Darsey Litzenberger (dlitz) wrote :

Released in PyCrypto 2.4.

Changed in pycrypto:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.