From c19271295a996011da85508d22c34ee34d49c6f1 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 19 Jan 2018 10:18:08 -0800 Subject: gnu: Add python-josepy. * gnu/packages/python-crypto.scm (python-josepy, python2-josepy): New variables. --- gnu/packages/python-crypto.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 4f06d7e394..a545f0ddcc 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -678,3 +678,40 @@ Python.") (define-public python2-ecpy (package-with-python2 python-ecpy)) + +(define-public python-josepy + (package + (name "python-josepy") + (version "1.0.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "josepy" version)) + (sha256 + (base32 + "1k0ahzzaq2rrjiifwbhbp7vm8z4zk0ipgiqwicil80kzlf6bhj4z")))) + (build-system python-build-system) + (arguments + ;; The tests require pytest >= 3.2, which is not yet packaged. + '(#:tests? #f)) + (propagated-inputs + `(("python-cryptography" ,python-cryptography) + ("python-pyopenssl" ,python-pyopenssl) + ("python-six" ,python-six))) +;; TODO Enable when we have pytest >= 3.2. +; (native-inputs +; `(("python-coverage" ,python-coverage) +; ("python-flake8" ,python-flake8) +; ("python-isort" ,python-isort) +; ("python-mock" ,python-mock) +; ("python-pytest" ,python-pytest-3.0) +; ("python-pytest-cov" ,python-pytest-cov) +; ("python-pytest-cache" ,python-pytest-cache) +; ("python-pytest-flake8" ,python-pytest-flake8))) + (home-page "https://github.com/certbot/josepy") + (synopsis "JOSE protocol implementation in Python") + (description "This package provides a Python implementation of the JOSE +protocol (Javascript Object Signing and Encryption).") + (license license:asl2.0))) + +(define-public python2-josepy + (package-with-python2 python-josepy)) -- cgit v1.3 From d32456d5a28ab5982030401ed830088f9d2e8fe4 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Fri, 19 Jan 2018 22:58:50 +0300 Subject: gnu: Add python-pycryptodome. * gnu/packages/python-crypto.scm (python-pycryptodome): New public variable. --- gnu/packages/python-crypto.scm | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index a545f0ddcc..7b0054cf8a 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -715,3 +715,46 @@ protocol (Javascript Object Signing and Encryption).") (define-public python2-josepy (package-with-python2 python-josepy)) + +(define-public python-pycryptodome + (package + (name "python-pycryptodome") + (version "3.4.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pycryptodome" version)) + (sha256 + (base32 + "1xrsd6ql4w0ypkxnsg3fivs3r3z6dd93x44lhvam7jzh3gixzn0q")))) + (build-system python-build-system) + (home-page "https://www.pycryptodome.org") + (synopsis "Cryptographic library for Python") + (description "This package provides a cryptographic library for Python. + +It brings the following enhancements with respect to the last official version +of PyCrypto: + +@itemize +@item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB) +@item Accelerated AES on Intel platforms via AES-NI +@item First class support for PyPy +@item Elliptic curves cryptography (NIST P-256 curve only) +@item Better and more compact API (nonce and iv attributes for ciphers, +automatic generation of random nonces and IVs, simplified CTR cipher mode, and +more) +@item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms +@item Salsa20 and ChaCha20 stream ciphers +@item scrypt and HKDF +@item Deterministic (EC)DSA +@item Password-protected PKCS#8 key containers +@item Shamir’s Secret Sharing scheme +@item Random numbers get sourced directly from the OS (and not from a CSPRNG +in userspace) +@item Cleaner RSA and DSA key generation (largely based on FIPS 186-4) +@item Major clean ups and simplification of the code base +@end itemize\n") + (license license:bsd-2))) + +(define-public python2-pycryptodome + (package-with-python2 python-pycryptodome)) -- cgit v1.3 From 51f887f33d08a805fa62c726c81904ce54a540ac Mon Sep 17 00:00:00 2001 From: Adam Van Ymeren Date: Thu, 23 Nov 2017 15:04:46 -0500 Subject: gnu: python-axolotl: Update to 0.1.39 and fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit python-axolotl has been failing since March, https://hydra.gnu.org/job/gnu/master/python-axolotl-0.1.35.x86_64-linux This also fixes the OMEMO and OTR plugins for Gajim work. * gnu/packages/patches/python-axolotl-AES-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python-crypto.scm (python-axolotl): Upgrade to 0.1.39. [source]: Use the patch. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/patches/python-axolotl-AES-fix.patch | 24 +++++++++++++++++++++++ gnu/packages/python-crypto.scm | 5 +++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-axolotl-AES-fix.patch (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 6c46c4e5da..f9264231ed 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1017,6 +1017,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-3.5-fix-tests.patch \ %D%/packages/patches/python-3.5-getentropy-on-old-kernels.patch \ + %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-dendropy-fix-tests.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-genshi-add-support-for-python-3.4-AST.patch \ diff --git a/gnu/packages/patches/python-axolotl-AES-fix.patch b/gnu/packages/patches/python-axolotl-AES-fix.patch new file mode 100644 index 0000000000..d34f4855cb --- /dev/null +++ b/gnu/packages/patches/python-axolotl-AES-fix.patch @@ -0,0 +1,24 @@ +Patch taken from the Debian package for python-axolotl-0.1.39. +See . + +Description: Removes IV paramenter from AES constructor, since it is not necessary for ctr mode. +Author: Josue Ortega +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 + + diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 7b0054cf8a..a9059efa5f 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -450,7 +450,7 @@ python-axolotl.") (define-public python-axolotl (package (name "python-axolotl") - (version "0.1.35") + (version "0.1.39") (source (origin (method url-fetch) @@ -458,8 +458,9 @@ python-axolotl.") "https://github.com/tgalal/python-axolotl/archive/" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) + (patches (search-patches "python-axolotl-AES-fix.patch")) (sha256 - (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8")))) + (base32 "0badsgkgz0ir3hqynxzsfjgacppi874syvvmgccc6j164053x6zm")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.3 From 0ba631b90f99df58cfb43cbe1aa8d052b45c9a9d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 20 Feb 2018 15:14:17 +0100 Subject: gnu: python-cryptography: Update to 2.1.4. * gnu/packages/python-crypto.scm (python-cryptography-vectors, python-cryptography): Update to 2.1.4. --- gnu/packages/python-crypto.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 350193edd4..b27f520749 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -281,14 +281,14 @@ is used by the Requests library to verify HTTPS requests.") (define-public python-cryptography-vectors (package (name "python-cryptography-vectors") - (version "2.0.3") + (version "2.1.4") (source (origin (method url-fetch) (uri (pypi-uri "cryptography_vectors" version)) (sha256 (base32 - "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y")))) + "1jm5c33qaz297sf99kz9kw8xi792ap9m6bwf0dfylls8z3rv9i3q")))) (build-system python-build-system) (home-page "https://github.com/pyca/cryptography") (synopsis "Test vectors for the cryptography package") @@ -303,14 +303,14 @@ is used by the Requests library to verify HTTPS requests.") (define-public python-cryptography (package (name "python-cryptography") - (version "2.0.3") + (version "2.1.4") (source (origin (method url-fetch) (uri (pypi-uri "cryptography" version)) (sha256 (base32 - "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh")))) + "14aj5ipbj1w5kba2hv6323954pachhflfrjhhmkjwssv3hvngng4")))) (build-system python-build-system) (inputs `(("openssl" ,openssl))) -- cgit v1.3 From fb9d0350153f0e969c0a8e57a698e378158ae124 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 20 Feb 2018 15:15:05 +0100 Subject: gnu: python-pyopenssl: Update to 17.5.0. * gnu/packages/python-crypto.scm (python-pyopenssl): Update to 17.5.0. --- gnu/packages/python-crypto.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index b27f520749..b898f088be 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -352,14 +352,14 @@ message digests and key derivation functions.") (define-public python-pyopenssl (package (name "python-pyopenssl") - (version "17.3.0") + (version "17.5.0") (source (origin (method url-fetch) (uri (pypi-uri "pyOpenSSL" version)) (sha256 (base32 - "0xkc1wfnpg6abzllivg3ylhc63npjdy1v81f4kc08bm8cj80nqr9")))) + "0wv78mwsdqbxqwdwllf4maqybhbj3vb8328ia04hnb558sxcy41c")))) (build-system python-build-system) (arguments '(#:phases -- cgit v1.3