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-potr
76 (url "https://github.com/python-otr/pure-python-otr.git")
79 (git-file-name name version))
81 (base32 "1hzw6h01fm216nmipyylgz0zybd80w1xsk12m7djycnhqrnrvvv1"))))
82 (build-system python-build-system)
84 `(("python-pycrypto" ,python-pycrypto)))
85 (synopsis "Python OTR Implementation")
86 (description "Python OTR is an Off-The-Record Protocol Implementation in
87 Python. It does not bind to libotr.")
88 (home-page "https://github.com/python-otr/pure-python-otr")
89 (license license:lgpl3+)))
91 (define-public python-base58
93 (name "python-base58")
98 (uri (pypi-uri "base58" version))
101 "0q1yr0n5jaf17xq98m7dma6z4rh8p19ch55l1s09gi3rk5ckqycs"))))
102 (build-system python-build-system)
104 `(("python-pyhamcrest" ,python-pyhamcrest)))
105 (home-page "https://github.com/keis/base58")
106 (synopsis "Base58 and Base58Check implementation")
107 (description "Base58 and Base58Check implementation compatible
108 with what is used by the Bitcoin network.")
109 (license license:expat)))
111 (define-public python-bcrypt
113 (name "python-bcrypt")
118 (uri (pypi-uri "bcrypt" version))
120 (base32 "0hhywhxx301cxivgxrpslrangbfpccc8y83qbwn1f57cab3nj00b"))))
121 (build-system python-build-system)
123 `(("python-pycparser" ,python-pycparser)
124 ("python-pytest" ,python-pytest)))
126 `(("python-cffi" ,python-cffi)
127 ("python-six" ,python-six)))
128 (home-page "https://github.com/pyca/bcrypt/")
130 "Modern password hashing library")
132 "Bcrypt is a Python module which provides a password hashing method based
133 on the Blowfish password hashing algorithm, as described in
134 @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
135 Password Scheme\"} by Niels Provos and David Mazieres.")
136 (license license:asl2.0)))
138 (define-public python2-bcrypt
139 (package-with-python2 python-bcrypt))
141 (define-public python-passlib
143 (name "python-passlib")
148 (uri (pypi-uri "passlib" version))
150 (base32 "1a5ngap7kq0b4azq8nlfg6xg5bcl1i0v1sbynhmbr631jgpnqrld"))))
151 (build-system python-build-system)
153 `(("python-nose" ,python-nose)))
155 `(("python-py-bcrypt" ,python-py-bcrypt)))
158 (modify-phases %standard-phases
159 (add-before 'check 'set-PYTHON_EGG_CACHE
160 ;; some tests require access to "$HOME/.cython"
161 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
162 (home-page "https://bitbucket.org/ecollins/passlib")
163 (synopsis "Comprehensive password hashing framework")
165 "Passlib is a password hashing library for Python 2 & 3, which provides
166 cross-platform implementations of over 30 password hashing algorithms, as well
167 as a framework for managing existing password hashes. It's designed to be
168 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
169 to providing full-strength password hashing for multi-user application.")
170 (license license:bsd-3)))
172 (define-public python2-passlib
173 (package-with-python2 python-passlib))
175 (define-public python-py-bcrypt
177 (name "python-py-bcrypt")
182 (uri (pypi-uri "py-bcrypt" version))
185 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
186 (build-system python-build-system)
187 (home-page "https://code.google.com/p/py-bcrypt")
189 "Bcrypt password hashing and key derivation")
191 "A python wrapper of OpenBSD's Blowfish password hashing code. This
192 system hashes passwords using a version of Bruce Schneier's Blowfish block
193 cipher with modifications designed to raise the cost of off-line password
194 cracking and frustrate fast hardware implementation. The computation cost of
195 the algorithm is parametrised, so it can be increased as computers get faster.
196 The intent is to make a compromise of a password database less likely to
197 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
199 ;; "sha2.c" is under BSD-3;
200 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
201 ;; the rest is under ISC.
202 (license (list license:isc license:bsd-3 license:bsd-4))))
204 (define-public python2-py-bcrypt
205 (package-with-python2 python-py-bcrypt))
207 (define-public python-pyblake2
209 (name "python-pyblake2")
214 (uri (pypi-uri "pyblake2" version))
217 "0gz9hgznv5zw4qjq43xa56y0yikimx30gffvibxzm0nv5sq7xk2w"))))
218 (build-system python-build-system)
219 (home-page "https://github.com/dchest/pyblake2")
220 (synopsis "BLAKE2 hash function for Python")
221 (description "BLAKE2 is a cryptographic hash function, which offers
222 stronger security while being as fast as MD5 or SHA-1, and comes in two
223 flavors: @code{BLAKE2b}, optimized for 64-bit platforms and produces digests
224 of any size between 1 and 64 bytes, and @code{BLAKE2s}, optimized for 8- to
225 32-bit platforms and produces digests of any size between 1 and 32 bytes.
227 This package provides a Python interface for BLAKE2.")
228 ;; The COPYING file declares it as public domain, with the option to
229 ;; alternatively use and redistribute it under a variety of permissive
230 ;; licenses. cc0 is explicitly mentioned in setup.py and pyblake2module.c.
231 (license (list license:public-domain license:cc0))))
233 (define-public python-paramiko
235 (name "python-paramiko")
240 (uri (pypi-uri "paramiko" version))
242 (base32 "0dahwq623jnna7gsr9j0mkwr9k2n1pvkapjryhcx508d5jxg8dkz"))))
243 (build-system python-build-system)
245 `(;; FIXME: Tests require many unpackaged libraries, see dev-requirements.txt.
248 `(("python-bcrypt" ,python-bcrypt)
249 ("python-pyasn1" ,python-pyasn1)
250 ("python-pynacl" ,python-pynacl)
251 ("python-cryptography" ,python-cryptography)))
252 (home-page "https://www.paramiko.org/")
253 (synopsis "SSHv2 protocol library")
254 (description "Paramiko is a python implementation of the SSHv2 protocol,
255 providing both client and server functionality. While it leverages a Python C
256 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
257 Python interface around SSH networking concepts.")
258 (license license:lgpl2.1+)))
260 (define-public python2-paramiko
261 (package-with-python2 python-paramiko))
263 (define-public python-ecdsa
265 (name "python-ecdsa")
270 (uri (pypi-uri "ecdsa" version))
272 (base32 "13nx5cbfxc0gnax5zwdmp9xc40qd1llk62mv85jyrvqkbw017ik4"))))
273 (build-system python-build-system)
276 (modify-phases %standard-phases
278 (lambda _ (invoke "pytest"))))))
280 `(("python-six" ,python-six)))
282 `(("openssl" ,openssl)
283 ("python-pytest" ,python-pytest)))
284 (home-page "https://github.com/warner/python-ecdsa")
285 (synopsis "ECDSA cryptographic signature library (pure python)")
287 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
288 Curve Digital Signature Algorithm), implemented purely in Python. With this
289 library, you can quickly create keypairs (signing key and verifying key), sign
290 messages, and verify the signatures. The keys and signatures are very short,
291 making them easy to handle and incorporate into other protocols.")
292 (license license:expat)))
294 (define-public python2-ecdsa
295 (package-with-python2 python-ecdsa))
297 ;;; Pycrypto is abandoned upstream:
299 ;;; https://github.com/dlitz/pycrypto/issues/173
301 ;;; TODO Remove this package from GNU Guix.
302 (define-public python-pycrypto
304 (name "python-pycrypto")
309 (uri (pypi-uri "pycrypto" version))
310 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"
311 "python-pycrypto-time-clock.patch"))
314 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
315 (build-system python-build-system)
321 (modify-phases %standard-phases
322 (add-before 'build 'set-build-env
323 ;; pycrypto runs an autoconf configure script behind the scenes
324 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
325 (home-page "https://www.dlitz.net/software/pycrypto/")
326 (synopsis "Cryptographic modules for Python")
328 "Pycrypto is a collection of both secure hash functions (such as SHA256
329 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
330 etc.). The package is structured to make adding new modules easy.")
331 (license license:public-domain)))
333 (define-public python2-pycrypto
334 (let ((pycrypto (package-with-python2 python-pycrypto)))
335 (package (inherit pycrypto)
337 `(("python" ,python-2)
340 (package-inputs pycrypto)))))))
342 (define-public python-kerberos
344 (name "python-kerberos")
349 (uri (pypi-uri "kerberos" version))
352 "19663qxmma0i8bfbjc2iwy5hgq0g4pfb75r023v5dps68zfvffgh"))))
353 (build-system python-build-system)
355 `(("mit-krb5" ,mit-krb5)))
356 (home-page "https://github.com/apple/ccs-pykerberos")
358 "Python Kerberos library used by CalendarServer")
360 "This Python package is a high-level wrapper for Kerberos (GSSAPI)
361 operations. The goal is to avoid having to build a module that wraps the
362 entire Kerberos.framework, and instead offer a limited set of functions that
363 do what is needed for client/server Kerberos authentication based on
364 <http://www.ietf.org/rfc/rfc4559.txt>.")
365 (license license:asl2.0)))
367 (define-public python-keyring
369 (name "python-keyring")
374 (uri (pypi-uri "keyring" version))
377 "1k0w3yh3fz0qp0cvkxdiinq9jzbrnc6bd88qpjz34x3cgcr94psz"))
378 (modules '((guix build utils)))
380 ;; https://github.com/jaraco/keyring/issues/414
381 '(begin (substitute* "tests/test_packaging.py"
382 (("ep, =") "(ep,) =")) #t))))
383 (build-system python-build-system)
386 (modify-phases %standard-phases
389 ;; Not clear why this test fails.
390 (delete-file "tests/test_packaging.py")
391 (substitute* "pytest.ini"
393 (invoke "pytest"))))))
395 `(("python-pytest" ,python-pytest)
396 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
397 ("python-pytest-cov" ,python-pytest-cov)
398 ("python-pytest-flake8" ,python-pytest-flake8)
399 ("python-setuptools-scm" ,python-setuptools-scm)))
401 `(("python-importlib-metadata" ,python-importlib-metadata)
402 ("python-secretstorage" ,python-secretstorage)))
403 (home-page "https://github.com/jaraco/keyring")
404 (synopsis "Store and access your passwords safely")
406 "The Python keyring lib provides a easy way to access the system keyring
407 service from python. It can be used in any application that needs safe
409 ;; "MIT" and PSF dual license
410 (properties `((python2-variant . ,(delay python2-keyring))))
411 (license license:x11)))
413 (define-public python2-keyring
414 (let ((keyring (package-with-python2
415 (strip-python2-variant python-keyring))))
418 (name "python2-keyring")
423 (uri (pypi-uri "keyring" version))
426 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
428 `(#:python ,python-2))
430 `(("python2-pytest" ,python2-pytest)
431 ("python2-pytest-runner" ,python2-pytest-runner)
432 ("python2-setuptools-scm" ,python2-setuptools-scm)))
434 `(("python2-pycrypto" ,python2-pycrypto))))))
436 (define-public python-keyrings.alt
438 (name "python-keyrings.alt")
443 (uri (pypi-uri "keyrings.alt" version))
446 "0gdjdqpq2hf770p6iwi891mil0vbsdhvy88x0v8b2w4y4b28lcli"))
447 (modules '((guix build utils)))
450 (delete-file "keyrings/alt/_win_crypto.py")
451 ;; Rely on python-keyring>20:
452 ;; https://github.com/jaraco/keyrings.alt/issues/33
453 (substitute* '("keyrings/alt/tests/test_Gnome.py"
454 "keyrings/alt/tests/test_Google.py"
455 "keyrings/alt/tests/test_Windows.py"
456 "keyrings/alt/tests/test_file.py"
457 "keyrings/alt/tests/test_pyfs.py")
458 (("keyring.tests.test_backend") "keyring.testing.backend")
459 (("keyring.tests.util") "keyring.testing.util"))
461 (build-system python-build-system)
463 `(("python-keyring" ,python-keyring)
464 ("python-pytest" ,python-pytest)
465 ("python-setuptools-scm" ,python-setuptools-scm)))
466 (home-page "https://github.com/jaraco/keyrings.alt")
467 (synopsis "Alternate keyring implementations")
468 (description "Keyrings in this package may have security risks or other
469 implications. These backends were extracted from the main keyring project to
470 make them available for those who wish to employ them, but are discouraged for
471 general production use. Include this module and use its backends at your own
473 (license license:expat)))
475 (define-public python-certifi
477 (name "python-certifi")
478 (version "2020.4.5.1")
481 (uri (pypi-uri "certifi" version))
484 "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i"))))
485 (build-system python-build-system)
486 (arguments '(#:tests? #f)) ;no tests
487 (home-page "https://certifi.io/")
488 (synopsis "Python CA certificate bundle")
490 "Certifi is a Python library that contains a CA certificate bundle, which
491 is used by the Requests library to verify HTTPS requests.")
492 (license license:asl2.0)))
494 (define-public python2-certifi
495 (package-with-python2 python-certifi))
497 (define-public python-cryptography-vectors
499 (name "python-cryptography-vectors")
504 (uri (pypi-uri "cryptography_vectors" version))
507 "1d4iykcv7cn9j399hczlxm5pzxmqy6d80h3j16dkjwlmv3293b4r"))))
508 (build-system python-build-system)
509 (home-page "https://github.com/pyca/cryptography")
510 (synopsis "Test vectors for the cryptography package")
512 "This package contains test vectors for the cryptography package.")
513 ;; Distributed under either BSD-3 or ASL2.0
514 (license (list license:bsd-3 license:asl2.0))))
516 (define-public python2-cryptography-vectors
517 (package-with-python2 python-cryptography-vectors))
519 (define-public python-cryptography
521 (name "python-cryptography")
526 (uri (pypi-uri "cryptography" version))
529 "0af25w5mkd6vwns3r6ai1w5ip9xp0ms9s261zzssbpadzdr05hx0"))))
530 (build-system python-build-system)
532 `(("openssl" ,openssl)))
534 `(("python-asn1crypto" ,python-asn1crypto)
535 ("python-cffi" ,python-cffi)
536 ("python-six" ,python-six)
537 ("python-idna" ,python-idna)
538 ("python-iso8601" ,python-iso8601)))
540 `(("python-cryptography-vectors" ,python-cryptography-vectors)
541 ("python-hypothesis" ,python-hypothesis)
542 ("python-pretend" ,python-pretend)
543 ("python-pytz" ,python-pytz)
544 ("python-pytest" ,python-pytest)))
545 (home-page "https://github.com/pyca/cryptography")
546 (synopsis "Cryptographic recipes and primitives for Python")
548 "cryptography is a package which provides cryptographic recipes and
549 primitives to Python developers. It aims to be the “cryptographic standard
550 library” for Python. The package includes both high level recipes, and low
551 level interfaces to common cryptographic algorithms such as symmetric ciphers,
552 message digests and key derivation functions.")
553 ;; Distributed under either BSD-3 or ASL2.0
554 (license (list license:bsd-3 license:asl2.0))
555 (properties `((python2-variant . ,(delay python2-cryptography))))))
557 (define-public python2-cryptography
558 (let ((crypto (package-with-python2
559 (strip-python2-variant python-cryptography))))
560 (package (inherit crypto)
562 `(("python2-ipaddress" ,python2-ipaddress)
563 ("python2-backport-ssl-match-hostname"
564 ,python2-backport-ssl-match-hostname)
565 ("python2-enum34" ,python2-enum34)
566 ,@(package-propagated-inputs crypto))))))
568 (define-public python-pyopenssl
570 (name "python-pyopenssl")
575 (uri (pypi-uri "pyOpenSSL" version))
578 "01wmsq6w0frzbr3zps4ga9kmqjidp2h317jwpq1g9ah24r5lj94s"))))
579 (build-system python-build-system)
582 (modify-phases %standard-phases
584 (add-after 'install 'check
585 (lambda* (#:key inputs outputs #:allow-other-keys)
586 (add-installed-pythonpath inputs outputs)
587 ;; PyOpenSSL runs tests against a certificate with a fixed
588 ;; expiry time. To ensure successful builds in the future,
589 ;; set the time to roughly the release date.
590 (invoke "faketime" "2019-01-01" "py.test" "-v" "-k"
592 ;; This test tries to look up certificates from
593 ;; the compiled-in default path in OpenSSL, which
594 ;; does not exist in the build environment.
595 "not test_fallback_default_verify_paths "
596 ;; This test attempts to make a connection to
597 ;; an external web service.
598 "and not test_set_default_verify_paths")))))))
600 `(("python-cryptography" ,python-cryptography)
601 ("python-six" ,python-six)))
603 `(("openssl" ,openssl)))
605 `(("libfaketime" ,libfaketime)
606 ("python-flaky" ,python-flaky)
607 ("python-pretend" ,python-pretend)
608 ("python-pytest" ,python-pytest)))
609 (home-page "https://github.com/pyca/pyopenssl")
610 (synopsis "Python wrapper module around the OpenSSL library")
612 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
614 (license license:asl2.0)))
616 (define-public python2-pyopenssl
617 (package-with-python2 python-pyopenssl))
619 (define-public python-ed25519
621 (name "python-ed25519")
626 (uri (pypi-uri "ed25519" version))
629 "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499"))))
630 (build-system python-build-system)
631 (home-page "https://github.com/warner/python-ed25519")
632 (synopsis "Ed25519 public-key signatures")
633 (description "Ed25519 public-key signatures")
634 (license license:expat)))
636 (define-public python2-ed25519
637 (package-with-python2 python-ed25519))
639 (define-public python-axolotl-curve25519
641 (name "python-axolotl-curve25519")
642 (version "0.4.1.post2")
646 (uri (pypi-uri "python-axolotl-curve25519" version))
649 "18v3rfyv7xi26fb97nw1xc0l6x8wi0i4xj8dlq4gblpbjxiac187"))))
650 (build-system python-build-system)
651 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
652 (synopsis "Python wrapper for curve25519 library")
653 (description "This is a python wrapper for the curve25519 library
654 with ed25519 signatures. The C code was pulled from
655 libaxolotl-android. At the moment this wrapper is meant for use by
657 (license (list license:gpl3 ; Most files
658 license:bsd-3)))) ; curve/curve25519-donna.c
660 (define-public python2-axolotl-curve25519
661 (package-with-python2 python-axolotl-curve25519))
663 (define-public python-axolotl
665 (name "python-axolotl")
670 (uri (pypi-uri "python-axolotl" version))
673 "1bwdp24fmriffwx91aigs9k162albb51iskp23nc939z893q23py"))))
674 (build-system python-build-system)
677 (modify-phases %standard-phases
678 ;; Don't install tests
679 (add-before 'install 'remove-tests
681 (for-each delete-file-recursively
682 '("axolotl/tests" "build/lib/axolotl/tests"))
685 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
686 ("python-cryptography" ,python-cryptography)
687 ("python-protobuf" ,python-protobuf)))
688 (home-page "https://github.com/tgalal/python-axolotl")
689 (synopsis "Python port of libaxolotl-android")
690 (description "This is a python port of libaxolotl-android. This
691 is a ratcheting forward secrecy protocol that works in synchronous and
692 asynchronous messaging environments.")
693 (license license:gpl3)))
695 (define-public python2-axolotl
696 (package-with-python2 python-axolotl))
698 ;; SlowAES isn't compatible with Python 3.
699 (define-public python2-slowaes
701 (name "python2-slowaes")
706 (uri (pypi-uri "slowaes" version))
709 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
710 (build-system python-build-system)
711 (arguments `(#:python ,python-2))
712 (home-page "http://code.google.com/p/slowaes/")
713 (synopsis "Implementation of AES in Python")
714 (description "This package contains an implementation of AES in Python.
715 This implementation is slow (hence the project name) but still useful when
716 faster ones are not available.")
717 (license license:asl2.0)))
719 (define-public python-pyaes
721 (name "python-pyaes")
726 (uri (pypi-uri "pyaes" version))
729 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
730 (build-system python-build-system)
731 (home-page "https://github.com/ricmoo/pyaes")
732 (synopsis "Implementation of AES in Python")
733 (description "This package contains a pure-Python implementation of the
734 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
736 (license license:expat)))
738 (define-public python2-pyaes
739 (package-with-python2 python-pyaes))
741 (define-public python-asn1crypto
743 (name "python-asn1crypto")
749 (url "https://github.com/wbond/asn1crypto")
751 (file-name (git-file-name name version))
754 "10lai2cs5mnz3gpaffbw1m7b885ls8328q5wxm35vfmcip1f0xmb"))))
755 (build-system python-build-system)
756 (home-page "https://github.com/wbond/asn1crypto")
757 (synopsis "ASN.1 parser and serializer in Python")
758 (description "asn1crypto is an ASN.1 parser and serializer with definitions
759 for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7,
760 PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
761 (license license:expat)))
763 (define-public python2-asn1crypto
764 (package-with-python2 python-asn1crypto))
766 (define-public python-pynacl
768 (name "python-pynacl")
773 (uri (pypi-uri "PyNaCl" version))
774 (modules '((guix build utils)))
777 ;; Remove spurious dependency on python-wheel, can be removed
779 (substitute* "setup.py"
781 ;; Remove bundled libsodium.
782 (delete-file-recursively "src/libsodium")
786 "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal"))))
787 (build-system python-build-system)
789 `(#:modules (,@%python-build-system-modules
794 (modify-phases (@ (guix build python-build-system) %standard-phases)
795 (add-before 'build 'use-system-sodium
797 (setenv "SODIUM_INSTALL" "system")
801 (let ((build-directory
802 (car (scandir "build" (cut string-prefix? "lib" <>)))))
804 (string-append "./build/" build-directory ":"
805 (getenv "PYTHONPATH")))
806 (invoke "pytest" "-vv")))))))
808 `(("python-hypothesis" ,python-hypothesis)
809 ("python-pytest" ,python-pytest)))
811 `(("python-cffi" ,python-cffi)
812 ("python-six" ,python-six)
813 ("libsodium" ,libsodium)))
814 (home-page "https://github.com/pyca/pynacl/")
815 (synopsis "Python bindings to libsodium")
817 "PyNaCl is a Python binding to libsodium, which is a fork of the
818 Networking and Cryptography library. These libraries have a stated goal
819 of improving usability, security and speed.")
820 (license license:asl2.0)))
822 (define-public python2-pynacl
823 (package-with-python2 python-pynacl))
825 (define-public python2-pgpdump
827 (name "python2-pgpdump")
832 (uri (pypi-uri "pgpdump" version))
835 "0s4nh8h7qsdj2yf29bspjs1zvxd4lcd11r6g11dp7fppgf2h0iqw"))))
836 (build-system python-build-system)
838 ;; Currently fails to build with Python 3.
839 (arguments `(#:python ,python-2))
841 (home-page "https://github.com/toofishes/python-pgpdump")
842 (synopsis "Python library for parsing PGP packets")
844 "Python-pgpdump is an OpenPGP packet parser based on
845 @uref{http://www.mew.org/~kazu/proj/pgpdump/, pgpdump}. It notably supports:
848 @item signature packets;
849 @item public key packets;
850 @item secret key packets;
851 @item trust, user ID, and user attribute packets;
852 @item ASCII-armor decoding and CRC check.
854 (license license:bsd-3)))
856 (define-public python2-roca-detect
858 (name "python2-roca-detect")
863 (uri (pypi-uri "roca-detect" version))
866 "1di4akyw2lf5r8zfwvyhkilz8jv8g4b66rgaqwfabmjwma6gnw27"))))
867 (build-system python-build-system)
869 ;; TODO: apk_parse_ph4, pyjks
870 `(("python2-dateutil" ,python2-dateutil)
871 ("python2-six" ,python2-six)
872 ("python2-cryptography" ,python2-cryptography)
873 ("python2-future" ,python2-future)
874 ("python2-coloredlogs" ,python2-coloredlogs)
875 ("python2-pgpdump" ,python2-pgpdump)))
877 `(;; Basic testing routine is quite simple and works with Py3
878 ;; but the rest of the code that processes the different
879 ;; key formats and extracts the modulus for inspection is
880 ;; not yet fully py3 ready.
882 (home-page "https://github.com/crocs-muni/roca")
883 (synopsis "ROCA detection tool")
885 "This tool is related to the paper entitled @i{Return of the
886 Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli}. It
887 enables you to test public RSA keys for a presence of the described
888 vulnerability. Currently the tool supports the following key formats: X.509
889 Certificate (DER encoded, PEM encoded), RSA PEM (encoded private key, public
890 key), SSH public key, ASC-encoded OpenPGP key, APK Android application, LDIFF
892 (license license:gpl3)))
894 (define-public python-blurhash
896 (name "python-blurhash")
900 ;; Tests not included in pypi release and releases not tagged in git repo.
903 (url "https://github.com/halcy/blurhash-python")
904 (commit "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8")))
905 (file-name (git-file-name name version))
908 "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"))))
909 (build-system python-build-system)
912 (modify-phases %standard-phases
915 (delete-file "setup.cfg")
916 (invoke "pytest"))))))
918 `(("python-numpy" ,python-numpy)
919 ("python-pillow" ,python-pillow)
920 ("python-pytest" ,python-pytest)))
921 (home-page "https://github.com/halcy/blurhash-python")
923 "Pure-Python implementation of the blurhash algorithm")
925 "Pure-Python implementation of the blurhash algorithm.")
926 (license license:expat)))
928 (define-public python-ecpy
935 (uri (pypi-uri "ECPy" version))
938 "1gc3i5s93zq6x1nkaxkq1dvmsc12vmrw0hns9f5s1hcb78ni52c8"))))
939 (build-system python-build-system)
941 `(("python-future" ,python-future)))
942 (home-page "https://github.com/ubinity/ECPy")
943 (synopsis "Pure Python Elliptic Curve Library")
944 (description "This package provides a Elliptic Curve Library in pure
946 (license license:asl2.0)))
948 (define-public python2-ecpy
949 (package-with-python2 python-ecpy))
951 (define-public python-josepy
953 (name "python-josepy")
957 (uri (pypi-uri "josepy" version))
960 "11khz8malzrv375b27jjkv66z6z6khdx1v5mkkr4vq16gp3n4p7v"))))
961 (build-system python-build-system)
963 ;; The tests require flake8 >= 3.5, which is not yet packaged.
966 `(("python-cryptography" ,python-cryptography)
967 ("python-pyopenssl" ,python-pyopenssl)
968 ("python-six" ,python-six)))
969 ;; TODO Enable when we have flake8 >= 3.5.
971 ; `(("python-coverage" ,python-coverage)
972 ; ("python-flake8" ,python-flake8)
973 ; ("python-isort" ,python-isort)
974 ; ("python-mock" ,python-mock)
975 ; ("python-pytest" ,python-pytest)
976 ; ("python-pytest-cov" ,python-pytest-cov)
977 ; ("python-pytest-cache" ,python-pytest-cache)
978 ; ("python-pytest-flake8" ,python-pytest-flake8)))
979 (home-page "https://github.com/certbot/josepy")
980 (synopsis "JOSE protocol implementation in Python")
981 (description "This package provides a Python implementation of the JOSE
982 protocol (Javascript Object Signing and Encryption).")
983 (license license:asl2.0)))
985 (define-public python2-josepy
986 (package-with-python2 python-josepy))
988 (define-public python-pycryptodome
990 (name "python-pycryptodome")
995 (uri (pypi-uri "pycryptodome" version))
998 "0dh6ky5ngxayyn5f6n7gdamjl49g3khz6pdx9sdnag1zwi8248hs"))))
999 (build-system python-build-system)
1000 (home-page "https://www.pycryptodome.org")
1001 (synopsis "Cryptographic library for Python")
1002 (description "This package provides a cryptographic library for Python.
1004 It brings the following enhancements with respect to the last official version
1008 @item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
1009 @item Accelerated AES on Intel platforms via AES-NI
1010 @item First class support for PyPy
1011 @item Elliptic curves cryptography (NIST P-256 curve only)
1012 @item Better and more compact API (nonce and iv attributes for ciphers,
1013 automatic generation of random nonces and IVs, simplified CTR cipher mode, and
1015 @item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
1016 @item Salsa20 and ChaCha20 stream ciphers
1017 @item scrypt and HKDF
1018 @item Deterministic (EC)DSA
1019 @item Password-protected PKCS#8 key containers
1020 @item Shamir’s Secret Sharing scheme
1021 @item Random numbers get sourced directly from the OS (and not from a CSPRNG
1023 @item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
1024 @item Major clean ups and simplification of the code base
1026 (license license:bsd-2)))
1028 (define-public python2-pycryptodome
1029 (package-with-python2 python-pycryptodome))
1031 (define-public python-m2crypto
1033 (name "python-m2crypto")
1038 (uri (pypi-uri "M2Crypto" version))
1040 (base32 "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc"))))
1041 (build-system python-build-system)
1042 (inputs `(("openssl" ,openssl)))
1043 (native-inputs `(("swig" ,swig)))
1044 (home-page "https://gitlab.com/m2crypto/m2crypto")
1045 (synopsis "Python crypto and TLS toolkit")
1046 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
1047 featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
1048 (including AES); TLS functionality to implement clients and servers; HTTPS
1049 extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
1050 AuthCookies for web session management; FTP/TLS client and server; S/MIME;
1051 M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
1052 through the Engine interface.")
1053 (properties `((python2-variant . ,(delay python2-m2crypto))))
1054 (license license:expat)))
1056 (define-public python2-m2crypto
1057 (let ((m2crypto (package-with-python2
1058 (strip-python2-variant python-m2crypto))))
1059 (package (inherit m2crypto)
1061 `(("python2-typing" ,python2-typing))))))
1063 (define-public python-pylibscrypt
1065 (name "python-pylibscrypt")
1070 (uri (pypi-uri "pylibscrypt" version))
1073 "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
1074 (build-system python-build-system)
1077 (modify-phases %standard-phases
1078 (add-before 'build 'hard-code-path-to-libscrypt
1079 (lambda* (#:key inputs #:allow-other-keys)
1080 (let ((libscrypt (assoc-ref inputs "libscrypt")))
1081 (substitute* "pylibscrypt/pylibscrypt.py"
1082 (("find_library\\('scrypt'\\)")
1083 (string-append "'" libscrypt "/lib/libscrypt.so'")))
1085 ;; The library can use various scrypt implementations and tests all of
1086 ;; them. Since we only provide a single implementation, most tests
1087 ;; fail. Simply skip them.
1089 ;; FIXME: Using "libscrypt" is the second best choice. The best one
1090 ;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
1091 ;; 1.1+. Use that as soon as Guix provides it.
1093 `(("libscrypt" ,libscrypt)))
1094 (home-page "https://github.com/jvarho/pylibscrypt")
1095 (synopsis "Scrypt for Python")
1096 (description "There are a lot of different scrypt modules for Python, but
1097 none of them have everything that I'd like, so here's one more. It uses
1099 (license license:isc)))
1101 (define-public python-libnacl
1103 (name "python-libnacl")
1108 (uri (pypi-uri "libnacl" version))
1111 "0nv7n8nfswkhl614x5mllrkvaslraa0053q11iylb337cy43vb4v"))))
1112 (build-system python-build-system)
1115 (modify-phases %standard-phases
1116 (add-after 'unpack 'locate-libsodium
1117 (lambda* (#:key inputs #:allow-other-keys)
1118 (substitute* "libnacl/__init__.py"
1119 (("(return ctypes.cdll.LoadLibrary\\(')libsodium.so('\\))"
1121 (let ((libsodium (string-append (assoc-ref inputs "libsodium")
1122 "/lib/libsodium.so")))
1123 (string-append pre libsodium post)))))))))
1125 `(("python-pyhamcrest" ,python-pyhamcrest)))
1127 `(("libsodium" ,libsodium)))
1128 (home-page "https://libnacl.readthedocs.org/")
1129 (synopsis "Python bindings for libsodium based on ctypes")
1130 (description "@code{libnacl} is used to gain direct access to the
1131 functions exposed by @code{NaCl} library via @code{libsodium}. It has
1132 been constructed to maintain extensive documentation on how to use
1133 @code{NaCl} as well as being completely portable.")
1134 (license license:asl2.0)))
1136 (define-public python-scrypt
1138 (name "python-scrypt")
1143 (uri (pypi-uri "scrypt" version))
1146 "0hjk71k3mgnl8siikm9lii9im8kv0rb7inkjzx78rnancra48xxr"))))
1147 (build-system python-build-system)
1149 `(("openssl" ,openssl)))
1150 (home-page "https://bitbucket.org/mhallin/py-scrypt")
1151 (synopsis "Bindings for the scrypt key derivation function library")
1152 (description "This is a set of Python bindings for the scrypt key
1153 derivation function.")
1154 (license license:bsd-2)))
1156 (define-public python-service-identity
1158 (name "python-service-identity")
1163 (uri (pypi-uri "service_identity" version))
1166 "0b9f5qiqjy8ralzgwjgkhx82h6h8sa7532psmb8mkd65md5aan08"))))
1167 (build-system python-build-system)
1169 `(("python-attrs" ,python-attrs)
1170 ("python-pyasn1" ,python-pyasn1)
1171 ("python-pyasn1-modules" ,python-pyasn1-modules)
1172 ("python-pyopenssl" ,python-pyopenssl)))
1173 (home-page "https://service-identity.readthedocs.io/")
1174 (synopsis "Service identity verification for PyOpenSSL")
1176 "@code{service_identity} aspires to give you all the tools you need
1177 for verifying whether a certificate is valid for the intended purposes.
1178 In the simplest case, this means host name verification. However,
1179 service_identity implements RFC 6125 fully and plans to add other
1180 relevant RFCs too.")
1181 (license license:expat)))
1183 (define-public python2-service-identity
1184 (package-with-python2 python-service-identity))
1186 (define-public python-hkdf
1188 (name "python-hkdf")
1193 (uri (pypi-uri "hkdf" version))
1196 "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2"))))
1197 (build-system python-build-system)
1199 `(("python-nose" ,python-nose)))
1200 (home-page "https://github.com/casebeer/python-hkdf")
1201 (synopsis "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)")
1202 (description "This package provides a Python implementation of the HMAC Key
1203 Derivation function (HKDF) defined in RFC 5869.")
1204 (license license:bsd-2)))
1206 (define-public python-spake2
1208 (name "python-spake2")
1213 (uri (pypi-uri "spake2" version))
1216 "1x16r7lrbklvfzbacb66qv9iiih6liq1y612dqh2chgf555n2yn1"))))
1217 (build-system python-build-system)
1219 `(("python-hkdf" ,python-hkdf)))
1220 (home-page "https://github.com/warner/python-spake2")
1221 (synopsis "SPAKE2 password-authenticated key exchange in Python")
1222 (description "This package provides a Python implementation of the SPAKE2
1223 Password-Authenticated Key Exchange algorithm.")
1224 (license license:expat)))
1226 (define-public python-txtorcon
1228 (name "python-txtorcon")
1233 (uri (pypi-uri "txtorcon" version))
1236 "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
1237 (build-system python-build-system)
1239 ;; The tests fail immediately due to a missing file. Reported upstream:
1240 ;; <https://github.com/meejah/txtorcon/issues/330>
1243 `(("python-automat" ,python-automat)
1244 ("python-idna" ,python-idna)
1245 ("python-incremental" ,python-incremental)
1246 ("python-service-identity" ,python-service-identity)
1247 ("python-twisted" ,python-twisted)
1248 ("python-zope-interface" ,python-zope-interface)))
1249 (home-page "https://github.com/meejah/txtorcon")
1250 (synopsis "Twisted-based Tor controller client")
1251 (description "This package provides a Twisted-based Tor controller client,
1252 with state-tracking and configuration abstractions.")
1253 (license license:expat)))
1255 (define-public python-keyutils
1257 (name "python-keyutils")
1262 (uri (pypi-uri "keyutils" version))
1265 "0lipygpzhwzzsq2k5imb1jgkmj8y4khxdwhzadjs3bd56g6bmkx9"))))
1266 (build-system python-build-system)
1268 `(("python-pytest" ,python-pytest)
1269 ("python-pytest-runner" ,python-pytest-runner)))
1271 `(("keyutils" ,keyutils)))
1274 (home-page "https://github.com/sassoftware/python-keyutils")
1275 (synopsis "Python bindings for keyutils")
1277 "This is a set of python bindings for keyutils, a key management suite
1278 that leverages the infrastructure provided by the Linux kernel for safely
1279 storing and retrieving sensitive information in your programs.")
1280 (license license:asl2.0)))
1282 (define-public python-mcuboot-imgtool
1284 (name "python-mcuboot-imgtool")
1290 (url "https://github.com/JuulLabs-OSS/mcuboot")
1291 (commit (string-append "v" version))))
1292 (file-name (git-file-name name version))
1295 "1m1csyvzq4jx81zg635ssy1n7sc0z539z0myh872ll3nwqx7wa0q"))))
1296 (build-system python-build-system)
1299 (modify-phases %standard-phases
1300 (add-after 'unpack 'fix-broken-test
1302 (substitute* "scripts/imgtool/keys/ed25519_test.py"
1303 (("raw_sign") "sign_digest"))
1305 (add-before 'build 'change-directory
1310 `(("python-click" ,python-click)
1311 ("python-intelhex" ,python-intelhex)
1312 ("python-cryptography" ,python-cryptography)))
1313 (home-page "https://mcuboot.com")
1314 (synopsis "Tool to securely sign firmware images for booting by MCUboot")
1315 (description "MCUboot is a secure bootloader for 32-bit MCUs. This
1316 package provides a tool to securely sign firmware images for booting by
1318 (license license:expat)))
1320 (define-public python-ntlm-auth
1322 (name "python-ntlm-auth")
1327 (uri (pypi-uri "ntlm-auth" version))
1330 "16mavidki4ma5ip8srqalr19gz4f5yn3cnmmgps1fmgfr24j63rm"))))
1331 (build-system python-build-system)
1333 `(("python-cryptography" ,python-cryptography)))
1334 (home-page "https://github.com/jborean93/ntlm-auth")
1336 "Calculates NTLM Authentication codes")
1338 "This library handles the low-level details of NTLM authentication for
1339 use in authenticating with a service that uses NTLM. It will create and parse
1340 the 3 different message types in the order required and produce a base64
1341 encoded value that can be attached to the HTTP header.
1343 The goal of this library is to offer full NTLM support including signing and
1344 sealing of messages as well as supporting MIC for message integrity and the
1345 ability to customise and set limits on the messages sent. Please see Features
1346 and Backlog for a list of what is and is not currently supported.")
1347 (license license:expat)))
1349 (define-public python-secretstorage
1351 (name "python-secretstorage")
1356 (uri (pypi-uri "SecretStorage" version))
1359 "1xmzr0j3066s220bss4nkgqbiwb5k4kkp2rkpqlqwjb5kfc8mnhm"))))
1360 (build-system python-build-system)
1362 '(#:tests? #f)) ; Tests require a running dbus service.
1364 `(("python-cryptography" ,python-cryptography)
1365 ("python-jeepney" ,python-jeepney)))
1366 (home-page "https://github.com/mitya57/secretstorage")
1367 (synopsis "Python bindings to FreeDesktop.org Secret Service API")
1369 "@code{python-secretstorage} provides a way for securely storing passwords
1370 and other secrets. It uses D-Bus Secret Service API that is supported by GNOME
1371 Keyring (since version 2.30) and KSecretsService. SecretStorage supports most
1372 of the functions provided by Secret Service, including creating and deleting
1373 items and collections, editing items, locking and unlocking collections
1374 (asynchronous unlocking is also supported).")
1375 (license license:bsd-3)))
1377 (define-public python-trustme
1379 (name "python-trustme")
1384 (uri (pypi-uri "trustme" version))
1386 (base32 "0v3vr5z6apnfmklf07m45kv5kaqvm6hxrkaqywch57bjd2siiywx"))))
1387 (build-system python-build-system)
1390 (modify-phases %standard-phases
1392 (lambda* (#:key inputs outputs #:allow-other-keys)
1393 (add-installed-pythonpath inputs outputs)
1394 (invoke "pytest" "-vv"))))))
1396 `(("python-more-itertools" ,python-more-itertools)
1397 ("python-pyopenssl" ,python-pyopenssl)
1398 ("python-pytest" ,python-pytest)
1399 ("python-pytest-cov" ,python-pytest-cov)
1400 ("python-service-identity" ,python-service-identity)
1401 ("python-zipp" ,python-zipp)))
1403 `(("python-cryptography" ,python-cryptography)))
1404 (home-page "https://github.com/python-trio/trustme")
1405 (synopsis "Fake a certificate authority for tests")
1407 "@code{trustme} is a tiny Python package that does one thing: it gives you
1408 a fake certificate authority (CA) that you can use to generate fake TLS certs to
1409 use in your tests.")
1410 ;; Either license applies.
1411 (license (list license:expat license:asl2.0))))
1413 (define-public python-certipy
1415 (name "python-certipy")
1420 (uri (pypi-uri "certipy" version))
1423 "0n980gqpzh0fm58h3i4mi2i10wgj606lscm1r5sk60vbf6vh8mv9"))))
1424 (build-system python-build-system)
1426 `(("python-pyopenssl" ,python-pyopenssl)))
1428 `(("python-pytest" ,python-pytest)))
1429 (home-page "https://github.com/LLNL/certipy")
1430 (synopsis "Utility to create and sign CAs and certificates")
1432 "Certipy was made to simplify the certificate creation process. To that
1433 end, certipy exposes methods for creating and managing certificate authorities,
1434 certificates, signing and building trust bundles.")
1435 (license license:bsd-3)))
1437 (define-public python-jeepney
1439 (name "python-jeepney")
1444 (uri (pypi-uri "jeepney" version))
1446 (base32 "0vp3p1lqhqk2kd3254q5sxr50znmm2hmysc8a7g0fr1brihvhy9l"))))
1447 (build-system python-build-system)
1449 `(("python-testpath" ,python-testpath)
1450 ("python-tornado" ,python-tornado)
1451 ("python-pytest" ,python-pytest)))
1452 (home-page "https://gitlab.com/takluyver/jeepney")
1453 (synopsis "Low-level, pure Python DBus protocol wrapper")
1455 "This is a low-level, pure Python DBus protocol client. It has an
1456 I/O-free core, and integration modules for different event loops.")
1457 (license license:expat)))
1459 (define-public python-argon2-cffi
1461 (name "python-argon2-cffi")
1466 (uri (pypi-uri "argon2-cffi" version))
1469 "0zgr4mnnm0p4i99023safb0qb8cgvl202nly1rvylk2b7qnrn0nq"))
1470 (modules '((guix build utils)))
1471 (snippet '(begin (delete-file-recursively "extras") #t))))
1472 (build-system python-build-system)
1475 (modify-phases %standard-phases
1478 (setenv "ARGON2_CFFI_USE_SYSTEM" "1")
1479 (invoke "python" "setup.py" "build")))
1481 (lambda* (#:key inputs outputs #:allow-other-keys)
1482 (add-installed-pythonpath inputs outputs)
1484 (invoke "python" "-m" "argon2" "--help")
1486 (invoke "python" "-m" "argon2" "-n" "1" "-t" "1" "-m" "8" "-p" "1"))))))
1488 `(("python-cffi" ,python-cffi)
1489 ("python-six" ,python-six)))
1490 (inputs `(("argon2" ,argon2)))
1492 `(("python-hypothesis" ,python-hypothesis)
1493 ("python-pytest" ,python-pytest)))
1494 (home-page "https://argon2-cffi.readthedocs.io/")
1495 (synopsis "Secure Password Hashes for Python")
1497 "Argon2 is a secure password hashing algorithm. It is designed to have
1498 both a configurable runtime as well as memory consumption. This means that you
1499 can decide how long it takes to hash a password and how much memory is required.")
1500 (license license:expat)))
1502 (define-public python-privy
1504 (name "python-privy")
1510 ;; Releases are untagged
1511 (url "https://github.com/ofek/privy")
1512 (commit "2838db3df239797c71bddacc48a4c49a83f35747")))
1513 (file-name (git-file-name name version))
1516 "1m32dh5fqc8cy7jyf1z5fs6zvmdkbq5fi98hr609gbl7s0l0y0i9"))))
1517 (build-system python-build-system)
1520 (modify-phases %standard-phases
1523 (invoke "python" "-m" "pytest"))))))
1525 `(("python-pytest" ,python-pytest)))
1527 `(("python-argon2-cffi" ,python-argon2-cffi)
1528 ("python-cryptography" ,python-cryptography)))
1529 (home-page "https://www.dropbox.com/developers")
1530 (synopsis "Library to password-protect your data")
1532 "Privy is a small and fast utility for password-protecting secret
1533 data such as API keys, cryptocurrency wallets, or seeds for digital
1535 (license (list license:expat license:asl2.0)))) ; dual licensed
1537 (define-public python-pgpy
1539 (name "python-pgpy")
1544 (uri (pypi-uri "PGPy" version))
1547 "0i4lqhzdwkjkim3wab0kqadx28z3r5ixlh6qxj4lif4gif56c0m7"))))
1548 (build-system python-build-system)
1550 `(("python-cryptography" ,python-cryptography)
1551 ("python-pyasn1" ,python-pyasn1)
1552 ("python-singledispatch" ,python-singledispatch)
1553 ("python-six" ,python-six)))
1554 (home-page "https://github.com/SecurityInnovation/PGPy")
1555 (synopsis "Python implementation of OpenPGP")
1557 "Currently, PGPy can load keys and signatures of all kinds in both ASCII
1558 armored and binary formats.
1560 It can create and verify RSA, DSA, and ECDSA signatures, at the moment. It
1561 can also encrypt and decrypt messages using RSA and ECDH.")
1562 (license license:bsd-3)))
1564 (define-public python-sop
1571 (uri (pypi-uri "sop" version))
1574 "0gljyjsdn6hdmwlwwb5g5s0c031p6izamvfxp0d39x60af8k5jyf"))))
1575 (build-system python-build-system)
1577 '(#:tests? #f)) ; There are no tests, and unittest throws an error trying
1579 ; TypeError: don't know how to make test from: 0.2.0
1580 (home-page "https://gitlab.com/dkg/python-sop")
1581 (synopsis "Stateless OpenPGP Command-Line Interface")
1583 "The Stateless OpenPGP Command-Line Interface (or sop) is a
1584 specification that encourages OpenPGP implementors to provide a common,
1585 relatively simple command-line API for purposes of object security.
1587 This Python module helps implementers build such a CLI from any implementation
1588 accessible to the Python interpreter.
1590 It does not provide such an implementation itself -- this is just the
1591 scaffolding for the command line, which should make it relatively easy to
1592 supply a handful of python functions as methods to a class.")
1593 (license license:expat))) ; MIT license