Commit | Line | Data |
---|---|---|
51f887f3 AVY |
1 | Patch taken from the Debian package for python-axolotl-0.1.39. |
2 | See <https://bugs.gnu.org/29415>. | |
3 | ||
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 | |
7 | ||
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) | |
14 | - | |
15 | - # cipher = AES.new(key, AES.MODE_CTR, counter=ctr) | |
16 | - ivBytes = bytearray(16) | |
17 | - ByteUtil.intToByteArray(ivBytes, 0, counter) | |
18 | - | |
19 | - cipher = AES.new(key, AES.MODE_CTR, IV=bytes(ivBytes), counter=ctr) | |
20 | - | |
21 | + cipher = AES.new(key, AES.MODE_CTR, counter=ctr) | |
22 | return cipher | |
23 | ||
24 |