projects/guix·blob mpd-fix-groups · refs

1898 lines · 69.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Eric Dvorsak <[email protected]>
3;;; Copyright © 2015-2021, 2023, 2024 Efraim Flashner <[email protected]>
4;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <[email protected]>
5;;; Copyright © 2016, 2017, 2020, 2022, 2023 Marius Bakke <[email protected]>
6;;; Copyright © 2017 Ben Sturmfels <[email protected]>
7;;; Copyright © 2016 Sou Bunnbu <[email protected]>
8;;; Copyright © 2015 Cyril Roelandt <[email protected]>
9;;; Copyright © 2014, 2017 Eric Bavier <[email protected]>
10;;; Copyright © 2015, 2016 David Thompson <[email protected]>
11;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <[email protected]>
12;;; Copyright © 2016, 2017 Nikita <[email protected]>
13;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
14;;; Copyright © 2015, 2016, 2017, 2019, 2022, 2024, 2025 Ricardo Wurmus <[email protected]>
15;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
16;;; Copyright © 2016, 2017, 2020 Arun Isaac <[email protected]>
17;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
18;;; Copyright © 2018 Tomáš Čech <[email protected]>
19;;; Copyright © 2018, 2021 Nicolas Goaziou <[email protected]>
20;;; Copyright © 2018 Vagrant Cascadian <[email protected]>
21;;; Copyright © 2018 Nam Nguyen <[email protected]>
22;;; Copyright © 2019, 2025 Guillaume Le Vaillant <[email protected]>
23;;; Copyright © 2019 Clément Lassieur <[email protected]>
24;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
25;;; Copyright © 2020 Justus Winter <[email protected]>
26;;; Copyright © 2020, 2021 Vinicius Monego <[email protected]>
27;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
28;;; Copyright © 2021 Maxime Devos <[email protected]>
29;;; Copyright © 2022 Artyom V. Poptsov <[email protected]>
30;;; Copyright © 2022 Antero Mejr <[email protected]>
31;;; Copyright © 2023 Juliana Sims <[email protected]>
32;;; Copyright © 2023, 2025 Zheng Junjie <[email protected]>
33;;; Copyright © 2024 jgart <[email protected]>
34;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
35;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]>
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52(define-module (gnu packages python-crypto)
53 #:use-module (guix packages)
54 #:use-module (guix download)
55 #:use-module (guix gexp)
56 #:use-module (guix git-download)
57 #:use-module (guix build-system cargo)
58 #:use-module (guix build-system pyproject)
59 #:use-module (guix build-system python)
60 #:use-module (guix utils)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages nss)
63 #:use-module (gnu packages check)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages kerberos)
66 #:use-module (gnu packages libffi)
67 #:use-module (gnu packages lsof)
68 #:use-module (gnu packages multiprecision)
69 #:use-module (gnu packages password-utils)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages protobuf)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages python-build)
74 #:use-module (gnu packages python-check)
75 #:use-module (gnu packages python-compression)
76 #:use-module (gnu packages python-web)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages rust)
79 #:use-module (gnu packages rust-apps)
80 #:use-module (gnu packages swig)
81 #:use-module (gnu packages time)
82 #:use-module (gnu packages tls)
83 #:use-module (gnu packages xml)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (srfi srfi-1))
86
87(define-public python-base58
88 (package
89 (name "python-base58")
90 (version "2.1.1")
91 (source
92 (origin
93 (method url-fetch)
94 (uri (pypi-uri "base58" version))
95 (sha256
96 (base32 "1317ly0db7nnjg5k58f6nqa0svfcvn446xd5bpiyi0bfbczwpl65"))))
97 (build-system pyproject-build-system)
98 (native-inputs
99 (list python-pyhamcrest
100 python-pytest
101 python-pytest-benchmark
102 python-setuptools
103 python-wheel))
104 (home-page "https://github.com/keis/base58")
105 (synopsis "Base58 and Base58Check implementation")
106 (description
107 "Base58 and Base58Check implementation compatible with what is used by
108the Bitcoin network.")
109 (license license:expat)))
110
111(define-public python-bcrypt
112 (package
113 (name "python-bcrypt")
114 (version "3.2.2") ;the latest not Rust version
115 (source
116 (origin
117 (method url-fetch)
118 (uri (pypi-uri "bcrypt" version))
119 (sha256
120 (base32 "1yvbdfmkssx1jf2lrhbs58xljmyi3p82r7rav82pf1bp44642g23"))))
121 (build-system pyproject-build-system)
122 (native-inputs
123 (list python-pytest
124 python-setuptools))
125 (propagated-inputs
126 (list python-cffi))
127 (home-page "https://github.com/pyca/bcrypt/")
128 (synopsis "Modern password hashing library")
129 (description
130 "Bcrypt is a Python module which provides a password hashing method based
131on the Blowfish password hashing algorithm, as described in
132@url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
133Password Scheme\"} by Niels Provos and David Mazieres.")
134 (license license:asl2.0)))
135
136(define-public python-murmurhash
137 (package
138 (name "python-murmurhash")
139 (version "1.0.10")
140 (source
141 (origin
142 (method git-fetch)
143 (uri (git-reference
144 (url "https://github.com/explosion/murmurhash")
145 (commit (string-append "v" version))))
146 (file-name (git-file-name name version))
147 (sha256
148 (base32 "02ny4391kbrssq9bf7kq75615ragvbjhsqi9hgv7wiaiz6yai1k8"))))
149 (build-system pyproject-build-system)
150 (arguments
151 (list
152 #:phases
153 #~(modify-phases %standard-phases
154 (add-after 'install 'fix-installation
155 (lambda* (#:key inputs outputs #:allow-other-keys)
156 (with-directory-excursion
157 (string-append (site-packages inputs outputs) "/murmurhash")
158 (delete-file-recursively "tests")
159 (delete-file "mrmr.pyx")
160 (for-each
161 (lambda (file)
162 (chmod file #o555))
163 (find-files "." "\\.so$")))))
164 ;; XXX: Otherwise ModuleNotFoundError, and --pyargs doesn't seem
165 ;; to fix the issue.
166 (replace 'check
167 (lambda args
168 (copy-recursively "murmurhash/tests" "tests")
169 (delete-file-recursively "murmurhash")
170 (with-directory-excursion "tests"
171 (apply (assoc-ref %standard-phases 'check) args)))))))
172 (native-inputs
173 (list python-cython
174 python-murmurhash3
175 python-pytest
176 python-setuptools))
177 (home-page "https://github.com/explosion/murmurhash")
178 (synopsis "Cython bindings for MurmurHash2")
179 (description
180 "This package provides Cython bindings for MurmurHash2.")
181 (license license:expat)))
182
183(define-public python-passlib
184 (package
185 (name "python-passlib")
186 (version "1.7.4")
187 (source
188 (origin
189 (method url-fetch)
190 (uri (pypi-uri "passlib" version))
191 (sha256
192 (base32 "015y5qaw9qnxr29lg60dml1g5rbqd4586wy5n8m41ib55gvm1zfy"))))
193 (build-system pyproject-build-system)
194 (arguments
195 (list
196 #:phases
197 #~(modify-phases %standard-phases
198 (add-before 'check 'set-PYTHON_EGG_CACHE
199 ;; Some tests require access to "$HOME/.cython".
200 (lambda _
201 (setenv "PYTHON_EGG_CACHE" "/tmp"))))))
202 (native-inputs
203 (list python-pytest python-setuptools python-wheel))
204 (propagated-inputs
205 (list python-argon2-cffi python-bcrypt python-cryptography))
206 (home-page "https://bitbucket.org/ecollins/passlib")
207 (synopsis "Comprehensive password hashing framework")
208 (description
209 "Passlib is a password hashing library for Python 2 & 3, which provides
210cross-platform implementations of over 30 password hashing algorithms, as well
211as a framework for managing existing password hashes. It's designed to be
212useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
213to providing full-strength password hashing for multi-user application.")
214 (license license:bsd-3)))
215
216(define-public python-paramiko
217 (package
218 (name "python-paramiko")
219 (version "4.0.0")
220 (source
221 (origin
222 (method url-fetch)
223 (uri (pypi-uri "paramiko" version))
224 (sha256
225 (base32 "17ynnmagd44gpp76r26rz1kldb37f79hm4ibinlckj8c71xz09ba"))))
226 (build-system pyproject-build-system)
227 (native-inputs
228 (list python-icecream
229 python-pytest
230 python-pytest-relaxed
231 python-setuptools))
232 (propagated-inputs
233 (list python-bcrypt
234 python-cryptography
235 python-invoke
236 python-pyasn1
237 python-pynacl))
238 (home-page "https://www.paramiko.org/")
239 (synopsis "SSHv2 protocol library")
240 (description "Paramiko is a python implementation of the SSHv2 protocol,
241providing both client and server functionality. While it leverages a Python C
242extension for low level cryptography (PyCrypto), Paramiko itself is a pure
243Python interface around SSH networking concepts.")
244 (license license:lgpl2.1+)))
245
246(define-public python-ecdsa
247 (package
248 (name "python-ecdsa")
249 (version "0.19.0")
250 (source
251 (origin
252 (method url-fetch)
253 (uri (pypi-uri "ecdsa" version))
254 (sha256
255 (base32 "1y3bmx6aw5klx143jas3czwbsfvr5d3fs8gm1bfh16b5k48svsk0"))))
256 (build-system pyproject-build-system)
257 (arguments
258 (list
259 ;; Test failes with error: AssertionError: KeyboardInterrupt not raised.
260 #:test-flags #~(list "-k" "not test_multithreading_with_interrupts")))
261 (native-inputs
262 (list openssl
263 python-pytest
264 python-setuptools
265 python-wheel))
266 (propagated-inputs
267 (list python-six))
268 (home-page "https://github.com/warner/python-ecdsa")
269 (synopsis "ECDSA cryptographic signature library (pure python)")
270 (description
271 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
272Curve Digital Signature Algorithm), implemented purely in Python. With this
273library, you can quickly create key pairs (signing key and verifying key), sign
274messages, and verify the signatures. The keys and signatures are very short,
275making them easy to handle and incorporate into other protocols.")
276 (license license:expat)))
277
278(define-public python-kerberos
279 (package
280 (name "python-kerberos")
281 (version "1.3.1")
282 (source
283 (origin
284 (method url-fetch)
285 (uri (pypi-uri "kerberos" version))
286 (sha256
287 (base32 "0b0a8rrwgfjrslz3jd3r5l7vr7jx5bc17sq0dbwn002f58a4dl6d"))))
288 (build-system pyproject-build-system)
289 (arguments
290 ;; No tests in PyPI, provided in Git but all of them require networking.
291 (list #:tests? #f))
292 (native-inputs
293 (list python-setuptools
294 python-wheel))
295 (inputs
296 (list mit-krb5))
297 (home-page "https://github.com/apple/ccs-pykerberos")
298 (synopsis "Python Kerberos library used by CalendarServer")
299 (description
300 "This Python package is a high-level wrapper for Kerberos (GSSAPI)
301operations. The goal is to avoid having to build a module that wraps the
302entire Kerberos.framework, and instead offer a limited set of functions that
303do what is needed for client/server Kerberos authentication based on
304<http://www.ietf.org/rfc/rfc4559.txt>.")
305 (license license:asl2.0)))
306
307(define-public python-keyring
308 (package
309 (name "python-keyring")
310 (version "23.9.3")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (pypi-uri "keyring" version))
315 (sha256
316 (base32
317 "19f4jpsxng9sjfqi8ww5hgg196r2zh1zb8g71wjr1xa27kc1vc39"))))
318 (build-system pyproject-build-system)
319 (arguments
320 (list
321 #:test-flags '(list "-c" "/dev/null") ;avoid extra test dependencies
322 #:phases
323 #~(modify-phases %standard-phases
324 (add-before 'check 'workaround-test-failure
325 (lambda _
326 ;; Workaround a failure in the test_entry_point test (see:
327 ;; https://github.com/jaraco/keyring/issues/526).
328 (delete-file-recursively "keyring.egg-info"))))))
329 (native-inputs
330 (list python-toml
331 python-pytest
332 python-setuptools
333 python-setuptools-scm
334 python-wheel))
335 (propagated-inputs
336 (list python-importlib-metadata
337 python-jaraco-classes
338 python-secretstorage))
339 (home-page "https://github.com/jaraco/keyring")
340 (synopsis "Store and access your passwords safely")
341 (description
342 "The Python keyring lib provides a easy way to access the system keyring
343service from python. It can be used in any application that needs safe
344password storage.")
345 ;; "MIT" and PSF dual license
346 (license license:x11)))
347
348(define-public python-keyrings-alt
349 (package
350 (name "python-keyrings-alt")
351 (version "5.0.2")
352 (source
353 (origin
354 (method url-fetch)
355 (uri (pypi-uri "keyrings_alt" version))
356 (sha256
357 (base32 "1yv9gnmkw6kpsjgnid0k1qcd49n9csqcvf02cl88bcf8knz7w2cg"))))
358 (build-system pyproject-build-system)
359 (native-inputs
360 (list python-keyring
361 python-pytest
362 python-setuptools
363 python-setuptools-scm
364 python-wheel))
365 (propagated-inputs
366 (list python-jaraco-classes
367 python-jaraco-context))
368 (home-page "https://github.com/jaraco/keyrings.alt")
369 (synopsis "Alternate keyring implementations")
370 (description
371 "Keyrings in this package may have security risks or other implications.
372These backends were extracted from the main keyring project to make them
373available for those who wish to employ them, but are discouraged for general
374production use. Include this module and use its backends at your own risk.")
375 (license license:expat)))
376
377(define-public python-blake3
378 (package
379 (name "python-blake3")
380 (version "0.3.1")
381 (source
382 (origin
383 (method url-fetch)
384 (uri (pypi-uri "blake3" version))
385 (sha256
386 (base32 "1p6z6jfk8n1lshz4cp6dgz2i8zmqdxwr8d9m86ypp3m1kp70k5xk"))))
387 (build-system cargo-build-system)
388 (arguments
389 (list
390 #:install-source? #f
391 #:imported-modules `(,@%pyproject-build-system-modules
392 ,@%cargo-build-system-modules)
393 #:modules `((guix build cargo-build-system)
394 ((guix build pyproject-build-system) #:prefix py:)
395 (guix build utils))
396 #:phases
397 #~(modify-phases %standard-phases
398 (add-after 'build 'build-python-module
399 (assoc-ref py:%standard-phases 'build))
400 (add-after 'build-python-module 'install-python-module
401 (assoc-ref py:%standard-phases 'install)))))
402 (native-inputs
403 (list python-wrapper
404 maturin))
405 (inputs (cargo-inputs 'python-blake3))
406 (home-page "https://github.com/oconnor663/blake3-py")
407 (synopsis "Python bindings for the Rust blake3 crate")
408 (description "This package provides Python bindings for the Rust crate of
409blake3, a cryptographic hash function.")
410 ;; This work is released into the public domain with CC0
411 ;; 1.0. Alternatively, it is licensed under the Apache License 2.0.
412 (license (list license:asl2.0 license:cc0))))
413
414(define-public python-certauth
415 (package
416 (name "python-certauth")
417 (version "1.3.0")
418 (source
419 (origin
420 (method url-fetch)
421 (uri (pypi-uri "certauth" version))
422 (sha256
423 (base32
424 "1yxqfb5131wahjyw9pxz03bq476rcfx62s6k53xx4cqbzzgdaqkq"))))
425 (build-system pyproject-build-system)
426 (arguments
427 (list
428 #:test-flags
429 #~(list "-k" (string-join
430 (list
431 ;; Those tests uses PKCS12, which has been removed in
432 ;; pyopenssl 23.3.0:
433 "not test_custom_not_before_not_after"
434 "test_ca_cert_in_mem")
435 " and not "))
436 #:phases
437 #~(modify-phases %standard-phases
438 (add-after 'unpack 'adjust-test
439 (lambda _
440 ;; Newer PyOpenSSL no longer separates extensions with
441 ;; newline (this can be removed for >1.3.0).
442 (substitute* "test/test_certauth.py"
443 (("7334\\\\n, DNS") "7334, DNS")))))))
444 (propagated-inputs
445 (list python-pyopenssl python-tldextract))
446 (native-inputs
447 (list nss-certs-for-test python-pytest-cov python-setuptools python-wheel))
448 (home-page "https://github.com/ikreymer/certauth")
449 (synopsis "Certificate authority creation tool")
450 (description "This package provides a small library, built on top of
451pyOpenSSL, which allows for creating a custom certificate authority (CA)
452certificate, and generating on-demand dynamic host certs using that CA
453certificate. It is most useful for use with a man-in-the-middle HTTPS proxy,
454for example, for recording or replaying web content.")
455 (license license:expat)))
456
457(define-public python-certifi
458 (package
459 (name "python-certifi")
460 (version "2025.06.15")
461 (source
462 (origin
463 (method git-fetch) ; no tests in PyPI package
464 (uri (git-reference
465 (url "https://github.com/certifi/python-certifi")
466 (commit version)))
467 (file-name (git-file-name name version))
468 (sha256
469 (base32 "1yyy3c64xbwfg2b8hi1fd6vwh56fzc90jfy3czimv5i91gwrl7ba"))
470 (snippet #~(begin
471 (delete-file "certifi/cacert.pem")
472 (delete-file "certifi/core.py")
473 (with-output-to-file "certifi/core.py"
474 (lambda _
475 (display
476 "\"\"\"
477certifi.py
478~~~~~~~~~~
479This file is a Guix-specific version of core.py.
480
481This module returns the installation location of SSL_CERT_FILE or
482/etc/ssl/certs/ca-certificates.crt, or its contents.
483\"\"\"
484import os
485
486_CA_CERTS = None
487
488try:
489 _CA_CERTS = os.environ [\"SSL_CERT_FILE\"]
490except:
491 _CA_CERTS = os.path.join(\"/etc\", \"ssl\", \"certs\", \"ca-certificates.crt\")
492
493def where() -> str:
494 return _CA_CERTS
495
496def contents() -> str:
497 with open(where(), \"r\", encoding=\"ascii\") as data:
498 return data.read()")))))))
499 (build-system pyproject-build-system)
500 (native-inputs
501 (list nss-certs-for-test
502 python-pytest
503 python-setuptools
504 python-wheel))
505 (home-page "https://certifi.io/")
506 (synopsis "Python CA certificate bundle")
507 (description
508 "Certifi is a Python library that contains a CA certificate bundle, which
509is used by the Requests library to verify HTTPS requests.")
510 (license license:asl2.0)))
511
512(define-public python-cryptography-vectors
513 (package
514 (name "python-cryptography-vectors")
515 (version "44.0.0")
516 (source
517 (origin
518 (method url-fetch)
519 (uri (pypi-uri "cryptography_vectors" version))
520 (sha256
521 (base32
522 "1aw06msy65rs27yxfp4xlwfq432ny1af5cx8s7zsbfa5div2hqhh"))))
523 (build-system pyproject-build-system)
524 (arguments (list #:tests? #f)) ; No tests included.
525 (native-inputs
526 (list python-flit-core))
527 (home-page "https://github.com/pyca/cryptography")
528 (synopsis "Test vectors for the cryptography package")
529 (description
530 "This package contains test vectors for the cryptography package.")
531 ;; Distributed under either BSD-3 or ASL2.0
532 (license (list license:bsd-3 license:asl2.0))))
533
534(define-public python-cryptography
535 (package
536 (name "python-cryptography")
537 (version "44.0.0")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (pypi-uri "cryptography" version))
542 (sha256
543 (base32
544 "00is2nzcl2pyhr90llga5mnbw3rvakn75rq10x1r6hhb6i7q6knd"))
545 (snippet
546 #~(begin (use-modules (guix build utils))
547 (for-each delete-file
548 (find-files "." "Cargo\\.lock$"))
549 (substitute* "pyproject.toml"
550 (("locked = true") "offline = true"))))))
551 (build-system pyproject-build-system)
552 (arguments
553 (list
554 #:imported-modules `(,@%cargo-build-system-modules
555 ,@%pyproject-build-system-modules)
556 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
557 (guix build pyproject-build-system)
558 (guix build utils))
559 #:phases
560 #~(modify-phases %standard-phases
561 (add-after 'unpack 'prepare-cargo-build-system
562 (lambda args
563 (for-each
564 (lambda (phase)
565 (format #t "Running cargo phase: ~a~%" phase)
566 (apply (assoc-ref cargo:%standard-phases phase)
567 #:cargo-target #$(cargo-triplet)
568 args))
569 '(unpack-rust-crates
570 configure
571 check-for-pregenerated-files
572 patch-cargo-checksums)))))))
573 (native-inputs
574 (append
575 (list python-certifi
576 python-cffi
577 python-click
578 python-cryptography-vectors
579 python-mypy
580 python-pretend
581 python-pytest
582 python-pytest-benchmark
583 python-pytest-cov
584 python-pytest-randomly
585 python-pytest-xdist
586 python-setuptools
587 python-wheel
588 rust
589 `(,rust "cargo"))
590 (or (and=> (%current-target-system)
591 (compose list make-rust-sysroot))
592 '())))
593 (inputs
594 (cons* maturin openssl (cargo-inputs 'python-cryptography)))
595 (propagated-inputs (list python-cffi))
596 (home-page "https://github.com/pyca/cryptography")
597 (synopsis "Cryptographic recipes and primitives for Python")
598 (description
599 "@code{cryptography} is a package which provides cryptographic recipes
600and primitives to Python developers. It aims to be the “cryptographic
601standard library” for Python. The package includes both high level recipes,
602and low level interfaces to common cryptographic algorithms such as symmetric
603ciphers, message digests and key derivation functions.")
604 ;; Distributed under either BSD-3 or ASL2.0
605 (license (list license:bsd-3 license:asl2.0))))
606
607(define-public python-pyopenssl
608 (package
609 (name "python-pyopenssl")
610 (version "24.3.0")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (pypi-uri "pyopenssl" version))
615 (sha256
616 (base32
617 "0dmv720kn5ws7bs1rkn59qmhzv5wxkkgriampi34g0vxawcs1xs9"))))
618 (build-system pyproject-build-system)
619 (arguments
620 (list
621 #:phases
622 #~(modify-phases %standard-phases
623 (replace 'check
624 (lambda* (#:key tests? #:allow-other-keys)
625 (when tests?
626 ;; PyOpenSSL runs tests against a certificate with a fixed
627 ;; expiry time. To ensure successful builds in the future,
628 ;; set the time to roughly the release date.
629 (invoke "faketime" "2024-07-20" "pytest" "-vv"
630 "--deselect"
631 ;; This test seems to fail when using faketime, at
632 ;; least on aarch64-linux with OSError: [Errno 22]
633 ;; Invalid argument
634 "tests/test_ssl.py::TestDTLS::test_timeout"
635 "-k"
636 ;; This test tries to look up certificates from
637 ;; the compiled-in default path in OpenSSL, which
638 ;; does not exist in the build environment.
639 "not test_fallback_default_verify_paths ")))))))
640 (propagated-inputs (list python-cryptography))
641 (inputs (list openssl))
642 (native-inputs
643 (list libfaketime
644 python-pretend
645 python-pytest
646 python-pytest-rerunfailures
647 python-setuptools))
648 (home-page "https://github.com/pyca/pyopenssl")
649 (synopsis "Python wrapper module around the OpenSSL library")
650 (description "PyOpenSSL is a high-level wrapper around a subset of the
651OpenSSL library.")
652 (properties `((updater-extra-inputs . ("openssl"))
653 (updater-extra-native-inputs . ("libfaketime"))))
654 (license license:asl2.0)))
655
656(define-public python-ed25519
657 (package
658 (name "python-ed25519")
659 (version "1.5")
660 (source
661 (origin
662 (method git-fetch)
663 (uri (git-reference
664 (url "https://github.com/warner/python-ed25519")
665 (commit version)))
666 (file-name (git-file-name name version))
667 (sha256
668 (base32 "0adxfm12wygh2gdsn83xmp1sw7w96ni7mr7v3z3y6q0mvh9n5x0p"))))
669 (build-system pyproject-build-system)
670 (arguments
671 (list
672 #:phases
673 #~(modify-phases %standard-phases
674 ;; XXX: Use custom test back-end on python-team branch.
675 (replace 'check
676 (lambda* (#:key tests? #:allow-other-keys)
677 (when tests? (invoke "python" "test_ed25519_kat.py")))))))
678 (native-inputs (list python-setuptools))
679 (home-page "https://github.com/warner/python-ed25519")
680 (synopsis "Ed25519 public-key signatures")
681 (description
682 "This package provides Ed25519 public-key signatures in Python.")
683 (license license:expat)))
684
685(define-public python-axolotl-curve25519
686 (package
687 (name "python-axolotl-curve25519")
688 (version "0.4.1.post2")
689 (source
690 (origin
691 (method url-fetch)
692 (uri (pypi-uri "python-axolotl-curve25519" version))
693 (sha256
694 (base32
695 "18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
696 (build-system pyproject-build-system)
697 (arguments
698 (list
699 #:test-backend #~'unittest
700 #:phases
701 #~(modify-phases %standard-phases
702 (add-after 'unpack 'relax-gcc-14-strictness
703 (lambda _
704 (setenv "CFLAGS"
705 (string-append "-g -O2 -Wno-error=int-conversion")))))))
706 (native-inputs (list python-setuptools))
707 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
708 (synopsis "Python wrapper for curve25519 library")
709 (description "This is a python wrapper for the curve25519 library
710with ed25519 signatures. The C code was pulled from
711libaxolotl-android. At the moment this wrapper is meant for use by
712python-axolotl.")
713 (license (list license:gpl3 ; Most files
714 license:bsd-3)))) ; curve/curve25519-donna.c
715
716(define-public python-axolotl
717 (package
718 (name "python-axolotl")
719 (version "0.2.3")
720 (source
721 (origin
722 (method git-fetch)
723 (uri (git-reference
724 (url "https://github.com/tgalal/python-axolotl")
725 (commit version)))
726 (file-name (git-file-name name version))
727 (sha256
728 (base32 "0bwzsyb3z54259kh667m714n28r6jp8almb5mrx48ar0pgashsrl"))))
729 (build-system pyproject-build-system)
730 (arguments
731 (list
732 #:phases
733 #~(modify-phases %standard-phases
734 ;; Don't install tests
735 (add-after 'install 'cleanup-install
736 (lambda* (#:key inputs outputs #:allow-other-keys)
737 (delete-file-recursively
738 (string-append (site-packages inputs outputs)
739 "/axolotl/tests")))))))
740 (native-inputs (list python-pytest python-setuptools python-wheel))
741 (propagated-inputs (list python-axolotl-curve25519 python-cryptography
742 python-protobuf))
743 (home-page "https://github.com/tgalal/python-axolotl")
744 (synopsis "Python port of libaxolotl-android")
745 (description
746 "This is a python port of libaxolotl-android. This is a ratcheting
747forward secrecy protocol that works in synchronous and asynchronous messaging
748environments.")
749 (license license:gpl3)))
750
751(define-public python-omemo-dr
752 (package
753 (name "python-omemo-dr")
754 (version "1.0.1")
755 (source
756 (origin
757 (method git-fetch)
758 (uri (git-reference
759 (url "https://dev.gajim.org/gajim/omemo-dr")
760 (commit (string-append "v" version))))
761 (file-name (git-file-name name version))
762 (sha256
763 (base32 "1gx0znbfvs8jg9s754hha81l8wpghswkfsqx2jzpgv6gigf3sm8z"))))
764 (build-system pyproject-build-system)
765 (arguments (list #:test-backend #~'unittest))
766 (propagated-inputs
767 (list python-cryptography python-protobuf-5 python-setuptools))
768 (home-page "https://dev.gajim.org/gajim/omemo-dr")
769 (synopsis "OMEMO cryptography library")
770 (description "OMEMO cryptography library that was forked from python-axolotl.")
771 (license license:gpl3)))
772
773(define-public python-oscrypto
774 (package
775 (name "python-oscrypto")
776 (version "1.3.0")
777 (source
778 (origin
779 (method git-fetch)
780 (uri (git-reference
781 (url "https://github.com/wbond/oscrypto/")
782 (commit version)))
783 (file-name (git-file-name name version))
784 (sha256
785 (base32
786 "1v5wkmzcyiqy39db8j2dvkdrv2nlsc48556h73x4dzjwd6kg4q0a"))))
787 (build-system pyproject-build-system)
788 (arguments
789 (list
790 #:test-backend #~'custom
791 #:test-flags
792 #~(list "run.py"
793 (format #f "use_openssl=~a,~a"
794 (search-input-file %build-inputs "/lib/libcrypto.so")
795 (search-input-file %build-inputs "/lib/libssl.so"))
796 "skip_internet=true"
797 "tests")
798 #:phases
799 #~(modify-phases %standard-phases
800 (add-before 'check 'set-envs
801 (lambda* (#:key inputs #:allow-other-keys)
802 (setenv
803 "SSL_CERT_FILE"
804 (search-input-file
805 inputs "/etc/ssl/certs/ca-certificates.crt")))))))
806 (propagated-inputs (list python-asn1crypto))
807 (native-inputs (list nss-certs-for-test openssl python-setuptools))
808 (home-page "https://github.com/wbond/oscrypto/")
809 (synopsis "Compiler-free Python encryption library")
810 (description
811 "@code{Python-oscrypto} is a compilation-free encryption library which
812integrates with the encryption library that is part of the operating system.
813It supports TLS (SSL) sockets, key generation, encryption, decryption,
814signing, verification and KDFs using the OS crypto libraries.")
815 (license license:expat)))
816
817(define-public python-pyaes
818 ;; XXX: Last updated in 2017.
819 (package
820 (name "python-pyaes")
821 (version "1.6.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "pyaes" version))
826 (sha256
827 (base32 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
828 (build-system pyproject-build-system)
829 (arguments
830 (list #:tests? #f)) ;no tests in PyPI
831 (native-inputs (list python-setuptools))
832 (home-page "https://github.com/ricmoo/pyaes")
833 (synopsis "Implementation of AES in Python")
834 (description "This package contains a pure-Python implementation of the
835AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
836ECB and OFB).")
837 (license license:expat)))
838
839(define-public python-asn1crypto
840 (package
841 (name "python-asn1crypto")
842 (version "1.5.1")
843 (source
844 (origin
845 (method git-fetch)
846 (uri (git-reference
847 (url "https://github.com/wbond/asn1crypto")
848 (commit version)))
849 (file-name (git-file-name name version))
850 (sha256
851 (base32
852 "1qsg06qrqnzixmrm65ibg503y2gffd675h1si4jgh92s315w1jrk"))))
853 (build-system python-build-system)
854 (arguments
855 '(#:phases (modify-phases %standard-phases
856 (replace 'check
857 (lambda* (#:key tests? #:allow-other-keys)
858 (when tests?
859 (invoke "python" "run.py" "tests")))))))
860 (home-page "https://github.com/wbond/asn1crypto")
861 (synopsis "ASN.1 parser and serializer in Python")
862 (description
863 "@code{asn1crypto} is an ASN.1 parser and serializer with definitions for
864private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
865PKCS#12, PKCS#5, X.509 and TSP.")
866 (license license:expat)))
867
868(define-public python-pynacl
869 (package
870 (name "python-pynacl")
871 (version "1.5.0")
872 (source
873 (origin
874 (method url-fetch)
875 (uri (pypi-uri "PyNaCl" version))
876 (modules '((guix build utils)))
877 (snippet
878 '(begin
879 ;; Remove bundled libsodium.
880 (delete-file-recursively "src/libsodium")))
881 (sha256
882 (base32
883 "1fi0jbxhh3svajzldlb6gj5sr5a48v11xlmx0wb831db167l9iwa"))))
884 (build-system pyproject-build-system)
885 (arguments
886 (list
887 #:phases
888 '(modify-phases %standard-phases
889 (add-before 'build 'use-system-sodium
890 (lambda _
891 (setenv "SODIUM_INSTALL" "system"))))))
892 (native-inputs
893 (list python-hypothesis python-pytest python-setuptools python-wheel))
894 (propagated-inputs
895 (list python-cffi python-six libsodium))
896 (home-page "https://github.com/pyca/pynacl/")
897 (synopsis "Python bindings to libsodium")
898 (description
899 "PyNaCl is a Python binding to libsodium, which is a fork of the
900Networking and Cryptography library. These libraries have a stated goal
901of improving usability, security and speed.")
902 (license license:asl2.0)))
903
904(define-public python-crcmod
905 (package
906 (name "python-crcmod")
907 (version "1.7")
908 (source (origin
909 (method url-fetch)
910 (uri (pypi-uri "crcmod" version))
911 (sha256
912 (base32
913 "07k0hgr42vw2j92cln3klxka81f33knd7459cn3d8aszvfh52w6w"))))
914 (build-system python-build-system)
915 (arguments
916 (list
917 #:phases
918 #~(modify-phases %standard-phases
919 (replace 'check
920 (lambda* (#:key tests? #:allow-other-keys)
921 (when tests?
922 ;; As per the Unit Testing subsection in the README.
923 (invoke "python" "-m" "crcmod.test")))))))
924 (synopsis "CRC generator for Python")
925 (description "Python module for generating objects that compute the
926Cyclic Redundancy Check.")
927 (home-page "https://crcmod.sourceforge.net/")
928 (license license:expat)))
929
930(define-public python-blurhash
931 (package
932 (name "python-blurhash")
933 (version "1.1.4")
934 (source
935 (origin
936 ;; Tests not included in pypi release and releases not tagged in git repo.
937 (method git-fetch)
938 (uri (git-reference
939 (url "https://github.com/halcy/blurhash-python")
940 (commit "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8")))
941 (file-name (git-file-name name version))
942 (sha256
943 (base32
944 "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"))))
945 (build-system python-build-system)
946 (arguments
947 '(#:phases
948 (modify-phases %standard-phases
949 (replace 'check
950 (lambda _
951 (delete-file "setup.cfg")
952 (invoke "pytest"))))))
953 (native-inputs
954 (list python-numpy python-pillow python-pytest))
955 (home-page "https://github.com/halcy/blurhash-python")
956 (synopsis
957 "Pure-Python implementation of the blurhash algorithm")
958 (description
959 "Pure-Python implementation of the blurhash algorithm.")
960 (license license:expat)))
961
962(define-public python-ecpy
963 (package
964 (name "python-ecpy")
965 (version "0.10.0")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "ECPy" version))
970 (sha256
971 (base32
972 "1gc3i5s93zq6x1nkaxkq1dvmsc12vmrw0hns9f5s1hcb78ni52c8"))))
973 (build-system python-build-system)
974 (propagated-inputs
975 (list python-future))
976 (home-page "https://github.com/ubinity/ECPy")
977 (synopsis "Pure Python Elliptic Curve Library")
978 (description "This package provides a Elliptic Curve Library in pure
979Python.")
980 (license license:asl2.0)))
981
982(define-public python-josepy
983 (package
984 (name "python-josepy")
985 (version "2.1.0")
986 (source
987 (origin
988 (method git-fetch)
989 (uri (git-reference
990 (url "https://github.com/certbot/josepy")
991 (commit (string-append "v" version))))
992 (file-name (git-file-name name version))
993 (sha256
994 (base32 "1zplnfrmc4nps9lgl3fz434ja7lmi9v8waydflzvpi75kf5fqxc1"))))
995 (build-system pyproject-build-system)
996 (native-inputs (list python-poetry-core python-pytest))
997 (propagated-inputs (list python-cryptography))
998 (home-page "https://github.com/certbot/josepy")
999 (synopsis "JOSE protocol implementation in Python")
1000 (description
1001 "This package provides a Python implementation of the JOSE protocol
1002(Javascript Object Signing and Encryption).")
1003 (license license:asl2.0)))
1004
1005(define pycryptodome-unbundle-tomcrypt-snippet
1006 #~(begin
1007 ;; Unbundle libtomcrypt.
1008 (delete-file-recursively "src/libtom")
1009 (substitute* "src/DES.c"
1010 (("#include \"libtom/tomcrypt_des.c\"")
1011 "#include <tomcrypt.h>"))
1012 (substitute* "setup.py"
1013 (("include_dirs=\\['src/', 'src/libtom/'\\]")
1014 ;; FIXME: why does '-ltomcrypt' need to be added
1015 ;; manually, even when 'tomcrypt' is added to 'libraries'?
1016 ;; This behaviour is not documented at
1017 ;; <https://docs.python.org/3/extending/building.html>.
1018 "include_dirs=['src/'], libraries=['tomcrypt', 'tommath'],
1019 extra_link_args=['-ltomcrypt', '-ltommath']"))))
1020
1021(define-public python-pycryptodome
1022 (package
1023 (name "python-pycryptodome")
1024 (version "3.21.0")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (pypi-uri "pycryptodome" version))
1029 (sha256
1030 (base32
1031 "15vjyjy686kgm4fnpwlah1wvxxy0wvr4q5vnp1iygnlv8q6pwy7p"))
1032 (modules '((guix build utils)))
1033 (snippet pycryptodome-unbundle-tomcrypt-snippet)))
1034 (build-system python-build-system)
1035 (inputs
1036 (list libtomcrypt libtommath))
1037 (home-page "https://www.pycryptodome.org")
1038 (synopsis "Low-level cryptographic Python library")
1039 (description
1040 "PyCryptodome is a self-contained Python package of low-level
1041cryptographic primitives. It's not a wrapper to a separate C library like
1042OpenSSL. To the largest possible extent, algorithms are implemented in pure
1043Python. Only the pieces that are extremely critical to performance (e.g.,
1044block ciphers) are implemented as C extensions.
1045
1046You are expected to have a solid understanding of cryptography and security
1047engineering to successfully use these primitives. You must also be able to
1048recognize that some are obsolete (e.g., TDES) or even insecure (RC4).
1049
1050It provides many enhancements over the last release of PyCrypto (2.6.1):
1051
1052@itemize
1053@item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1054@item Accelerated AES on Intel platforms via AES-NI
1055@item First-class support for PyPy
1056@item Elliptic curves cryptography (NIST P-256 curve only)
1057@item Better and more compact API (nonce and iv attributes for ciphers,
1058automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1059more)
1060@item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1061@item Salsa20 and ChaCha20 stream ciphers
1062@item scrypt and HKDF
1063@item Deterministic (EC)DSA
1064@item Password-protected PKCS#8 key containers
1065@item Shamir’s Secret Sharing scheme
1066@item Random numbers get sourced directly from the OS (and not from a CSPRNG
1067in userspace)
1068@item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1069@item Major clean-ups and simplification of the code base
1070@end itemize
1071
1072This package provides drop-in compatibility with PyCrypto. It is one of two
1073PyCryptodome variants, the other being python-pycryptodomex.")
1074 (license (list license:bsd-2
1075 license:public-domain)))) ; code inherited from PyCrypto
1076
1077(define-public python-pycryptodomex
1078 (package (inherit python-pycryptodome)
1079 (name "python-pycryptodomex")
1080 (version (package-version python-pycryptodome))
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "pycryptodomex" version))
1085 (sha256
1086 (base32 "0v4y03ha7rm9kdcv9fkrmc94425z3q3mq1nn5p1jbpc1ag80nb92"))
1087 (modules '((guix build utils)))
1088 (snippet pycryptodome-unbundle-tomcrypt-snippet)))
1089 (description
1090 "PyCryptodome is a self-contained Python package of low-level
1091cryptographic primitives. It's not a wrapper to a separate C library like
1092OpenSSL. To the largest possible extent, algorithms are implemented in pure
1093Python. Only the pieces that are extremely critical to performance (e.g.,
1094block ciphers) are implemented as C extensions.
1095
1096You are expected to have a solid understanding of cryptography and security
1097engineering to successfully use these primitives. You must also be able to
1098recognize that some are obsolete (e.g., TDES) or even insecure (RC4).
1099
1100It provides many enhancements over the last release of PyCrypto (2.6.1):
1101
1102@itemize
1103@item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1104@item Accelerated AES on Intel platforms via AES-NI
1105@item First-class support for PyPy
1106@item Elliptic curves cryptography (NIST P-256 curve only)
1107@item Better and more compact API (nonce and iv attributes for ciphers,
1108automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1109more)
1110@item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1111@item Salsa20 and ChaCha20 stream ciphers
1112@item scrypt and HKDF
1113@item Deterministic (EC)DSA
1114@item Password-protected PKCS#8 key containers
1115@item Shamir’s Secret Sharing scheme
1116@item Random numbers get sourced directly from the OS (and not from a CSPRNG
1117in userspace)
1118@item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1119@item Major clean-ups and simplification of the code base
1120@end itemize
1121
1122PyCryptodomex is the stand-alone version of PyCryptodome that no longer
1123provides drop-in compatibility with PyCrypto.")))
1124
1125(define-public python-m2crypto
1126 (package
1127 (name "python-m2crypto")
1128 (version "0.38.0")
1129 (source
1130 (origin
1131 (method url-fetch)
1132 (uri (pypi-uri "M2Crypto" version))
1133 (sha256
1134 (base32 "1jyynaybncgjp8rndrwjpj5gnbrislngimf6ind9874h6052dwlr"))))
1135 (build-system pyproject-build-system)
1136 (arguments
1137 `(;; FIXME: Tests start failing with time due to date checks in TLS
1138 ;; certificates.
1139 #:tests? #f))
1140 (inputs (list openssl))
1141 (native-inputs (list swig python-setuptools python-wheel))
1142 (home-page "https://gitlab.com/m2crypto/m2crypto")
1143 (synopsis "Python crypto and TLS toolkit")
1144 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
1145featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
1146(including AES); TLS functionality to implement clients and servers; HTTPS
1147extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
1148AuthCookies for web session management; FTP/TLS client and server; S/MIME;
1149M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
1150through the Engine interface.")
1151 (license license:expat)))
1152
1153(define-public python-pykeepass
1154 (package
1155 (name "python-pykeepass")
1156 (version "3.2.1")
1157 (source
1158 (origin
1159 (method git-fetch)
1160 ;; Source tarball on PyPI doesn't include tests.
1161 (uri (git-reference
1162 (url "https://github.com/libkeepass/pykeepass")
1163 (commit version)))
1164 (file-name (git-file-name name version))
1165 (sha256
1166 (base32 "1symxf4ahylynihnp9z4z3lh2vy65ipvg8s4hjrnn936hcaaxghk"))))
1167 (build-system python-build-system)
1168 (arguments
1169 `(#:phases
1170 (modify-phases %standard-phases
1171 (add-after 'unpack 'make-kdbx-writable
1172 ;; Tests have to write to the .kdbx files in the test directory.
1173 (lambda _
1174 (with-directory-excursion "tests"
1175 (for-each make-file-writable (find-files "."))
1176 #t)))
1177 (add-before 'build 'patch-requirements
1178 (lambda _
1179 ;; Update requirements from dependency==version
1180 ;; to dependency>=version.
1181 (substitute* "setup.py"
1182 (("==") ">="))
1183 #t)))))
1184 (propagated-inputs
1185 (list python-argon2-cffi
1186 python-construct
1187 python-dateutil
1188 python-future
1189 python-lxml
1190 python-pycryptodomex))
1191 (home-page "https://github.com/libkeepass/pykeepass")
1192 (synopsis "Python library to interact with keepass databases")
1193 (description
1194 "This library allows you to write entries to a KeePass database. It
1195supports KDBX3 and KDBX4.")
1196 ;; There are no copyright headers in the source code. The LICENSE file
1197 ;; indicates GPL3.
1198 (license license:gpl3+)))
1199
1200(define-public python-pylibscrypt
1201 (package
1202 (name "python-pylibscrypt")
1203 (version "2.0.0")
1204 (source
1205 (origin
1206 (method git-fetch)
1207 (uri (git-reference
1208 (url "https://github.com/jvarho/pylibscrypt")
1209 (commit (string-append "v" version))))
1210 (file-name (git-file-name name version))
1211 (sha256
1212 (base32 "0hshivwl3xznlqhrvwbylp40k1bfx4gnyzmxwldkwjhf1260zan1"))))
1213 (build-system pyproject-build-system)
1214 (native-inputs (list python-pytest python-setuptools python-wheel))
1215 (home-page "https://github.com/jvarho/pylibscrypt")
1216 (synopsis "Scrypt for Python")
1217 (description
1218 "This package provides another Scrypt module for Python.")
1219 (license license:isc)))
1220
1221(define-public python-libnacl
1222 (package
1223 (name "python-libnacl")
1224 (version "2.1.0")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "libnacl" version))
1229 (sha256
1230 (base32
1231 "0q18j8kfibhi5qckakhf0b0psf8nkll91nfp3yqxkri9vykqshgk"))))
1232 (build-system pyproject-build-system)
1233 (arguments
1234 `(#:phases
1235 (modify-phases %standard-phases
1236 (add-after 'unpack 'locate-libsodium
1237 (lambda* (#:key inputs #:allow-other-keys)
1238 (substitute* "libnacl/__init__.py"
1239 (("ctypes\\.util\\.find_library\\('sodium'\\)")
1240 (string-append "'"
1241 (search-input-file inputs "/lib/libsodium.so")
1242 "'")))))
1243 (replace 'check
1244 (lambda* (#:key tests? #:allow-other-keys)
1245 (when tests?
1246 (invoke "python" "-m" "unittest" "discover"
1247 "--start-directory" "tests" "-v")))))))
1248 (native-inputs
1249 (list python-poetry-core))
1250 (inputs
1251 (list libsodium))
1252 (home-page "https://libnacl.readthedocs.org/")
1253 (synopsis "Python bindings for libsodium based on ctypes")
1254 (description "@code{libnacl} is used to gain direct access to the
1255functions exposed by @code{NaCl} library via @code{libsodium}. It has
1256been constructed to maintain extensive documentation on how to use
1257@code{NaCl} as well as being completely portable.")
1258 (license license:asl2.0)))
1259
1260(define-public python-pyotp
1261 (package
1262 (name "python-pyotp")
1263 (version "2.9.0")
1264 (source
1265 (origin
1266 (method url-fetch)
1267 (uri (pypi-uri "pyotp" version))
1268 (sha256
1269 (base32 "0qvgsf86az9cqj6d8vim2shvyam89ik0p4sszysf7pfvw116csrl"))))
1270 (build-system python-build-system)
1271 (home-page "https://github.com/pyauth/pyotp")
1272 (synopsis "Python One Time Password Library")
1273 (description
1274 "PyOTP is a Python library for generating and verifying one-time
1275passwords. It can be used to implement two-factor (2FA) or multi-factor
1276(MFA) authentication methods in web applications and in other systems that
1277require users to log in.")
1278 (license license:expat)))
1279
1280;; XXX: This project was archived by the owner on Apr 20, 2025. It is now
1281;; read-only. Consider to remove when starts failing to build and nothing
1282;; depends on it.
1283(define-public python-rsa
1284 (package
1285 (name "python-rsa")
1286 (version "4.9.1")
1287 (source
1288 (origin
1289 (method url-fetch)
1290 (uri (pypi-uri "rsa" version))
1291 (sha256
1292 (base32 "0xdfs3mhdb9wjpckj7i4zyv9sr82m7hk0mfkvw3lrnlpakdvzgg7"))))
1293 (build-system pyproject-build-system)
1294 (arguments
1295 (list #:tests? #f)) ;tests are not included in PyPI archive
1296 (native-inputs
1297 (list python-poetry-core))
1298 (propagated-inputs
1299 (list python-pyasn1))
1300 (home-page "https://stuvel.eu/rsa")
1301 (synopsis "Pure-Python RSA implementation")
1302 (description "Python-RSA is a pure-Python RSA implementation. It supports
1303encryption and decryption, signing and verifying signatures, and key
1304generation according to PKCS#1 version 1.5. It can be used as a Python
1305library as well as on the command line.")
1306 (license license:asl2.0)))
1307
1308(define-public python-rsa-for-awscli-1
1309 (hidden-package
1310 (package
1311 (inherit python-rsa)
1312 (version "3.4.2")
1313 (source
1314 (origin
1315 (method url-fetch)
1316 (uri (pypi-uri "rsa" version))
1317 (sha256
1318 (base32 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
1319 (native-inputs
1320 (list python-setuptools)))))
1321
1322(define-public python-scrypt
1323 (package
1324 (name "python-scrypt")
1325 (version "0.9.4")
1326 (source
1327 (origin
1328 (method git-fetch)
1329 (uri (git-reference
1330 (url "https://github.com/holgern/py-scrypt")
1331 (commit (string-append "v" version))))
1332 (file-name (git-file-name name version))
1333 (sha256
1334 (base32 "07mr8slhplk0pfji3pfb86281wf035c3vxg7w4g17vgry1l5fdg2"))))
1335 (build-system pyproject-build-system)
1336 (native-inputs (list python-pytest python-setuptools python-wheel))
1337 (inputs (list openssl))
1338 (home-page "https://github.com/holgern/py-scrypt")
1339 (synopsis "Bindings for the scrypt key derivation function library")
1340 (description
1341 "This package is a set of Python bindings for the scrypt key derivation
1342function.")
1343 (license license:bsd-2)))
1344
1345(define-public python-service-identity
1346 (package
1347 (name "python-service-identity")
1348 (version "24.2.0")
1349 (source
1350 (origin
1351 (method url-fetch)
1352 (uri (pypi-uri "service_identity" version))
1353 (sha256
1354 (base32 "02cfpry5alap6mf3ffq1gdq6s7a2cmgjqpb2bp6wcf8d7yhkns5q"))))
1355 (build-system pyproject-build-system)
1356 (native-inputs
1357 (list python-hatch-fancy-pypi-readme
1358 python-hatch-vcs
1359 python-hatchling
1360 python-idna
1361 python-pytest))
1362 (propagated-inputs
1363 (list python-attrs
1364 python-cryptography
1365 python-pyasn1
1366 python-pyasn1-modules
1367 python-six))
1368 (home-page "https://service-identity.readthedocs.io/")
1369 (synopsis "Service identity verification for PyOpenSSL")
1370 (description
1371 "@code{service_identity} aspires to give you all the tools you need for
1372verifying whether a certificate is valid for the intended purposes. In the
1373simplest case, this means host name verification. However, service_identity
1374implements RFC 6125 fully and plans to add other relevant RFCs too.")
1375 (license license:expat)))
1376
1377(define-public python-google-crc32c
1378 (package
1379 (name "python-google-crc32c")
1380 (version "1.3.0")
1381 (source
1382 (origin
1383 (method git-fetch)
1384 (uri (git-reference
1385 (url "https://github.com/googleapis/python-crc32c")
1386 (commit (string-append "v" version))))
1387 (file-name (git-file-name name version))
1388 (sha256
1389 (base32 "005ra4pfv71rq53198k7q6k63f529q3g6hkbxbwfcf82jr77hxga"))))
1390 (build-system pyproject-build-system)
1391 (inputs (list crc32c))
1392 (native-inputs (list python-pytest python-setuptools python-wheel))
1393 (home-page "https://github.com/googleapis/python-crc32c")
1394 (synopsis "Python wrapper of Google CRC32C")
1395 (description
1396 "This package provides a Python wrapper of the C library implementation
1397of the CRC32C hashing algorithm.")
1398 (license license:asl2.0)))
1399
1400(define-public python-hkdf
1401 (package
1402 (name "python-hkdf")
1403 (version "0.0.3")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "hkdf" version))
1408 (sha256
1409 (base32
1410 "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2"))))
1411 (build-system python-build-system)
1412 (native-inputs
1413 (list python-nose))
1414 (home-page "https://github.com/casebeer/python-hkdf")
1415 (synopsis "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)")
1416 (description "This package provides a Python implementation of the HMAC Key
1417Derivation function (HKDF) defined in RFC 5869.")
1418 (license license:bsd-2)))
1419
1420(define-public python-spake2
1421 (package
1422 (name "python-spake2")
1423 (version "0.9")
1424 (source
1425 (origin
1426 (method url-fetch)
1427 (uri (pypi-uri "spake2" version))
1428 (sha256
1429 (base32
1430 "0d4kbaxi4cv8klyqh6yb0p0qiwfdwvczy1h2mzvmlfdcsnlc87s2"))))
1431 (build-system python-build-system)
1432 (propagated-inputs
1433 (list python-cryptography python-hkdf))
1434 (home-page "https://github.com/warner/python-spake2")
1435 (synopsis "SPAKE2 password-authenticated key exchange in Python")
1436 (description "This package provides a Python implementation of the SPAKE2
1437Password-Authenticated Key Exchange algorithm.")
1438 (license license:expat)))
1439
1440(define-public python-keyutils
1441 (package
1442 (name "python-keyutils")
1443 (version "0.6")
1444 (source
1445 (origin
1446 (method url-fetch)
1447 (uri (pypi-uri "keyutils" version))
1448 (sha256
1449 (base32
1450 "0lipygpzhwzzsq2k5imb1jgkmj8y4khxdwhzadjs3bd56g6bmkx9"))))
1451 (build-system python-build-system)
1452 (native-inputs
1453 (list python-cython python-pytest python-pytest-runner))
1454 (inputs
1455 (list keyutils))
1456 (arguments
1457 (list #:tests? #f
1458 #:phases
1459 #~(modify-phases %standard-phases
1460 (add-before 'build 'regenerate-c-file
1461 (lambda _
1462 (invoke "cython" "keyutils/_keyutils.pyx"))))))
1463 (home-page "https://github.com/sassoftware/python-keyutils")
1464 (synopsis "Python bindings for keyutils")
1465 (description
1466 "This is a set of python bindings for keyutils, a key management suite
1467that leverages the infrastructure provided by the Linux kernel for safely
1468storing and retrieving sensitive information in your programs.")
1469 (license license:asl2.0)))
1470
1471(define-public python-mcuboot-imgtool
1472 (package
1473 (name "python-mcuboot-imgtool")
1474 (version "1.4.0")
1475 (source
1476 (origin
1477 (method git-fetch)
1478 (uri (git-reference
1479 (url "https://github.com/mcu-tools/mcuboot")
1480 (commit (string-append "v" version))))
1481 (file-name (git-file-name name version))
1482 (sha256
1483 (base32 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
1484 (build-system pyproject-build-system)
1485 (arguments
1486 (list
1487 #:phases
1488 #~(modify-phases %standard-phases
1489 (add-after 'unpack 'fix-broken-test
1490 (lambda _
1491 (substitute* "scripts/imgtool/keys/ed25519_test.py"
1492 (("raw_sign")
1493 "sign_digest"))))
1494 (add-before 'build 'change-directory
1495 (lambda _
1496 (chdir "scripts"))))))
1497 (native-inputs (list python-pytest python-setuptools python-wheel))
1498 (propagated-inputs (list python-click python-intelhex python-cryptography))
1499 (home-page "https://mcuboot.com")
1500 (synopsis "Tool to securely sign firmware images for booting by MCUboot")
1501 (description
1502 "MCUboot is a secure bootloader for 32-bit MCUs. This package provides a
1503tool to securely sign firmware images for booting by MCUboot.")
1504 (license license:expat)))
1505
1506(define-public python-ntlm-auth
1507 (package
1508 (name "python-ntlm-auth")
1509 (version "1.5.0")
1510 (source
1511 (origin
1512 (method git-fetch)
1513 (uri (git-reference
1514 (url "https://github.com/jborean93/ntlm-auth")
1515 (commit (string-append "v" version))))
1516 (file-name (git-file-name name version))
1517 (sha256
1518 (base32 "00dpf5bfsy07frsjihv1k10zmwcyq4bvkilbxha7h6nlwpcm2409"))))
1519 (build-system pyproject-build-system)
1520 (native-inputs
1521 (list python-pytest python-requests python-setuptools python-wheel))
1522 (propagated-inputs (list python-cryptography))
1523 (home-page "https://github.com/jborean93/ntlm-auth")
1524 (synopsis "Calculates NTLM Authentication codes")
1525 (description
1526 "This library handles the low-level details of NTLM authentication for
1527use in authenticating with a service that uses NTLM. It will create and parse
1528the 3 different message types in the order required and produce a base64
1529encoded value that can be attached to the HTTP header.
1530
1531The goal of this library is to offer full NTLM support including signing and
1532sealing of messages as well as supporting MIC for message integrity and the
1533ability to customise and set limits on the messages sent. Please see Features
1534and Backlog for a list of what is and is not currently supported.")
1535 (license license:expat)))
1536
1537(define-public python-secretstorage
1538 (package
1539 (name "python-secretstorage")
1540 (version "3.3.3")
1541 (source
1542 (origin
1543 (method url-fetch)
1544 (uri (pypi-uri "SecretStorage" version))
1545 (sha256
1546 (base32 "0xxxxr77sgmjm1rqzdd1rkan9xg0qmv8awc1pb9adv39ycz560r4"))))
1547 (build-system pyproject-build-system)
1548 (arguments
1549 '(#:tests? #f)) ; Tests require a running dbus service.
1550 (native-inputs
1551 (list python-setuptools))
1552 (propagated-inputs
1553 (list python-cryptography python-jeepney))
1554 (home-page "https://github.com/mitya57/secretstorage")
1555 (synopsis "Python bindings to FreeDesktop.org Secret Service API")
1556 (description
1557 "@code{python-secretstorage} provides a way for securely storing passwords
1558and other secrets. It uses D-Bus Secret Service API that is supported by GNOME
1559Keyring (since version 2.30) and KSecretsService. SecretStorage supports most
1560of the functions provided by Secret Service, including creating and deleting
1561items and collections, editing items, locking and unlocking collections
1562(asynchronous unlocking is also supported).")
1563 (license license:bsd-3)))
1564
1565(define-public python-trustme
1566 (package
1567 (name "python-trustme")
1568 (version "1.2.1")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (pypi-uri "trustme" version))
1573 (sha256
1574 (base32 "0zz49agi7hy82fbr03xs6k9vjgiy7v8qsp426cgv8bbzphmvla35"))))
1575 (build-system pyproject-build-system)
1576 (native-inputs
1577 (list python-hatchling
1578 python-pyopenssl
1579 python-pytest
1580 python-service-identity))
1581 (propagated-inputs
1582 (list python-cryptography
1583 python-idna))
1584 (home-page "https://trustme.readthedocs.io")
1585 (synopsis "Fake a certificate authority for tests")
1586 (description
1587 "@code{trustme} is a tiny Python package that does one thing: it gives you
1588a fake certificate authority (CA) that you can use to generate fake TLS certs to
1589use in your tests.")
1590 ;; Either license applies.
1591 (license (list license:expat license:asl2.0))))
1592
1593(define-public python-certipy
1594 (package
1595 (name "python-certipy")
1596 (version "0.2.2")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (pypi-uri "certipy" version))
1601 (sha256
1602 (base32 "0pm0kf079ws9s93vpkxnw3gj6a1hi34p34bicx69rqlyh7cg7wgy"))))
1603 (build-system pyproject-build-system)
1604 (propagated-inputs (list python-cryptography))
1605 (native-inputs (list python-pypa-build
1606 python-flask
1607 python-pytest
1608 python-setuptools
1609 python-wheel))
1610 (home-page "https://github.com/LLNL/certipy")
1611 (synopsis "Utility to create and sign CAs and certificates")
1612 (description
1613 "Certipy was made to simplify the certificate creation process. To that
1614end, certipy exposes methods for creating and managing certificate authorities,
1615certificates, signing and building trust bundles.")
1616 (license license:bsd-3)))
1617
1618(define-public python-jeepney
1619 (package
1620 (name "python-jeepney")
1621 (version "0.8.0")
1622 (source
1623 (origin
1624 (method url-fetch)
1625 (uri (pypi-uri "jeepney" version))
1626 (sha256
1627 (base32 "01jqrk7pn94i7bpmj834pjrw7id659gfag6wpbv04fcpap94izjy"))))
1628 (build-system pyproject-build-system)
1629 (native-inputs
1630 (list python-async-timeout
1631 python-testpath
1632 python-trio
1633 python-pytest
1634 python-pytest-asyncio
1635 python-pytest-trio
1636 ;; For the build backend
1637 python-flit-core))
1638 (home-page "https://gitlab.com/takluyver/jeepney")
1639 (synopsis "Low-level, pure Python DBus protocol wrapper")
1640 (description
1641 "This is a low-level, pure Python DBus protocol client. It has an
1642I/O-free core, and integration modules for different event loops.")
1643 (license license:expat)))
1644
1645(define-public python-argon2-cffi
1646 (package
1647 (name "python-argon2-cffi")
1648 (version "25.1.0")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "argon2_cffi" version))
1653 (sha256
1654 (base32 "1ha62fg9blw38q3qayjid8608fp2a57fd81cpzic9x22ib6fajk9"))))
1655 (build-system pyproject-build-system)
1656 (native-inputs
1657 (list python-hatch-fancy-pypi-readme
1658 python-hatch-vcs
1659 python-hatchling
1660 python-pytest))
1661 (propagated-inputs
1662 (list python-argon2-cffi-bindings))
1663 (home-page "https://argon2-cffi.readthedocs.io/")
1664 (synopsis "Secure Password Hashes for Python")
1665 (description
1666 "Argon2 is a secure password hashing algorithm. It is designed to have
1667both a configurable runtime as well as memory consumption. This means that you
1668can decide how long it takes to hash a password and how much memory is required.")
1669 (license license:expat)))
1670
1671(define-public python-argon2-cffi-bindings
1672 (package
1673 (name "python-argon2-cffi-bindings")
1674 (version "25.1.0")
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "argon2_cffi_bindings" version))
1679 (sha256
1680 (base32 "179256zsrh5c51zmv9k1sc9p102j152nzxqgwhhdhmadxbkg6mxr"))))
1681 (build-system pyproject-build-system)
1682 (arguments
1683 (list
1684 #:phases
1685 #~(modify-phases %standard-phases
1686 (add-before 'build 'use-system-argon2
1687 (lambda _
1688 (setenv "ARGON2_CFFI_USE_SYSTEM" "1"))))))
1689 (native-inputs
1690 (list python-pytest
1691 python-setuptools
1692 python-setuptools-scm))
1693 (inputs
1694 (list argon2))
1695 (propagated-inputs
1696 (list python-cffi))
1697 (home-page "https://github.com/hynek/argon2-cffi-bindings")
1698 (synopsis "Low-level CFFI bindings for Argon2")
1699 (description
1700 "argon2-cffi-bindings provides low-level CFFI bindings to the official
1701implementation of the Argon2 password hashing algorithm.")
1702 (license license:expat)))
1703
1704(define-public python-privy
1705 (package
1706 (name "python-privy")
1707 (version "6.0.0")
1708 (source
1709 (origin
1710 (method git-fetch)
1711 (uri (git-reference
1712 ;; Releases are untagged
1713 (url "https://github.com/ofek/privy")
1714 (commit "2838db3df239797c71bddacc48a4c49a83f35747")))
1715 (file-name (git-file-name name version))
1716 (sha256
1717 (base32
1718 "1m32dh5fqc8cy7jyf1z5fs6zvmdkbq5fi98hr609gbl7s0l0y0i9"))))
1719 (build-system python-build-system)
1720 (arguments
1721 '(#:phases
1722 (modify-phases %standard-phases
1723 (replace 'check
1724 (lambda _
1725 (invoke "python" "-m" "pytest"))))))
1726 (native-inputs
1727 (list python-pytest))
1728 (propagated-inputs
1729 (list python-argon2-cffi python-cryptography))
1730 (home-page "https://www.dropbox.com/developers")
1731 (synopsis "Library to password-protect your data")
1732 (description
1733 "Privy is a small and fast utility for password-protecting secret
1734data such as API keys, cryptocurrency wallets, or seeds for digital
1735signatures.")
1736 (license (list license:expat license:asl2.0)))) ; dual licensed
1737
1738(define-public python-pgpy
1739 (package
1740 (name "python-pgpy")
1741 (version "0.6.0")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "PGPy" version))
1746 (sha256
1747 (base32 "10w3h934fi1ijx72ppn67a50yhkf8n1db6xx02gk2fjc7wsjx717"))))
1748 (build-system pyproject-build-system)
1749 (arguments
1750 (list #:test-flags
1751 ;; All broken tests are in this file.
1752 ;; They fail with ValueError: key_size must be at least 1024-bits.
1753 #~(list "--ignore" "tests/test_10_exceptions.py")))
1754 (native-inputs
1755 (list python-pytest python-setuptools python-wheel))
1756 (propagated-inputs (list python-cryptography python-pyasn1))
1757 (home-page "https://github.com/SecurityInnovation/PGPy")
1758 (synopsis "Python implementation of OpenPGP")
1759 (description
1760 "Currently, PGPy can load keys and signatures of all kinds in both ASCII
1761armored and binary formats.
1762
1763It can create and verify RSA, DSA, and ECDSA signatures, at the moment. It
1764can also encrypt and decrypt messages using RSA and ECDH.")
1765 (license license:bsd-3)))
1766
1767(define-public python-pyu2f
1768 (package
1769 (name "python-pyu2f")
1770 (version "0.1.5")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "pyu2f" version))
1775 (sha256
1776 (base32 "0srhzdbgdsqwpcw7awqm19yg3xbabqckfvrp8rbpvz2232hs7jm3"))))
1777 (build-system python-build-system)
1778 (arguments '(#:tests? #f)) ;none included
1779 (propagated-inputs (list python-six))
1780 (home-page "https://github.com/google/pyu2f/")
1781 (synopsis "U2F host library for interacting with a U2F device over USB")
1782 (description
1783 "Pyu2f is a Python-based U2F host library. It provides functionality for
1784interacting with a U2F device over USB.")
1785 (license license:asl2.0)))
1786
1787(define-public python-sop
1788 (package
1789 (name "python-sop")
1790 (version "0.5.1")
1791 (source
1792 (origin
1793 (method git-fetch)
1794 (uri (git-reference
1795 (url "https://gitlab.com/dkg/python-sop")
1796 (commit (string-append "sop-" version))))
1797 (file-name (git-file-name name version))
1798 (sha256
1799 (base32 "0sin5miiiqgww0s52jz098x44nbnx003vfd4jn55bs5mgca60lll"))))
1800 (build-system pyproject-build-system)
1801 (arguments
1802 (list #:tests? #f)) ; XXX: No tests upstream.
1803 (native-inputs (list python-setuptools python-wheel))
1804 (home-page "https://gitlab.com/dkg/python-sop")
1805 (synopsis "Stateless OpenPGP Command-Line Interface")
1806 (description
1807 "The Stateless OpenPGP Command-Line Interface (or sop) is a
1808specification that encourages OpenPGP implementors to provide a common,
1809relatively simple command-line API for purposes of object security.
1810
1811This Python module helps implementers build such a CLI from any implementation
1812accessible to the Python interpreter.
1813
1814It does not provide such an implementation itself -- this is just the
1815scaffolding for the command line, which should make it relatively easy to
1816supply a handful of python functions as methods to a class.")
1817 (license license:expat))) ; MIT license
1818
1819(define-public python-starkbank-ecdsa
1820 (package
1821 (name "python-starkbank-ecdsa")
1822 (version "2.0.3")
1823 (home-page "https://github.com/starkbank/ecdsa-python")
1824 (source (origin
1825 (method git-fetch)
1826 (uri (git-reference
1827 (url home-page)
1828 (commit (string-append "v" version))))
1829 (file-name (git-file-name name version))
1830 (sha256
1831 (base32
1832 "1k9h4p0frkgj76vrqfjim4mik98g09mivdxxcmxr6raa5jwr83sh"))))
1833 (arguments
1834 (list #:phases #~(modify-phases %standard-phases
1835 (add-after 'unpack 'remove-broken-test
1836 (lambda _
1837 (delete-file "tests/testOpenSSL.py"))))))
1838 (build-system python-build-system)
1839 (native-inputs (list python-pytest))
1840 (synopsis "Python ECDSA library")
1841 (description "This package provides a Python ECDSA library, optimized for
1842speed but without C extensions.")
1843 (license license:expat)))
1844
1845(define-public python-zxcvbn
1846 (package
1847 (name "python-zxcvbn")
1848 (version "4.5.0")
1849 (source
1850 (origin
1851 (method git-fetch) ;for tests
1852 (uri (git-reference
1853 (url "https://github.com/dwolfhub/zxcvbn-python")
1854 (commit (string-append "v" version))))
1855 (file-name (git-file-name name version))
1856 (sha256
1857 (base32 "0x39yi4zc1n6mjjk3rx32ick0hysyi9hv9ln69apcch4jf84j9fi"))))
1858 (build-system pyproject-build-system)
1859 (native-inputs (list python-pytest python-setuptools python-wheel))
1860 (home-page "https://github.com/dwolfhub/zxcvbn-python")
1861 (synopsis "Realistic password strength estimator Python library")
1862 (description
1863 "This is a Python implementation of the @code{zxcvbn} library created at
1864Dropbox. The original library, written for JavaScript, can be found
1865@url{https://github.com/dropbox/zxcvbn, here}. This port includes features
1866such as:
1867@enumerate
1868@item Accepts user data to be added to the dictionaries that are tested
1869against (name, birthdate, etc.)
1870@item Gives a score to the password, from 0 (terrible) to 4 (great).
1871@item Provides feedback on the password and ways to improve it.
1872@item Returns time estimates on how long it would take to guess the password
1873in different situations.
1874@end enumerate")
1875 (license license:expat)))
1876
1877;; XXX: Not maintained since 2016.
1878(define-public python-pydes
1879 (package
1880 (name "python-pydes")
1881 (version "2.0.1")
1882 (source
1883 (origin
1884 (method url-fetch)
1885 (uri (pypi-uri "pyDes" version))
1886 (sha256
1887 (base32 "04lh71f47y04vspfrdrq6a0hn060ibxvdp5z1pcr0gmqs8hqxaz2"))))
1888 (build-system pyproject-build-system)
1889 (arguments
1890 (list #:tests? #f)) ;no tests in PyPI, I could not fine Git
1891 (native-inputs (list python-setuptools))
1892 (home-page "http://twhiteman.netfirms.com/des.html") ;XXX: Dead link
1893 (synopsis
1894 "Pure python implementation of the DES and TRIPLE DES encryption algorithms")
1895 (description
1896 "This package provides a pure Python implementation of the DES and
1897TRIPLE DES encryption algorithms.")
1898 (license license:public-domain)))