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 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))
219 "17wx8lkhqxmddfdq7z7x45xqq2w3gwa974hpq1n3y0dqbn4r414j"))))
220 (build-system python-build-system)
222 `(;; FIXME: Tests require many unpackaged libraries, see dev-requirements.txt.
225 `(("python-bcrypt" ,python-bcrypt)
226 ("python-pyasn1" ,python-pyasn1)
227 ("python-pynacl" ,python-pynacl)
228 ("python-cryptography" ,python-cryptography)))
229 (home-page "https://www.paramiko.org/")
230 (synopsis "SSHv2 protocol library")
231 (description "Paramiko is a python implementation of the SSHv2 protocol,
232 providing both client and server functionality. While it leverages a Python C
233 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
234 Python interface around SSH networking concepts.")
235 (license license:lgpl2.1+)))
237 (define-public python2-paramiko
238 (package-with-python2 python-paramiko))
240 (define-public python-ecdsa
242 (name "python-ecdsa")
247 (uri (pypi-uri "ecdsa" version))
249 (base32 "13nx5cbfxc0gnax5zwdmp9xc40qd1llk62mv85jyrvqkbw017ik4"))))
250 (build-system python-build-system)
253 (modify-phases %standard-phases
255 (lambda _ (invoke "pytest"))))))
257 `(("python-six" ,python-six)))
259 `(("openssl" ,openssl)
260 ("python-pytest" ,python-pytest)))
261 (home-page "https://github.com/warner/python-ecdsa")
262 (synopsis "ECDSA cryptographic signature library (pure python)")
264 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
265 Curve Digital Signature Algorithm), implemented purely in Python. With this
266 library, you can quickly create keypairs (signing key and verifying key), sign
267 messages, and verify the signatures. The keys and signatures are very short,
268 making them easy to handle and incorporate into other protocols.")
269 (license license:expat)))
271 (define-public python2-ecdsa
272 (package-with-python2 python-ecdsa))
274 ;;; Pycrypto is abandoned upstream:
276 ;;; https://github.com/dlitz/pycrypto/issues/173
278 ;;; TODO Remove this package from GNU Guix.
279 (define-public python-pycrypto
281 (name "python-pycrypto")
286 (uri (pypi-uri "pycrypto" version))
287 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"
288 "python-pycrypto-time-clock.patch"))
291 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
292 (build-system python-build-system)
298 (modify-phases %standard-phases
299 (add-before 'build 'set-build-env
300 ;; pycrypto runs an autoconf configure script behind the scenes
301 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
302 (home-page "https://www.dlitz.net/software/pycrypto/")
303 (synopsis "Cryptographic modules for Python")
305 "Pycrypto is a collection of both secure hash functions (such as SHA256
306 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
307 etc.). The package is structured to make adding new modules easy.")
308 (license license:public-domain)))
310 (define-public python2-pycrypto
311 (let ((pycrypto (package-with-python2 python-pycrypto)))
312 (package (inherit pycrypto)
314 `(("python" ,python-2)
317 (package-inputs pycrypto)))))))
319 (define-public python-kerberos
321 (name "python-kerberos")
326 (uri (pypi-uri "kerberos" version))
329 "19663qxmma0i8bfbjc2iwy5hgq0g4pfb75r023v5dps68zfvffgh"))))
330 (build-system python-build-system)
332 `(("mit-krb5" ,mit-krb5)))
333 (home-page "https://github.com/apple/ccs-pykerberos")
335 "Python Kerberos library used by CalendarServer")
337 "This Python package is a high-level wrapper for Kerberos (GSSAPI)
338 operations. The goal is to avoid having to build a module that wraps the
339 entire Kerberos.framework, and instead offer a limited set of functions that
340 do what is needed for client/server Kerberos authentication based on
341 <http://www.ietf.org/rfc/rfc4559.txt>.")
342 (license license:asl2.0)))
344 (define-public python-keyring
346 (name "python-keyring")
351 (uri (pypi-uri "keyring" version))
354 "1k0w3yh3fz0qp0cvkxdiinq9jzbrnc6bd88qpjz34x3cgcr94psz"))
355 (modules '((guix build utils)))
357 ;; https://github.com/jaraco/keyring/issues/414
358 '(begin (substitute* "tests/test_packaging.py"
359 (("ep, =") "(ep,) =")) #t))))
360 (build-system python-build-system)
363 (modify-phases %standard-phases
366 ;; Not clear why this test fails.
367 (delete-file "tests/test_packaging.py")
368 (substitute* "pytest.ini"
370 (invoke "pytest"))))))
372 `(("python-pytest" ,python-pytest)
373 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
374 ("python-pytest-cov" ,python-pytest-cov)
375 ("python-pytest-flake8" ,python-pytest-flake8)
376 ("python-setuptools-scm" ,python-setuptools-scm)))
378 `(("python-importlib-metadata" ,python-importlib-metadata)
379 ("python-secretstorage" ,python-secretstorage)))
380 (home-page "https://github.com/jaraco/keyring")
381 (synopsis "Store and access your passwords safely")
383 "The Python keyring lib provides a easy way to access the system keyring
384 service from python. It can be used in any application that needs safe
386 ;; "MIT" and PSF dual license
387 (properties `((python2-variant . ,(delay python2-keyring))))
388 (license license:x11)))
390 (define-public python2-keyring
391 (let ((keyring (package-with-python2
392 (strip-python2-variant python-keyring))))
395 (name "python2-keyring")
400 (uri (pypi-uri "keyring" version))
403 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
405 `(#:python ,python-2))
407 `(("python2-pytest" ,python2-pytest)
408 ("python2-pytest-runner" ,python2-pytest-runner)
409 ("python2-setuptools-scm" ,python2-setuptools-scm)))
411 `(("python2-pycrypto" ,python2-pycrypto))))))
413 (define-public python-keyrings.alt
415 (name "python-keyrings.alt")
420 (uri (pypi-uri "keyrings.alt" version))
423 "0gdjdqpq2hf770p6iwi891mil0vbsdhvy88x0v8b2w4y4b28lcli"))
424 (modules '((guix build utils)))
427 (delete-file "keyrings/alt/_win_crypto.py")
428 ;; Rely on python-keyring>20:
429 ;; https://github.com/jaraco/keyrings.alt/issues/33
430 (substitute* '("keyrings/alt/tests/test_Gnome.py"
431 "keyrings/alt/tests/test_Google.py"
432 "keyrings/alt/tests/test_Windows.py"
433 "keyrings/alt/tests/test_file.py"
434 "keyrings/alt/tests/test_pyfs.py")
435 (("keyring.tests.test_backend") "keyring.testing.backend")
436 (("keyring.tests.util") "keyring.testing.util"))
438 (build-system python-build-system)
440 `(("python-keyring" ,python-keyring)
441 ("python-pytest" ,python-pytest)
442 ("python-setuptools-scm" ,python-setuptools-scm)))
443 (home-page "https://github.com/jaraco/keyrings.alt")
444 (synopsis "Alternate keyring implementations")
445 (description "Keyrings in this package may have security risks or other
446 implications. These backends were extracted from the main keyring project to
447 make them available for those who wish to employ them, but are discouraged for
448 general production use. Include this module and use its backends at your own
450 (license license:expat)))
452 (define-public python-certifi
454 (name "python-certifi")
455 (version "2020.4.5.1")
458 (uri (pypi-uri "certifi" version))
461 "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i"))))
462 (build-system python-build-system)
463 (arguments '(#:tests? #f)) ;no tests
464 (home-page "https://certifi.io/")
465 (synopsis "Python CA certificate bundle")
467 "Certifi is a Python library that contains a CA certificate bundle, which
468 is used by the Requests library to verify HTTPS requests.")
469 (license license:asl2.0)))
471 (define-public python2-certifi
472 (package-with-python2 python-certifi))
474 (define-public python-cryptography-vectors
476 (name "python-cryptography-vectors")
481 (uri (pypi-uri "cryptography_vectors" version))
484 "1d4iykcv7cn9j399hczlxm5pzxmqy6d80h3j16dkjwlmv3293b4r"))))
485 (build-system python-build-system)
486 (home-page "https://github.com/pyca/cryptography")
487 (synopsis "Test vectors for the cryptography package")
489 "This package contains test vectors for the cryptography package.")
490 ;; Distributed under either BSD-3 or ASL2.0
491 (license (list license:bsd-3 license:asl2.0))))
493 (define-public python2-cryptography-vectors
494 (package-with-python2 python-cryptography-vectors))
496 (define-public python-cryptography
498 (name "python-cryptography")
503 (uri (pypi-uri "cryptography" version))
506 "0af25w5mkd6vwns3r6ai1w5ip9xp0ms9s261zzssbpadzdr05hx0"))))
507 (build-system python-build-system)
509 `(("openssl" ,openssl)))
511 `(("python-asn1crypto" ,python-asn1crypto)
512 ("python-cffi" ,python-cffi)
513 ("python-six" ,python-six)
514 ("python-idna" ,python-idna)
515 ("python-iso8601" ,python-iso8601)))
517 `(("python-cryptography-vectors" ,python-cryptography-vectors)
518 ("python-hypothesis" ,python-hypothesis)
519 ("python-pretend" ,python-pretend)
520 ("python-pytz" ,python-pytz)
521 ("python-pytest" ,python-pytest)))
522 (home-page "https://github.com/pyca/cryptography")
523 (synopsis "Cryptographic recipes and primitives for Python")
525 "cryptography is a package which provides cryptographic recipes and
526 primitives to Python developers. It aims to be the “cryptographic standard
527 library” for Python. The package includes both high level recipes, and low
528 level interfaces to common cryptographic algorithms such as symmetric ciphers,
529 message digests and key derivation functions.")
530 ;; Distributed under either BSD-3 or ASL2.0
531 (license (list license:bsd-3 license:asl2.0))
532 (properties `((python2-variant . ,(delay python2-cryptography))))))
534 (define-public python2-cryptography
535 (let ((crypto (package-with-python2
536 (strip-python2-variant python-cryptography))))
537 (package (inherit crypto)
539 `(("python2-ipaddress" ,python2-ipaddress)
540 ("python2-backport-ssl-match-hostname"
541 ,python2-backport-ssl-match-hostname)
542 ("python2-enum34" ,python2-enum34)
543 ,@(package-propagated-inputs crypto))))))
545 (define-public python-pyopenssl
547 (name "python-pyopenssl")
552 (uri (pypi-uri "pyOpenSSL" version))
555 "01wmsq6w0frzbr3zps4ga9kmqjidp2h317jwpq1g9ah24r5lj94s"))))
556 (build-system python-build-system)
559 (modify-phases %standard-phases
561 (add-after 'install 'check
562 (lambda* (#:key inputs outputs #:allow-other-keys)
563 (add-installed-pythonpath inputs outputs)
564 ;; PyOpenSSL runs tests against a certificate with a fixed
565 ;; expiry time. To ensure successful builds in the future,
566 ;; set the time to roughly the release date.
567 (invoke "faketime" "2019-01-01" "py.test" "-v" "-k"
569 ;; This test tries to look up certificates from
570 ;; the compiled-in default path in OpenSSL, which
571 ;; does not exist in the build environment.
572 "not test_fallback_default_verify_paths "
573 ;; This test attempts to make a connection to
574 ;; an external web service.
575 "and not test_set_default_verify_paths")))))))
577 `(("python-cryptography" ,python-cryptography)
578 ("python-six" ,python-six)))
580 `(("openssl" ,openssl)))
582 `(("libfaketime" ,libfaketime)
583 ("python-flaky" ,python-flaky)
584 ("python-pretend" ,python-pretend)
585 ("python-pytest" ,python-pytest)))
586 (home-page "https://github.com/pyca/pyopenssl")
587 (synopsis "Python wrapper module around the OpenSSL library")
589 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
591 (license license:asl2.0)))
593 (define-public python2-pyopenssl
594 (package-with-python2 python-pyopenssl))
596 (define-public python-ed25519
598 (name "python-ed25519")
603 (uri (pypi-uri "ed25519" version))
606 "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499"))))
607 (build-system python-build-system)
608 (home-page "https://github.com/warner/python-ed25519")
609 (synopsis "Ed25519 public-key signatures")
610 (description "Ed25519 public-key signatures")
611 (license license:expat)))
613 (define-public python2-ed25519
614 (package-with-python2 python-ed25519))
616 (define-public python-axolotl-curve25519
618 (name "python-axolotl-curve25519")
619 (version "0.4.1.post2")
623 (uri (pypi-uri "python-axolotl-curve25519" version))
626 "18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
627 (build-system python-build-system)
628 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
629 (synopsis "Python wrapper for curve25519 library")
630 (description "This is a python wrapper for the curve25519 library
631 with ed25519 signatures. The C code was pulled from
632 libaxolotl-android. At the moment this wrapper is meant for use by
634 (license (list license:gpl3 ; Most files
635 license:bsd-3)))) ; curve/curve25519-donna.c
637 (define-public python2-axolotl-curve25519
638 (package-with-python2 python-axolotl-curve25519))
640 (define-public python-axolotl
642 (name "python-axolotl")
647 (uri (pypi-uri "python-axolotl" version))
650 "1bwdp24fmriffwx91aigs9k162albb51iskp23nc939z893q23py"))))
651 (build-system python-build-system)
654 (modify-phases %standard-phases
655 ;; Don't install tests
656 (add-before 'install 'remove-tests
658 (for-each delete-file-recursively
659 '("axolotl/tests" "build/lib/axolotl/tests"))
662 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
663 ("python-cryptography" ,python-cryptography)
664 ("python-protobuf" ,python-protobuf)))
665 (home-page "https://github.com/tgalal/python-axolotl")
666 (synopsis "Python port of libaxolotl-android")
667 (description "This is a python port of libaxolotl-android. This
668 is a ratcheting forward secrecy protocol that works in synchronous and
669 asynchronous messaging environments.")
670 (license license:gpl3)))
672 (define-public python2-axolotl
673 (package-with-python2 python-axolotl))
675 ;; SlowAES isn't compatible with Python 3.
676 (define-public python2-slowaes
678 (name "python2-slowaes")
683 (uri (pypi-uri "slowaes" version))
686 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
687 (build-system python-build-system)
688 (arguments `(#:python ,python-2))
689 (home-page "http://code.google.com/p/slowaes/")
690 (synopsis "Implementation of AES in Python")
691 (description "This package contains an implementation of AES in Python.
692 This implementation is slow (hence the project name) but still useful when
693 faster ones are not available.")
694 (license license:asl2.0)))
696 (define-public python-pyaes
698 (name "python-pyaes")
703 (uri (pypi-uri "pyaes" version))
706 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
707 (build-system python-build-system)
708 (home-page "https://github.com/ricmoo/pyaes")
709 (synopsis "Implementation of AES in Python")
710 (description "This package contains a pure-Python implementation of the
711 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
713 (license license:expat)))
715 (define-public python2-pyaes
716 (package-with-python2 python-pyaes))
718 (define-public python-asn1crypto
720 (name "python-asn1crypto")
726 (url "https://github.com/wbond/asn1crypto")
728 (file-name (git-file-name name version))
731 "10lai2cs5mnz3gpaffbw1m7b885ls8328q5wxm35vfmcip1f0xmb"))))
732 (build-system python-build-system)
733 (home-page "https://github.com/wbond/asn1crypto")
734 (synopsis "ASN.1 parser and serializer in Python")
735 (description "asn1crypto is an ASN.1 parser and serializer with definitions
736 for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7,
737 PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
738 (license license:expat)))
740 (define-public python2-asn1crypto
741 (package-with-python2 python-asn1crypto))
743 (define-public python-pynacl
745 (name "python-pynacl")
750 (uri (pypi-uri "PyNaCl" version))
751 (modules '((guix build utils)))
754 ;; Remove spurious dependency on python-wheel, can be removed
756 (substitute* "setup.py"
758 ;; Remove bundled libsodium.
759 (delete-file-recursively "src/libsodium")
763 "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal"))))
764 (build-system python-build-system)
766 `(#:modules (,@%python-build-system-modules
771 (modify-phases (@ (guix build python-build-system) %standard-phases)
772 (add-before 'build 'use-system-sodium
774 (setenv "SODIUM_INSTALL" "system")
778 (let ((build-directory
779 (car (scandir "build" (cut string-prefix? "lib" <>)))))
781 (string-append "./build/" build-directory ":"
782 (getenv "PYTHONPATH")))
783 (invoke "pytest" "-vv")))))))
785 `(("python-hypothesis" ,python-hypothesis)
786 ("python-pytest" ,python-pytest)))
788 `(("python-cffi" ,python-cffi)
789 ("python-six" ,python-six)
790 ("libsodium" ,libsodium)))
791 (home-page "https://github.com/pyca/pynacl/")
792 (synopsis "Python bindings to libsodium")
794 "PyNaCl is a Python binding to libsodium, which is a fork of the
795 Networking and Cryptography library. These libraries have a stated goal
796 of improving usability, security and speed.")
797 (license license:asl2.0)))
799 (define-public python2-pynacl
800 (package-with-python2 python-pynacl))
802 (define-public python2-pgpdump
804 (name "python2-pgpdump")
809 (uri (pypi-uri "pgpdump" version))
812 "0s4nh8h7qsdj2yf29bspjs1zvxd4lcd11r6g11dp7fppgf2h0iqw"))))
813 (build-system python-build-system)
815 ;; Currently fails to build with Python 3.
816 (arguments `(#:python ,python-2))
818 (home-page "https://github.com/toofishes/python-pgpdump")
819 (synopsis "Python library for parsing PGP packets")
821 "Python-pgpdump is an OpenPGP packet parser based on
822 @uref{http://www.mew.org/~kazu/proj/pgpdump/, pgpdump}. It notably supports:
825 @item signature packets;
826 @item public key packets;
827 @item secret key packets;
828 @item trust, user ID, and user attribute packets;
829 @item ASCII-armor decoding and CRC check.
831 (license license:bsd-3)))
833 (define-public python2-roca-detect
835 (name "python2-roca-detect")
840 (uri (pypi-uri "roca-detect" version))
843 "1di4akyw2lf5r8zfwvyhkilz8jv8g4b66rgaqwfabmjwma6gnw27"))))
844 (build-system python-build-system)
846 ;; TODO: apk_parse_ph4, pyjks
847 `(("python2-dateutil" ,python2-dateutil)
848 ("python2-six" ,python2-six)
849 ("python2-cryptography" ,python2-cryptography)
850 ("python2-future" ,python2-future)
851 ("python2-coloredlogs" ,python2-coloredlogs)
852 ("python2-pgpdump" ,python2-pgpdump)))
854 `(;; Basic testing routine is quite simple and works with Py3
855 ;; but the rest of the code that processes the different
856 ;; key formats and extracts the modulus for inspection is
857 ;; not yet fully py3 ready.
859 (home-page "https://github.com/crocs-muni/roca")
860 (synopsis "ROCA detection tool")
862 "This tool is related to the paper entitled @i{Return of the
863 Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli}. It
864 enables you to test public RSA keys for a presence of the described
865 vulnerability. Currently the tool supports the following key formats: X.509
866 Certificate (DER encoded, PEM encoded), RSA PEM (encoded private key, public
867 key), SSH public key, ASC-encoded OpenPGP key, APK Android application, LDIFF
869 (license license:gpl3)))
871 (define-public python-blurhash
873 (name "python-blurhash")
877 ;; Tests not included in pypi release and releases not tagged in git repo.
880 (url "https://github.com/halcy/blurhash-python")
881 (commit "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8")))
882 (file-name (git-file-name name version))
885 "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"))))
886 (build-system python-build-system)
889 (modify-phases %standard-phases
892 (delete-file "setup.cfg")
893 (invoke "pytest"))))))
895 `(("python-numpy" ,python-numpy)
896 ("python-pillow" ,python-pillow)
897 ("python-pytest" ,python-pytest)))
898 (home-page "https://github.com/halcy/blurhash-python")
900 "Pure-Python implementation of the blurhash algorithm")
902 "Pure-Python implementation of the blurhash algorithm.")
903 (license license:expat)))
905 (define-public python-ecpy
912 (uri (pypi-uri "ECPy" version))
915 "1gc3i5s93zq6x1nkaxkq1dvmsc12vmrw0hns9f5s1hcb78ni52c8"))))
916 (build-system python-build-system)
918 `(("python-future" ,python-future)))
919 (home-page "https://github.com/ubinity/ECPy")
920 (synopsis "Pure Python Elliptic Curve Library")
921 (description "This package provides a Elliptic Curve Library in pure
923 (license license:asl2.0)))
925 (define-public python2-ecpy
926 (package-with-python2 python-ecpy))
928 (define-public python-josepy
930 (name "python-josepy")
934 (uri (pypi-uri "josepy" version))
937 "11khz8malzrv375b27jjkv66z6z6khdx1v5mkkr4vq16gp3n4p7v"))))
938 (build-system python-build-system)
940 ;; The tests require flake8 >= 3.5, which is not yet packaged.
943 `(("python-cryptography" ,python-cryptography)
944 ("python-pyopenssl" ,python-pyopenssl)
945 ("python-six" ,python-six)))
946 ;; TODO Enable when we have flake8 >= 3.5.
948 ; `(("python-coverage" ,python-coverage)
949 ; ("python-flake8" ,python-flake8)
950 ; ("python-isort" ,python-isort)
951 ; ("python-mock" ,python-mock)
952 ; ("python-pytest" ,python-pytest)
953 ; ("python-pytest-cov" ,python-pytest-cov)
954 ; ("python-pytest-cache" ,python-pytest-cache)
955 ; ("python-pytest-flake8" ,python-pytest-flake8)))
956 (home-page "https://github.com/certbot/josepy")
957 (synopsis "JOSE protocol implementation in Python")
958 (description "This package provides a Python implementation of the JOSE
959 protocol (Javascript Object Signing and Encryption).")
960 (license license:asl2.0)))
962 (define-public python2-josepy
963 (package-with-python2 python-josepy))
965 (define-public python-pycryptodome
967 (name "python-pycryptodome")
972 (uri (pypi-uri "pycryptodome" version))
975 "0dh6ky5ngxayyn5f6n7gdamjl49g3khz6pdx9sdnag1zwi8248hs"))))
976 (build-system python-build-system)
977 (home-page "https://www.pycryptodome.org")
978 (synopsis "Cryptographic library for Python")
979 (description "This package provides a cryptographic library for Python.
981 It brings the following enhancements with respect to the last official version
985 @item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
986 @item Accelerated AES on Intel platforms via AES-NI
987 @item First class support for PyPy
988 @item Elliptic curves cryptography (NIST P-256 curve only)
989 @item Better and more compact API (nonce and iv attributes for ciphers,
990 automatic generation of random nonces and IVs, simplified CTR cipher mode, and
992 @item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
993 @item Salsa20 and ChaCha20 stream ciphers
994 @item scrypt and HKDF
995 @item Deterministic (EC)DSA
996 @item Password-protected PKCS#8 key containers
997 @item Shamir’s Secret Sharing scheme
998 @item Random numbers get sourced directly from the OS (and not from a CSPRNG
1000 @item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1001 @item Major clean ups and simplification of the code base
1003 (license license:bsd-2)))
1005 (define-public python2-pycryptodome
1006 (package-with-python2 python-pycryptodome))
1008 (define-public python-m2crypto
1010 (name "python-m2crypto")
1015 (uri (pypi-uri "M2Crypto" version))
1017 (base32 "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc"))))
1018 (build-system python-build-system)
1019 (inputs `(("openssl" ,openssl)))
1020 (native-inputs `(("swig" ,swig)))
1021 (home-page "https://gitlab.com/m2crypto/m2crypto")
1022 (synopsis "Python crypto and TLS toolkit")
1023 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
1024 featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
1025 (including AES); TLS functionality to implement clients and servers; HTTPS
1026 extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
1027 AuthCookies for web session management; FTP/TLS client and server; S/MIME;
1028 M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
1029 through the Engine interface.")
1030 (properties `((python2-variant . ,(delay python2-m2crypto))))
1031 (license license:expat)))
1033 (define-public python2-m2crypto
1034 (let ((m2crypto (package-with-python2
1035 (strip-python2-variant python-m2crypto))))
1036 (package (inherit m2crypto)
1038 `(("python2-typing" ,python2-typing))))))
1040 (define-public python-pylibscrypt
1042 (name "python-pylibscrypt")
1047 (uri (pypi-uri "pylibscrypt" version))
1050 "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
1051 (build-system python-build-system)
1054 (modify-phases %standard-phases
1055 (add-before 'build 'hard-code-path-to-libscrypt
1056 (lambda* (#:key inputs #:allow-other-keys)
1057 (let ((libscrypt (assoc-ref inputs "libscrypt")))
1058 (substitute* "pylibscrypt/pylibscrypt.py"
1059 (("find_library\\('scrypt'\\)")
1060 (string-append "'" libscrypt "/lib/libscrypt.so'")))
1062 ;; The library can use various scrypt implementations and tests all of
1063 ;; them. Since we only provide a single implementation, most tests
1064 ;; fail. Simply skip them.
1066 ;; FIXME: Using "libscrypt" is the second best choice. The best one
1067 ;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
1068 ;; 1.1+. Use that as soon as Guix provides it.
1070 `(("libscrypt" ,libscrypt)))
1071 (home-page "https://github.com/jvarho/pylibscrypt")
1072 (synopsis "Scrypt for Python")
1073 (description "There are a lot of different scrypt modules for Python, but
1074 none of them have everything that I'd like, so here's one more. It uses
1076 (license license:isc)))
1078 (define-public python-libnacl
1080 (name "python-libnacl")
1085 (uri (pypi-uri "libnacl" version))
1088 "0nv7n8nfswkhl614x5mllrkvaslraa0053q11iylb337cy43vb4v"))))
1089 (build-system python-build-system)
1092 (modify-phases %standard-phases
1093 (add-after 'unpack 'locate-libsodium
1094 (lambda* (#:key inputs #:allow-other-keys)
1095 (substitute* "libnacl/__init__.py"
1096 (("(return ctypes.cdll.LoadLibrary\\(')libsodium.so('\\))"
1098 (let ((libsodium (string-append (assoc-ref inputs "libsodium")
1099 "/lib/libsodium.so")))
1100 (string-append pre libsodium post)))))))))
1102 `(("python-pyhamcrest" ,python-pyhamcrest)))
1104 `(("libsodium" ,libsodium)))
1105 (home-page "https://libnacl.readthedocs.org/")
1106 (synopsis "Python bindings for libsodium based on ctypes")
1107 (description "@code{libnacl} is used to gain direct access to the
1108 functions exposed by @code{NaCl} library via @code{libsodium}. It has
1109 been constructed to maintain extensive documentation on how to use
1110 @code{NaCl} as well as being completely portable.")
1111 (license license:asl2.0)))
1113 (define-public python-scrypt
1115 (name "python-scrypt")
1120 (uri (pypi-uri "scrypt" version))
1123 "0hjk71k3mgnl8siikm9lii9im8kv0rb7inkjzx78rnancra48xxr"))))
1124 (build-system python-build-system)
1126 `(("openssl" ,openssl)))
1127 (home-page "https://bitbucket.org/mhallin/py-scrypt")
1128 (synopsis "Bindings for the scrypt key derivation function library")
1129 (description "This is a set of Python bindings for the scrypt key
1130 derivation function.")
1131 (license license:bsd-2)))
1133 (define-public python-service-identity
1135 (name "python-service-identity")
1140 (uri (pypi-uri "service_identity" version))
1143 "0b9f5qiqjy8ralzgwjgkhx82h6h8sa7532psmb8mkd65md5aan08"))))
1144 (build-system python-build-system)
1146 `(("python-attrs" ,python-attrs)
1147 ("python-pyasn1" ,python-pyasn1)
1148 ("python-pyasn1-modules" ,python-pyasn1-modules)
1149 ("python-pyopenssl" ,python-pyopenssl)))
1150 (home-page "https://service-identity.readthedocs.io/")
1151 (synopsis "Service identity verification for PyOpenSSL")
1153 "@code{service_identity} aspires to give you all the tools you need
1154 for verifying whether a certificate is valid for the intended purposes.
1155 In the simplest case, this means host name verification. However,
1156 service_identity implements RFC 6125 fully and plans to add other
1157 relevant RFCs too.")
1158 (license license:expat)))
1160 (define-public python2-service-identity
1161 (package-with-python2 python-service-identity))
1163 (define-public python-hkdf
1165 (name "python-hkdf")
1170 (uri (pypi-uri "hkdf" version))
1173 "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2"))))
1174 (build-system python-build-system)
1176 `(("python-nose" ,python-nose)))
1177 (home-page "https://github.com/casebeer/python-hkdf")
1178 (synopsis "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)")
1179 (description "This package provides a Python implementation of the HMAC Key
1180 Derivation function (HKDF) defined in RFC 5869.")
1181 (license license:bsd-2)))
1183 (define-public python-spake2
1185 (name "python-spake2")
1190 (uri (pypi-uri "spake2" version))
1193 "1x16r7lrbklvfzbacb66qv9iiih6liq1y612dqh2chgf555n2yn1"))))
1194 (build-system python-build-system)
1196 `(("python-hkdf" ,python-hkdf)))
1197 (home-page "https://github.com/warner/python-spake2")
1198 (synopsis "SPAKE2 password-authenticated key exchange in Python")
1199 (description "This package provides a Python implementation of the SPAKE2
1200 Password-Authenticated Key Exchange algorithm.")
1201 (license license:expat)))
1203 (define-public python-txtorcon
1205 (name "python-txtorcon")
1210 (uri (pypi-uri "txtorcon" version))
1213 "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
1214 (build-system python-build-system)
1216 ;; The tests fail immediately due to a missing file. Reported upstream:
1217 ;; <https://github.com/meejah/txtorcon/issues/330>
1220 `(("python-automat" ,python-automat)
1221 ("python-idna" ,python-idna)
1222 ("python-incremental" ,python-incremental)
1223 ("python-service-identity" ,python-service-identity)
1224 ("python-twisted" ,python-twisted)
1225 ("python-zope-interface" ,python-zope-interface)))
1226 (home-page "https://github.com/meejah/txtorcon")
1227 (synopsis "Twisted-based Tor controller client")
1228 (description "This package provides a Twisted-based Tor controller client,
1229 with state-tracking and configuration abstractions.")
1230 (license license:expat)))
1232 (define-public python-keyutils
1234 (name "python-keyutils")
1239 (uri (pypi-uri "keyutils" version))
1242 "0lipygpzhwzzsq2k5imb1jgkmj8y4khxdwhzadjs3bd56g6bmkx9"))))
1243 (build-system python-build-system)
1245 `(("python-pytest" ,python-pytest)
1246 ("python-pytest-runner" ,python-pytest-runner)))
1248 `(("keyutils" ,keyutils)))
1251 (home-page "https://github.com/sassoftware/python-keyutils")
1252 (synopsis "Python bindings for keyutils")
1254 "This is a set of python bindings for keyutils, a key management suite
1255 that leverages the infrastructure provided by the Linux kernel for safely
1256 storing and retrieving sensitive information in your programs.")
1257 (license license:asl2.0)))
1259 (define-public python-mcuboot-imgtool
1261 (name "python-mcuboot-imgtool")
1267 (url "https://github.com/JuulLabs-OSS/mcuboot")
1268 (commit (string-append "v" version))))
1269 (file-name (git-file-name name version))
1272 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
1273 (build-system python-build-system)
1276 (modify-phases %standard-phases
1277 (add-after 'unpack 'fix-broken-test
1279 (substitute* "scripts/imgtool/keys/ed25519_test.py"
1280 (("raw_sign") "sign_digest"))
1282 (add-before 'build 'change-directory
1287 `(("python-click" ,python-click)
1288 ("python-intelhex" ,python-intelhex)
1289 ("python-cryptography" ,python-cryptography)))
1290 (home-page "https://mcuboot.com")
1291 (synopsis "Tool to securely sign firmware images for booting by MCUboot")
1292 (description "MCUboot is a secure bootloader for 32-bit MCUs. This
1293 package provides a tool to securely sign firmware images for booting by
1295 (license license:expat)))
1297 (define-public python-ntlm-auth
1299 (name "python-ntlm-auth")
1304 (uri (pypi-uri "ntlm-auth" version))
1307 "16mavidki4ma5ip8srqalr19gz4f5yn3cnmmgps1fmgfr24j63rm"))))
1308 (build-system python-build-system)
1310 `(("python-cryptography" ,python-cryptography)))
1311 (home-page "https://github.com/jborean93/ntlm-auth")
1313 "Calculates NTLM Authentication codes")
1315 "This library handles the low-level details of NTLM authentication for
1316 use in authenticating with a service that uses NTLM. It will create and parse
1317 the 3 different message types in the order required and produce a base64
1318 encoded value that can be attached to the HTTP header.
1320 The goal of this library is to offer full NTLM support including signing and
1321 sealing of messages as well as supporting MIC for message integrity and the
1322 ability to customise and set limits on the messages sent. Please see Features
1323 and Backlog for a list of what is and is not currently supported.")
1324 (license license:expat)))
1326 (define-public python-secretstorage
1328 (name "python-secretstorage")
1333 (uri (pypi-uri "SecretStorage" version))
1336 "1xmzr0j3066s220bss4nkgqbiwb5k4kkp2rkpqlqwjb5kfc8mnhm"))))
1337 (build-system python-build-system)
1339 '(#:tests? #f)) ; Tests require a running dbus service.
1341 `(("python-cryptography" ,python-cryptography)
1342 ("python-jeepney" ,python-jeepney)))
1343 (home-page "https://github.com/mitya57/secretstorage")
1344 (synopsis "Python bindings to FreeDesktop.org Secret Service API")
1346 "@code{python-secretstorage} provides a way for securely storing passwords
1347 and other secrets. It uses D-Bus Secret Service API that is supported by GNOME
1348 Keyring (since version 2.30) and KSecretsService. SecretStorage supports most
1349 of the functions provided by Secret Service, including creating and deleting
1350 items and collections, editing items, locking and unlocking collections
1351 (asynchronous unlocking is also supported).")
1352 (license license:bsd-3)))
1354 (define-public python-trustme
1356 (name "python-trustme")
1361 (uri (pypi-uri "trustme" version))
1363 (base32 "0v3vr5z6apnfmklf07m45kv5kaqvm6hxrkaqywch57bjd2siiywx"))))
1364 (build-system python-build-system)
1367 (modify-phases %standard-phases
1369 (lambda* (#:key inputs outputs #:allow-other-keys)
1370 (add-installed-pythonpath inputs outputs)
1371 (invoke "pytest" "-vv"))))))
1373 `(("python-more-itertools" ,python-more-itertools)
1374 ("python-pyopenssl" ,python-pyopenssl)
1375 ("python-pytest" ,python-pytest)
1376 ("python-pytest-cov" ,python-pytest-cov)
1377 ("python-service-identity" ,python-service-identity)
1378 ("python-zipp" ,python-zipp)))
1380 `(("python-cryptography" ,python-cryptography)))
1381 (home-page "https://github.com/python-trio/trustme")
1382 (synopsis "Fake a certificate authority for tests")
1384 "@code{trustme} is a tiny Python package that does one thing: it gives you
1385 a fake certificate authority (CA) that you can use to generate fake TLS certs to
1386 use in your tests.")
1387 ;; Either license applies.
1388 (license (list license:expat license:asl2.0))))
1390 (define-public python-certipy
1392 (name "python-certipy")
1397 (uri (pypi-uri "certipy" version))
1400 "0n980gqpzh0fm58h3i4mi2i10wgj606lscm1r5sk60vbf6vh8mv9"))))
1401 (build-system python-build-system)
1403 `(("python-pyopenssl" ,python-pyopenssl)))
1405 `(("python-pytest" ,python-pytest)))
1406 (home-page "https://github.com/LLNL/certipy")
1407 (synopsis "Utility to create and sign CAs and certificates")
1409 "Certipy was made to simplify the certificate creation process. To that
1410 end, certipy exposes methods for creating and managing certificate authorities,
1411 certificates, signing and building trust bundles.")
1412 (license license:bsd-3)))
1414 (define-public python-jeepney
1416 (name "python-jeepney")
1421 (uri (pypi-uri "jeepney" version))
1424 "1fz9lb5fl831sijg2j0sbki698j2z6awbblas7mz3gp9jz2xi9hb"))))
1425 (build-system python-build-system)
1427 `(("python-testpath" ,python-testpath)
1428 ("python-tornado" ,python-tornado)
1429 ("python-pytest" ,python-pytest)))
1430 (home-page "https://gitlab.com/takluyver/jeepney")
1431 (synopsis "Low-level, pure Python DBus protocol wrapper")
1433 "This is a low-level, pure Python DBus protocol client. It has an
1434 I/O-free core, and integration modules for different event loops.")
1435 (license license:expat)))
1437 (define-public python-argon2-cffi
1439 (name "python-argon2-cffi")
1444 (uri (pypi-uri "argon2-cffi" version))
1447 "0zgr4mnnm0p4i99023safb0qb8cgvl202nly1rvylk2b7qnrn0nq"))
1448 (modules '((guix build utils)))
1449 (snippet '(begin (delete-file-recursively "extras") #t))))
1450 (build-system python-build-system)
1453 (modify-phases %standard-phases
1456 (setenv "ARGON2_CFFI_USE_SYSTEM" "1")
1457 (invoke "python" "setup.py" "build")))
1459 (lambda* (#:key inputs outputs #:allow-other-keys)
1460 (add-installed-pythonpath inputs outputs)
1462 (invoke "python" "-m" "argon2" "--help")
1464 (invoke "python" "-m" "argon2" "-n" "1" "-t" "1" "-m" "8" "-p" "1"))))))
1466 `(("python-cffi" ,python-cffi)
1467 ("python-six" ,python-six)))
1468 (inputs `(("argon2" ,argon2)))
1470 `(("python-hypothesis" ,python-hypothesis)
1471 ("python-pytest" ,python-pytest)))
1472 (home-page "https://argon2-cffi.readthedocs.io/")
1473 (synopsis "Secure Password Hashes for Python")
1475 "Argon2 is a secure password hashing algorithm. It is designed to have
1476 both a configurable runtime as well as memory consumption. This means that you
1477 can decide how long it takes to hash a password and how much memory is required.")
1478 (license license:expat)))
1480 (define-public python-privy
1482 (name "python-privy")
1488 ;; Releases are untagged
1489 (url "https://github.com/ofek/privy")
1490 (commit "2838db3df239797c71bddacc48a4c49a83f35747")))
1491 (file-name (git-file-name name version))
1494 "1m32dh5fqc8cy7jyf1z5fs6zvmdkbq5fi98hr609gbl7s0l0y0i9"))))
1495 (build-system python-build-system)
1498 (modify-phases %standard-phases
1501 (invoke "python" "-m" "pytest"))))))
1503 `(("python-pytest" ,python-pytest)))
1505 `(("python-argon2-cffi" ,python-argon2-cffi)
1506 ("python-cryptography" ,python-cryptography)))
1507 (home-page "https://www.dropbox.com/developers")
1508 (synopsis "Library to password-protect your data")
1510 "Privy is a small and fast utility for password-protecting secret
1511 data such as API keys, cryptocurrency wallets, or seeds for digital
1513 (license (list license:expat license:asl2.0)))) ; dual licensed
1515 (define-public python-pgpy
1517 (name "python-pgpy")
1522 (uri (pypi-uri "PGPy" version))
1525 "0i4lqhzdwkjkim3wab0kqadx28z3r5ixlh6qxj4lif4gif56c0m7"))))
1526 (build-system python-build-system)
1528 `(("python-cryptography" ,python-cryptography)
1529 ("python-pyasn1" ,python-pyasn1)
1530 ("python-singledispatch" ,python-singledispatch)
1531 ("python-six" ,python-six)))
1532 (home-page "https://github.com/SecurityInnovation/PGPy")
1533 (synopsis "Python implementation of OpenPGP")
1535 "Currently, PGPy can load keys and signatures of all kinds in both ASCII
1536 armored and binary formats.
1538 It can create and verify RSA, DSA, and ECDSA signatures, at the moment. It
1539 can also encrypt and decrypt messages using RSA and ECDH.")
1540 (license license:bsd-3)))
1542 (define-public python-sop
1549 (uri (pypi-uri "sop" version))
1552 "0gljyjsdn6hdmwlwwb5g5s0c031p6izamvfxp0d39x60af8k5jyf"))))
1553 (build-system python-build-system)
1555 '(#:tests? #f)) ; There are no tests, and unittest throws an error trying
1557 ; TypeError: don't know how to make test from: 0.2.0
1558 (home-page "https://gitlab.com/dkg/python-sop")
1559 (synopsis "Stateless OpenPGP Command-Line Interface")
1561 "The Stateless OpenPGP Command-Line Interface (or sop) is a
1562 specification that encourages OpenPGP implementors to provide a common,
1563 relatively simple command-line API for purposes of object security.
1565 This Python module helps implementers build such a CLI from any implementation
1566 accessible to the Python interpreter.
1568 It does not provide such an implementation itself -- this is just the
1569 scaffolding for the command line, which should make it relatively easy to
1570 supply a handful of python functions as methods to a class.")
1571 (license license:expat))) ; MIT license