summaryrefslogtreecommitdiff
path: root/gnu/packages/python-crypto.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-crypto.scm')
-rw-r--r--gnu/packages/python-crypto.scm725
1 files changed, 388 insertions, 337 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index a80da0d470..79e3a93489 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -24,13 +24,15 @@
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
-;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;; Copyright © 2023, 2025 Zheng Junjie <z572@z572.online>
;;; Copyright © 2024 jgart <jgart@dismail.de>
;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,10 +59,8 @@
#:use-module (guix build-system python)
#:use-module (guix utils)
#:use-module (gnu packages)
- #:use-module (gnu packages certs)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages check)
- #:use-module (gnu packages crates-io)
- #:use-module (gnu packages crates-tls)
#:use-module (gnu packages crypto)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libffi)
@@ -75,6 +75,7 @@
#:use-module (gnu packages python-compression)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages rust)
#:use-module (gnu packages rust-apps)
#:use-module (gnu packages swig)
#:use-module (gnu packages time)
@@ -110,21 +111,21 @@ the Bitcoin network.")
(define-public python-bcrypt
(package
(name "python-bcrypt")
- (version "3.2.0")
+ (version "3.2.2") ;the latest not Rust version
(source
(origin
(method url-fetch)
(uri (pypi-uri "bcrypt" version))
(sha256
- (base32 "0agvzdn7r7jx5y4scl5gjmrmr6njvizwmr9n7h1kmaahdrrc34sv"))))
- (build-system python-build-system)
+ (base32 "1yvbdfmkssx1jf2lrhbs58xljmyi3p82r7rav82pf1bp44642g23"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pycparser python-pytest))
+ (list python-pytest
+ python-setuptools))
(propagated-inputs
- (list python-cffi python-six))
+ (list python-cffi))
(home-page "https://github.com/pyca/bcrypt/")
- (synopsis
- "Modern password hashing library")
+ (synopsis "Modern password hashing library")
(description
"Bcrypt is a Python module which provides a password hashing method based
on the Blowfish password hashing algorithm, as described in
@@ -132,6 +133,53 @@ on the Blowfish password hashing algorithm, as described in
Password Scheme\"} by Niels Provos and David Mazieres.")
(license license:asl2.0)))
+(define-public python-murmurhash
+ (package
+ (name "python-murmurhash")
+ (version "1.0.10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/explosion/murmurhash")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "02ny4391kbrssq9bf7kq75615ragvbjhsqi9hgv7wiaiz6yai1k8"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'fix-installation
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (with-directory-excursion
+ (string-append (site-packages inputs outputs) "/murmurhash")
+ (delete-file-recursively "tests")
+ (delete-file "mrmr.pyx")
+ (for-each
+ (lambda (file)
+ (chmod file #o555))
+ (find-files "." "\\.so$")))))
+ ;; XXX: Otherwise ModuleNotFoundError, and --pyargs doesn't seem
+ ;; to fix the issue.
+ (replace 'check
+ (lambda args
+ (copy-recursively "murmurhash/tests" "tests")
+ (delete-file-recursively "murmurhash")
+ (with-directory-excursion "tests"
+ (apply (assoc-ref %standard-phases 'check) args)))))))
+ (native-inputs
+ (list python-cython
+ python-murmurhash3
+ python-pytest
+ python-setuptools))
+ (home-page "https://github.com/explosion/murmurhash")
+ (synopsis "Cython bindings for MurmurHash2")
+ (description
+ "This package provides Cython bindings for MurmurHash2.")
+ (license license:expat)))
+
(define-public python-passlib
(package
(name "python-passlib")
@@ -152,7 +200,7 @@ Password Scheme\"} by Niels Provos and David Mazieres.")
(lambda _
(setenv "PYTHON_EGG_CACHE" "/tmp"))))))
(native-inputs
- (list python-nose python-setuptools python-wheel))
+ (list python-pytest python-setuptools python-wheel))
(propagated-inputs
(list python-argon2-cffi python-bcrypt python-cryptography))
(home-page "https://bitbucket.org/ecollins/passlib")
@@ -168,24 +216,22 @@ to providing full-strength password hashing for multi-user application.")
(define-public python-paramiko
(package
(name "python-paramiko")
- (version "3.5.0")
+ (version "4.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "paramiko" version))
(sha256
- (base32 "0941n85xi32kvrh2mxppga527a0jz2iz2c99lpfwwmagv90fa4dd"))))
+ (base32 "17ynnmagd44gpp76r26rz1kldb37f79hm4ibinlckj8c71xz09ba"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-pytest
- python-icecream
+ (list python-icecream
+ python-pytest
python-pytest-relaxed
- python-pytest-xdist
- python-setuptools
- python-wheel))
+ python-setuptools))
(propagated-inputs
- (list python-cryptography
- python-bcrypt
+ (list python-bcrypt
+ python-cryptography
python-invoke
python-pyasn1
python-pynacl))
@@ -341,65 +387,22 @@ production use. Include this module and use its backends at your own risk.")
(build-system cargo-build-system)
(arguments
(list
+ #:install-source? #f
+ #:imported-modules `(,@%pyproject-build-system-modules
+ ,@%cargo-build-system-modules)
+ #:modules `((guix build cargo-build-system)
+ ((guix build pyproject-build-system) #:prefix py:)
+ (guix build utils))
#:phases
#~(modify-phases %standard-phases
- (add-after 'install 'build-python-module
- (lambda _
- ;; We don't use maturin.
- (delete-file "pyproject.toml")
- (call-with-output-file "pyproject.toml"
- (lambda (port)
- (format port "\
-[build-system]
-build-backend = 'setuptools.build_meta'
-requires = ['setuptools']
-")))
- (call-with-output-file "setup.cfg"
- (lambda (port)
- (format port "\
-
-[metadata]
-name = blake3
-version = ~a
-
-[options]
-packages = find:
-
-[options.packages.find]
-exclude =
- src*
- c_impl*
- tests*
- Cargo.toml
-" #$version)))
- ;; ZIP does not support timestamps before 1980.
- (setenv "SOURCE_DATE_EPOCH" "315532800")
- (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+ (add-after 'build 'build-python-module
+ (assoc-ref py:%standard-phases 'build))
(add-after 'build-python-module 'install-python-module
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((whl (car (find-files "dist" "\\.whl$"))))
- (invoke "pip" "--no-cache-dir" "--no-input"
- "install" "--no-deps" "--prefix" #$output whl))))
- (add-after 'install-python-module 'install-python-library
- (lambda _
- (let ((site (string-append #$output "/lib/python"
- #$(version-major+minor
- (package-version python))
- "/site-packages")))
- (mkdir-p site)
- (copy-file "target/release/libblake3.so"
- (string-append site "/blake3.so"))))))
- #:cargo-inputs
- `(("rust-blake3" ,rust-blake3-1)
- ("rust-hex" ,rust-hex-0.4)
- ("rust-parking-lot" ,rust-parking-lot-0.11)
- ("rust-pyo3" ,rust-pyo3-0.15)
- ("rust-rayon" ,rust-rayon-1))))
- (inputs (list rust-blake3-1))
+ (assoc-ref py:%standard-phases 'install)))))
(native-inputs
(list python-wrapper
- python-pypa-build
- python-wheel))
+ maturin))
+ (inputs (cargo-inputs 'python-blake3))
(home-page "https://github.com/oconnor663/blake3-py")
(synopsis "Python bindings for the Rust blake3 crate")
(description "This package provides Python bindings for the Rust crate of
@@ -454,20 +457,23 @@ for example, for recording or replaying web content.")
(define-public python-certifi
(package
(name "python-certifi")
- (version "2022.6.15")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "certifi" version))
- (sha256
- (base32
- "03c2l11lgljx0kz17cvdc4hlc3p1594ajdih9zq0a4dig285mj44"))
- (snippet
- #~(begin
- (delete-file "certifi/cacert.pem")
- (delete-file "certifi/core.py")
- (with-output-to-file "certifi/core.py"
- (lambda _
- (display "\"\"\"
+ (version "2025.06.15")
+ (source
+ (origin
+ (method git-fetch) ; no tests in PyPI package
+ (uri (git-reference
+ (url "https://github.com/certifi/python-certifi")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1yyy3c64xbwfg2b8hi1fd6vwh56fzc90jfy3czimv5i91gwrl7ba"))
+ (snippet #~(begin
+ (delete-file "certifi/cacert.pem")
+ (delete-file "certifi/core.py")
+ (with-output-to-file "certifi/core.py"
+ (lambda _
+ (display
+ "\"\"\"
certifi.py
~~~~~~~~~~
This file is a Guix-specific version of core.py.
@@ -490,8 +496,12 @@ def where() -> str:
def contents() -> str:
with open(where(), \"r\", encoding=\"ascii\") as data:
return data.read()")))))))
- (build-system python-build-system)
- (arguments '(#:tests? #f)) ;no tests
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list nss-certs-for-test
+ python-pytest
+ python-setuptools
+ python-wheel))
(home-page "https://certifi.io/")
(synopsis "Python CA certificate bundle")
(description
@@ -538,59 +548,50 @@ is used by the Requests library to verify HTTPS requests.")
(find-files "." "Cargo\\.lock$"))
(substitute* "pyproject.toml"
(("locked = true") "offline = true"))))))
- (build-system cargo-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
#:imported-modules `(,@%cargo-build-system-modules
,@%pyproject-build-system-modules)
- #:modules '((guix build cargo-build-system)
- ((guix build pyproject-build-system) #:prefix py:)
+ #:modules '(((guix build cargo-build-system) #:prefix cargo:)
+ (guix build pyproject-build-system)
(guix build utils))
- #:cargo-inputs
- (list rust-asn1-0.20
- rust-cc-1
- rust-cfg-if-1
- rust-foreign-types-0.3
- rust-foreign-types-shared-0.1
- rust-once-cell-1
- rust-openssl-0.10
- rust-openssl-sys-0.9
- rust-pem-3
- rust-pyo3-0.23
- rust-self-cell-1)
- #:install-source? #false
#:phases
#~(modify-phases %standard-phases
- (add-after 'configure 'dont-vendor-self
- (lambda* (#:key vendor-dir #:allow-other-keys)
- ;; Don't keep the whole tarball in the vendor directory
- (delete-file-recursively
- (string-append vendor-dir "/cryptography-" #$version ".tar.zst"))))
- (replace 'build
- (assoc-ref py:%standard-phases 'build))
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key tests? inputs outputs #:allow-other-keys)
- (when tests?
- (py:add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest" "tests"))))
- (replace 'install
- (assoc-ref py:%standard-phases 'install)))))
+ (add-after 'unpack 'prepare-cargo-build-system
+ (lambda args
+ (for-each
+ (lambda (phase)
+ (format #t "Running cargo phase: ~a~%" phase)
+ (apply (assoc-ref cargo:%standard-phases phase)
+ #:cargo-target #$(cargo-triplet)
+ args))
+ '(unpack-rust-crates
+ configure
+ check-for-pregenerated-files
+ patch-cargo-checksums)))))))
(native-inputs
- (list python-certifi
- python-cffi
- python-click
- python-cryptography-vectors
- python-mypy
- python-pretend
- python-pytest
- python-pytest-benchmark
- python-pytest-cov
- python-pytest-randomly
- python-pytest-xdist
- python-setuptools
- python-wheel))
- (inputs (list maturin openssl python-wrapper))
+ (append
+ (list python-certifi
+ python-cffi
+ python-click
+ python-cryptography-vectors
+ python-mypy
+ python-pretend
+ python-pytest
+ python-pytest-benchmark
+ python-pytest-cov
+ python-pytest-randomly
+ python-pytest-xdist
+ python-setuptools
+ python-wheel
+ rust
+ `(,rust "cargo"))
+ (or (and=> (%current-target-system)
+ (compose list make-rust-sysroot))
+ '())))
+ (inputs
+ (cons* maturin openssl (cargo-inputs 'python-cryptography)))
(propagated-inputs (list python-cffi))
(home-page "https://github.com/pyca/cryptography")
(synopsis "Cryptographic recipes and primitives for Python")
@@ -643,7 +644,7 @@ ciphers, message digests and key derivation functions.")
python-pretend
python-pytest
python-pytest-rerunfailures
- python-wheel))
+ python-setuptools))
(home-page "https://github.com/pyca/pyopenssl")
(synopsis "Python wrapper module around the OpenSSL library")
(description "PyOpenSSL is a high-level wrapper around a subset of the
@@ -655,18 +656,30 @@ OpenSSL library.")
(define-public python-ed25519
(package
(name "python-ed25519")
- (version "1.4")
+ (version "1.5")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "ed25519" version))
- (sha256
- (base32
- "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499"))))
- (build-system python-build-system)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/warner/python-ed25519")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0adxfm12wygh2gdsn83xmp1sw7w96ni7mr7v3z3y6q0mvh9n5x0p"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; XXX: Use custom test back-end on python-team branch.
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests? (invoke "python" "test_ed25519_kat.py")))))))
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/warner/python-ed25519")
(synopsis "Ed25519 public-key signatures")
- (description "Ed25519 public-key signatures")
+ (description
+ "This package provides Ed25519 public-key signatures in Python.")
(license license:expat)))
(define-public python-axolotl-curve25519
@@ -681,15 +694,16 @@ OpenSSL library.")
(base32
"18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
(arguments
(list
+ #:test-backend #~'unittest
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'relax-gcc-14-strictness
(lambda _
(setenv "CFLAGS"
(string-append "-g -O2 -Wno-error=int-conversion")))))))
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/tgalal/python-axolotl-curve25519")
(synopsis "Python wrapper for curve25519 library")
(description "This is a python wrapper for the curve25519 library
@@ -705,28 +719,33 @@ python-axolotl.")
(version "0.2.3")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "python-axolotl" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tgalal/python-axolotl")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "1bwdp24fmriffwx91aigs9k162albb51iskp23nc939z893q23py"))))
- (build-system python-build-system)
+ (base32 "0bwzsyb3z54259kh667m714n28r6jp8almb5mrx48ar0pgashsrl"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; Don't install tests
- (add-before 'install 'remove-tests
- (lambda _
- (for-each delete-file-recursively
- '("axolotl/tests" "build/lib/axolotl/tests"))
- #t)))))
- (propagated-inputs
- (list python-axolotl-curve25519 python-cryptography python-protobuf))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Don't install tests
+ (add-after 'install 'cleanup-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (site-packages inputs outputs)
+ "/axolotl/tests")))))))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
+ (propagated-inputs (list python-axolotl-curve25519 python-cryptography
+ python-protobuf))
(home-page "https://github.com/tgalal/python-axolotl")
(synopsis "Python port of libaxolotl-android")
- (description "This is a python port of libaxolotl-android. This
-is a ratcheting forward secrecy protocol that works in synchronous and
-asynchronous messaging environments.")
+ (description
+ "This is a python port of libaxolotl-android. This is a ratcheting
+forward secrecy protocol that works in synchronous and asynchronous messaging
+environments.")
(license license:gpl3)))
(define-public python-omemo-dr
@@ -741,11 +760,11 @@ asynchronous messaging environments.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "1gx0znbfvs8jg9s754hha81l8wpghswkfsqx2jzpgv6gigf3sm8z"))))
- (build-system python-build-system)
+ (base32 "1gx0znbfvs8jg9s754hha81l8wpghswkfsqx2jzpgv6gigf3sm8z"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:test-backend #~'unittest))
(propagated-inputs
- (list python-axolotl-curve25519 python-cryptography python-protobuf-5))
+ (list python-cryptography python-protobuf-5 python-setuptools))
(home-page "https://dev.gajim.org/gajim/omemo-dr")
(synopsis "OMEMO cryptography library")
(description "OMEMO cryptography library that was forked from python-axolotl.")
@@ -763,7 +782,9 @@ asynchronous messaging environments.")
(sha256
(base32 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
+ (arguments
+ (list #:tests? #f)) ;no tests in PyPI
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/ricmoo/pyaes")
(synopsis "Implementation of AES in Python")
(description "This package contains a pure-Python implementation of the
@@ -917,23 +938,24 @@ Python.")
(define-public python-josepy
(package
(name "python-josepy")
- (version "1.13.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "josepy" version))
- (sha256
- (base32
- "1jaxqyp53paks2z8zyzr50gqvzfxbar7r2qf98kqak4aizrxlcc9"))))
- (build-system python-build-system)
- (arguments
- ;; TODO: some test dependencies are missing (see pyproject.toml).
- '(#:tests? #f))
- (propagated-inputs
- (list python-cryptography python-pyopenssl))
+ (version "2.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/certbot/josepy")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zplnfrmc4nps9lgl3fz434ja7lmi9v8waydflzvpi75kf5fqxc1"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-poetry-core python-pytest))
+ (propagated-inputs (list python-cryptography))
(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).")
+ (description
+ "This package provides a Python implementation of the JOSE protocol
+(Javascript Object Signing and Encryption).")
(license license:asl2.0)))
(define pycryptodome-unbundle-tomcrypt-snippet
@@ -1134,39 +1156,22 @@ supports KDBX3 and KDBX4.")
(define-public python-pylibscrypt
(package
(name "python-pylibscrypt")
- (version "1.7.1")
+ (version "2.0.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pylibscrypt" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jvarho/pylibscrypt")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'build 'hard-code-path-to-libscrypt
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libscrypt (assoc-ref inputs "libscrypt")))
- (substitute* "pylibscrypt/pylibscrypt.py"
- (("find_library\\('scrypt'\\)")
- (string-append "'" libscrypt "/lib/libscrypt.so'")))
- #t))))
- ;; The library can use various scrypt implementations and tests all of
- ;; them. Since we only provide a single implementation, most tests
- ;; fail. Simply skip them.
- #:tests? #f))
- ;; FIXME: Using "libscrypt" is the second best choice. The best one
- ;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
- ;; 1.1+. Use that as soon as Guix provides it.
- (inputs
- (list libscrypt))
+ (base32 "0hshivwl3xznlqhrvwbylp40k1bfx4gnyzmxwldkwjhf1260zan1"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://github.com/jvarho/pylibscrypt")
(synopsis "Scrypt for Python")
- (description "There are a lot of different scrypt modules for Python, but
-none of them have everything that I'd like, so here's one more. It uses
-@code{libscrypt}.")
+ (description
+ "This package provides another Scrypt module for Python.")
(license license:isc)))
(define-public python-libnacl
@@ -1231,21 +1236,24 @@ require users to log in.")
(define-public python-scrypt
(package
(name "python-scrypt")
- (version "0.8.7")
+ (version "0.9.4")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "scrypt" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/holgern/py-scrypt")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0hjk71k3mgnl8siikm9lii9im8kv0rb7inkjzx78rnancra48xxr"))))
- (build-system python-build-system)
- (inputs
- (list openssl))
- (home-page "https://bitbucket.org/mhallin/py-scrypt")
+ (base32 "07mr8slhplk0pfji3pfb86281wf035c3vxg7w4g17vgry1l5fdg2"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest python-setuptools python-wheel))
+ (inputs (list openssl))
+ (home-page "https://github.com/holgern/py-scrypt")
(synopsis "Bindings for the scrypt key derivation function library")
- (description "This is a set of Python bindings for the scrypt key
-derivation function.")
+ (description
+ "This package is a set of Python bindings for the scrypt key derivation
+function.")
(license license:bsd-2)))
(define-public python-service-identity
@@ -1280,6 +1288,29 @@ simplest case, this means host name verification. However, service_identity
implements RFC 6125 fully and plans to add other relevant RFCs too.")
(license license:expat)))
+(define-public python-google-crc32c
+ (package
+ (name "python-google-crc32c")
+ (version "1.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/googleapis/python-crc32c")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "005ra4pfv71rq53198k7q6k63f529q3g6hkbxbwfcf82jr77hxga"))))
+ (build-system pyproject-build-system)
+ (inputs (list crc32c))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
+ (home-page "https://github.com/googleapis/python-crc32c")
+ (synopsis "Python wrapper of Google CRC32C")
+ (description
+ "This package provides a Python wrapper of the C library implementation
+of the CRC32C hashing algorithm.")
+ (license license:asl2.0)))
+
(define-public python-hkdf
(package
(name "python-hkdf")
@@ -1390,51 +1421,52 @@ storing and retrieving sensitive information in your programs.")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/JuulLabs-OSS/mcuboot")
- (commit (string-append "v" version))))
+ (url "https://github.com/mcu-tools/mcuboot")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
- (build-system python-build-system)
+ (base32 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-broken-test
- (lambda _
- (substitute* "scripts/imgtool/keys/ed25519_test.py"
- (("raw_sign") "sign_digest"))
- #t))
- (add-before 'build 'change-directory
- (lambda _
- (chdir "scripts")
- #t)))))
- (propagated-inputs
- (list python-click python-intelhex python-cryptography))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-broken-test
+ (lambda _
+ (substitute* "scripts/imgtool/keys/ed25519_test.py"
+ (("raw_sign")
+ "sign_digest"))))
+ (add-before 'build 'change-directory
+ (lambda _
+ (chdir "scripts"))))))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
+ (propagated-inputs (list python-click python-intelhex python-cryptography))
(home-page "https://mcuboot.com")
(synopsis "Tool to securely sign firmware images for booting by MCUboot")
- (description "MCUboot is a secure bootloader for 32-bit MCUs. This
-package provides a tool to securely sign firmware images for booting by
-MCUboot.")
+ (description
+ "MCUboot is a secure bootloader for 32-bit MCUs. This package provides a
+tool to securely sign firmware images for booting by MCUboot.")
(license license:expat)))
(define-public python-ntlm-auth
(package
(name "python-ntlm-auth")
- (version "1.4.0")
+ (version "1.5.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "ntlm-auth" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jborean93/ntlm-auth")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "16mavidki4ma5ip8srqalr19gz4f5yn3cnmmgps1fmgfr24j63rm"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-cryptography))
+ (base32 "00dpf5bfsy07frsjihv1k10zmwcyq4bvkilbxha7h6nlwpcm2409"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest python-requests python-setuptools python-wheel))
+ (propagated-inputs (list python-cryptography))
(home-page "https://github.com/jborean93/ntlm-auth")
- (synopsis
- "Calculates NTLM Authentication codes")
+ (synopsis "Calculates NTLM Authentication codes")
(description
"This library handles the low-level details of NTLM authentication for
use in authenticating with a service that uses NTLM. It will create and parse
@@ -1457,9 +1489,11 @@ and Backlog for a list of what is and is not currently supported.")
(uri (pypi-uri "SecretStorage" version))
(sha256
(base32 "0xxxxr77sgmjm1rqzdd1rkan9xg0qmv8awc1pb9adv39ycz560r4"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
'(#:tests? #f)) ; Tests require a running dbus service.
+ (native-inputs
+ (list python-setuptools))
(propagated-inputs
(list python-cryptography python-jeepney))
(home-page "https://github.com/mitya57/secretstorage")
@@ -1476,28 +1510,23 @@ items and collections, editing items, locking and unlocking collections
(define-public python-trustme
(package
(name "python-trustme")
- (version "0.9.0")
+ (version "1.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "trustme" version))
(sha256
- (base32 "0v2qzszmyazfgc1snicdr4b4qdajpjd4pbinpgrn9vfff0yv41sy"))))
+ (base32 "0zz49agi7hy82fbr03xs6k9vjgiy7v8qsp426cgv8bbzphmvla35"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-more-itertools
+ (list python-hatchling
python-pyopenssl
python-pytest
- python-pytest-cov
- python-service-identity
- python-setuptools
- python-wheel
- python-zipp))
+ python-service-identity))
(propagated-inputs
(list python-cryptography
- python-idna
- python-ipaddress))
- (home-page "https://github.com/python-trio/trustme")
+ python-idna))
+ (home-page "https://trustme.readthedocs.io")
(synopsis "Fake a certificate authority for tests")
(description
"@code{trustme} is a tiny Python package that does one thing: it gives you
@@ -1509,19 +1538,20 @@ use in your tests.")
(define-public python-certipy
(package
(name "python-certipy")
- (version "0.1.3")
+ (version "0.2.2")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "certipy" version))
- (sha256
- (base32
- "0n980gqpzh0fm58h3i4mi2i10wgj606lscm1r5sk60vbf6vh8mv9"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-pyopenssl))
- (native-inputs
- (list python-pytest))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "certipy" version))
+ (sha256
+ (base32 "0pm0kf079ws9s93vpkxnw3gj6a1hi34p34bicx69rqlyh7cg7wgy"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-cryptography))
+ (native-inputs (list python-pypa-build
+ python-flask
+ python-pytest
+ python-setuptools
+ python-wheel))
(home-page "https://github.com/LLNL/certipy")
(synopsis "Utility to create and sign CAs and certificates")
(description
@@ -1560,39 +1590,21 @@ I/O-free core, and integration modules for different event loops.")
(define-public python-argon2-cffi
(package
(name "python-argon2-cffi")
- (version "21.1.0")
+ (version "25.1.0")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "argon2-cffi" version))
- (sha256
- (base32
- "0w5q5cdwmzpjgw3bl9f6b9a5xai87qvx3jryra9gd8fi0c8vc47p"))
- (modules '((guix build utils)))
- (snippet '(delete-file-recursively "extras"))))
- ;; TODO: with pyproject-build-system the install phase fails.
- (build-system python-build-system)
- (arguments
- (list
- #:phases
- '(modify-phases %standard-phases
- (replace 'build
- (lambda _
- (setenv "ARGON2_CFFI_USE_SYSTEM" "1")
- (invoke "python" "setup.py" "build")))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest")
- (invoke "python" "-m" "argon2" "--help")
- ;; see tox.ini
- (invoke "python" "-m" "argon2" "-n" "1" "-t" "1" "-m" "8" "-p" "1")))))))
- (propagated-inputs
- (list python-cffi python-typing-extensions))
- (inputs (list argon2))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "argon2_cffi" version))
+ (sha256
+ (base32 "1ha62fg9blw38q3qayjid8608fp2a57fd81cpzic9x22ib6fajk9"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-hypothesis
+ (list python-hatch-fancy-pypi-readme
+ python-hatch-vcs
+ python-hatchling
python-pytest))
+ (propagated-inputs
+ (list python-argon2-cffi-bindings))
(home-page "https://argon2-cffi.readthedocs.io/")
(synopsis "Secure Password Hashes for Python")
(description
@@ -1601,6 +1613,39 @@ both a configurable runtime as well as memory consumption. This means that you
can decide how long it takes to hash a password and how much memory is required.")
(license license:expat)))
+(define-public python-argon2-cffi-bindings
+ (package
+ (name "python-argon2-cffi-bindings")
+ (version "25.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "argon2_cffi_bindings" version))
+ (sha256
+ (base32 "179256zsrh5c51zmv9k1sc9p102j152nzxqgwhhdhmadxbkg6mxr"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'use-system-argon2
+ (lambda _
+ (setenv "ARGON2_CFFI_USE_SYSTEM" "1"))))))
+ (native-inputs
+ (list python-pytest
+ python-setuptools
+ python-setuptools-scm))
+ (inputs
+ (list argon2))
+ (propagated-inputs
+ (list python-cffi))
+ (home-page "https://github.com/hynek/argon2-cffi-bindings")
+ (synopsis "Low-level CFFI bindings for Argon2")
+ (description
+ "argon2-cffi-bindings provides low-level CFFI bindings to the official
+implementation of the Argon2 password hashing algorithm.")
+ (license license:expat)))
+
(define-public python-privy
(package
(name "python-privy")
@@ -1687,19 +1732,20 @@ interacting with a U2F device over USB.")
(define-public python-sop
(package
(name "python-sop")
- (version "0.2.0")
+ (version "0.5.1")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "sop" version))
- (sha256
- (base32
- "0gljyjsdn6hdmwlwwb5g5s0c031p6izamvfxp0d39x60af8k5jyf"))))
- (build-system python-build-system)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/dkg/python-sop")
+ (commit (string-append "sop-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0sin5miiiqgww0s52jz098x44nbnx003vfd4jn55bs5mgca60lll"))))
+ (build-system pyproject-build-system)
(arguments
- '(#:tests? #f)) ; There are no tests, and unittest throws an error trying
- ; to find some:
- ; TypeError: don't know how to make test from: 0.2.0
+ (list #:tests? #f)) ; XXX: No tests upstream.
+ (native-inputs (list python-setuptools python-wheel))
(home-page "https://gitlab.com/dkg/python-sop")
(synopsis "Stateless OpenPGP Command-Line Interface")
(description
@@ -1744,23 +1790,25 @@ speed but without C extensions.")
(define-public python-zxcvbn
(package
(name "python-zxcvbn")
- (version "4.4.28")
- (source (origin
- (method git-fetch) ;for tests
- (uri (git-reference
- (url "https://github.com/dwolfhub/zxcvbn-python")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0xzlsqc9h0llfy19w4m39jgfcnvzqviv8jhgwn3r75kip97i5mvs"))))
- (build-system python-build-system)
+ (version "4.5.0")
+ (source
+ (origin
+ (method git-fetch) ;for tests
+ (uri (git-reference
+ (url "https://github.com/dwolfhub/zxcvbn-python")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0x39yi4zc1n6mjjk3rx32ick0hysyi9hv9ln69apcch4jf84j9fi"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://github.com/dwolfhub/zxcvbn-python")
(synopsis "Realistic password strength estimator Python library")
- (description "This is a Python implementation of the @code{zxcvbn} library
-created at Dropbox. The original library, written for JavaScript, can be
-found @url{https://github.com/dropbox/zxcvbn, here}. This port includes
-features such as:
+ (description
+ "This is a Python implementation of the @code{zxcvbn} library created at
+Dropbox. The original library, written for JavaScript, can be found
+@url{https://github.com/dropbox/zxcvbn, here}. This port includes features
+such as:
@enumerate
@item Accepts user data to be added to the dictionaries that are tested
against (name, birthdate, etc.)
@@ -1771,6 +1819,7 @@ in different situations.
@end enumerate")
(license license:expat)))
+;; XXX: Not maintained since 2016.
(define-public python-pydes
(package
(name "python-pydes")
@@ -1782,8 +1831,10 @@ in different situations.
(sha256
(base32 "04lh71f47y04vspfrdrq6a0hn060ibxvdp5z1pcr0gmqs8hqxaz2"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
- (home-page "http://twhiteman.netfirms.com/des.html")
+ (arguments
+ (list #:tests? #f)) ;no tests in PyPI, I could not fine Git
+ (native-inputs (list python-setuptools))
+ (home-page "http://twhiteman.netfirms.com/des.html") ;XXX: Dead link
(synopsis
"Pure python implementation of the DES and TRIPLE DES encryption algorithms")
(description