1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com>
6 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
7 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
8 ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
9 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
11 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
13 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
15 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
16 ;;; Copyright © 2016, 2017, 2020 Arun Isaac <arunisaac@systemreboot.net>
17 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
18 ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
19 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
20 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
21 ;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
22 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
23 ;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
24 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
25 ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
26 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages python-crypto)
44 #:use-module (guix packages)
45 #:use-module (guix download)
46 #:use-module (guix git-download)
47 #:use-module (guix build-system python)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages kerberos)
52 #:use-module (gnu packages libffi)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages password-utils)
55 #:use-module (gnu packages protobuf)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-check)
58 #:use-module (gnu packages python-compression)
59 #:use-module (gnu packages python-web)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages swig)
62 #:use-module (gnu packages time)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages xml)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (srfi srfi-1))
68 (define-public python-potr
77 (url "https://github.com/python-otr/pure-python-otr")
80 (git-file-name name version))
82 (base32 "1hzw6h01fm216nmipyylgz0zybd80w1xsk12m7djycnhqrnrvvv1"))))
83 (build-system python-build-system)
85 `(("python-pycrypto" ,python-pycrypto)))
86 (synopsis "Python OTR Implementation")
87 (description "Python OTR is an Off-The-Record Protocol Implementation in
88 Python. It does not bind to libotr.")
89 (home-page "https://github.com/python-otr/pure-python-otr")
90 (license license:lgpl3+)))
92 (define-public python-base58
94 (name "python-base58")
99 (uri (pypi-uri "base58" version))
102 "0yfaqp76kbdb62hikr5n4jkkfjfmii89grwfy6sw3fmsv5hrap1n"))))
103 (build-system python-build-system)
105 `(("python-pyhamcrest" ,python-pyhamcrest)))
106 (home-page "https://github.com/keis/base58")
107 (synopsis "Base58 and Base58Check implementation")
108 (description "Base58 and Base58Check implementation compatible
109 with what is used by the Bitcoin network.")
110 (license license:expat)))
112 (define-public python-bcrypt
114 (name "python-bcrypt")
119 (uri (pypi-uri "bcrypt" version))
121 (base32 "0hhywhxx301cxivgxrpslrangbfpccc8y83qbwn1f57cab3nj00b"))))
122 (build-system python-build-system)
124 `(("python-pycparser" ,python-pycparser)
125 ("python-pytest" ,python-pytest)))
127 `(("python-cffi" ,python-cffi)
128 ("python-six" ,python-six)))
129 (home-page "https://github.com/pyca/bcrypt/")
131 "Modern password hashing library")
133 "Bcrypt is a Python module which provides a password hashing method based
134 on the Blowfish password hashing algorithm, as described in
135 @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
136 Password Scheme\"} by Niels Provos and David Mazieres.")
137 (license license:asl2.0)))
139 (define-public python2-bcrypt
140 (package-with-python2 python-bcrypt))
142 (define-public python-passlib
144 (name "python-passlib")
149 (uri (pypi-uri "passlib" version))
151 (base32 "015y5qaw9qnxr29lg60dml1g5rbqd4586wy5n8m41ib55gvm1zfy"))))
152 (build-system python-build-system)
154 `(("python-nose" ,python-nose)))
156 `(("python-py-bcrypt" ,python-py-bcrypt)))
159 (modify-phases %standard-phases
160 (add-before 'check 'set-PYTHON_EGG_CACHE
161 ;; Some tests require access to "$HOME/.cython".
162 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
163 (home-page "https://bitbucket.org/ecollins/passlib")
164 (synopsis "Comprehensive password hashing framework")
166 "Passlib is a password hashing library for Python 2 & 3, which provides
167 cross-platform implementations of over 30 password hashing algorithms, as well
168 as a framework for managing existing password hashes. It's designed to be
169 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
170 to providing full-strength password hashing for multi-user application.")
171 (license license:bsd-3)))
173 (define-public python2-passlib
174 (package-with-python2 python-passlib))
176 (define-public python-py-bcrypt
178 (name "python-py-bcrypt")
183 (uri (pypi-uri "py-bcrypt" version))
186 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
187 (build-system python-build-system)
188 (home-page "https://code.google.com/p/py-bcrypt")
190 "Bcrypt password hashing and key derivation")
192 "A python wrapper of OpenBSD's Blowfish password hashing code. This
193 system hashes passwords using a version of Bruce Schneier's Blowfish block
194 cipher with modifications designed to raise the cost of off-line password
195 cracking and frustrate fast hardware implementation. The computation cost of
196 the algorithm is parametrised, so it can be increased as computers get faster.
197 The intent is to make a compromise of a password database less likely to
198 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
200 ;; "sha2.c" is under BSD-3;
201 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
202 ;; the rest is under ISC.
203 (license (list license:isc license:bsd-3 license:bsd-4))))
205 (define-public python2-py-bcrypt
206 (package-with-python2 python-py-bcrypt))
208 (define-public python-pyblake2
210 (name "python-pyblake2")
215 (uri (pypi-uri "pyblake2" version))
218 "0gz9hgznv5zw4qjq43xa56y0yikimx30gffvibxzm0nv5sq7xk2w"))))
219 (build-system python-build-system)
220 (home-page "https://github.com/dchest/pyblake2")
221 (synopsis "BLAKE2 hash function for Python")
222 (description "BLAKE2 is a cryptographic hash function, which offers
223 stronger security while being as fast as MD5 or SHA-1, and comes in two
224 flavors: @code{BLAKE2b}, optimized for 64-bit platforms and produces digests
225 of any size between 1 and 64 bytes, and @code{BLAKE2s}, optimized for 8- to
226 32-bit platforms and produces digests of any size between 1 and 32 bytes.
228 This package provides a Python interface for BLAKE2.")
229 ;; The COPYING file declares it as public domain, with the option to
230 ;; alternatively use and redistribute it under a variety of permissive
231 ;; licenses. cc0 is explicitly mentioned in setup.py and pyblake2module.c.
232 (license (list license:public-domain license:cc0))))
234 (define-public python-paramiko
236 (name "python-paramiko")
241 (uri (pypi-uri "paramiko" version))
243 (base32 "0dahwq623jnna7gsr9j0mkwr9k2n1pvkapjryhcx508d5jxg8dkz"))))
244 (build-system python-build-system)
246 `(;; FIXME: Tests require many unpackaged libraries, see dev-requirements.txt.
249 `(("python-bcrypt" ,python-bcrypt)
250 ("python-pyasn1" ,python-pyasn1)
251 ("python-pynacl" ,python-pynacl)
252 ("python-cryptography" ,python-cryptography)))
253 (home-page "https://www.paramiko.org/")
254 (synopsis "SSHv2 protocol library")
255 (description "Paramiko is a python implementation of the SSHv2 protocol,
256 providing both client and server functionality. While it leverages a Python C
257 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
258 Python interface around SSH networking concepts.")
259 (license license:lgpl2.1+)))
261 (define-public python2-paramiko
262 (package-with-python2 python-paramiko))
264 (define-public python-ecdsa
266 (name "python-ecdsa")
271 (uri (pypi-uri "ecdsa" version))
273 (base32 "13nx5cbfxc0gnax5zwdmp9xc40qd1llk62mv85jyrvqkbw017ik4"))))
274 (build-system python-build-system)
277 (modify-phases %standard-phases
279 (lambda _ (invoke "pytest"))))))
281 `(("python-six" ,python-six)))
283 `(("openssl" ,openssl)
284 ("python-pytest" ,python-pytest)))
285 (home-page "https://github.com/warner/python-ecdsa")
286 (synopsis "ECDSA cryptographic signature library (pure python)")
288 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
289 Curve Digital Signature Algorithm), implemented purely in Python. With this
290 library, you can quickly create key pairs (signing key and verifying key), sign
291 messages, and verify the signatures. The keys and signatures are very short,
292 making them easy to handle and incorporate into other protocols.")
293 (license license:expat)))
295 (define-public python2-ecdsa
296 (package-with-python2 python-ecdsa))
298 ;;; Pycrypto is abandoned upstream:
300 ;;; https://github.com/dlitz/pycrypto/issues/173
302 ;;; TODO Remove this package from GNU Guix.
303 (define-public python-pycrypto
305 (name "python-pycrypto")
310 (uri (pypi-uri "pycrypto" version))
311 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"
312 "python-pycrypto-time-clock.patch"))
315 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
316 (build-system python-build-system)
322 (modify-phases %standard-phases
323 (add-before 'build 'set-build-env
324 ;; pycrypto runs an autoconf configure script behind the scenes
325 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
326 (home-page "https://www.dlitz.net/software/pycrypto/")
327 (synopsis "Cryptographic modules for Python")
329 "Pycrypto is a collection of both secure hash functions (such as SHA256
330 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
331 etc.). The package is structured to make adding new modules easy.")
332 (license license:public-domain)))
334 (define-public python2-pycrypto
335 (let ((pycrypto (package-with-python2 python-pycrypto)))
336 (package (inherit pycrypto)
338 `(("python" ,python-2)
341 (package-inputs pycrypto)))))))
343 (define-public python-kerberos
345 (name "python-kerberos")
350 (uri (pypi-uri "kerberos" version))
353 "19663qxmma0i8bfbjc2iwy5hgq0g4pfb75r023v5dps68zfvffgh"))))
354 (build-system python-build-system)
356 `(("mit-krb5" ,mit-krb5)))
357 (home-page "https://github.com/apple/ccs-pykerberos")
359 "Python Kerberos library used by CalendarServer")
361 "This Python package is a high-level wrapper for Kerberos (GSSAPI)
362 operations. The goal is to avoid having to build a module that wraps the
363 entire Kerberos.framework, and instead offer a limited set of functions that
364 do what is needed for client/server Kerberos authentication based on
365 <http://www.ietf.org/rfc/rfc4559.txt>.")
366 (license license:asl2.0)))
368 (define-public python-keyring
370 (name "python-keyring")
375 (uri (pypi-uri "keyring" version))
378 "1k0w3yh3fz0qp0cvkxdiinq9jzbrnc6bd88qpjz34x3cgcr94psz"))
379 (modules '((guix build utils)))
381 ;; https://github.com/jaraco/keyring/issues/414
382 '(begin (substitute* "tests/test_packaging.py"
383 (("ep, =") "(ep,) =")) #t))))
384 (build-system python-build-system)
387 (modify-phases %standard-phases
390 ;; Not clear why this test fails.
391 (delete-file "tests/test_packaging.py")
392 (substitute* "pytest.ini"
394 (invoke "pytest"))))))
396 `(("python-pytest" ,python-pytest)
397 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
398 ("python-pytest-cov" ,python-pytest-cov)
399 ("python-pytest-flake8" ,python-pytest-flake8)
400 ("python-setuptools-scm" ,python-setuptools-scm)))
402 `(("python-importlib-metadata" ,python-importlib-metadata)
403 ("python-secretstorage" ,python-secretstorage)))
404 (home-page "https://github.com/jaraco/keyring")
405 (synopsis "Store and access your passwords safely")
407 "The Python keyring lib provides a easy way to access the system keyring
408 service from python. It can be used in any application that needs safe
410 ;; "MIT" and PSF dual license
411 (properties `((python2-variant . ,(delay python2-keyring))))
412 (license license:x11)))
414 (define-public python2-keyring
415 (let ((keyring (package-with-python2
416 (strip-python2-variant python-keyring))))
419 (name "python2-keyring")
424 (uri (pypi-uri "keyring" version))
427 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
429 `(#:python ,python-2))
431 `(("python2-pytest" ,python2-pytest)
432 ("python2-pytest-runner" ,python2-pytest-runner)
433 ("python2-setuptools-scm" ,python2-setuptools-scm)))
435 `(("python2-pycrypto" ,python2-pycrypto))))))
437 (define-public python-keyrings.alt
439 (name "python-keyrings.alt")
444 (uri (pypi-uri "keyrings.alt" version))
447 "0gdjdqpq2hf770p6iwi891mil0vbsdhvy88x0v8b2w4y4b28lcli"))
448 (modules '((guix build utils)))
451 (delete-file "keyrings/alt/_win_crypto.py")
452 ;; Rely on python-keyring>20:
453 ;; https://github.com/jaraco/keyrings.alt/issues/33
454 (substitute* '("keyrings/alt/tests/test_Gnome.py"
455 "keyrings/alt/tests/test_Google.py"
456 "keyrings/alt/tests/test_Windows.py"
457 "keyrings/alt/tests/test_file.py"
458 "keyrings/alt/tests/test_pyfs.py")
459 (("keyring.tests.test_backend") "keyring.testing.backend")
460 (("keyring.tests.util") "keyring.testing.util"))
462 (build-system python-build-system)
464 `(("python-keyring" ,python-keyring)
465 ("python-pytest" ,python-pytest)
466 ("python-setuptools-scm" ,python-setuptools-scm)))
467 (home-page "https://github.com/jaraco/keyrings.alt")
468 (synopsis "Alternate keyring implementations")
469 (description "Keyrings in this package may have security risks or other
470 implications. These backends were extracted from the main keyring project to
471 make them available for those who wish to employ them, but are discouraged for
472 general production use. Include this module and use its backends at your own
474 (license license:expat)))
476 (define-public python-certifi
478 (name "python-certifi")
479 (version "2020.4.5.1")
482 (uri (pypi-uri "certifi" version))
485 "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i"))))
486 (build-system python-build-system)
487 (arguments '(#:tests? #f)) ;no tests
488 (home-page "https://certifi.io/")
489 (synopsis "Python CA certificate bundle")
491 "Certifi is a Python library that contains a CA certificate bundle, which
492 is used by the Requests library to verify HTTPS requests.")
493 (license license:asl2.0)))
495 (define-public python2-certifi
496 (package-with-python2 python-certifi))
498 (define-public python-cryptography-vectors
500 (name "python-cryptography-vectors")
505 (uri (pypi-uri "cryptography_vectors" version))
508 "1d4iykcv7cn9j399hczlxm5pzxmqy6d80h3j16dkjwlmv3293b4r"))))
509 (build-system python-build-system)
510 (home-page "https://github.com/pyca/cryptography")
511 (synopsis "Test vectors for the cryptography package")
513 "This package contains test vectors for the cryptography package.")
514 ;; Distributed under either BSD-3 or ASL2.0
515 (license (list license:bsd-3 license:asl2.0))))
517 (define-public python2-cryptography-vectors
518 (package-with-python2 python-cryptography-vectors))
520 (define-public python-cryptography
522 (name "python-cryptography")
527 (uri (pypi-uri "cryptography" version))
530 "0af25w5mkd6vwns3r6ai1w5ip9xp0ms9s261zzssbpadzdr05hx0"))))
531 (build-system python-build-system)
533 `(("openssl" ,openssl)))
535 `(("python-asn1crypto" ,python-asn1crypto)
536 ("python-cffi" ,python-cffi)
537 ("python-six" ,python-six)
538 ("python-idna" ,python-idna)
539 ("python-iso8601" ,python-iso8601)))
541 `(("python-cryptography-vectors" ,python-cryptography-vectors)
542 ("python-hypothesis" ,python-hypothesis)
543 ("python-pretend" ,python-pretend)
544 ("python-pytz" ,python-pytz)
545 ("python-pytest" ,python-pytest)))
546 (home-page "https://github.com/pyca/cryptography")
547 (synopsis "Cryptographic recipes and primitives for Python")
549 "cryptography is a package which provides cryptographic recipes and
550 primitives to Python developers. It aims to be the “cryptographic standard
551 library” for Python. The package includes both high level recipes, and low
552 level interfaces to common cryptographic algorithms such as symmetric ciphers,
553 message digests and key derivation functions.")
554 ;; Distributed under either BSD-3 or ASL2.0
555 (license (list license:bsd-3 license:asl2.0))
556 (properties `((python2-variant . ,(delay python2-cryptography))))))
558 (define-public python2-cryptography
559 (let ((crypto (package-with-python2
560 (strip-python2-variant python-cryptography))))
561 (package (inherit crypto)
563 `(("python2-ipaddress" ,python2-ipaddress)
564 ("python2-backport-ssl-match-hostname"
565 ,python2-backport-ssl-match-hostname)
566 ("python2-enum34" ,python2-enum34)
567 ,@(package-propagated-inputs crypto))))))
569 (define-public python-pyopenssl
571 (name "python-pyopenssl")
576 (uri (pypi-uri "pyOpenSSL" version))
579 "01wmsq6w0frzbr3zps4ga9kmqjidp2h317jwpq1g9ah24r5lj94s"))))
580 (build-system python-build-system)
583 (modify-phases %standard-phases
585 (add-after 'install 'check
586 (lambda* (#:key inputs outputs #:allow-other-keys)
587 (add-installed-pythonpath inputs outputs)
588 ;; PyOpenSSL runs tests against a certificate with a fixed
589 ;; expiry time. To ensure successful builds in the future,
590 ;; set the time to roughly the release date.
591 (invoke "faketime" "2019-01-01" "py.test" "-v" "-k"
593 ;; This test tries to look up certificates from
594 ;; the compiled-in default path in OpenSSL, which
595 ;; does not exist in the build environment.
596 "not test_fallback_default_verify_paths "
597 ;; This test attempts to make a connection to
598 ;; an external web service.
599 "and not test_set_default_verify_paths")))))))
601 `(("python-cryptography" ,python-cryptography)
602 ("python-six" ,python-six)))
604 `(("openssl" ,openssl)))
606 `(("libfaketime" ,libfaketime)
607 ("python-flaky" ,python-flaky)
608 ("python-pretend" ,python-pretend)
609 ("python-pytest" ,python-pytest)))
610 (home-page "https://github.com/pyca/pyopenssl")
611 (synopsis "Python wrapper module around the OpenSSL library")
613 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
615 (license license:asl2.0)))
617 (define-public python2-pyopenssl
618 (package-with-python2 python-pyopenssl))
620 (define-public python-ed25519
622 (name "python-ed25519")
627 (uri (pypi-uri "ed25519" version))
630 "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499"))))
631 (build-system python-build-system)
632 (home-page "https://github.com/warner/python-ed25519")
633 (synopsis "Ed25519 public-key signatures")
634 (description "Ed25519 public-key signatures")
635 (license license:expat)))
637 (define-public python2-ed25519
638 (package-with-python2 python-ed25519))
640 (define-public python-axolotl-curve25519
642 (name "python-axolotl-curve25519")
643 (version "0.4.1.post2")
647 (uri (pypi-uri "python-axolotl-curve25519" version))
650 "18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
651 (build-system python-build-system)
652 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
653 (synopsis "Python wrapper for curve25519 library")
654 (description "This is a python wrapper for the curve25519 library
655 with ed25519 signatures. The C code was pulled from
656 libaxolotl-android. At the moment this wrapper is meant for use by
658 (license (list license:gpl3 ; Most files
659 license:bsd-3)))) ; curve/curve25519-donna.c
661 (define-public python2-axolotl-curve25519
662 (package-with-python2 python-axolotl-curve25519))
664 (define-public python-axolotl
666 (name "python-axolotl")
671 (uri (pypi-uri "python-axolotl" version))
674 "1bwdp24fmriffwx91aigs9k162albb51iskp23nc939z893q23py"))))
675 (build-system python-build-system)
678 (modify-phases %standard-phases
679 ;; Don't install tests
680 (add-before 'install 'remove-tests
682 (for-each delete-file-recursively
683 '("axolotl/tests" "build/lib/axolotl/tests"))
686 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
687 ("python-cryptography" ,python-cryptography)
688 ("python-protobuf" ,python-protobuf)))
689 (home-page "https://github.com/tgalal/python-axolotl")
690 (synopsis "Python port of libaxolotl-android")
691 (description "This is a python port of libaxolotl-android. This
692 is a ratcheting forward secrecy protocol that works in synchronous and
693 asynchronous messaging environments.")
694 (license license:gpl3)))
696 (define-public python2-axolotl
697 (package-with-python2 python-axolotl))
699 ;; SlowAES isn't compatible with Python 3.
700 (define-public python2-slowaes
702 (name "python2-slowaes")
707 (uri (pypi-uri "slowaes" version))
710 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
711 (build-system python-build-system)
712 (arguments `(#:python ,python-2))
713 (home-page "http://code.google.com/p/slowaes/")
714 (synopsis "Implementation of AES in Python")
715 (description "This package contains an implementation of AES in Python.
716 This implementation is slow (hence the project name) but still useful when
717 faster ones are not available.")
718 (license license:asl2.0)))
720 (define-public python-pyaes
722 (name "python-pyaes")
727 (uri (pypi-uri "pyaes" version))
730 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
731 (build-system python-build-system)
732 (home-page "https://github.com/ricmoo/pyaes")
733 (synopsis "Implementation of AES in Python")
734 (description "This package contains a pure-Python implementation of the
735 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
737 (license license:expat)))
739 (define-public python2-pyaes
740 (package-with-python2 python-pyaes))
742 (define-public python-asn1crypto
744 (name "python-asn1crypto")
750 (url "https://github.com/wbond/asn1crypto")
752 (file-name (git-file-name name version))
755 "10lai2cs5mnz3gpaffbw1m7b885ls8328q5wxm35vfmcip1f0xmb"))))
756 (build-system python-build-system)
757 (home-page "https://github.com/wbond/asn1crypto")
758 (synopsis "ASN.1 parser and serializer in Python")
759 (description "asn1crypto is an ASN.1 parser and serializer with definitions
760 for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7,
761 PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
762 (license license:expat)))
764 (define-public python2-asn1crypto
765 (package-with-python2 python-asn1crypto))
767 (define-public python-pynacl
769 (name "python-pynacl")
774 (uri (pypi-uri "PyNaCl" version))
775 (modules '((guix build utils)))
778 ;; Remove spurious dependency on python-wheel, can be removed
780 (substitute* "setup.py"
782 ;; Remove bundled libsodium.
783 (delete-file-recursively "src/libsodium")
787 "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal"))))
788 (build-system python-build-system)
790 `(#:modules (,@%python-build-system-modules
795 (modify-phases (@ (guix build python-build-system) %standard-phases)
796 (add-before 'build 'use-system-sodium
798 (setenv "SODIUM_INSTALL" "system")
802 (let ((build-directory
803 (car (scandir "build" (cut string-prefix? "lib" <>)))))
805 (string-append "./build/" build-directory ":"
806 (getenv "PYTHONPATH")))
807 (invoke "pytest" "-vv")))))))
809 `(("python-hypothesis" ,python-hypothesis)
810 ("python-pytest" ,python-pytest)))
812 `(("python-cffi" ,python-cffi)
813 ("python-six" ,python-six)
814 ("libsodium" ,libsodium)))
815 (home-page "https://github.com/pyca/pynacl/")
816 (synopsis "Python bindings to libsodium")
818 "PyNaCl is a Python binding to libsodium, which is a fork of the
819 Networking and Cryptography library. These libraries have a stated goal
820 of improving usability, security and speed.")
821 (license license:asl2.0)))
823 (define-public python2-pynacl
824 (package-with-python2 python-pynacl))
826 (define-public python2-pgpdump
828 (name "python2-pgpdump")
833 (uri (pypi-uri "pgpdump" version))
836 "0s4nh8h7qsdj2yf29bspjs1zvxd4lcd11r6g11dp7fppgf2h0iqw"))))
837 (build-system python-build-system)
839 ;; Currently fails to build with Python 3.
840 (arguments `(#:python ,python-2))
842 (home-page "https://github.com/toofishes/python-pgpdump")
843 (synopsis "Python library for parsing PGP packets")
845 "Python-pgpdump is an OpenPGP packet parser based on
846 @uref{http://www.mew.org/~kazu/proj/pgpdump/, pgpdump}. It notably supports:
849 @item signature packets;
850 @item public key packets;
851 @item secret key packets;
852 @item trust, user ID, and user attribute packets;
853 @item ASCII-armor decoding and CRC check.
855 (license license:bsd-3)))
857 (define-public python2-roca-detect
859 (name "python2-roca-detect")
864 (uri (pypi-uri "roca-detect" version))
867 "1di4akyw2lf5r8zfwvyhkilz8jv8g4b66rgaqwfabmjwma6gnw27"))))
868 (build-system python-build-system)
870 ;; TODO: apk_parse_ph4, pyjks
871 `(("python2-dateutil" ,python2-dateutil)
872 ("python2-six" ,python2-six)
873 ("python2-cryptography" ,python2-cryptography)
874 ("python2-future" ,python2-future)
875 ("python2-coloredlogs" ,python2-coloredlogs)
876 ("python2-pgpdump" ,python2-pgpdump)))
878 `(;; Basic testing routine is quite simple and works with Py3
879 ;; but the rest of the code that processes the different
880 ;; key formats and extracts the modulus for inspection is
881 ;; not yet fully py3 ready.
883 (home-page "https://github.com/crocs-muni/roca")
884 (synopsis "ROCA detection tool")
886 "This tool is related to the paper entitled @i{Return of the
887 Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli}. It
888 enables you to test public RSA keys for a presence of the described
889 vulnerability. Currently the tool supports the following key formats: X.509
890 Certificate (DER encoded, PEM encoded), RSA PEM (encoded private key, public
891 key), SSH public key, ASC-encoded OpenPGP key, APK Android application, LDIFF
893 (license license:gpl3)))
895 (define-public python-blurhash
897 (name "python-blurhash")
901 ;; Tests not included in pypi release and releases not tagged in git repo.
904 (url "https://github.com/halcy/blurhash-python")
905 (commit "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8")))
906 (file-name (git-file-name name version))
909 "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"))))
910 (build-system python-build-system)
913 (modify-phases %standard-phases
916 (delete-file "setup.cfg")
917 (invoke "pytest"))))))
919 `(("python-numpy" ,python-numpy)
920 ("python-pillow" ,python-pillow)
921 ("python-pytest" ,python-pytest)))
922 (home-page "https://github.com/halcy/blurhash-python")
924 "Pure-Python implementation of the blurhash algorithm")
926 "Pure-Python implementation of the blurhash algorithm.")
927 (license license:expat)))
929 (define-public python-ecpy
936 (uri (pypi-uri "ECPy" version))
939 "1gc3i5s93zq6x1nkaxkq1dvmsc12vmrw0hns9f5s1hcb78ni52c8"))))
940 (build-system python-build-system)
942 `(("python-future" ,python-future)))
943 (home-page "https://github.com/ubinity/ECPy")
944 (synopsis "Pure Python Elliptic Curve Library")
945 (description "This package provides a Elliptic Curve Library in pure
947 (license license:asl2.0)))
949 (define-public python2-ecpy
950 (package-with-python2 python-ecpy))
952 (define-public python-josepy
954 (name "python-josepy")
958 (uri (pypi-uri "josepy" version))
961 "11khz8malzrv375b27jjkv66z6z6khdx1v5mkkr4vq16gp3n4p7v"))))
962 (build-system python-build-system)
964 ;; The tests require flake8 >= 3.5, which is not yet packaged.
967 `(("python-cryptography" ,python-cryptography)
968 ("python-pyopenssl" ,python-pyopenssl)
969 ("python-six" ,python-six)))
970 ;; TODO Enable when we have flake8 >= 3.5.
972 ; `(("python-coverage" ,python-coverage)
973 ; ("python-flake8" ,python-flake8)
974 ; ("python-isort" ,python-isort)
975 ; ("python-mock" ,python-mock)
976 ; ("python-pytest" ,python-pytest)
977 ; ("python-pytest-cov" ,python-pytest-cov)
978 ; ("python-pytest-cache" ,python-pytest-cache)
979 ; ("python-pytest-flake8" ,python-pytest-flake8)))
980 (home-page "https://github.com/certbot/josepy")
981 (synopsis "JOSE protocol implementation in Python")
982 (description "This package provides a Python implementation of the JOSE
983 protocol (Javascript Object Signing and Encryption).")
984 (license license:asl2.0)))
986 (define-public python2-josepy
987 (package-with-python2 python-josepy))
989 (define-public python-pycryptodome
991 (name "python-pycryptodome")
996 (uri (pypi-uri "pycryptodome" version))
999 "1i4m74f88qj9ci8rpyzrbk2slmsdj5ipmwdkq6qk24byalm203li"))))
1000 (build-system python-build-system)
1001 (home-page "https://www.pycryptodome.org")
1002 (synopsis "Low-level cryptographic Python library")
1004 "PyCryptodome is a self-contained Python package of low-level
1005 cryptographic primitives. It's not a wrapper to a separate C library like
1006 OpenSSL. To the largest possible extent, algorithms are implemented in pure
1007 Python. Only the pieces that are extremely critical to performance (e.g.,
1008 block ciphers) are implemented as C extensions.
1010 You are expected to have a solid understanding of cryptography and security
1011 engineering to successfully use these primitives. You must also be able to
1012 recognize that some are obsolete (e.g., TDES) or even insecure (RC4).
1014 It provides many enhancements over the last release of PyCrypto (2.6.1):
1017 @item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1018 @item Accelerated AES on Intel platforms via AES-NI
1019 @item First-class support for PyPy
1020 @item Elliptic curves cryptography (NIST P-256 curve only)
1021 @item Better and more compact API (nonce and iv attributes for ciphers,
1022 automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1024 @item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1025 @item Salsa20 and ChaCha20 stream ciphers
1026 @item scrypt and HKDF
1027 @item Deterministic (EC)DSA
1028 @item Password-protected PKCS#8 key containers
1029 @item Shamir’s Secret Sharing scheme
1030 @item Random numbers get sourced directly from the OS (and not from a CSPRNG
1032 @item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1033 @item Major clean-ups and simplification of the code base
1036 This package provides drop-in compatibility with PyCrypto. It is one of two
1037 PyCryptodome variants, the other being python-pycryptodomex.")
1038 (license (list license:bsd-2
1039 license:public-domain)))) ; code inherited from PyCrypto
1041 (define-public python2-pycryptodome
1042 (package-with-python2 python-pycryptodome))
1044 (define-public python-pycryptodomex
1045 (package (inherit python-pycryptodome)
1046 (name "python-pycryptodomex")
1047 (version (package-version python-pycryptodome))
1051 (uri (pypi-uri "pycryptodomex" version))
1053 (base32 "0lbx4qk3xmwqiidhmkj8qa7bh2lf8bwzg0xjpsh2w5zqjrc7qnvv"))))
1055 "PyCryptodome is a self-contained Python package of low-level
1056 cryptographic primitives. It's not a wrapper to a separate C library like
1057 OpenSSL. To the largest possible extent, algorithms are implemented in pure
1058 Python. Only the pieces that are extremely critical to performance (e.g.,
1059 block ciphers) are implemented as C extensions.
1061 You are expected to have a solid understanding of cryptography and security
1062 engineering to successfully use these primitives. You must also be able to
1063 recognize that some are obsolete (e.g., TDES) or even insecure (RC4).
1065 It provides many enhancements over the last release of PyCrypto (2.6.1):
1068 @item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1069 @item Accelerated AES on Intel platforms via AES-NI
1070 @item First-class support for PyPy
1071 @item Elliptic curves cryptography (NIST P-256 curve only)
1072 @item Better and more compact API (nonce and iv attributes for ciphers,
1073 automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1075 @item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1076 @item Salsa20 and ChaCha20 stream ciphers
1077 @item scrypt and HKDF
1078 @item Deterministic (EC)DSA
1079 @item Password-protected PKCS#8 key containers
1080 @item Shamir’s Secret Sharing scheme
1081 @item Random numbers get sourced directly from the OS (and not from a CSPRNG
1083 @item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1084 @item Major clean-ups and simplification of the code base
1087 PyCryptodomex is the stand-alone version of PyCryptodome that no longer
1088 provides drop-in compatibility with PyCrypto.")))
1090 (define-public python-m2crypto
1092 (name "python-m2crypto")
1097 (uri (pypi-uri "M2Crypto" version))
1099 (base32 "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc"))))
1100 (build-system python-build-system)
1101 (inputs `(("openssl" ,openssl)))
1102 (native-inputs `(("swig" ,swig)))
1103 (home-page "https://gitlab.com/m2crypto/m2crypto")
1104 (synopsis "Python crypto and TLS toolkit")
1105 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
1106 featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
1107 (including AES); TLS functionality to implement clients and servers; HTTPS
1108 extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
1109 AuthCookies for web session management; FTP/TLS client and server; S/MIME;
1110 M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
1111 through the Engine interface.")
1112 (properties `((python2-variant . ,(delay python2-m2crypto))))
1113 (license license:expat)))
1115 (define-public python2-m2crypto
1116 (let ((m2crypto (package-with-python2
1117 (strip-python2-variant python-m2crypto))))
1118 (package (inherit m2crypto)
1120 `(("python2-typing" ,python2-typing))))))
1122 (define-public python-pykeepass
1124 (name "python-pykeepass")
1129 ;; Source tarball on PyPI doesn't include tests.
1131 (url "https://github.com/libkeepass/pykeepass")
1133 (file-name (git-file-name name version))
1135 (base32 "1symxf4ahylynihnp9z4z3lh2vy65ipvg8s4hjrnn936hcaaxghk"))))
1136 (build-system python-build-system)
1139 (modify-phases %standard-phases
1140 (add-after 'unpack 'make-kdbx-writable
1141 ;; Tests have to write to the .kdbx files in the test directory.
1143 (with-directory-excursion "tests"
1144 (for-each make-file-writable (find-files "."))
1146 (add-before 'build 'patch-requirements
1148 ;; Update requirements from dependency==version
1149 ;; to dependency>=version.
1150 (substitute* "setup.py"
1154 `(("python-argon2-cffi" ,python-argon2-cffi)
1155 ("python-construct" ,python-construct)
1156 ("python-dateutil" ,python-dateutil)
1157 ("python-future" ,python-future)
1158 ("python-lxml" ,python-lxml)
1159 ("python-pycryptodomex" ,python-pycryptodomex)))
1160 (home-page "https://github.com/libkeepass/pykeepass")
1161 (synopsis "Python library to interact with keepass databases")
1163 "This library allows you to write entries to a KeePass database. It
1164 supports KDBX3 and KDBX4.")
1165 ;; There are no copyright headers in the source code. The LICENSE file
1167 (license license:gpl3+)))
1169 (define-public python-pylibscrypt
1171 (name "python-pylibscrypt")
1176 (uri (pypi-uri "pylibscrypt" version))
1179 "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
1180 (build-system python-build-system)
1183 (modify-phases %standard-phases
1184 (add-before 'build 'hard-code-path-to-libscrypt
1185 (lambda* (#:key inputs #:allow-other-keys)
1186 (let ((libscrypt (assoc-ref inputs "libscrypt")))
1187 (substitute* "pylibscrypt/pylibscrypt.py"
1188 (("find_library\\('scrypt'\\)")
1189 (string-append "'" libscrypt "/lib/libscrypt.so'")))
1191 ;; The library can use various scrypt implementations and tests all of
1192 ;; them. Since we only provide a single implementation, most tests
1193 ;; fail. Simply skip them.
1195 ;; FIXME: Using "libscrypt" is the second best choice. The best one
1196 ;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
1197 ;; 1.1+. Use that as soon as Guix provides it.
1199 `(("libscrypt" ,libscrypt)))
1200 (home-page "https://github.com/jvarho/pylibscrypt")
1201 (synopsis "Scrypt for Python")
1202 (description "There are a lot of different scrypt modules for Python, but
1203 none of them have everything that I'd like, so here's one more. It uses
1205 (license license:isc)))
1207 (define-public python-libnacl
1209 (name "python-libnacl")
1214 (uri (pypi-uri "libnacl" version))
1217 "0nv7n8nfswkhl614x5mllrkvaslraa0053q11iylb337cy43vb4v"))))
1218 (build-system python-build-system)
1221 (modify-phases %standard-phases
1222 (add-after 'unpack 'locate-libsodium
1223 (lambda* (#:key inputs #:allow-other-keys)
1224 (substitute* "libnacl/__init__.py"
1225 (("(return ctypes.cdll.LoadLibrary\\(')libsodium.so('\\))"
1227 (let ((libsodium (string-append (assoc-ref inputs "libsodium")
1228 "/lib/libsodium.so")))
1229 (string-append pre libsodium post)))))))))
1231 `(("python-pyhamcrest" ,python-pyhamcrest)))
1233 `(("libsodium" ,libsodium)))
1234 (home-page "https://libnacl.readthedocs.org/")
1235 (synopsis "Python bindings for libsodium based on ctypes")
1236 (description "@code{libnacl} is used to gain direct access to the
1237 functions exposed by @code{NaCl} library via @code{libsodium}. It has
1238 been constructed to maintain extensive documentation on how to use
1239 @code{NaCl} as well as being completely portable.")
1240 (license license:asl2.0)))
1242 (define-public python-pyotp
1244 (name "python-pyotp")
1249 (uri (pypi-uri "pyotp" version))
1251 (base32 "0jsqfmx9i7j8z81r4zazv76xzy1fcq8v9s2r4kvx7ajfndq3z2h3"))))
1252 (build-system python-build-system)
1253 (home-page "https://github.com/pyauth/pyotp")
1254 (synopsis "Python One Time Password Library")
1256 "PyOTP is a Python library for generating and verifying one-time
1257 passwords. It can be used to implement two-factor (2FA) or multi-factor
1258 (MFA) authentication methods in web applications and in other systems that
1259 require users to log in.")
1260 (license license:expat)))
1262 (define-public python-scrypt
1264 (name "python-scrypt")
1269 (uri (pypi-uri "scrypt" version))
1272 "0hjk71k3mgnl8siikm9lii9im8kv0rb7inkjzx78rnancra48xxr"))))
1273 (build-system python-build-system)
1275 `(("openssl" ,openssl)))
1276 (home-page "https://bitbucket.org/mhallin/py-scrypt")
1277 (synopsis "Bindings for the scrypt key derivation function library")
1278 (description "This is a set of Python bindings for the scrypt key
1279 derivation function.")
1280 (license license:bsd-2)))
1282 (define-public python-service-identity
1284 (name "python-service-identity")
1289 (uri (pypi-uri "service_identity" version))
1292 "0b9f5qiqjy8ralzgwjgkhx82h6h8sa7532psmb8mkd65md5aan08"))))
1293 (build-system python-build-system)
1295 `(("python-attrs" ,python-attrs)
1296 ("python-pyasn1" ,python-pyasn1)
1297 ("python-pyasn1-modules" ,python-pyasn1-modules)
1298 ("python-pyopenssl" ,python-pyopenssl)))
1299 (home-page "https://service-identity.readthedocs.io/")
1300 (synopsis "Service identity verification for PyOpenSSL")
1302 "@code{service_identity} aspires to give you all the tools you need
1303 for verifying whether a certificate is valid for the intended purposes.
1304 In the simplest case, this means host name verification. However,
1305 service_identity implements RFC 6125 fully and plans to add other
1306 relevant RFCs too.")
1307 (license license:expat)))
1309 (define-public python2-service-identity
1310 (package-with-python2 python-service-identity))
1312 (define-public python-hkdf
1314 (name "python-hkdf")
1319 (uri (pypi-uri "hkdf" version))
1322 "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2"))))
1323 (build-system python-build-system)
1325 `(("python-nose" ,python-nose)))
1326 (home-page "https://github.com/casebeer/python-hkdf")
1327 (synopsis "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)")
1328 (description "This package provides a Python implementation of the HMAC Key
1329 Derivation function (HKDF) defined in RFC 5869.")
1330 (license license:bsd-2)))
1332 (define-public python-spake2
1334 (name "python-spake2")
1339 (uri (pypi-uri "spake2" version))
1342 "1x16r7lrbklvfzbacb66qv9iiih6liq1y612dqh2chgf555n2yn1"))))
1343 (build-system python-build-system)
1345 `(("python-hkdf" ,python-hkdf)))
1346 (home-page "https://github.com/warner/python-spake2")
1347 (synopsis "SPAKE2 password-authenticated key exchange in Python")
1348 (description "This package provides a Python implementation of the SPAKE2
1349 Password-Authenticated Key Exchange algorithm.")
1350 (license license:expat)))
1352 (define-public python-txtorcon
1354 (name "python-txtorcon")
1359 (uri (pypi-uri "txtorcon" version))
1362 "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
1363 (build-system python-build-system)
1365 ;; The tests fail immediately due to a missing file. Reported upstream:
1366 ;; <https://github.com/meejah/txtorcon/issues/330>
1369 `(("python-automat" ,python-automat)
1370 ("python-idna" ,python-idna)
1371 ("python-incremental" ,python-incremental)
1372 ("python-service-identity" ,python-service-identity)
1373 ("python-twisted" ,python-twisted)
1374 ("python-zope-interface" ,python-zope-interface)))
1375 (home-page "https://github.com/meejah/txtorcon")
1376 (synopsis "Twisted-based Tor controller client")
1377 (description "This package provides a Twisted-based Tor controller client,
1378 with state-tracking and configuration abstractions.")
1379 (license license:expat)))
1381 (define-public python-keyutils
1383 (name "python-keyutils")
1388 (uri (pypi-uri "keyutils" version))
1391 "0lipygpzhwzzsq2k5imb1jgkmj8y4khxdwhzadjs3bd56g6bmkx9"))))
1392 (build-system python-build-system)
1394 `(("python-pytest" ,python-pytest)
1395 ("python-pytest-runner" ,python-pytest-runner)))
1397 `(("keyutils" ,keyutils)))
1400 (home-page "https://github.com/sassoftware/python-keyutils")
1401 (synopsis "Python bindings for keyutils")
1403 "This is a set of python bindings for keyutils, a key management suite
1404 that leverages the infrastructure provided by the Linux kernel for safely
1405 storing and retrieving sensitive information in your programs.")
1406 (license license:asl2.0)))
1408 (define-public python-mcuboot-imgtool
1410 (name "python-mcuboot-imgtool")
1416 (url "https://github.com/JuulLabs-OSS/mcuboot")
1417 (commit (string-append "v" version))))
1418 (file-name (git-file-name name version))
1421 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
1422 (build-system python-build-system)
1425 (modify-phases %standard-phases
1426 (add-after 'unpack 'fix-broken-test
1428 (substitute* "scripts/imgtool/keys/ed25519_test.py"
1429 (("raw_sign") "sign_digest"))
1431 (add-before 'build 'change-directory
1436 `(("python-click" ,python-click)
1437 ("python-intelhex" ,python-intelhex)
1438 ("python-cryptography" ,python-cryptography)))
1439 (home-page "https://mcuboot.com")
1440 (synopsis "Tool to securely sign firmware images for booting by MCUboot")
1441 (description "MCUboot is a secure bootloader for 32-bit MCUs. This
1442 package provides a tool to securely sign firmware images for booting by
1444 (license license:expat)))
1446 (define-public python-ntlm-auth
1448 (name "python-ntlm-auth")
1453 (uri (pypi-uri "ntlm-auth" version))
1456 "16mavidki4ma5ip8srqalr19gz4f5yn3cnmmgps1fmgfr24j63rm"))))
1457 (build-system python-build-system)
1459 `(("python-cryptography" ,python-cryptography)))
1460 (home-page "https://github.com/jborean93/ntlm-auth")
1462 "Calculates NTLM Authentication codes")
1464 "This library handles the low-level details of NTLM authentication for
1465 use in authenticating with a service that uses NTLM. It will create and parse
1466 the 3 different message types in the order required and produce a base64
1467 encoded value that can be attached to the HTTP header.
1469 The goal of this library is to offer full NTLM support including signing and
1470 sealing of messages as well as supporting MIC for message integrity and the
1471 ability to customise and set limits on the messages sent. Please see Features
1472 and Backlog for a list of what is and is not currently supported.")
1473 (license license:expat)))
1475 (define-public python-secretstorage
1477 (name "python-secretstorage")
1482 (uri (pypi-uri "SecretStorage" version))
1485 "1xmzr0j3066s220bss4nkgqbiwb5k4kkp2rkpqlqwjb5kfc8mnhm"))))
1486 (build-system python-build-system)
1488 '(#:tests? #f)) ; Tests require a running dbus service.
1490 `(("python-cryptography" ,python-cryptography)
1491 ("python-jeepney" ,python-jeepney)))
1492 (home-page "https://github.com/mitya57/secretstorage")
1493 (synopsis "Python bindings to FreeDesktop.org Secret Service API")
1495 "@code{python-secretstorage} provides a way for securely storing passwords
1496 and other secrets. It uses D-Bus Secret Service API that is supported by GNOME
1497 Keyring (since version 2.30) and KSecretsService. SecretStorage supports most
1498 of the functions provided by Secret Service, including creating and deleting
1499 items and collections, editing items, locking and unlocking collections
1500 (asynchronous unlocking is also supported).")
1501 (license license:bsd-3)))
1503 (define-public python-trustme
1505 (name "python-trustme")
1510 (uri (pypi-uri "trustme" version))
1512 (base32 "0v3vr5z6apnfmklf07m45kv5kaqvm6hxrkaqywch57bjd2siiywx"))))
1513 (build-system python-build-system)
1516 (modify-phases %standard-phases
1518 (lambda* (#:key inputs outputs #:allow-other-keys)
1519 (add-installed-pythonpath inputs outputs)
1520 (invoke "pytest" "-vv"))))))
1522 `(("python-more-itertools" ,python-more-itertools)
1523 ("python-pyopenssl" ,python-pyopenssl)
1524 ("python-pytest" ,python-pytest)
1525 ("python-pytest-cov" ,python-pytest-cov)
1526 ("python-service-identity" ,python-service-identity)
1527 ("python-zipp" ,python-zipp)))
1529 `(("python-cryptography" ,python-cryptography)))
1530 (home-page "https://github.com/python-trio/trustme")
1531 (synopsis "Fake a certificate authority for tests")
1533 "@code{trustme} is a tiny Python package that does one thing: it gives you
1534 a fake certificate authority (CA) that you can use to generate fake TLS certs to
1535 use in your tests.")
1536 ;; Either license applies.
1537 (license (list license:expat license:asl2.0))))
1539 (define-public python-certipy
1541 (name "python-certipy")
1546 (uri (pypi-uri "certipy" version))
1549 "0n980gqpzh0fm58h3i4mi2i10wgj606lscm1r5sk60vbf6vh8mv9"))))
1550 (build-system python-build-system)
1552 `(("python-pyopenssl" ,python-pyopenssl)))
1554 `(("python-pytest" ,python-pytest)))
1555 (home-page "https://github.com/LLNL/certipy")
1556 (synopsis "Utility to create and sign CAs and certificates")
1558 "Certipy was made to simplify the certificate creation process. To that
1559 end, certipy exposes methods for creating and managing certificate authorities,
1560 certificates, signing and building trust bundles.")
1561 (license license:bsd-3)))
1563 (define-public python-jeepney
1565 (name "python-jeepney")
1570 (uri (pypi-uri "jeepney" version))
1572 (base32 "0vp3p1lqhqk2kd3254q5sxr50znmm2hmysc8a7g0fr1brihvhy9l"))))
1573 (build-system python-build-system)
1575 `(("python-testpath" ,python-testpath)
1576 ("python-tornado" ,python-tornado)
1577 ("python-pytest" ,python-pytest)))
1578 (home-page "https://gitlab.com/takluyver/jeepney")
1579 (synopsis "Low-level, pure Python DBus protocol wrapper")
1581 "This is a low-level, pure Python DBus protocol client. It has an
1582 I/O-free core, and integration modules for different event loops.")
1583 (license license:expat)))
1585 (define-public python-argon2-cffi
1587 (name "python-argon2-cffi")
1592 (uri (pypi-uri "argon2-cffi" version))
1595 "0zgr4mnnm0p4i99023safb0qb8cgvl202nly1rvylk2b7qnrn0nq"))
1596 (modules '((guix build utils)))
1597 (snippet '(begin (delete-file-recursively "extras") #t))))
1598 (build-system python-build-system)
1601 (modify-phases %standard-phases
1604 (setenv "ARGON2_CFFI_USE_SYSTEM" "1")
1605 (invoke "python" "setup.py" "build")))
1607 (lambda* (#:key inputs outputs #:allow-other-keys)
1608 (add-installed-pythonpath inputs outputs)
1610 (invoke "python" "-m" "argon2" "--help")
1612 (invoke "python" "-m" "argon2" "-n" "1" "-t" "1" "-m" "8" "-p" "1"))))))
1614 `(("python-cffi" ,python-cffi)
1615 ("python-six" ,python-six)))
1616 (inputs `(("argon2" ,argon2)))
1618 `(("python-hypothesis" ,python-hypothesis)
1619 ("python-pytest" ,python-pytest)))
1620 (home-page "https://argon2-cffi.readthedocs.io/")
1621 (synopsis "Secure Password Hashes for Python")
1623 "Argon2 is a secure password hashing algorithm. It is designed to have
1624 both a configurable runtime as well as memory consumption. This means that you
1625 can decide how long it takes to hash a password and how much memory is required.")
1626 (license license:expat)))
1628 (define-public python-privy
1630 (name "python-privy")
1636 ;; Releases are untagged
1637 (url "https://github.com/ofek/privy")
1638 (commit "2838db3df239797c71bddacc48a4c49a83f35747")))
1639 (file-name (git-file-name name version))
1642 "1m32dh5fqc8cy7jyf1z5fs6zvmdkbq5fi98hr609gbl7s0l0y0i9"))))
1643 (build-system python-build-system)
1646 (modify-phases %standard-phases
1649 (invoke "python" "-m" "pytest"))))))
1651 `(("python-pytest" ,python-pytest)))
1653 `(("python-argon2-cffi" ,python-argon2-cffi)
1654 ("python-cryptography" ,python-cryptography)))
1655 (home-page "https://www.dropbox.com/developers")
1656 (synopsis "Library to password-protect your data")
1658 "Privy is a small and fast utility for password-protecting secret
1659 data such as API keys, cryptocurrency wallets, or seeds for digital
1661 (license (list license:expat license:asl2.0)))) ; dual licensed
1663 (define-public python-pgpy
1665 (name "python-pgpy")
1670 (uri (pypi-uri "PGPy" version))
1672 (base32 "11rrq15gmn6qbahli7czflfcngjl7zyybjlvk732my6axnf2d754"))))
1673 (build-system python-build-system)
1676 (modify-phases %standard-phases
1678 (lambda* (#:key tests? #:allow-other-keys)
1680 (invoke "pytest")))))))
1682 `(("python-cryptography" ,python-cryptography)
1683 ("python-pyasn1" ,python-pyasn1)
1684 ("python-pytest" ,python-pytest)
1685 ("python-singledispatch" ,python-singledispatch)
1686 ("python-six" ,python-six)
1687 ("python-wheel" ,python-wheel)))
1688 (home-page "https://github.com/SecurityInnovation/PGPy")
1689 (synopsis "Python implementation of OpenPGP")
1691 "Currently, PGPy can load keys and signatures of all kinds in both ASCII
1692 armored and binary formats.
1694 It can create and verify RSA, DSA, and ECDSA signatures, at the moment. It
1695 can also encrypt and decrypt messages using RSA and ECDH.")
1696 (license license:bsd-3)))
1698 (define-public python-sop
1705 (uri (pypi-uri "sop" version))
1708 "0gljyjsdn6hdmwlwwb5g5s0c031p6izamvfxp0d39x60af8k5jyf"))))
1709 (build-system python-build-system)
1711 '(#:tests? #f)) ; There are no tests, and unittest throws an error trying
1713 ; TypeError: don't know how to make test from: 0.2.0
1714 (home-page "https://gitlab.com/dkg/python-sop")
1715 (synopsis "Stateless OpenPGP Command-Line Interface")
1717 "The Stateless OpenPGP Command-Line Interface (or sop) is a
1718 specification that encourages OpenPGP implementors to provide a common,
1719 relatively simple command-line API for purposes of object security.
1721 This Python module helps implementers build such a CLI from any implementation
1722 accessible to the Python interpreter.
1724 It does not provide such an implementation itself -- this is just the
1725 scaffolding for the command line, which should make it relatively easy to
1726 supply a handful of python functions as methods to a class.")
1727 (license license:expat))) ; MIT license