From 5ef1913ce6516ddd78c4efe7645b6e06d8925503 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 14 Nov 2020 00:04:08 +0100 Subject: gnu: Add python-pycryptodomex. * gnu/packages/python-crypto.scm (python-pycryptodomex): New public variable. --- gnu/packages/python-crypto.scm | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 1ac98caab0..652bca7bc4 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1029,6 +1029,57 @@ in userspace) (define-public python2-pycryptodome (package-with-python2 python-pycryptodome)) +(define-public python-pycryptodomex + (package + (name "python-pycryptodomex") + (version "3.9.9") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pycryptodomex" version)) + (sha256 + (base32 "0lbx4qk3xmwqiidhmkj8qa7bh2lf8bwzg0xjpsh2w5zqjrc7qnvv")))) + (build-system python-build-system) + (home-page "https://www.pycryptodome.org") + (synopsis "Low-level cryptographic Python library") + (description + "PyCryptodome is a self-contained Python package of low-level +cryptographic primitives. It's not a wrapper to a separate C library like +OpenSSL. To the largest possible extent, algorithms are implemented in pure +Python. Only the pieces that are extremely critical to performance (e.g., +block ciphers) are implemented as C extensions. + +You are expected to have a solid understanding of cryptography and security +engineering to successfully use these primitives. You must also be able to +recognize that some are obsolete (e.g., TDES) or even insecure (RC4). + +It provides many enhancements over the last release of PyCrypto (2.6.1): + +@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 + +PyCryptodomex is the stand-alone version of PyCryptodome that no longer +provides drop-in compatibility with PyCrypto.") + (license (list license:bsd-2 + license:public-domain)))) ; code inherited from PyCrypto + (define-public python-m2crypto (package (name "python-m2crypto") -- cgit v1.2.3 From 970a3026e903dbb0e712da624b7dac6c870194c7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 14 Nov 2020 00:20:53 +0100 Subject: gnu: python-pycryptodome: Expand description. * gnu/packages/python-crypto.scm (python-pycryptodome)[synopsis, description]: Copy higher-level description from python-pycryptodomex. --- gnu/packages/python-crypto.scm | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 652bca7bc4..8911667f22 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -999,16 +999,24 @@ protocol (Javascript Object Signing and Encryption).") "0dh6ky5ngxayyn5f6n7gdamjl49g3khz6pdx9sdnag1zwi8248hs")))) (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. + (synopsis "Low-level cryptographic Python library") + (description + "PyCryptodome is a self-contained Python package of low-level +cryptographic primitives. It's not a wrapper to a separate C library like +OpenSSL. To the largest possible extent, algorithms are implemented in pure +Python. Only the pieces that are extremely critical to performance (e.g., +block ciphers) are implemented as C extensions. -It brings the following enhancements with respect to the last official version -of PyCrypto: +You are expected to have a solid understanding of cryptography and security +engineering to successfully use these primitives. You must also be able to +recognize that some are obsolete (e.g., TDES) or even insecure (RC4). + +It provides many enhancements over the last release of PyCrypto (2.6.1): @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 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 @@ -1022,8 +1030,11 @@ more) @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") +@item Major clean-ups and simplification of the code base +@end itemize + +This package provides drop-in compatibility with PyCrypto. It is one of two +PyCryptodome variants, the other being python-pycryptodomex.") (license license:bsd-2))) (define-public python2-pycryptodome -- cgit v1.2.3 From c8ca9eb8f369c869b37a6c059713b0c49eaee0a5 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 14 Nov 2020 00:22:03 +0100 Subject: gnu: python-pycryptodome: Note public-domain legacy. * gnu/packages/python-pycryptodome.scm (python-pycryptodome)[license]: Add public-domain. --- gnu/packages/python-crypto.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 8911667f22..97b55b0021 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1035,7 +1035,8 @@ in userspace) This package provides drop-in compatibility with PyCrypto. It is one of two PyCryptodome variants, the other being python-pycryptodomex.") - (license license:bsd-2))) + (license (list license:bsd-2 + license:public-domain)))) ; code inherited from PyCrypto (define-public python2-pycryptodome (package-with-python2 python-pycryptodome)) -- cgit v1.2.3 From 0404b28dc74348e984dffe303481652c46b0b940 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 14 Nov 2020 00:22:53 +0100 Subject: gnu: python-pykeepass: Update to 3.2.1. * gnu/packages/python-crypto.scm (python-pykeepass): Update to 3.2.1. [propagated-inputs]: Substitute python-pycryptodomex for python-pycryptodome. --- gnu/packages/python-crypto.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 97b55b0021..9bb0cede19 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1127,7 +1127,7 @@ through the Engine interface.") (define-public python-pykeepass (package (name "python-pykeepass") - (version "3.2.0") + (version "3.2.1") (source (origin (method git-fetch) @@ -1137,7 +1137,7 @@ through the Engine interface.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1wxbfpy7467mlnfsvmh685fhfnq4fki9y7yc9cylp30r5n3hisaj")))) + (base32 "1symxf4ahylynihnp9z4z3lh2vy65ipvg8s4hjrnn936hcaaxghk")))) (build-system python-build-system) (arguments `(#:phases @@ -1161,7 +1161,7 @@ through the Engine interface.") ("python-dateutil" ,python-dateutil) ("python-future" ,python-future) ("python-lxml" ,python-lxml) - ("python-pycryptodome" ,python-pycryptodome))) + ("python-pycryptodomex" ,python-pycryptodomex))) (home-page "https://github.com/libkeepass/pykeepass") (synopsis "Python library to interact with keepass databases") (description -- cgit v1.2.3 From bb2d1dae20d5a0debc8fde405c34f4f16f189198 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 15 Nov 2020 00:27:26 +0100 Subject: gnu: python-pycryptodome: Update to 3.9.9. * gnu/packages/python-crypto.scm (python-pycryptodome): Update to 3.9.9. --- 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 9bb0cede19..60a9776bae 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -989,14 +989,14 @@ protocol (Javascript Object Signing and Encryption).") (define-public python-pycryptodome (package (name "python-pycryptodome") - (version "3.7.3") + (version "3.9.9") (source (origin (method url-fetch) (uri (pypi-uri "pycryptodome" version)) (sha256 (base32 - "0dh6ky5ngxayyn5f6n7gdamjl49g3khz6pdx9sdnag1zwi8248hs")))) + "1i4m74f88qj9ci8rpyzrbk2slmsdj5ipmwdkq6qk24byalm203li")))) (build-system python-build-system) (home-page "https://www.pycryptodome.org") (synopsis "Low-level cryptographic Python library") -- cgit v1.2.3 From cbfa23c74ec874be7f55ee7758009d477d6c6005 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 15 Nov 2020 00:28:36 +0100 Subject: gnu: python-pycryptodomex: Inherit from python-pycryptodome. * gnu/packages/python-crypto.scm (python-pycryptodomex): Inherit from python-pycryptodome. [build-system, home-page, synopsis, license]: Remove redundant fields. --- gnu/packages/python-crypto.scm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 60a9776bae..ce183bd6ae 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1042,18 +1042,15 @@ PyCryptodome variants, the other being python-pycryptodomex.") (package-with-python2 python-pycryptodome)) (define-public python-pycryptodomex - (package + (package (inherit python-pycryptodome) (name "python-pycryptodomex") - (version "3.9.9") + (version (package-version python-pycryptodome)) (source (origin (method url-fetch) (uri (pypi-uri "pycryptodomex" version)) (sha256 (base32 "0lbx4qk3xmwqiidhmkj8qa7bh2lf8bwzg0xjpsh2w5zqjrc7qnvv")))) - (build-system python-build-system) - (home-page "https://www.pycryptodome.org") - (synopsis "Low-level cryptographic Python library") (description "PyCryptodome is a self-contained Python package of low-level cryptographic primitives. It's not a wrapper to a separate C library like @@ -1088,9 +1085,7 @@ in userspace) @end itemize PyCryptodomex is the stand-alone version of PyCryptodome that no longer -provides drop-in compatibility with PyCrypto.") - (license (list license:bsd-2 - license:public-domain)))) ; code inherited from PyCrypto +provides drop-in compatibility with PyCrypto."))) (define-public python-m2crypto (package -- cgit v1.2.3