aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-axolotl-AES-fix.patch
blob: d34f4855cb555b42a6faf0ae020a3923619f468c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Patch taken from the Debian package for python-axolotl-0.1.39.
See <https://bugs.gnu.org/29415>.

Description: Removes IV paramenter from AES constructor, since it is not necessary for ctr mode.
Author: Josue Ortega <josue@debian.org>
Last-Update: 2017-04-13

--- a/axolotl/sessioncipher.py
+++ b/axolotl/sessioncipher.py
@@ -228,13 +228,7 @@
         # counterint = struct.unpack(">L", counterbytes)[0]
         # counterint = int.from_bytes(counterbytes, byteorder='big')
         ctr = Counter.new(128, initial_value=counter)
-
-        # cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
-        ivBytes = bytearray(16)
-        ByteUtil.intToByteArray(ivBytes, 0, counter)
-
-        cipher = AES.new(key, AES.MODE_CTR, IV=bytes(ivBytes), counter=ctr)
-
+        cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
         return cipher
 
 

© 2015 - 2026 Jakob L. Kreuze

(define-module (gnu packages cppi) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix licenses)) (define-public cppi (package (name "cppi") (version "1.18") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/cppi/cppi-" version ".tar.xz")) (sha256 (base32 "1jk42cjaggk71rimjnx3qpmb6hivps0917vl3z7wbxk3i2whb98j")))) (build-system gnu-build-system) (home-page "https://www.gnu.org/software/cppi/") (synopsis "Indent C preprocessor directives to reflect nesting and more") (description "GNU Cppi processes C source code files to properly indent the preprocessor directives to reflect their nesting. It also performs other standardizations, such as correcting the number of spaces between directives and the text following them.") (license gpl3+)))

© 2015 - 2026 Jakob L. Kreuze