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 ((guix licenses) #:prefix license:)
65 #:use-module (srfi srfi-1))
67 (define-public python-base58
69 (name "python-base58")
74 (uri (pypi-uri "base58" version))
77 "0q1yr0n5jaf17xq98m7dma6z4rh8p19ch55l1s09gi3rk5ckqycs"))))
78 (build-system python-build-system)
80 `(("python-pyhamcrest" ,python-pyhamcrest)))
81 (home-page "https://github.com/keis/base58")
82 (synopsis "Base58 and Base58Check implementation")
83 (description "Base58 and Base58Check implementation compatible
84 with what is used by the Bitcoin network.")
85 (license license:expat)))
87 (define-public python-bcrypt
89 (name "python-bcrypt")
94 (uri (pypi-uri "bcrypt" version))
96 (base32 "0hhywhxx301cxivgxrpslrangbfpccc8y83qbwn1f57cab3nj00b"))))
97 (build-system python-build-system)
99 `(("python-pycparser" ,python-pycparser)
100 ("python-pytest" ,python-pytest)))
102 `(("python-cffi" ,python-cffi)
103 ("python-six" ,python-six)))
104 (home-page "https://github.com/pyca/bcrypt/")
106 "Modern password hashing library")
108 "Bcrypt is a Python module which provides a password hashing method based
109 on the Blowfish password hashing algorithm, as described in
110 @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
111 Password Scheme\"} by Niels Provos and David Mazieres.")
112 (license license:asl2.0)))
114 (define-public python2-bcrypt
115 (package-with-python2 python-bcrypt))
117 (define-public python-passlib
119 (name "python-passlib")
124 (uri (pypi-uri "passlib" version))
126 (base32 "1a5ngap7kq0b4azq8nlfg6xg5bcl1i0v1sbynhmbr631jgpnqrld"))))
127 (build-system python-build-system)
129 `(("python-nose" ,python-nose)))
131 `(("python-py-bcrypt" ,python-py-bcrypt)))
134 (modify-phases %standard-phases
135 (add-before 'check 'set-PYTHON_EGG_CACHE
136 ;; some tests require access to "$HOME/.cython"
137 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
138 (home-page "https://bitbucket.org/ecollins/passlib")
139 (synopsis "Comprehensive password hashing framework")
141 "Passlib is a password hashing library for Python 2 & 3, which provides
142 cross-platform implementations of over 30 password hashing algorithms, as well
143 as a framework for managing existing password hashes. It's designed to be
144 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
145 to providing full-strength password hashing for multi-user application.")
146 (license license:bsd-3)))
148 (define-public python2-passlib
149 (package-with-python2 python-passlib))
151 (define-public python-py-bcrypt
153 (name "python-py-bcrypt")
158 (uri (pypi-uri "py-bcrypt" version))
161 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
162 (build-system python-build-system)
163 (home-page "https://code.google.com/p/py-bcrypt")
165 "Bcrypt password hashing and key derivation")
167 "A python wrapper of OpenBSD's Blowfish password hashing code. This
168 system hashes passwords using a version of Bruce Schneier's Blowfish block
169 cipher with modifications designed to raise the cost of off-line password
170 cracking and frustrate fast hardware implementation. The computation cost of
171 the algorithm is parametrised, so it can be increased as computers get faster.
172 The intent is to make a compromise of a password database less likely to
173 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
175 ;; "sha2.c" is under BSD-3;
176 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
177 ;; the rest is under ISC.
178 (license (list license:isc license:bsd-3 license:bsd-4))))
180 (define-public python2-py-bcrypt
181 (package-with-python2 python-py-bcrypt))
183 (define-public python-pyblake2
185 (name "python-pyblake2")
190 (uri (pypi-uri "pyblake2" version))
193 "0gz9hgznv5zw4qjq43xa56y0yikimx30gffvibxzm0nv5sq7xk2w"))))
194 (build-system python-build-system)
195 (home-page "https://github.com/dchest/pyblake2")
196 (synopsis "BLAKE2 hash function for Python")
197 (description "BLAKE2 is a cryptographic hash function, which offers
198 stronger security while being as fast as MD5 or SHA-1, and comes in two
199 flavors: @code{BLAKE2b}, optimized for 64-bit platforms and produces digests
200 of any size between 1 and 64 bytes, and @code{BLAKE2s}, optimized for 8- to
201 32-bit platforms and produces digests of any size between 1 and 32 bytes.
203 This package provides a Python interface for BLAKE2.")
204 ;; The COPYING file declares it as public domain, with the option to
205 ;; alternatively use and redistribute it under a variety of permissive
206 ;; licenses. cc0 is explicitly mentioned in setup.py and pyblake2module.c.
207 (license (list license:public-domain license:cc0))))
209 (define-public python-paramiko
211 (name "python-paramiko")
216 (uri (pypi-uri "paramiko" version))
218 (base32 "0dahwq623jnna7gsr9j0mkwr9k2n1pvkapjryhcx508d5jxg8dkz"))))
219 (build-system python-build-system)
221 `(;; FIXME: Tests require many unpackaged libraries, see dev-requirements.txt.
224 `(("python-bcrypt" ,python-bcrypt)
225 ("python-pyasn1" ,python-pyasn1)
226 ("python-pynacl" ,python-pynacl)
227 ("python-cryptography" ,python-cryptography)))
228 (home-page "https://www.paramiko.org/")
229 (synopsis "SSHv2 protocol library")
230 (description "Paramiko is a python implementation of the SSHv2 protocol,
231 providing both client and server functionality. While it leverages a Python C
232 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
233 Python interface around SSH networking concepts.")
234 (license license:lgpl2.1+)))
236 (define-public python2-paramiko
237 (package-with-python2 python-paramiko))
239 (define-public python-ecdsa
241 (name "python-ecdsa")
246 (uri (pypi-uri "ecdsa" version))
248 (base32 "13nx5cbfxc0gnax5zwdmp9xc40qd1llk62mv85jyrvqkbw017ik4"))))
249 (build-system python-build-system)
252 (modify-phases %standard-phases
254 (lambda _ (invoke "pytest"))))))
256 `(("python-six" ,python-six)))
258 `(("openssl" ,openssl)
259 ("python-pytest" ,python-pytest)))
260 (home-page "https://github.com/warner/python-ecdsa")
261 (synopsis "ECDSA cryptographic signature library (pure python)")
263 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
264 Curve Digital Signature Algorithm), implemented purely in Python. With this
265 library, you can quickly create keypairs (signing key and verifying key), sign
266 messages, and verify the signatures. The keys and signatures are very short,
267 making them easy to handle and incorporate into other protocols.")
268 (license license:expat)))
270 (define-public python2-ecdsa
271 (package-with-python2 python-ecdsa))
273 ;;; Pycrypto is abandoned upstream:
275 ;;; https://github.com/dlitz/pycrypto/issues/173
277 ;;; TODO Remove this package from GNU Guix.
278 (define-public python-pycrypto
280 (name "python-pycrypto")
285 (uri (pypi-uri "pycrypto" version))
286 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"
287 "python-pycrypto-time-clock.patch"))
290 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
291 (build-system python-build-system)
297 (modify-phases %standard-phases
298 (add-before 'build 'set-build-env
299 ;; pycrypto runs an autoconf configure script behind the scenes
300 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
301 (home-page "https://www.dlitz.net/software/pycrypto/")
302 (synopsis "Cryptographic modules for Python")
304 "Pycrypto is a collection of both secure hash functions (such as SHA256
305 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
306 etc.). The package is structured to make adding new modules easy.")
307 (license license:public-domain)))
309 (define-public python2-pycrypto
310 (let ((pycrypto (package-with-python2 python-pycrypto)))
311 (package (inherit pycrypto)
313 `(("python" ,python-2)
316 (package-inputs pycrypto)))))))
318 (define-public python-kerberos
320 (name "python-kerberos")
325 (uri (pypi-uri "kerberos" version))
328 "19663qxmma0i8bfbjc2iwy5hgq0g4pfb75r023v5dps68zfvffgh"))))
329 (build-system python-build-system)
331 `(("mit-krb5" ,mit-krb5)))
332 (home-page "https://github.com/apple/ccs-pykerberos")
334 "Python Kerberos library used by CalendarServer")
336 "This Python package is a high-level wrapper for Kerberos (GSSAPI)
337 operations. The goal is to avoid having to build a module that wraps the
338 entire Kerberos.framework, and instead offer a limited set of functions that
339 do what is needed for client/server Kerberos authentication based on
340 <http://www.ietf.org/rfc/rfc4559.txt>.")
341 (license license:asl2.0)))
343 (define-public python-keyring
345 (name "python-keyring")
350 (uri (pypi-uri "keyring" version))
353 "1k0w3yh3fz0qp0cvkxdiinq9jzbrnc6bd88qpjz34x3cgcr94psz"))
354 (modules '((guix build utils)))
356 ;; https://github.com/jaraco/keyring/issues/414
357 '(begin (substitute* "tests/test_packaging.py"
358 (("ep, =") "(ep,) =")) #t))))
359 (build-system python-build-system)
362 (modify-phases %standard-phases
365 ;; Not clear why this test fails.
366 (delete-file "tests/test_packaging.py")
367 (substitute* "pytest.ini"
369 (invoke "pytest"))))))
371 `(("python-pytest" ,python-pytest)
372 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
373 ("python-pytest-cov" ,python-pytest-cov)
374 ("python-pytest-flake8" ,python-pytest-flake8)
375 ("python-setuptools-scm" ,python-setuptools-scm)))
377 `(("python-importlib-metadata" ,python-importlib-metadata)
378 ("python-secretstorage" ,python-secretstorage)))
379 (home-page "https://github.com/jaraco/keyring")
380 (synopsis "Store and access your passwords safely")
382 "The Python keyring lib provides a easy way to access the system keyring
383 service from python. It can be used in any application that needs safe
385 ;; "MIT" and PSF dual license
386 (properties `((python2-variant . ,(delay python2-keyring))))
387 (license license:x11)))
389 (define-public python2-keyring
390 (let ((keyring (package-with-python2
391 (strip-python2-variant python-keyring))))
394 (name "python2-keyring")
399 (uri (pypi-uri "keyring" version))
402 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
404 `(#:python ,python-2))
406 `(("python2-pytest" ,python2-pytest)
407 ("python2-pytest-runner" ,python2-pytest-runner)
408 ("python2-setuptools-scm" ,python2-setuptools-scm)))
410 `(("python2-pycrypto" ,python2-pycrypto))))))
412 (define-public python-keyrings.alt
414 (name "python-keyrings.alt")
419 (uri (pypi-uri "keyrings.alt" version))
422 "0gdjdqpq2hf770p6iwi891mil0vbsdhvy88x0v8b2w4y4b28lcli"))
423 (modules '((guix build utils)))
426 (delete-file "keyrings/alt/_win_crypto.py")
427 ;; Rely on python-keyring>20:
428 ;; https://github.com/jaraco/keyrings.alt/issues/33
429 (substitute* '("keyrings/alt/tests/test_Gnome.py"
430 "keyrings/alt/tests/test_Google.py"
431 "keyrings/alt/tests/test_Windows.py"
432 "keyrings/alt/tests/test_file.py"
433 "keyrings/alt/tests/test_pyfs.py")
434 (("keyring.tests.test_backend") "keyring.testing.backend")
435 (("keyring.tests.util") "keyring.testing.util"))
437 (build-system python-build-system)
439 `(("python-keyring" ,python-keyring)
440 ("python-pytest" ,python-pytest)
441 ("python-setuptools-scm" ,python-setuptools-scm)))
442 (home-page "https://github.com/jaraco/keyrings.alt")
443 (synopsis "Alternate keyring implementations")
444 (description "Keyrings in this package may have security risks or other
445 implications. These backends were extracted from the main keyring project to
446 make them available for those who wish to employ them, but are discouraged for
447 general production use. Include this module and use its backends at your own
449 (license license:expat)))
451 (define-public python-certifi
453 (name "python-certifi")
454 (version "2020.4.5.1")
457 (uri (pypi-uri "certifi" version))
460 "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i"))))
461 (build-system python-build-system)
462 (arguments '(#:tests? #f)) ;no tests
463 (home-page "https://certifi.io/")
464 (synopsis "Python CA certificate bundle")
466 "Certifi is a Python library that contains a CA certificate bundle, which
467 is used by the Requests library to verify HTTPS requests.")
468 (license license:asl2.0)))
470 (define-public python2-certifi
471 (package-with-python2 python-certifi))
473 (define-public python-cryptography-vectors
475 (name "python-cryptography-vectors")
480 (uri (pypi-uri "cryptography_vectors" version))
483 "1d4iykcv7cn9j399hczlxm5pzxmqy6d80h3j16dkjwlmv3293b4r"))))
484 (build-system python-build-system)
485 (home-page "https://github.com/pyca/cryptography")
486 (synopsis "Test vectors for the cryptography package")
488 "This package contains test vectors for the cryptography package.")
489 ;; Distributed under either BSD-3 or ASL2.0
490 (license (list license:bsd-3 license:asl2.0))))
492 (define-public python2-cryptography-vectors
493 (package-with-python2 python-cryptography-vectors))
495 (define-public python-cryptography
497 (name "python-cryptography")
502 (uri (pypi-uri "cryptography" version))
505 "0af25w5mkd6vwns3r6ai1w5ip9xp0ms9s261zzssbpadzdr05hx0"))))
506 (build-system python-build-system)
508 `(("openssl" ,openssl)))
510 `(("python-asn1crypto" ,python-asn1crypto)
511 ("python-cffi" ,python-cffi)
512 ("python-six" ,python-six)
513 ("python-idna" ,python-idna)
514 ("python-iso8601" ,python-iso8601)))
516 `(("python-cryptography-vectors" ,python-cryptography-vectors)
517 ("python-hypothesis" ,python-hypothesis)
518 ("python-pretend" ,python-pretend)
519 ("python-pytz" ,python-pytz)
520 ("python-pytest" ,python-pytest)))
521 (home-page "https://github.com/pyca/cryptography")
522 (synopsis "Cryptographic recipes and primitives for Python")
524 "cryptography is a package which provides cryptographic recipes and
525 primitives to Python developers. It aims to be the “cryptographic standard
526 library” for Python. The package includes both high level recipes, and low
527 level interfaces to common cryptographic algorithms such as symmetric ciphers,
528 message digests and key derivation functions.")
529 ;; Distributed under either BSD-3 or ASL2.0
530 (license (list license:bsd-3 license:asl2.0))
531 (properties `((python2-variant . ,(delay python2-cryptography))))))
533 (define-public python2-cryptography
534 (let ((crypto (package-with-python2
535 (strip-python2-variant python-cryptography))))
536 (package (inherit crypto)
538 `(("python2-ipaddress" ,python2-ipaddress)
539 ("python2-backport-ssl-match-hostname"
540 ,python2-backport-ssl-match-hostname)
541 ("python2-enum34" ,python2-enum34)
542 ,@(package-propagated-inputs crypto))))))
544 (define-public python-pyopenssl
546 (name "python-pyopenssl")
551 (uri (pypi-uri "pyOpenSSL" version))
554 "01wmsq6w0frzbr3zps4ga9kmqjidp2h317jwpq1g9ah24r5lj94s"))))
555 (build-system python-build-system)
558 (modify-phases %standard-phases
560 (add-after 'install 'check
561 (lambda* (#:key inputs outputs #:allow-other-keys)
562 (add-installed-pythonpath inputs outputs)
563 ;; PyOpenSSL runs tests against a certificate with a fixed
564 ;; expiry time. To ensure successful builds in the future,
565 ;; set the time to roughly the release date.
566 (invoke "faketime" "2019-01-01" "py.test" "-v" "-k"
568 ;; This test tries to look up certificates from
569 ;; the compiled-in default path in OpenSSL, which
570 ;; does not exist in the build environment.
571 "not test_fallback_default_verify_paths "
572 ;; This test attempts to make a connection to
573 ;; an external web service.
574 "and not test_set_default_verify_paths")))))))
576 `(("python-cryptography" ,python-cryptography)
577 ("python-six" ,python-six)))
579 `(("openssl" ,openssl)))
581 `(("libfaketime" ,libfaketime)
582 ("python-flaky" ,python-flaky)
583 ("python-pretend" ,python-pretend)
584 ("python-pytest" ,python-pytest)))
585 (home-page "https://github.com/pyca/pyopenssl")
586 (synopsis "Python wrapper module around the OpenSSL library")
588 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
590 (license license:asl2.0)))
592 (define-public python2-pyopenssl
593 (package-with-python2 python-pyopenssl))
595 (define-public python-ed25519
597 (name "python-ed25519")
602 (uri (pypi-uri "ed25519" version))
605 "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499"))))
606 (build-system python-build-system)
607 (home-page "https://github.com/warner/python-ed25519")
608 (synopsis "Ed25519 public-key signatures")
609 (description "Ed25519 public-key signatures")
610 (license license:expat)))
612 (define-public python2-ed25519
613 (package-with-python2 python-ed25519))
615 (define-public python-axolotl-curve25519
617 (name "python-axolotl-curve25519")
618 (version "0.4.1.post2")
622 (uri (pypi-uri "python-axolotl-curve25519" version))
625 "18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
626 (build-system python-build-system)
627 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
628 (synopsis "Python wrapper for curve25519 library")
629 (description "This is a python wrapper for the curve25519 library
630 with ed25519 signatures. The C code was pulled from
631 libaxolotl-android. At the moment this wrapper is meant for use by
633 (license (list license:gpl3 ; Most files
634 license:bsd-3)))) ; curve/curve25519-donna.c
636 (define-public python2-axolotl-curve25519
637 (package-with-python2 python-axolotl-curve25519))
639 (define-public python-axolotl
641 (name "python-axolotl")
646 (uri (pypi-uri "python-axolotl" version))
649 "1bwdp24fmriffwx91aigs9k162albb51iskp23nc939z893q23py"))))
650 (build-system python-build-system)
653 (modify-phases %standard-phases
654 ;; Don't install tests
655 (add-before 'install 'remove-tests
657 (for-each delete-file-recursively
658 '("axolotl/tests" "build/lib/axolotl/tests"))
661 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
662 ("python-cryptography" ,python-cryptography)
663 ("python-protobuf" ,python-protobuf)))
664 (home-page "https://github.com/tgalal/python-axolotl")
665 (synopsis "Python port of libaxolotl-android")
666 (description "This is a python port of libaxolotl-android. This
667 is a ratcheting forward secrecy protocol that works in synchronous and
668 asynchronous messaging environments.")
669 (license license:gpl3)))
671 (define-public python2-axolotl
672 (package-with-python2 python-axolotl))
674 ;; SlowAES isn't compatible with Python 3.
675 (define-public python2-slowaes
677 (name "python2-slowaes")
682 (uri (pypi-uri "slowaes" version))
685 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
686 (build-system python-build-system)
687 (arguments `(#:python ,python-2))
688 (home-page "http://code.google.com/p/slowaes/")
689 (synopsis "Implementation of AES in Python")
690 (description "This package contains an implementation of AES in Python.
691 This implementation is slow (hence the project name) but still useful when
692 faster ones are not available.")
693 (license license:asl2.0)))
695 (define-public python-pyaes
697 (name "python-pyaes")
702 (uri (pypi-uri "pyaes" version))
705 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
706 (build-system python-build-system)
707 (home-page "https://github.com/ricmoo/pyaes")
708 (synopsis "Implementation of AES in Python")
709 (description "This package contains a pure-Python implementation of the
710 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
712 (license license:expat)))
714 (define-public python2-pyaes
715 (package-with-python2 python-pyaes))
717 (define-public python-asn1crypto
719 (name "python-asn1crypto")
725 (url "https://github.com/wbond/asn1crypto")
727 (file-name (git-file-name name version))
730 "10lai2cs5mnz3gpaffbw1m7b885ls8328q5wxm35vfmcip1f0xmb"))))
731 (build-system python-build-system)
732 (home-page "https://github.com/wbond/asn1crypto")
733 (synopsis "ASN.1 parser and serializer in Python")
734 (description "asn1crypto is an ASN.1 parser and serializer with definitions
735 for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7,
736 PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
737 (license license:expat)))
739 (define-public python2-asn1crypto
740 (package-with-python2 python-asn1crypto))
742 (define-public python-pynacl
744 (name "python-pynacl")
749 (uri (pypi-uri "PyNaCl" version))
750 (modules '((guix build utils)))
753 ;; Remove spurious dependency on python-wheel, can be removed
755 (substitute* "setup.py"
757 ;; Remove bundled libsodium.
758 (delete-file-recursively "src/libsodium")
762 "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal"))))
763 (build-system python-build-system)
765 `(#:modules (,@%python-build-system-modules
770 (modify-phases (@ (guix build python-build-system) %standard-phases)
771 (add-before 'build 'use-system-sodium
773 (setenv "SODIUM_INSTALL" "system")
777 (let ((build-directory
778 (car (scandir "build" (cut string-prefix? "lib" <>)))))
780 (string-append "./build/" build-directory ":"
781 (getenv "PYTHONPATH")))
782 (invoke "pytest" "-vv")))))))
784 `(("python-hypothesis" ,python-hypothesis)
785 ("python-pytest" ,python-pytest)))
787 `(("python-cffi" ,python-cffi)
788 ("python-six" ,python-six)
789 ("libsodium" ,libsodium)))
790 (home-page "https://github.com/pyca/pynacl/")
791 (synopsis "Python bindings to libsodium")
793 "PyNaCl is a Python binding to libsodium, which is a fork of the
794 Networking and Cryptography library. These libraries have a stated goal
795 of improving usability, security and speed.")
796 (license license:asl2.0)))
798 (define-public python2-pynacl
799 (package-with-python2 python-pynacl))
801 (define-public python2-pgpdump
803 (name "python2-pgpdump")
808 (uri (pypi-uri "pgpdump" version))
811 "0s4nh8h7qsdj2yf29bspjs1zvxd4lcd11r6g11dp7fppgf2h0iqw"))))
812 (build-system python-build-system)
814 ;; Currently fails to build with Python 3.
815 (arguments `(#:python ,python-2))
817 (home-page "https://github.com/toofishes/python-pgpdump")
818 (synopsis "Python library for parsing PGP packets")
820 "Python-pgpdump is an OpenPGP packet parser based on
821 @uref{http://www.mew.org/~kazu/proj/pgpdump/, pgpdump}. It notably supports:
824 @item signature packets;
825 @item public key packets;
826 @item secret key packets;
827 @item trust, user ID, and user attribute packets;
828 @item ASCII-armor decoding and CRC check.
830 (license license:bsd-3)))
832 (define-public python2-roca-detect
834 (name "python2-roca-detect")
839 (uri (pypi-uri "roca-detect" version))
842 "1di4akyw2lf5r8zfwvyhkilz8jv8g4b66rgaqwfabmjwma6gnw27"))))
843 (build-system python-build-system)
845 ;; TODO: apk_parse_ph4, pyjks
846 `(("python2-dateutil" ,python2-dateutil)
847 ("python2-six" ,python2-six)
848 ("python2-cryptography" ,python2-cryptography)
849 ("python2-future" ,python2-future)
850 ("python2-coloredlogs" ,python2-coloredlogs)
851 ("python2-pgpdump" ,python2-pgpdump)))
853 `(;; Basic testing routine is quite simple and works with Py3
854 ;; but the rest of the code that processes the different
855 ;; key formats and extracts the modulus for inspection is
856 ;; not yet fully py3 ready.
858 (home-page "https://github.com/crocs-muni/roca")
859 (synopsis "ROCA detection tool")
861 "This tool is related to the paper entitled @i{Return of the
862 Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli}. It
863 enables you to test public RSA keys for a presence of the described
864 vulnerability. Currently the tool supports the following key formats: X.509
865 Certificate (DER encoded, PEM encoded), RSA PEM (encoded private key, public
866 key), SSH public key, ASC-encoded OpenPGP key, APK Android application, LDIFF
868 (license license:gpl3)))
870 (define-public python-blurhash
872 (name "python-blurhash")
876 ;; Tests not included in pypi release and releases not tagged in git repo.
879 (url "https://github.com/halcy/blurhash-python")
880 (commit "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8")))
881 (file-name (git-file-name name version))
884 "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"))))
885 (build-system python-build-system)
888 (modify-phases %standard-phases
891 (delete-file "setup.cfg")
892 (invoke "pytest"))))))
894 `(("python-numpy" ,python-numpy)
895 ("python-pillow" ,python-pillow)
896 ("python-pytest" ,python-pytest)))
897 (home-page "https://github.com/halcy/blurhash-python")
899 "Pure-Python implementation of the blurhash algorithm")
901 "Pure-Python implementation of the blurhash algorithm.")
902 (license license:expat)))
904 (define-public python-ecpy
911 (uri (pypi-uri "ECPy" version))
914 "1gc3i5s93zq6x1nkaxkq1dvmsc12vmrw0hns9f5s1hcb78ni52c8"))))
915 (build-system python-build-system)
917 `(("python-future" ,python-future)))
918 (home-page "https://github.com/ubinity/ECPy")
919 (synopsis "Pure Python Elliptic Curve Library")
920 (description "This package provides a Elliptic Curve Library in pure
922 (license license:asl2.0)))
924 (define-public python2-ecpy
925 (package-with-python2 python-ecpy))
927 (define-public python-josepy
929 (name "python-josepy")
933 (uri (pypi-uri "josepy" version))
936 "11khz8malzrv375b27jjkv66z6z6khdx1v5mkkr4vq16gp3n4p7v"))))
937 (build-system python-build-system)
939 ;; The tests require flake8 >= 3.5, which is not yet packaged.
942 `(("python-cryptography" ,python-cryptography)
943 ("python-pyopenssl" ,python-pyopenssl)
944 ("python-six" ,python-six)))
945 ;; TODO Enable when we have flake8 >= 3.5.
947 ; `(("python-coverage" ,python-coverage)
948 ; ("python-flake8" ,python-flake8)
949 ; ("python-isort" ,python-isort)
950 ; ("python-mock" ,python-mock)
951 ; ("python-pytest" ,python-pytest)
952 ; ("python-pytest-cov" ,python-pytest-cov)
953 ; ("python-pytest-cache" ,python-pytest-cache)
954 ; ("python-pytest-flake8" ,python-pytest-flake8)))
955 (home-page "https://github.com/certbot/josepy")
956 (synopsis "JOSE protocol implementation in Python")
957 (description "This package provides a Python implementation of the JOSE
958 protocol (Javascript Object Signing and Encryption).")
959 (license license:asl2.0)))
961 (define-public python2-josepy
962 (package-with-python2 python-josepy))
964 (define-public python-pycryptodome
966 (name "python-pycryptodome")
971 (uri (pypi-uri "pycryptodome" version))
974 "0dh6ky5ngxayyn5f6n7gdamjl49g3khz6pdx9sdnag1zwi8248hs"))))
975 (build-system python-build-system)
976 (home-page "https://www.pycryptodome.org")
977 (synopsis "Cryptographic library for Python")
978 (description "This package provides a cryptographic library for Python.
980 It brings the following enhancements with respect to the last official version
984 @item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
985 @item Accelerated AES on Intel platforms via AES-NI
986 @item First class support for PyPy
987 @item Elliptic curves cryptography (NIST P-256 curve only)
988 @item Better and more compact API (nonce and iv attributes for ciphers,
989 automatic generation of random nonces and IVs, simplified CTR cipher mode, and
991 @item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
992 @item Salsa20 and ChaCha20 stream ciphers
993 @item scrypt and HKDF
994 @item Deterministic (EC)DSA
995 @item Password-protected PKCS#8 key containers
996 @item Shamir’s Secret Sharing scheme
997 @item Random numbers get sourced directly from the OS (and not from a CSPRNG
999 @item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1000 @item Major clean ups and simplification of the code base
1002 (license license:bsd-2)))
1004 (define-public python2-pycryptodome
1005 (package-with-python2 python-pycryptodome))
1007 (define-public python-m2crypto
1009 (name "python-m2crypto")
1014 (uri (pypi-uri "M2Crypto" version))
1016 (base32 "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc"))))
1017 (build-system python-build-system)
1018 (inputs `(("openssl" ,openssl)))
1019 (native-inputs `(("swig" ,swig)))
1020 (home-page "https://gitlab.com/m2crypto/m2crypto")
1021 (synopsis "Python crypto and TLS toolkit")
1022 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
1023 featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
1024 (including AES); TLS functionality to implement clients and servers; HTTPS
1025 extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
1026 AuthCookies for web session management; FTP/TLS client and server; S/MIME;
1027 M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
1028 through the Engine interface.")
1029 (properties `((python2-variant . ,(delay python2-m2crypto))))
1030 (license license:expat)))
1032 (define-public python2-m2crypto
1033 (let ((m2crypto (package-with-python2
1034 (strip-python2-variant python-m2crypto))))
1035 (package (inherit m2crypto)
1037 `(("python2-typing" ,python2-typing))))))
1039 (define-public python-pylibscrypt
1041 (name "python-pylibscrypt")
1046 (uri (pypi-uri "pylibscrypt" version))
1049 "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
1050 (build-system python-build-system)
1053 (modify-phases %standard-phases
1054 (add-before 'build 'hard-code-path-to-libscrypt
1055 (lambda* (#:key inputs #:allow-other-keys)
1056 (let ((libscrypt (assoc-ref inputs "libscrypt")))
1057 (substitute* "pylibscrypt/pylibscrypt.py"
1058 (("find_library\\('scrypt'\\)")
1059 (string-append "'" libscrypt "/lib/libscrypt.so'")))
1061 ;; The library can use various scrypt implementations and tests all of
1062 ;; them. Since we only provide a single implementation, most tests
1063 ;; fail. Simply skip them.
1065 ;; FIXME: Using "libscrypt" is the second best choice. The best one
1066 ;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
1067 ;; 1.1+. Use that as soon as Guix provides it.
1069 `(("libscrypt" ,libscrypt)))
1070 (home-page "https://github.com/jvarho/pylibscrypt")
1071 (synopsis "Scrypt for Python")
1072 (description "There are a lot of different scrypt modules for Python, but
1073 none of them have everything that I'd like, so here's one more. It uses
1075 (license license:isc)))
1077 (define-public python-libnacl
1079 (name "python-libnacl")
1084 (uri (pypi-uri "libnacl" version))
1087 "0nv7n8nfswkhl614x5mllrkvaslraa0053q11iylb337cy43vb4v"))))
1088 (build-system python-build-system)
1091 (modify-phases %standard-phases
1092 (add-after 'unpack 'locate-libsodium
1093 (lambda* (#:key inputs #:allow-other-keys)
1094 (substitute* "libnacl/__init__.py"
1095 (("(return ctypes.cdll.LoadLibrary\\(')libsodium.so('\\))"
1097 (let ((libsodium (string-append (assoc-ref inputs "libsodium")
1098 "/lib/libsodium.so")))
1099 (string-append pre libsodium post)))))))))
1101 `(("python-pyhamcrest" ,python-pyhamcrest)))
1103 `(("libsodium" ,libsodium)))
1104 (home-page "https://libnacl.readthedocs.org/")
1105 (synopsis "Python bindings for libsodium based on ctypes")
1106 (description "@code{libnacl} is used to gain direct access to the
1107 functions exposed by @code{NaCl} library via @code{libsodium}. It has
1108 been constructed to maintain extensive documentation on how to use
1109 @code{NaCl} as well as being completely portable.")
1110 (license license:asl2.0)))
1112 (define-public python-scrypt
1114 (name "python-scrypt")
1119 (uri (pypi-uri "scrypt" version))
1122 "0hjk71k3mgnl8siikm9lii9im8kv0rb7inkjzx78rnancra48xxr"))))
1123 (build-system python-build-system)
1125 `(("openssl" ,openssl)))
1126 (home-page "https://bitbucket.org/mhallin/py-scrypt")
1127 (synopsis "Bindings for the scrypt key derivation function library")
1128 (description "This is a set of Python bindings for the scrypt key
1129 derivation function.")
1130 (license license:bsd-2)))
1132 (define-public python-service-identity
1134 (name "python-service-identity")
1139 (uri (pypi-uri "service_identity" version))
1142 "0b9f5qiqjy8ralzgwjgkhx82h6h8sa7532psmb8mkd65md5aan08"))))
1143 (build-system python-build-system)
1145 `(("python-attrs" ,python-attrs)
1146 ("python-pyasn1" ,python-pyasn1)
1147 ("python-pyasn1-modules" ,python-pyasn1-modules)
1148 ("python-pyopenssl" ,python-pyopenssl)))
1149 (home-page "https://service-identity.readthedocs.io/")
1150 (synopsis "Service identity verification for PyOpenSSL")
1152 "@code{service_identity} aspires to give you all the tools you need
1153 for verifying whether a certificate is valid for the intended purposes.
1154 In the simplest case, this means host name verification. However,
1155 service_identity implements RFC 6125 fully and plans to add other
1156 relevant RFCs too.")
1157 (license license:expat)))
1159 (define-public python2-service-identity
1160 (package-with-python2 python-service-identity))
1162 (define-public python-hkdf
1164 (name "python-hkdf")
1169 (uri (pypi-uri "hkdf" version))
1172 "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2"))))
1173 (build-system python-build-system)
1175 `(("python-nose" ,python-nose)))
1176 (home-page "https://github.com/casebeer/python-hkdf")
1177 (synopsis "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)")
1178 (description "This package provides a Python implementation of the HMAC Key
1179 Derivation function (HKDF) defined in RFC 5869.")
1180 (license license:bsd-2)))
1182 (define-public python-spake2
1184 (name "python-spake2")
1189 (uri (pypi-uri "spake2" version))
1192 "1x16r7lrbklvfzbacb66qv9iiih6liq1y612dqh2chgf555n2yn1"))))
1193 (build-system python-build-system)
1195 `(("python-hkdf" ,python-hkdf)))
1196 (home-page "https://github.com/warner/python-spake2")
1197 (synopsis "SPAKE2 password-authenticated key exchange in Python")
1198 (description "This package provides a Python implementation of the SPAKE2
1199 Password-Authenticated Key Exchange algorithm.")
1200 (license license:expat)))
1202 (define-public python-txtorcon
1204 (name "python-txtorcon")
1209 (uri (pypi-uri "txtorcon" version))
1212 "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
1213 (build-system python-build-system)
1215 ;; The tests fail immediately due to a missing file. Reported upstream:
1216 ;; <https://github.com/meejah/txtorcon/issues/330>
1219 `(("python-automat" ,python-automat)
1220 ("python-idna" ,python-idna)
1221 ("python-incremental" ,python-incremental)
1222 ("python-service-identity" ,python-service-identity)
1223 ("python-twisted" ,python-twisted)
1224 ("python-zope-interface" ,python-zope-interface)))
1225 (home-page "https://github.com/meejah/txtorcon")
1226 (synopsis "Twisted-based Tor controller client")
1227 (description "This package provides a Twisted-based Tor controller client,
1228 with state-tracking and configuration abstractions.")
1229 (license license:expat)))
1231 (define-public python-keyutils
1233 (name "python-keyutils")
1238 (uri (pypi-uri "keyutils" version))
1241 "0lipygpzhwzzsq2k5imb1jgkmj8y4khxdwhzadjs3bd56g6bmkx9"))))
1242 (build-system python-build-system)
1244 `(("python-pytest" ,python-pytest)
1245 ("python-pytest-runner" ,python-pytest-runner)))
1247 `(("keyutils" ,keyutils)))
1250 (home-page "https://github.com/sassoftware/python-keyutils")
1251 (synopsis "Python bindings for keyutils")
1253 "This is a set of python bindings for keyutils, a key management suite
1254 that leverages the infrastructure provided by the Linux kernel for safely
1255 storing and retrieving sensitive information in your programs.")
1256 (license license:asl2.0)))
1258 (define-public python-mcuboot-imgtool
1260 (name "python-mcuboot-imgtool")
1266 (url "https://github.com/JuulLabs-OSS/mcuboot")
1267 (commit (string-append "v" version))))
1268 (file-name (git-file-name name version))
1271 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
1272 (build-system python-build-system)
1275 (modify-phases %standard-phases
1276 (add-after 'unpack 'fix-broken-test
1278 (substitute* "scripts/imgtool/keys/ed25519_test.py"
1279 (("raw_sign") "sign_digest"))
1281 (add-before 'build 'change-directory
1286 `(("python-click" ,python-click)
1287 ("python-intelhex" ,python-intelhex)
1288 ("python-cryptography" ,python-cryptography)))
1289 (home-page "https://mcuboot.com")
1290 (synopsis "Tool to securely sign firmware images for booting by MCUboot")
1291 (description "MCUboot is a secure bootloader for 32-bit MCUs. This
1292 package provides a tool to securely sign firmware images for booting by
1294 (license license:expat)))
1296 (define-public python-ntlm-auth
1298 (name "python-ntlm-auth")
1303 (uri (pypi-uri "ntlm-auth" version))
1306 "16mavidki4ma5ip8srqalr19gz4f5yn3cnmmgps1fmgfr24j63rm"))))
1307 (build-system python-build-system)
1309 `(("python-cryptography" ,python-cryptography)))
1310 (home-page "https://github.com/jborean93/ntlm-auth")
1312 "Calculates NTLM Authentication codes")
1314 "This library handles the low-level details of NTLM authentication for
1315 use in authenticating with a service that uses NTLM. It will create and parse
1316 the 3 different message types in the order required and produce a base64
1317 encoded value that can be attached to the HTTP header.
1319 The goal of this library is to offer full NTLM support including signing and
1320 sealing of messages as well as supporting MIC for message integrity and the
1321 ability to customise and set limits on the messages sent. Please see Features
1322 and Backlog for a list of what is and is not currently supported.")
1323 (license license:expat)))
1325 (define-public python-secretstorage
1327 (name "python-secretstorage")
1332 (uri (pypi-uri "SecretStorage" version))
1335 "1xmzr0j3066s220bss4nkgqbiwb5k4kkp2rkpqlqwjb5kfc8mnhm"))))
1336 (build-system python-build-system)
1338 '(#:tests? #f)) ; Tests require a running dbus service.
1340 `(("python-cryptography" ,python-cryptography)
1341 ("python-jeepney" ,python-jeepney)))
1342 (home-page "https://github.com/mitya57/secretstorage")
1343 (synopsis "Python bindings to FreeDesktop.org Secret Service API")
1345 "@code{python-secretstorage} provides a way for securely storing passwords
1346 and other secrets. It uses D-Bus Secret Service API that is supported by GNOME
1347 Keyring (since version 2.30) and KSecretsService. SecretStorage supports most
1348 of the functions provided by Secret Service, including creating and deleting
1349 items and collections, editing items, locking and unlocking collections
1350 (asynchronous unlocking is also supported).")
1351 (license license:bsd-3)))
1353 (define-public python-trustme
1355 (name "python-trustme")
1360 (uri (pypi-uri "trustme" version))
1362 (base32 "0v3vr5z6apnfmklf07m45kv5kaqvm6hxrkaqywch57bjd2siiywx"))))
1363 (build-system python-build-system)
1366 (modify-phases %standard-phases
1368 (lambda* (#:key inputs outputs #:allow-other-keys)
1369 (add-installed-pythonpath inputs outputs)
1370 (invoke "pytest" "-vv"))))))
1372 `(("python-more-itertools" ,python-more-itertools)
1373 ("python-pyopenssl" ,python-pyopenssl)
1374 ("python-pytest" ,python-pytest)
1375 ("python-pytest-cov" ,python-pytest-cov)
1376 ("python-service-identity" ,python-service-identity)
1377 ("python-zipp" ,python-zipp)))
1379 `(("python-cryptography" ,python-cryptography)))
1380 (home-page "https://github.com/python-trio/trustme")
1381 (synopsis "Fake a certificate authority for tests")
1383 "@code{trustme} is a tiny Python package that does one thing: it gives you
1384 a fake certificate authority (CA) that you can use to generate fake TLS certs to
1385 use in your tests.")
1386 ;; Either license applies.
1387 (license (list license:expat license:asl2.0))))
1389 (define-public python-certipy
1391 (name "python-certipy")
1396 (uri (pypi-uri "certipy" version))
1399 "0n980gqpzh0fm58h3i4mi2i10wgj606lscm1r5sk60vbf6vh8mv9"))))
1400 (build-system python-build-system)
1402 `(("python-pyopenssl" ,python-pyopenssl)))
1404 `(("python-pytest" ,python-pytest)))
1405 (home-page "https://github.com/LLNL/certipy")
1406 (synopsis "Utility to create and sign CAs and certificates")
1408 "Certipy was made to simplify the certificate creation process. To that
1409 end, certipy exposes methods for creating and managing certificate authorities,
1410 certificates, signing and building trust bundles.")
1411 (license license:bsd-3)))
1413 (define-public python-jeepney
1415 (name "python-jeepney")
1420 (uri (pypi-uri "jeepney" version))
1422 (base32 "0vp3p1lqhqk2kd3254q5sxr50znmm2hmysc8a7g0fr1brihvhy9l"))))
1423 (build-system python-build-system)
1425 `(("python-testpath" ,python-testpath)
1426 ("python-tornado" ,python-tornado)
1427 ("python-pytest" ,python-pytest)))
1428 (home-page "https://gitlab.com/takluyver/jeepney")
1429 (synopsis "Low-level, pure Python DBus protocol wrapper")
1431 "This is a low-level, pure Python DBus protocol client. It has an
1432 I/O-free core, and integration modules for different event loops.")
1433 (license license:expat)))
1435 (define-public python-argon2-cffi
1437 (name "python-argon2-cffi")
1442 (uri (pypi-uri "argon2-cffi" version))
1445 "0zgr4mnnm0p4i99023safb0qb8cgvl202nly1rvylk2b7qnrn0nq"))
1446 (modules '((guix build utils)))
1447 (snippet '(begin (delete-file-recursively "extras") #t))))
1448 (build-system python-build-system)
1451 (modify-phases %standard-phases
1454 (setenv "ARGON2_CFFI_USE_SYSTEM" "1")
1455 (invoke "python" "setup.py" "build")))
1457 (lambda* (#:key inputs outputs #:allow-other-keys)
1458 (add-installed-pythonpath inputs outputs)
1460 (invoke "python" "-m" "argon2" "--help")
1462 (invoke "python" "-m" "argon2" "-n" "1" "-t" "1" "-m" "8" "-p" "1"))))))
1464 `(("python-cffi" ,python-cffi)
1465 ("python-six" ,python-six)))
1466 (inputs `(("argon2" ,argon2)))
1468 `(("python-hypothesis" ,python-hypothesis)
1469 ("python-pytest" ,python-pytest)))
1470 (home-page "https://argon2-cffi.readthedocs.io/")
1471 (synopsis "Secure Password Hashes for Python")
1473 "Argon2 is a secure password hashing algorithm. It is designed to have
1474 both a configurable runtime as well as memory consumption. This means that you
1475 can decide how long it takes to hash a password and how much memory is required.")
1476 (license license:expat)))
1478 (define-public python-privy
1480 (name "python-privy")
1486 ;; Releases are untagged
1487 (url "https://github.com/ofek/privy")
1488 (commit "2838db3df239797c71bddacc48a4c49a83f35747")))
1489 (file-name (git-file-name name version))
1492 "1m32dh5fqc8cy7jyf1z5fs6zvmdkbq5fi98hr609gbl7s0l0y0i9"))))
1493 (build-system python-build-system)
1496 (modify-phases %standard-phases
1499 (invoke "python" "-m" "pytest"))))))
1501 `(("python-pytest" ,python-pytest)))
1503 `(("python-argon2-cffi" ,python-argon2-cffi)
1504 ("python-cryptography" ,python-cryptography)))
1505 (home-page "https://www.dropbox.com/developers")
1506 (synopsis "Library to password-protect your data")
1508 "Privy is a small and fast utility for password-protecting secret
1509 data such as API keys, cryptocurrency wallets, or seeds for digital
1511 (license (list license:expat license:asl2.0)))) ; dual licensed
1513 (define-public python-pgpy
1515 (name "python-pgpy")
1520 (uri (pypi-uri "PGPy" version))
1523 "0i4lqhzdwkjkim3wab0kqadx28z3r5ixlh6qxj4lif4gif56c0m7"))))
1524 (build-system python-build-system)
1526 `(("python-cryptography" ,python-cryptography)
1527 ("python-pyasn1" ,python-pyasn1)
1528 ("python-singledispatch" ,python-singledispatch)
1529 ("python-six" ,python-six)))
1530 (home-page "https://github.com/SecurityInnovation/PGPy")
1531 (synopsis "Python implementation of OpenPGP")
1533 "Currently, PGPy can load keys and signatures of all kinds in both ASCII
1534 armored and binary formats.
1536 It can create and verify RSA, DSA, and ECDSA signatures, at the moment. It
1537 can also encrypt and decrypt messages using RSA and ECDH.")
1538 (license license:bsd-3)))
1540 (define-public python-sop
1547 (uri (pypi-uri "sop" version))
1550 "0gljyjsdn6hdmwlwwb5g5s0c031p6izamvfxp0d39x60af8k5jyf"))))
1551 (build-system python-build-system)
1553 '(#:tests? #f)) ; There are no tests, and unittest throws an error trying
1555 ; TypeError: don't know how to make test from: 0.2.0
1556 (home-page "https://gitlab.com/dkg/python-sop")
1557 (synopsis "Stateless OpenPGP Command-Line Interface")
1559 "The Stateless OpenPGP Command-Line Interface (or sop) is a
1560 specification that encourages OpenPGP implementors to provide a common,
1561 relatively simple command-line API for purposes of object security.
1563 This Python module helps implementers build such a CLI from any implementation
1564 accessible to the Python interpreter.
1566 It does not provide such an implementation itself -- this is just the
1567 scaffolding for the command line, which should make it relatively easy to
1568 supply a handful of python functions as methods to a class.")
1569 (license license:expat))) ; MIT license