gnu: python-babel: Update to 2.7.0.
[guix.git] / gnu / packages / patches / python-axolotl-AES-fix.patch
blobd34f4855cb555b42a6faf0ae020a3923619f468c
1 Patch taken from the Debian package for python-axolotl-0.1.39.
2 See <https://bugs.gnu.org/29415>.
4 Description: Removes IV paramenter from AES constructor, since it is not necessary for ctr mode.
5 Author: Josue Ortega <josue@debian.org>
6 Last-Update: 2017-04-13
8 --- a/axolotl/sessioncipher.py
9 +++ b/axolotl/sessioncipher.py
10 @@ -228,13 +228,7 @@
11 # counterint = struct.unpack(">L", counterbytes)[0]
12 # counterint = int.from_bytes(counterbytes, byteorder='big')
13 ctr = Counter.new(128, initial_value=counter)
15 - # cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
16 - ivBytes = bytearray(16)
17 - ByteUtil.intToByteArray(ivBytes, 0, counter)
19 - cipher = AES.new(key, AES.MODE_CTR, IV=bytes(ivBytes), counter=ctr)
21 + cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
22 return cipher