summaryrefslogtreecommitdiff
path: root/python-3-changes.txt
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-05-04 23:29:37 -0700
committerDwayne Litzenberger <dlitz@dlitz.net>2013-05-05 01:45:23 -0700
commitc273b6c237303cf6d09f5d33bdb58113df4dc679 (patch)
treea51642bea9b0b02b1043646a8eeba5d42e0c0a41 /python-3-changes.txt
parent4ce0dd74b36af9f96747da650aed84bbe93c76df (diff)
downloadpycrypto-bugfixes-wip.tar.gz
[Fix LP#1176482] Restore previous behavior of the block cipher 'IV' attributebugfixes-wip
PEP 272 describes the behavior of the block cipher 'IV' attribute as follows: IV Contains the initial value which will be used to start a cipher feedback mode; it will always be a string exactly one block in length. After encrypting or decrypting a string, this value is updated to reflect the modified feedback text. It is read-only, and cannot be assigned a new value. In versions of PyCrypto prior to 2.6, the implementation of the 'IV' attribute matched this description, except that the attribute was also writable and could modify the behavior of the cipher. In PyCrypto 2.6, this behavior was changed: The 'IV' attribute was no longer updated during encryptions and decryptions, and writing to it no longer had any effect. PyCrypto 2.5 and below: >>> from Crypto.Cipher import AES >>> ciph = AES.new("\0"*16, AES.MODE_CBC, "ABCDEFGHIJKLMNOP") >>> ciph.encrypt("\0"*16) 'a\xd7\x82X\xeb\x1a\xbdo\xffG\x9d\x1d\xab\xb6\x10;' >>> ciph.IV 'a\xd7\x82X\xeb\x1a\xbdo\xffG\x9d\x1d\xab\xb6\x10;' PyCrypto 2.6: >>> from Crypto.Cipher import AES >>> ciph = AES.new("\0"*16, AES.MODE_CBC, "ABCDEFGHIJKLMNOP") >>> ciph.encrypt("\0"*16) 'a\xd7\x82X\xeb\x1a\xbdo\xffG\x9d\x1d\xab\xb6\x10;' >>> ciph.IV 'ABCDEFGHIJKLMNOP' The bug was introduced at the same time that we introduced Python wrappers around the native C objects. Bug introduced: commit 6f9fe103a582999c397f7bc8a2248613a207b780 Bug report: https://bugs.launchpad.net/pycrypto/+bug/1176482 This commit restores the previous (PyCrypto 2.5) behavior.
Diffstat (limited to 'python-3-changes.txt')
0 files changed, 0 insertions, 0 deletions