projects/guix·blob librewolf-updates · refs

1885 lines · 68.9 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-jaraco-classes
337 python-secretstorage))
338 (home-page "https://github.com/jaraco/keyring")
339 (synopsis "Store and access your passwords safely")
340 (description
341 "The Python keyring lib provides a easy way to access the system keyring
342service from python. It can be used in any application that needs safe
343password storage.")
344 ;; "MIT" and PSF dual license
345 (license license:x11)))
346
347(define-public python-keyrings-alt
348 (package
349 (name "python-keyrings-alt")
350 (version "5.0.2")
351 (source
352 (origin
353 (method url-fetch)
354 (uri (pypi-uri "keyrings_alt" version))
355 (sha256
356 (base32 "1yv9gnmkw6kpsjgnid0k1qcd49n9csqcvf02cl88bcf8knz7w2cg"))))
357 (build-system pyproject-build-system)
358 (native-inputs
359 (list python-keyring
360 python-pytest
361 python-setuptools
362 python-setuptools-scm
363 python-wheel))
364 (propagated-inputs
365 (list python-jaraco-classes
366 python-jaraco-context))
367 (home-page "https://github.com/jaraco/keyrings.alt")
368 (synopsis "Alternate keyring implementations")
369 (description
370 "Keyrings in this package may have security risks or other implications.
371These backends were extracted from the main keyring project to make them
372available for those who wish to employ them, but are discouraged for general
373production use. Include this module and use its backends at your own risk.")
374 (license license:expat)))
375
376(define-public python-blake3
377 (package
378 (name "python-blake3")
379 (version "1.0.8")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "blake3" version))
384 (sha256
385 (base32 "1fk5n55cl2iigrjdwwsm6h8q6in1l19cihh44s0kbh57ypqcfg2i"))))
386 (build-system cargo-build-system)
387 (arguments
388 (list
389 #:install-source? #f
390 #:imported-modules `(,@%pyproject-build-system-modules
391 ,@%cargo-build-system-modules)
392 #:modules `((guix build cargo-build-system)
393 ((guix build pyproject-build-system) #:prefix py:)
394 (guix build utils))
395 #:phases
396 #~(modify-phases %standard-phases
397 (add-after 'build 'build-python-module
398 (assoc-ref py:%standard-phases 'build))
399 (add-after 'build-python-module 'install-python-module
400 (assoc-ref py:%standard-phases 'install)))))
401 (native-inputs
402 (list python-wrapper
403 maturin))
404 (inputs (cargo-inputs 'python-blake3))
405 (propagated-inputs (list python-typing-extensions))
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 python-setuptools))
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-pretend
580 python-pytest
581 python-pytest-benchmark
582 python-pytest-randomly
583 python-pytest-xdist
584 python-setuptools
585 rust
586 `(,rust "cargo"))
587 (or (and=> (%current-target-system)
588 (compose list make-rust-sysroot))
589 '())))
590 (inputs
591 (cons* maturin openssl (cargo-inputs 'python-cryptography)))
592 (propagated-inputs (list python-cffi))
593 (home-page "https://github.com/pyca/cryptography")
594 (synopsis "Cryptographic recipes and primitives for Python")
595 (description
596 "@code{cryptography} is a package which provides cryptographic recipes
597and primitives to Python developers. It aims to be the “cryptographic
598standard library” for Python. The package includes both high level recipes,
599and low level interfaces to common cryptographic algorithms such as symmetric
600ciphers, message digests and key derivation functions.")
601 ;; Distributed under either BSD-3 or ASL2.0
602 (license (list license:bsd-3 license:asl2.0))))
603
604(define-public python-pyopenssl
605 (package
606 (name "python-pyopenssl")
607 (version "24.3.0")
608 (source
609 (origin
610 (method url-fetch)
611 (uri (pypi-uri "pyopenssl" version))
612 (sha256
613 (base32
614 "0dmv720kn5ws7bs1rkn59qmhzv5wxkkgriampi34g0vxawcs1xs9"))))
615 (build-system pyproject-build-system)
616 (arguments
617 (list
618 #:phases
619 #~(modify-phases %standard-phases
620 (replace 'check
621 (lambda* (#:key tests? #:allow-other-keys)
622 (when tests?
623 ;; PyOpenSSL runs tests against a certificate with a fixed
624 ;; expiry time. To ensure successful builds in the future,
625 ;; set the time to roughly the release date.
626 (invoke "faketime" "2024-07-20" "pytest" "-vv"
627 "--deselect"
628 ;; This test seems to fail when using faketime, at
629 ;; least on aarch64-linux with OSError: [Errno 22]
630 ;; Invalid argument
631 "tests/test_ssl.py::TestDTLS::test_timeout"
632 "-k"
633 ;; This test tries to look up certificates from
634 ;; the compiled-in default path in OpenSSL, which
635 ;; does not exist in the build environment.
636 "not test_fallback_default_verify_paths ")))))))
637 (propagated-inputs (list python-cryptography))
638 (inputs (list openssl))
639 (native-inputs
640 (list libfaketime
641 python-pretend
642 python-pytest
643 python-pytest-rerunfailures
644 python-setuptools))
645 (home-page "https://github.com/pyca/pyopenssl")
646 (synopsis "Python wrapper module around the OpenSSL library")
647 (description "PyOpenSSL is a high-level wrapper around a subset of the
648OpenSSL library.")
649 (properties `((updater-extra-inputs . ("openssl"))
650 (updater-extra-native-inputs . ("libfaketime"))))
651 (license license:asl2.0)))
652
653(define-public python-ed25519
654 (package
655 (name "python-ed25519")
656 (version "1.5")
657 (source
658 (origin
659 (method git-fetch)
660 (uri (git-reference
661 (url "https://github.com/warner/python-ed25519")
662 (commit version)))
663 (file-name (git-file-name name version))
664 (sha256
665 (base32 "0adxfm12wygh2gdsn83xmp1sw7w96ni7mr7v3z3y6q0mvh9n5x0p"))))
666 (build-system pyproject-build-system)
667 (arguments
668 (list
669 #:phases
670 #~(modify-phases %standard-phases
671 ;; XXX: Use custom test back-end on python-team branch.
672 (replace 'check
673 (lambda* (#:key tests? #:allow-other-keys)
674 (when tests? (invoke "python" "test_ed25519_kat.py")))))))
675 (native-inputs (list python-setuptools))
676 (home-page "https://github.com/warner/python-ed25519")
677 (synopsis "Ed25519 public-key signatures")
678 (description
679 "This package provides Ed25519 public-key signatures in Python.")
680 (license license:expat)))
681
682(define-public python-axolotl-curve25519
683 (package
684 (name "python-axolotl-curve25519")
685 (version "0.4.1.post2")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (pypi-uri "python-axolotl-curve25519" version))
690 (sha256
691 (base32
692 "18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
693 (build-system pyproject-build-system)
694 (arguments
695 (list
696 #:tests? #f ; No tests.
697 #:phases
698 #~(modify-phases %standard-phases
699 (add-after 'unpack 'relax-gcc-14-strictness
700 (lambda _
701 (setenv "CFLAGS"
702 (string-append "-g -O2 -Wno-error=int-conversion")))))))
703 (native-inputs (list python-setuptools))
704 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
705 (synopsis "Python wrapper for curve25519 library")
706 (description "This is a python wrapper for the curve25519 library
707with ed25519 signatures. The C code was pulled from
708libaxolotl-android. At the moment this wrapper is meant for use by
709python-axolotl.")
710 (license (list license:gpl3 ; Most files
711 license:bsd-3)))) ; curve/curve25519-donna.c
712
713(define-public python-omemo-dr
714 (package
715 (name "python-omemo-dr")
716 (version "1.0.1")
717 (source
718 (origin
719 (method git-fetch)
720 (uri (git-reference
721 (url "https://dev.gajim.org/gajim/omemo-dr")
722 (commit (string-append "v" version))))
723 (file-name (git-file-name name version))
724 (sha256
725 (base32 "1gx0znbfvs8jg9s754hha81l8wpghswkfsqx2jzpgv6gigf3sm8z"))))
726 (build-system pyproject-build-system)
727 (arguments (list #:test-backend #~'unittest))
728 (propagated-inputs
729 (list python-cryptography python-protobuf-5 python-setuptools))
730 (home-page "https://dev.gajim.org/gajim/omemo-dr")
731 (synopsis "OMEMO cryptography library")
732 (description "OMEMO cryptography library that was forked from python-axolotl.")
733 (license license:gpl3)))
734
735(define-public python-oscrypto
736 (package
737 (name "python-oscrypto")
738 (version "1.3.0")
739 (source
740 (origin
741 (method git-fetch)
742 (uri (git-reference
743 (url "https://github.com/wbond/oscrypto/")
744 (commit version)))
745 (file-name (git-file-name name version))
746 (sha256
747 (base32 "1v5wkmzcyiqy39db8j2dvkdrv2nlsc48556h73x4dzjwd6kg4q0a"))
748 (patches
749 (list
750 (origin
751 (method url-fetch)
752 (uri
753 (string-append "https://github.com/wbond/oscrypto/commit/"
754 "3865f5d528740aa1205d16ddbee84c5b48aeb078.patch"))
755 (sha256
756 (base32
757 "1lnvh5w4x5g4vnl8l078znd040zc6k4y18dzksbj7ydad3hrq73p")))))))
758 (build-system pyproject-build-system)
759 (arguments
760 (list
761 #:test-backend #~'custom
762 #:test-flags
763 #~(list "run.py"
764 (format #f "use_openssl=~a,~a"
765 (search-input-file %build-inputs "/lib/libcrypto.so")
766 (search-input-file %build-inputs "/lib/libssl.so"))
767 "skip_internet=true"
768 "tests")
769 #:phases
770 #~(modify-phases %standard-phases
771 (add-before 'check 'set-envs
772 (lambda* (#:key inputs #:allow-other-keys)
773 (setenv
774 "SSL_CERT_FILE"
775 (search-input-file
776 inputs "/etc/ssl/certs/ca-certificates.crt")))))))
777 (propagated-inputs (list python-asn1crypto))
778 (native-inputs (list nss-certs-for-test openssl python-setuptools))
779 (home-page "https://github.com/wbond/oscrypto/")
780 (synopsis "Compiler-free Python encryption library")
781 (description
782 "@code{Python-oscrypto} is a compilation-free encryption library which
783integrates with the encryption library that is part of the operating system.
784It supports TLS (SSL) sockets, key generation, encryption, decryption,
785signing, verification and KDFs using the OS crypto libraries.")
786 (license license:expat)))
787
788(define-public python-pyaes
789 ;; XXX: Last updated in 2017.
790 (package
791 (name "python-pyaes")
792 (version "1.6.1")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (pypi-uri "pyaes" version))
797 (sha256
798 (base32 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
799 (build-system pyproject-build-system)
800 (arguments
801 (list #:tests? #f)) ;no tests in PyPI
802 (native-inputs (list python-setuptools))
803 (home-page "https://github.com/ricmoo/pyaes")
804 (synopsis "Implementation of AES in Python")
805 (description "This package contains a pure-Python implementation of the
806AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
807ECB and OFB).")
808 (license license:expat)))
809
810(define-public python-asn1crypto
811 (let ((commit "b763a757bb2bef2ab63620611ddd8006d5e9e4a2")
812 (revision "0"))
813 (package
814 (name "python-asn1crypto")
815 (version (git-version "1.5.1" revision commit))
816 (source
817 (origin
818 (method git-fetch)
819 (uri (git-reference
820 (url "https://github.com/wbond/asn1crypto")
821 (commit commit)))
822 (file-name (git-file-name name version))
823 (sha256
824 (base32 "0xmrms7lj87pskgirf7ff21yih76kp2688x4n24wi2pd8269lmfp"))))
825 (build-system pyproject-build-system)
826 (arguments (list #:test-backend #~'unittest))
827 (native-inputs (list python-setuptools))
828 (home-page "https://github.com/wbond/asn1crypto")
829 (synopsis "ASN.1 parser and serializer in Python")
830 (description
831 "@code{asn1crypto} is an ASN.1 parser and serializer with definitions for
832private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
833PKCS#12, PKCS#5, X.509 and TSP.")
834 (license license:expat))))
835
836(define-public python-pynacl
837 (package
838 (name "python-pynacl")
839 (version "1.5.0")
840 (source
841 (origin
842 (method url-fetch)
843 (uri (pypi-uri "PyNaCl" version))
844 (modules '((guix build utils)))
845 (snippet
846 '(begin
847 ;; Remove bundled libsodium.
848 (delete-file-recursively "src/libsodium")))
849 (sha256
850 (base32
851 "1fi0jbxhh3svajzldlb6gj5sr5a48v11xlmx0wb831db167l9iwa"))))
852 (build-system pyproject-build-system)
853 (arguments
854 (list
855 #:phases
856 '(modify-phases %standard-phases
857 (add-before 'build 'use-system-sodium
858 (lambda _
859 (setenv "SODIUM_INSTALL" "system"))))))
860 (native-inputs
861 (list python-hypothesis python-pytest python-setuptools python-wheel))
862 (propagated-inputs
863 (list python-cffi python-six libsodium))
864 (home-page "https://github.com/pyca/pynacl/")
865 (synopsis "Python bindings to libsodium")
866 (description
867 "PyNaCl is a Python binding to libsodium, which is a fork of the
868Networking and Cryptography library. These libraries have a stated goal
869of improving usability, security and speed.")
870 (license license:asl2.0)))
871
872(define-public python-crcmod
873 (package
874 (name "python-crcmod")
875 (version "1.7")
876 (source (origin
877 (method url-fetch)
878 (uri (pypi-uri "crcmod" version))
879 (sha256
880 (base32
881 "07k0hgr42vw2j92cln3klxka81f33knd7459cn3d8aszvfh52w6w"))))
882 (build-system pyproject-build-system)
883 (arguments
884 (list
885 #:test-backend #~'custom
886 #:test-flags #~(list "-m" "crcmod.test")))
887 (native-inputs (list python-setuptools))
888 (synopsis "CRC generator for Python")
889 (description "Python module for generating objects that compute the
890Cyclic Redundancy Check.")
891 (home-page "https://crcmod.sourceforge.net/")
892 (license license:expat)))
893
894(define-public python-blurhash
895 (package
896 (name "python-blurhash")
897 (version "1.1.5")
898 (source
899 (origin
900 (method git-fetch)
901 (uri (git-reference
902 (url "https://github.com/halcy/blurhash-python")
903 (commit (string-append "v" version))))
904 (file-name (git-file-name name version))
905 (sha256
906 (base32 "16xcjxiya773fp7bxs9i6y1wsjx88pdvlwj6bqyy9vf3ckcffcwm"))))
907 (build-system pyproject-build-system)
908 (arguments
909 (list #:test-flags #~(list "-c" "/dev/null")))
910 (native-inputs
911 (list python-numpy python-pillow python-pytest python-setuptools))
912 (home-page "https://github.com/halcy/blurhash-python")
913 (synopsis "Pure-Python implementation of the blurhash algorithm")
914 (description
915 "This package provides a pure Python implementation of the blurhash
916algorithm.")
917 (license license:expat)))
918
919(define-public python-ecpy
920 (package
921 (name "python-ecpy")
922 (version "1.2.5")
923 (source
924 (origin
925 (method git-fetch)
926 (uri (git-reference
927 (url "https://github.com/cslashm/ECPy")
928 (commit version)))
929 (file-name (git-file-name name version))
930 (sha256
931 (base32
932 "0p642bpqicxjkwqk4q46wqkbxhad1qiir6xz4w7xx0d4cdq7yps8"))))
933 (build-system pyproject-build-system)
934 (arguments (list #:tests? #f)) ;no tests
935 (native-inputs
936 (list python-setuptools))
937 (home-page "https://github.com/cslashm/ECPy")
938 (synopsis "Pure Python Elliptic Curve Library")
939 (description "This package provides a Elliptic Curve Library in pure
940Python.")
941 (license license:asl2.0)))
942
943(define-public python-josepy
944 (package
945 (name "python-josepy")
946 (version "2.1.0")
947 (source
948 (origin
949 (method git-fetch)
950 (uri (git-reference
951 (url "https://github.com/certbot/josepy")
952 (commit (string-append "v" version))))
953 (file-name (git-file-name name version))
954 (sha256
955 (base32 "1zplnfrmc4nps9lgl3fz434ja7lmi9v8waydflzvpi75kf5fqxc1"))))
956 (build-system pyproject-build-system)
957 (native-inputs (list python-poetry-core python-pytest))
958 (propagated-inputs (list python-cryptography))
959 (home-page "https://github.com/certbot/josepy")
960 (synopsis "JOSE protocol implementation in Python")
961 (description
962 "This package provides a Python implementation of the JOSE protocol
963(Javascript Object Signing and Encryption).")
964 (license license:asl2.0)))
965
966(define pycryptodome-unbundle-tomcrypt-snippet
967 #~(begin
968 ;; Unbundle libtomcrypt.
969 (delete-file-recursively "src/libtom")
970 (substitute* "src/DES.c"
971 (("#include \"libtom/tomcrypt_des.c\"")
972 "#include <tomcrypt.h>"))
973 (substitute* "setup.py"
974 (("include_dirs=\\['src/', 'src/libtom/'\\]")
975 ;; FIXME: why does '-ltomcrypt' need to be added
976 ;; manually, even when 'tomcrypt' is added to 'libraries'?
977 ;; This behaviour is not documented at
978 ;; <https://docs.python.org/3/extending/building.html>.
979 "include_dirs=['src/'], libraries=['tomcrypt', 'tommath'],
980 extra_link_args=['-ltomcrypt', '-ltommath']"))))
981
982(define-public python-pycryptodome
983 (package
984 (name "python-pycryptodome")
985 (version "3.23.0")
986 (source
987 (origin
988 (method git-fetch)
989 (uri (git-reference
990 (url "https://github.com/Legrandin/pycryptodome")
991 (commit (string-append "v" version))))
992 (file-name (git-file-name name version))
993 (sha256
994 (base32 "0j1dk55y0q7gqmig1l5b8774w63w2i7qrii1xzkpzz0c3i229i67"))
995 (modules '((guix build utils)))
996 (snippet pycryptodome-unbundle-tomcrypt-snippet)))
997 (build-system pyproject-build-system)
998 (arguments
999 (list
1000 ;; tests: 42912 passed
1001 #:test-backend #~'custom
1002 ;; As seen in
1003 ;; <https://github.com/Legrandin/pycryptodome/blob/v3.23.0/INSTALL.rst>.
1004 #:test-flags
1005 #~(list "-m" "Crypto.SelfTest")
1006 #:phases
1007 #~(modify-phases %standard-phases
1008 (add-after 'unpack 'patch-gmp-path
1009 (lambda* (#:key inputs #:allow-other-keys)
1010 (substitute* "lib/Crypto/Math/_IntegerGMP.py"
1011 (("load_lib\\(\"gmp\"")
1012 (format #f "load_lib(~s"
1013 (search-input-file inputs "/lib/libgmp.so.10")))))))))
1014 (native-inputs
1015 (list python-pycryptodome-test-vectors
1016 python-setuptools))
1017 (inputs
1018 (list gmp
1019 libtomcrypt
1020 libtommath))
1021 (home-page "https://www.pycryptodome.org")
1022 (synopsis "Low-level cryptographic Python library")
1023 (description
1024 "PyCryptodome is a self-contained Python package of low-level
1025cryptographic primitives. It's not a wrapper to a separate C library like
1026OpenSSL. To the largest possible extent, algorithms are implemented in pure
1027Python. Only the pieces that are extremely critical to performance (e.g.,
1028block ciphers) are implemented as C extensions.
1029
1030You are expected to have a solid understanding of cryptography and security
1031engineering to successfully use these primitives. You must also be able to
1032recognize that some are obsolete (e.g., TDES) or even insecure (RC4).
1033
1034It provides many enhancements over the last release of PyCrypto (2.6.1):
1035
1036@itemize
1037@item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1038@item Accelerated AES on Intel platforms via AES-NI
1039@item First-class support for PyPy
1040@item Elliptic curves cryptography (NIST P-256 curve only)
1041@item Better and more compact API (nonce and iv attributes for ciphers,
1042automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1043more)
1044@item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1045@item Salsa20 and ChaCha20 stream ciphers
1046@item scrypt and HKDF
1047@item Deterministic (EC)DSA
1048@item Password-protected PKCS#8 key containers
1049@item Shamir’s Secret Sharing scheme
1050@item Random numbers get sourced directly from the OS (and not from a CSPRNG
1051in userspace)
1052@item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1053@item Major clean-ups and simplification of the code base
1054@end itemize
1055
1056This package provides drop-in compatibility with PyCrypto. It is one of two
1057PyCryptodome variants, the other being python-pycryptodomex.")
1058 (license (list license:bsd-2
1059 license:public-domain)))) ; code inherited from PyCrypto
1060
1061(define-public python-pycryptodome-test-vectors
1062 (package
1063 (name "python-pycryptodome-test-vectors")
1064 (version "1.0.22")
1065 (source
1066 (origin
1067 (method url-fetch)
1068 (uri (pypi-uri "pycryptodome_test_vectors" version))
1069 (sha256
1070 (base32 "19bn19fpnkj39nki2dp8k26is5fpqa3q7agkhk9rvfqfvzvgx3nn"))))
1071 (build-system pyproject-build-system)
1072 (arguments
1073 (list #:tests? #f)) ;no tests
1074 (native-inputs
1075 (list python-setuptools))
1076 (home-page "https://www.pycryptodome.org")
1077 (synopsis "Test vectors for PyCryptodome")
1078 (description
1079 "This package provides test vectors for @code{PyCryptodome}.")
1080 (license (list license:bsd-2
1081 license:asl2.0))))
1082
1083(define-public python-pycryptodomex
1084 (package/inherit python-pycryptodome
1085 (name "python-pycryptodomex")
1086 (arguments
1087 (substitute-keyword-arguments (package-arguments python-pycryptodome)
1088 ((#:test-flags _)
1089 #~(list "-m" "Cryptodome.SelfTest"))
1090 ((#:phases phases #~%standard-phases)
1091 #~(modify-phases #$phases
1092 (add-before 'build 'set-separate-namespace
1093 (lambda _
1094 ;; This changes the build logic, see setup.py.
1095 (with-output-to-file ".separate_namespace"
1096 (lambda _ (display "")))))))))
1097 (synopsis
1098 "Low-level cryptographic Python library independent of the old PyCrypto")
1099 (description
1100 "PyCryptodome is a self-contained Python package of low-level
1101cryptographic primitives. It's not a wrapper to a separate C library like
1102OpenSSL. To the largest possible extent, algorithms are implemented in pure
1103Python. Only the pieces that are extremely critical to performance (e.g.,
1104block ciphers) are implemented as C extensions.
1105
1106You are expected to have a solid understanding of cryptography and security
1107engineering to successfully use these primitives. You must also be able to
1108recognize that some are obsolete (e.g., TDES) or even insecure (RC4).
1109
1110It provides many enhancements over the last release of PyCrypto (2.6.1):
1111
1112@itemize
1113@item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1114@item Accelerated AES on Intel platforms via AES-NI
1115@item First-class support for PyPy
1116@item Elliptic curves cryptography (NIST P-256 curve only)
1117@item Better and more compact API (nonce and iv attributes for ciphers,
1118automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1119more)
1120@item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1121@item Salsa20 and ChaCha20 stream ciphers
1122@item scrypt and HKDF
1123@item Deterministic (EC)DSA
1124@item Password-protected PKCS#8 key containers
1125@item Shamir’s Secret Sharing scheme
1126@item Random numbers get sourced directly from the OS (and not from a CSPRNG
1127in userspace)
1128@item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1129@item Major clean-ups and simplification of the code base
1130@end itemize
1131
1132PyCryptodomex is the stand-alone version of PyCryptodome that no longer
1133provides drop-in compatibility with PyCrypto.")))
1134
1135(define-public python-m2crypto
1136 (package
1137 (name "python-m2crypto")
1138 (version "0.38.0")
1139 (source
1140 (origin
1141 (method url-fetch)
1142 (uri (pypi-uri "M2Crypto" version))
1143 (sha256
1144 (base32 "1jyynaybncgjp8rndrwjpj5gnbrislngimf6ind9874h6052dwlr"))))
1145 (build-system pyproject-build-system)
1146 (arguments
1147 `(;; FIXME: Tests start failing with time due to date checks in TLS
1148 ;; certificates.
1149 #:tests? #f))
1150 (inputs (list openssl))
1151 (native-inputs (list swig-4.0 python-setuptools python-wheel))
1152 (home-page "https://gitlab.com/m2crypto/m2crypto")
1153 (synopsis "Python crypto and TLS toolkit")
1154 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
1155featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
1156(including AES); TLS functionality to implement clients and servers; HTTPS
1157extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
1158AuthCookies for web session management; FTP/TLS client and server; S/MIME;
1159M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
1160through the Engine interface.")
1161 (license license:expat)))
1162
1163(define-public python-pykeepass
1164 (package
1165 (name "python-pykeepass")
1166 (version "4.1.1.post1")
1167 (source
1168 (origin
1169 (method git-fetch)
1170 (uri (git-reference
1171 (url "https://github.com/libkeepass/pykeepass")
1172 (commit (string-append "v" version))))
1173 (file-name (git-file-name name version))
1174 (sha256
1175 (base32 "1ayvgklq3naydx01m7hyvf44ywczk5yzy2pk48bpfayl7bgk7q8d"))))
1176 (build-system pyproject-build-system)
1177 (arguments
1178 ;; tests: 115 passed
1179 (list #:test-backend #~'unittest))
1180 (native-inputs
1181 (list python-setuptools))
1182 (propagated-inputs
1183 (list python-argon2-cffi
1184 python-construct
1185 python-lxml
1186 python-pycryptodomex
1187 python-pyotp))
1188 (home-page "https://github.com/libkeepass/pykeepass")
1189 (synopsis "Python library to interact with keepass databases")
1190 (description
1191 "This library allows you to write entries to a KeePass database. It
1192supports KDBX3 and KDBX4.")
1193 ;; There are no copyright headers in the source code. The LICENSE file
1194 ;; indicates GPL3.
1195 (license license:gpl3+)))
1196
1197(define-public python-pylibscrypt
1198 (package
1199 (name "python-pylibscrypt")
1200 (version "2.0.0")
1201 (source
1202 (origin
1203 (method git-fetch)
1204 (uri (git-reference
1205 (url "https://github.com/jvarho/pylibscrypt")
1206 (commit (string-append "v" version))))
1207 (file-name (git-file-name name version))
1208 (sha256
1209 (base32 "0hshivwl3xznlqhrvwbylp40k1bfx4gnyzmxwldkwjhf1260zan1"))))
1210 (build-system pyproject-build-system)
1211 (native-inputs (list python-pytest python-setuptools python-wheel))
1212 (home-page "https://github.com/jvarho/pylibscrypt")
1213 (synopsis "Scrypt for Python")
1214 (description
1215 "This package provides another Scrypt module for Python.")
1216 (license license:isc)))
1217
1218(define-public python-libnacl
1219 (package
1220 (name "python-libnacl")
1221 (version "2.1.0")
1222 (source
1223 (origin
1224 (method url-fetch)
1225 (uri (pypi-uri "libnacl" version))
1226 (sha256
1227 (base32
1228 "0q18j8kfibhi5qckakhf0b0psf8nkll91nfp3yqxkri9vykqshgk"))))
1229 (build-system pyproject-build-system)
1230 (arguments
1231 `(#:phases
1232 (modify-phases %standard-phases
1233 (add-after 'unpack 'locate-libsodium
1234 (lambda* (#:key inputs #:allow-other-keys)
1235 (substitute* "libnacl/__init__.py"
1236 (("ctypes\\.util\\.find_library\\('sodium'\\)")
1237 (string-append "'"
1238 (search-input-file inputs "/lib/libsodium.so")
1239 "'")))))
1240 (replace 'check
1241 (lambda* (#:key tests? #:allow-other-keys)
1242 (when tests?
1243 (invoke "python" "-m" "unittest" "discover"
1244 "--start-directory" "tests" "-v")))))))
1245 (native-inputs
1246 (list python-poetry-core))
1247 (inputs
1248 (list libsodium))
1249 (home-page "https://libnacl.readthedocs.org/")
1250 (synopsis "Python bindings for libsodium based on ctypes")
1251 (description "@code{libnacl} is used to gain direct access to the
1252functions exposed by @code{NaCl} library via @code{libsodium}. It has
1253been constructed to maintain extensive documentation on how to use
1254@code{NaCl} as well as being completely portable.")
1255 (license license:asl2.0)))
1256
1257(define-public python-pyotp
1258 (package
1259 (name "python-pyotp")
1260 (version "2.9.0")
1261 (source
1262 (origin
1263 (method git-fetch)
1264 (uri (git-reference
1265 (url "https://github.com/pyauth/pyotp")
1266 (commit (string-append "v" version))))
1267 (file-name (git-file-name name version))
1268 (sha256
1269 (base32 "0fx253649bvs2w31jdwnr51dm0b6v1zhp7mprnis37c57vj4qczz"))))
1270 (build-system pyproject-build-system)
1271 (arguments
1272 (list
1273 #:test-flags
1274 #~(list "test.py")))
1275 (native-inputs
1276 (list python-setuptools
1277 python-pytest))
1278 (home-page "https://github.com/pyauth/pyotp")
1279 (synopsis "Python One Time Password Library")
1280 (description
1281 "PyOTP is a Python library for generating and verifying one-time
1282passwords. It can be used to implement two-factor (2FA) or multi-factor
1283(MFA) authentication methods in web applications and in other systems that
1284require users to log in.")
1285 (license license:expat)))
1286
1287;; XXX: This project was archived by the owner on Apr 20, 2025. It is now
1288;; read-only. Consider to remove when starts failing to build and nothing
1289;; depends on it.
1290(define-public python-rsa
1291 (package
1292 (name "python-rsa")
1293 (version "4.9.1")
1294 (source
1295 (origin
1296 (method url-fetch)
1297 (uri (pypi-uri "rsa" version))
1298 (sha256
1299 (base32 "0xdfs3mhdb9wjpckj7i4zyv9sr82m7hk0mfkvw3lrnlpakdvzgg7"))))
1300 (build-system pyproject-build-system)
1301 (arguments
1302 (list #:tests? #f)) ;tests are not included in PyPI archive
1303 (native-inputs
1304 (list python-poetry-core))
1305 (propagated-inputs
1306 (list python-pyasn1))
1307 (home-page "https://stuvel.eu/rsa")
1308 (synopsis "Pure-Python RSA implementation")
1309 (description "Python-RSA is a pure-Python RSA implementation. It supports
1310encryption and decryption, signing and verifying signatures, and key
1311generation according to PKCS#1 version 1.5. It can be used as a Python
1312library as well as on the command line.")
1313 (license license:asl2.0)))
1314
1315(define-public python-rsa-for-awscli-1
1316 (hidden-package
1317 (package
1318 (inherit python-rsa)
1319 (version "3.4.2")
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (pypi-uri "rsa" version))
1324 (sha256
1325 (base32 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
1326 (native-inputs
1327 (list python-setuptools)))))
1328
1329(define-public python-scrypt
1330 (package
1331 (name "python-scrypt")
1332 (version "0.9.4")
1333 (source
1334 (origin
1335 (method git-fetch)
1336 (uri (git-reference
1337 (url "https://github.com/holgern/py-scrypt")
1338 (commit (string-append "v" version))))
1339 (file-name (git-file-name name version))
1340 (sha256
1341 (base32 "07mr8slhplk0pfji3pfb86281wf035c3vxg7w4g17vgry1l5fdg2"))))
1342 (build-system pyproject-build-system)
1343 (native-inputs (list python-pytest python-setuptools python-wheel))
1344 (inputs (list openssl))
1345 (home-page "https://github.com/holgern/py-scrypt")
1346 (synopsis "Bindings for the scrypt key derivation function library")
1347 (description
1348 "This package is a set of Python bindings for the scrypt key derivation
1349function.")
1350 (license license:bsd-2)))
1351
1352(define-public python-service-identity
1353 (package
1354 (name "python-service-identity")
1355 (version "24.2.0")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "service_identity" version))
1360 (sha256
1361 (base32 "02cfpry5alap6mf3ffq1gdq6s7a2cmgjqpb2bp6wcf8d7yhkns5q"))))
1362 (build-system pyproject-build-system)
1363 (native-inputs
1364 (list python-hatch-fancy-pypi-readme
1365 python-hatch-vcs
1366 python-hatchling
1367 python-idna
1368 python-pytest))
1369 (propagated-inputs
1370 (list python-attrs
1371 python-cryptography
1372 python-pyasn1
1373 python-pyasn1-modules
1374 python-six))
1375 (home-page "https://service-identity.readthedocs.io/")
1376 (synopsis "Service identity verification for PyOpenSSL")
1377 (description
1378 "@code{service_identity} aspires to give you all the tools you need for
1379verifying whether a certificate is valid for the intended purposes. In the
1380simplest case, this means host name verification. However, service_identity
1381implements RFC 6125 fully and plans to add other relevant RFCs too.")
1382 (license license:expat)))
1383
1384(define-public python-google-crc32c
1385 (package
1386 (name "python-google-crc32c")
1387 (version "1.3.0")
1388 (source
1389 (origin
1390 (method git-fetch)
1391 (uri (git-reference
1392 (url "https://github.com/googleapis/python-crc32c")
1393 (commit (string-append "v" version))))
1394 (file-name (git-file-name name version))
1395 (sha256
1396 (base32 "005ra4pfv71rq53198k7q6k63f529q3g6hkbxbwfcf82jr77hxga"))))
1397 (build-system pyproject-build-system)
1398 (inputs (list crc32c))
1399 (native-inputs (list python-pytest python-setuptools python-wheel))
1400 (home-page "https://github.com/googleapis/python-crc32c")
1401 (synopsis "Python wrapper of Google CRC32C")
1402 (description
1403 "This package provides a Python wrapper of the C library implementation
1404of the CRC32C hashing algorithm.")
1405 (license license:asl2.0)))
1406
1407(define-public python-spake2
1408 (package
1409 (name "python-spake2")
1410 (version "0.9")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (pypi-uri "spake2" version))
1415 (sha256
1416 (base32 "0d4kbaxi4cv8klyqh6yb0p0qiwfdwvczy1h2mzvmlfdcsnlc87s2"))))
1417 (build-system pyproject-build-system)
1418 (native-inputs (list python-pytest python-setuptools))
1419 (propagated-inputs (list python-cryptography))
1420 (home-page "https://github.com/warner/python-spake2")
1421 (synopsis "SPAKE2 password-authenticated key exchange in Python")
1422 (description "This package provides a Python implementation of the SPAKE2
1423Password-Authenticated Key Exchange algorithm.")
1424 (license license:expat)))
1425
1426(define-public python-keyutils
1427 (package
1428 (name "python-keyutils")
1429 (version "0.6")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "keyutils" version))
1434 (sha256
1435 (base32 "0lipygpzhwzzsq2k5imb1jgkmj8y4khxdwhzadjs3bd56g6bmkx9"))))
1436 (build-system pyproject-build-system)
1437 (arguments
1438 (list
1439 #:tests? #f
1440 #:phases
1441 #~(modify-phases %standard-phases
1442 (add-before 'build 'regenerate-c-file
1443 (lambda _
1444 (invoke "cython" "keyutils/_keyutils.pyx"))))))
1445 (native-inputs
1446 (list python-cython python-pytest python-setuptools))
1447 (inputs
1448 (list keyutils))
1449 (home-page "https://github.com/sassoftware/python-keyutils")
1450 (synopsis "Python bindings for keyutils")
1451 (description
1452 "This is a set of python bindings for keyutils, a key management suite
1453that leverages the infrastructure provided by the Linux kernel for safely
1454storing and retrieving sensitive information in your programs.")
1455 (license license:asl2.0)))
1456
1457(define-public python-mcuboot-imgtool
1458 (package
1459 (name "python-mcuboot-imgtool")
1460 (version "1.4.0")
1461 (source
1462 (origin
1463 (method git-fetch)
1464 (uri (git-reference
1465 (url "https://github.com/mcu-tools/mcuboot")
1466 (commit (string-append "v" version))))
1467 (file-name (git-file-name name version))
1468 (sha256
1469 (base32 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
1470 (build-system pyproject-build-system)
1471 (arguments
1472 (list
1473 #:phases
1474 #~(modify-phases %standard-phases
1475 (add-after 'unpack 'fix-broken-test
1476 (lambda _
1477 (substitute* "scripts/imgtool/keys/ed25519_test.py"
1478 (("raw_sign")
1479 "sign_digest"))))
1480 (add-before 'build 'change-directory
1481 (lambda _
1482 (chdir "scripts"))))))
1483 (native-inputs (list python-pytest python-setuptools python-wheel))
1484 (propagated-inputs (list python-click python-intelhex python-cryptography))
1485 (home-page "https://mcuboot.com")
1486 (synopsis "Tool to securely sign firmware images for booting by MCUboot")
1487 (description
1488 "MCUboot is a secure bootloader for 32-bit MCUs. This package provides a
1489tool to securely sign firmware images for booting by MCUboot.")
1490 (license license:expat)))
1491
1492(define-public python-ntlm-auth
1493 (package
1494 (name "python-ntlm-auth")
1495 (version "1.5.0")
1496 (source
1497 (origin
1498 (method git-fetch)
1499 (uri (git-reference
1500 (url "https://github.com/jborean93/ntlm-auth")
1501 (commit (string-append "v" version))))
1502 (file-name (git-file-name name version))
1503 (sha256
1504 (base32 "00dpf5bfsy07frsjihv1k10zmwcyq4bvkilbxha7h6nlwpcm2409"))))
1505 (build-system pyproject-build-system)
1506 (native-inputs
1507 (list python-pytest python-requests python-setuptools python-wheel))
1508 (propagated-inputs (list python-cryptography))
1509 (home-page "https://github.com/jborean93/ntlm-auth")
1510 (synopsis "Calculates NTLM Authentication codes")
1511 (description
1512 "This library handles the low-level details of NTLM authentication for
1513use in authenticating with a service that uses NTLM. It will create and parse
1514the 3 different message types in the order required and produce a base64
1515encoded value that can be attached to the HTTP header.
1516
1517The goal of this library is to offer full NTLM support including signing and
1518sealing of messages as well as supporting MIC for message integrity and the
1519ability to customise and set limits on the messages sent. Please see Features
1520and Backlog for a list of what is and is not currently supported.")
1521 (license license:expat)))
1522
1523(define-public python-secretstorage
1524 (package
1525 (name "python-secretstorage")
1526 (version "3.3.3")
1527 (source
1528 (origin
1529 (method url-fetch)
1530 (uri (pypi-uri "SecretStorage" version))
1531 (sha256
1532 (base32 "0xxxxr77sgmjm1rqzdd1rkan9xg0qmv8awc1pb9adv39ycz560r4"))))
1533 (build-system pyproject-build-system)
1534 (arguments
1535 '(#:tests? #f)) ; Tests require a running dbus service.
1536 (native-inputs
1537 (list python-setuptools))
1538 (propagated-inputs
1539 (list python-cryptography python-jeepney))
1540 (home-page "https://github.com/mitya57/secretstorage")
1541 (synopsis "Python bindings to FreeDesktop.org Secret Service API")
1542 (description
1543 "@code{python-secretstorage} provides a way for securely storing passwords
1544and other secrets. It uses D-Bus Secret Service API that is supported by GNOME
1545Keyring (since version 2.30) and KSecretsService. SecretStorage supports most
1546of the functions provided by Secret Service, including creating and deleting
1547items and collections, editing items, locking and unlocking collections
1548(asynchronous unlocking is also supported).")
1549 (license license:bsd-3)))
1550
1551(define-public python-trustme
1552 (package
1553 (name "python-trustme")
1554 (version "1.2.1")
1555 (source
1556 (origin
1557 (method url-fetch)
1558 (uri (pypi-uri "trustme" version))
1559 (sha256
1560 (base32 "0zz49agi7hy82fbr03xs6k9vjgiy7v8qsp426cgv8bbzphmvla35"))))
1561 (build-system pyproject-build-system)
1562 (native-inputs
1563 (list python-hatchling
1564 python-pyopenssl
1565 python-pytest
1566 python-service-identity))
1567 (propagated-inputs
1568 (list python-cryptography
1569 python-idna))
1570 (home-page "https://trustme.readthedocs.io")
1571 (synopsis "Fake a certificate authority for tests")
1572 (description
1573 "@code{trustme} is a tiny Python package that does one thing: it gives you
1574a fake certificate authority (CA) that you can use to generate fake TLS certs to
1575use in your tests.")
1576 ;; Either license applies.
1577 (license (list license:expat license:asl2.0))))
1578
1579(define-public python-certipy
1580 (package
1581 (name "python-certipy")
1582 (version "0.2.2")
1583 (source
1584 (origin
1585 (method url-fetch)
1586 (uri (pypi-uri "certipy" version))
1587 (sha256
1588 (base32 "0pm0kf079ws9s93vpkxnw3gj6a1hi34p34bicx69rqlyh7cg7wgy"))))
1589 (build-system pyproject-build-system)
1590 (propagated-inputs (list python-cryptography))
1591 (native-inputs (list python-pypa-build
1592 python-flask
1593 python-pytest
1594 python-setuptools
1595 python-wheel))
1596 (home-page "https://github.com/LLNL/certipy")
1597 (synopsis "Utility to create and sign CAs and certificates")
1598 (description
1599 "Certipy was made to simplify the certificate creation process. To that
1600end, certipy exposes methods for creating and managing certificate authorities,
1601certificates, signing and building trust bundles.")
1602 (license license:bsd-3)))
1603
1604(define-public python-jeepney
1605 (package
1606 (name "python-jeepney")
1607 (version "0.8.0")
1608 (source
1609 (origin
1610 (method url-fetch)
1611 (uri (pypi-uri "jeepney" version))
1612 (sha256
1613 (base32 "01jqrk7pn94i7bpmj834pjrw7id659gfag6wpbv04fcpap94izjy"))))
1614 (build-system pyproject-build-system)
1615 (native-inputs
1616 (list python-async-timeout
1617 python-testpath
1618 python-trio
1619 python-pytest
1620 python-pytest-asyncio
1621 python-pytest-trio
1622 ;; For the build backend
1623 python-flit-core))
1624 (home-page "https://gitlab.com/takluyver/jeepney")
1625 (synopsis "Low-level, pure Python DBus protocol wrapper")
1626 (description
1627 "This is a low-level, pure Python DBus protocol client. It has an
1628I/O-free core, and integration modules for different event loops.")
1629 (license license:expat)))
1630
1631(define-public python-argon2-cffi
1632 (package
1633 (name "python-argon2-cffi")
1634 (version "25.1.0")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "argon2_cffi" version))
1639 (sha256
1640 (base32 "1ha62fg9blw38q3qayjid8608fp2a57fd81cpzic9x22ib6fajk9"))))
1641 (build-system pyproject-build-system)
1642 (native-inputs
1643 (list python-hatch-fancy-pypi-readme
1644 python-hatch-vcs
1645 python-hatchling
1646 python-pytest))
1647 (propagated-inputs
1648 (list python-argon2-cffi-bindings))
1649 (home-page "https://argon2-cffi.readthedocs.io/")
1650 (synopsis "Secure Password Hashes for Python")
1651 (description
1652 "Argon2 is a secure password hashing algorithm. It is designed to have
1653both a configurable runtime as well as memory consumption. This means that you
1654can decide how long it takes to hash a password and how much memory is required.")
1655 (license license:expat)))
1656
1657(define-public python-argon2-cffi-bindings
1658 (package
1659 (name "python-argon2-cffi-bindings")
1660 (version "25.1.0")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "argon2_cffi_bindings" version))
1665 (sha256
1666 (base32 "179256zsrh5c51zmv9k1sc9p102j152nzxqgwhhdhmadxbkg6mxr"))))
1667 (build-system pyproject-build-system)
1668 (arguments
1669 (list
1670 #:phases
1671 #~(modify-phases %standard-phases
1672 (add-before 'build 'use-system-argon2
1673 (lambda _
1674 (setenv "ARGON2_CFFI_USE_SYSTEM" "1"))))))
1675 (native-inputs
1676 (list python-pytest
1677 python-setuptools
1678 python-setuptools-scm))
1679 (inputs
1680 (list argon2))
1681 (propagated-inputs
1682 (list python-cffi))
1683 (home-page "https://github.com/hynek/argon2-cffi-bindings")
1684 (synopsis "Low-level CFFI bindings for Argon2")
1685 (description
1686 "argon2-cffi-bindings provides low-level CFFI bindings to the official
1687implementation of the Argon2 password hashing algorithm.")
1688 (license license:expat)))
1689
1690(define-public python-privy
1691 (package
1692 (name "python-privy")
1693 (version "6.0.0")
1694 (source
1695 (origin
1696 (method git-fetch)
1697 (uri (git-reference
1698 ;; Releases are untagged
1699 (url "https://github.com/ofek/privy")
1700 (commit "2838db3df239797c71bddacc48a4c49a83f35747")))
1701 (file-name (git-file-name name version))
1702 (sha256
1703 (base32 "1m32dh5fqc8cy7jyf1z5fs6zvmdkbq5fi98hr609gbl7s0l0y0i9"))))
1704 (build-system pyproject-build-system)
1705 (native-inputs (list python-pytest python-setuptools))
1706 (propagated-inputs (list python-argon2-cffi python-cryptography))
1707 (home-page "https://www.dropbox.com/developers")
1708 (synopsis "Library to password-protect your data")
1709 (description
1710 "Privy is a small and fast utility for password-protecting secret
1711data such as API keys, cryptocurrency wallets, or seeds for digital
1712signatures.")
1713 (license (list license:expat license:asl2.0)))) ; dual licensed
1714
1715(define-public python-pgpy
1716 (package
1717 (name "python-pgpy")
1718 (version "0.6.0")
1719 (source
1720 (origin
1721 (method url-fetch)
1722 (uri (pypi-uri "PGPy" version))
1723 (sha256
1724 (base32 "10w3h934fi1ijx72ppn67a50yhkf8n1db6xx02gk2fjc7wsjx717"))))
1725 (build-system pyproject-build-system)
1726 (arguments
1727 (list #:test-flags
1728 ;; All broken tests are in this file.
1729 ;; They fail with ValueError: key_size must be at least 1024-bits.
1730 #~(list "--ignore" "tests/test_10_exceptions.py")))
1731 (native-inputs
1732 (list python-pytest python-setuptools python-wheel))
1733 (propagated-inputs (list python-cryptography python-pyasn1))
1734 (home-page "https://github.com/SecurityInnovation/PGPy")
1735 (synopsis "Python implementation of OpenPGP")
1736 (description
1737 "Currently, PGPy can load keys and signatures of all kinds in both ASCII
1738armored and binary formats.
1739
1740It can create and verify RSA, DSA, and ECDSA signatures, at the moment. It
1741can also encrypt and decrypt messages using RSA and ECDH.")
1742 (license license:bsd-3)))
1743
1744(define-public python-pyu2f
1745 (package
1746 (name "python-pyu2f")
1747 (version "0.1.5")
1748 (source
1749 (origin
1750 (method git-fetch)
1751 (uri (git-reference
1752 (url "https://github.com/google/pyu2f/")
1753 (commit (string-append "v" version))))
1754 (file-name (git-file-name name version))
1755 (sha256
1756 (base32 "1jlpplw7hlrh8bgmp37g18panij0p7ism6r4d981my4dc73lbwik"))))
1757 (build-system pyproject-build-system)
1758 (arguments
1759 (list
1760 ;; This test requires the fakefs package.
1761 #:test-flags #~(list "--ignore=pyu2f/tests/hid/linux_test.py")))
1762 (native-inputs (list python-mock python-pytest python-setuptools))
1763 (propagated-inputs (list python-six))
1764 (home-page "https://github.com/google/pyu2f/")
1765 (synopsis "U2F host library for interacting with a U2F device over USB")
1766 (description
1767 "Pyu2f is a Python-based U2F host library. It provides functionality for
1768interacting with a U2F device over USB.")
1769 (license license:asl2.0)))
1770
1771(define-public python-sop
1772 (package
1773 (name "python-sop")
1774 (version "0.5.1")
1775 (source
1776 (origin
1777 (method git-fetch)
1778 (uri (git-reference
1779 (url "https://gitlab.com/dkg/python-sop")
1780 (commit (string-append "sop-" version))))
1781 (file-name (git-file-name name version))
1782 (sha256
1783 (base32 "0sin5miiiqgww0s52jz098x44nbnx003vfd4jn55bs5mgca60lll"))))
1784 (build-system pyproject-build-system)
1785 (arguments
1786 (list #:tests? #f)) ; XXX: No tests upstream.
1787 (native-inputs (list python-setuptools python-wheel))
1788 (home-page "https://gitlab.com/dkg/python-sop")
1789 (synopsis "Stateless OpenPGP Command-Line Interface")
1790 (description
1791 "The Stateless OpenPGP Command-Line Interface (or sop) is a
1792specification that encourages OpenPGP implementors to provide a common,
1793relatively simple command-line API for purposes of object security.
1794
1795This Python module helps implementers build such a CLI from any implementation
1796accessible to the Python interpreter.
1797
1798It does not provide such an implementation itself -- this is just the
1799scaffolding for the command line, which should make it relatively easy to
1800supply a handful of python functions as methods to a class.")
1801 (license license:expat))) ; MIT license
1802
1803(define-public python-starkbank-ecdsa
1804 (package
1805 (name "python-starkbank-ecdsa")
1806 (version "2.2.0")
1807 (home-page "https://github.com/starkbank/ecdsa-python")
1808 (source
1809 (origin
1810 (method git-fetch)
1811 (uri (git-reference
1812 (url home-page)
1813 (commit (string-append "v" version))))
1814 (file-name (git-file-name name version))
1815 (sha256
1816 (base32 "01zy16csrbyfhjl0kay9rbpbwc3dpr7kh2qkrbdy5a1n644fbahx"))))
1817 (arguments
1818 (list
1819 #:test-backend #~'unittest
1820 #:phases
1821 #~(modify-phases %standard-phases
1822 (add-after 'unpack 'remove-broken-test
1823 (lambda _
1824 (delete-file "tests/testOpenSSL.py"))))))
1825 (build-system pyproject-build-system)
1826 (native-inputs (list python-setuptools))
1827 (synopsis "Python ECDSA library")
1828 (description "This package provides a Python ECDSA library, optimized for
1829speed but without C extensions.")
1830 (license license:expat)))
1831
1832(define-public python-zxcvbn
1833 (package
1834 (name "python-zxcvbn")
1835 (version "4.5.0")
1836 (source
1837 (origin
1838 (method git-fetch) ;for tests
1839 (uri (git-reference
1840 (url "https://github.com/dwolfhub/zxcvbn-python")
1841 (commit (string-append "v" version))))
1842 (file-name (git-file-name name version))
1843 (sha256
1844 (base32 "0x39yi4zc1n6mjjk3rx32ick0hysyi9hv9ln69apcch4jf84j9fi"))))
1845 (build-system pyproject-build-system)
1846 (native-inputs (list python-pytest python-setuptools python-wheel))
1847 (home-page "https://github.com/dwolfhub/zxcvbn-python")
1848 (synopsis "Realistic password strength estimator Python library")
1849 (description
1850 "This is a Python implementation of the @code{zxcvbn} library created at
1851Dropbox. The original library, written for JavaScript, can be found
1852@url{https://github.com/dropbox/zxcvbn, here}. This port includes features
1853such as:
1854@enumerate
1855@item Accepts user data to be added to the dictionaries that are tested
1856against (name, birthdate, etc.)
1857@item Gives a score to the password, from 0 (terrible) to 4 (great).
1858@item Provides feedback on the password and ways to improve it.
1859@item Returns time estimates on how long it would take to guess the password
1860in different situations.
1861@end enumerate")
1862 (license license:expat)))
1863
1864;; XXX: Not maintained since 2016.
1865(define-public python-pydes
1866 (package
1867 (name "python-pydes")
1868 (version "2.0.1")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (pypi-uri "pyDes" version))
1873 (sha256
1874 (base32 "04lh71f47y04vspfrdrq6a0hn060ibxvdp5z1pcr0gmqs8hqxaz2"))))
1875 (build-system pyproject-build-system)
1876 (arguments
1877 (list #:tests? #f)) ;no tests in PyPI, I could not fine Git
1878 (native-inputs (list python-setuptools))
1879 (home-page "http://twhiteman.netfirms.com/des.html") ;XXX: Dead link
1880 (synopsis
1881 "Pure python implementation of the DES and TRIPLE DES encryption algorithms")
1882 (description
1883 "This package provides a pure Python implementation of the DES and
1884TRIPLE DES encryption algorithms.")
1885 (license license:public-domain)))