1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017 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 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
13 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
14 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
15 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
16 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
17 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
18 ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages python-crypto)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system python)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages libffi)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages protobuf)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages time)
48 #:use-module (gnu packages tls)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (srfi srfi-1))
52 (define-public python-bcrypt
54 (name "python-bcrypt")
59 (uri (pypi-uri "bcrypt" version))
62 "13cyrnqwkhc70rs6dg65z4yrrr3dc42fhk11804fqmci9hvimvb7"))))
63 (build-system python-build-system)
65 `(("python-pycparser" ,python-pycparser)
66 ("python-pytest" ,python-pytest)))
68 `(("python-cffi" ,python-cffi)
69 ("python-six" ,python-six)))
70 (home-page "https://github.com/pyca/bcrypt/")
72 "Modern password hashing library")
74 "Bcrypt is a Python module which provides a password hashing method based
75 on the Blowfish password hashing algorithm, as described in
76 @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
77 Password Scheme\"} by Niels Provos and David Mazieres.")
78 (license license:asl2.0)))
80 (define-public python2-bcrypt
81 (package-with-python2 python-bcrypt))
83 (define-public python-passlib
85 (name "python-passlib")
90 (uri (pypi-uri "passlib" version))
93 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
94 (build-system python-build-system)
96 `(("python-nose" ,python-nose)))
98 `(("python-py-bcrypt" ,python-py-bcrypt)))
101 (modify-phases %standard-phases
102 (add-before 'check 'set-PYTHON_EGG_CACHE
103 ;; some tests require access to "$HOME/.cython"
104 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
105 (home-page "https://bitbucket.org/ecollins/passlib")
107 "Comprehensive password hashing framework")
109 "Passlib is a password hashing library for Python 2 & 3, which provides
110 cross-platform implementations of over 30 password hashing algorithms, as well
111 as a framework for managing existing password hashes. It's designed to be
112 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
113 to providing full-strength password hashing for multi-user application.")
114 (license license:bsd-3)))
116 (define-public python2-passlib
117 (package-with-python2 python-passlib))
119 (define-public python-py-bcrypt
121 (name "python-py-bcrypt")
127 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
132 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
133 (build-system python-build-system)
134 (home-page "https://code.google.com/p/py-bcrypt")
136 "Bcrypt password hashing and key derivation")
138 "A python wrapper of OpenBSD's Blowfish password hashing code. This
139 system hashes passwords using a version of Bruce Schneier's Blowfish block
140 cipher with modifications designed to raise the cost of off-line password
141 cracking and frustrate fast hardware implementation. The computation cost of
142 the algorithm is parametised, so it can be increased as computers get faster.
143 The intent is to make a compromise of a password database less likely to
144 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
146 ;; "sha2.c" is under BSD-3;
147 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
148 ;; the rest is under ISC.
149 (license (list license:isc license:bsd-3 license:bsd-4))))
151 (define-public python2-py-bcrypt
152 (package-with-python2 python-py-bcrypt))
154 (define-public python-paramiko
156 (name "python-paramiko")
161 (uri (pypi-uri "paramiko" version))
164 "1wx4s95i2cdh8hhi1c3jb8lzk71jifa3z9wjfsx905y7lrsngqrk"))))
165 (build-system python-build-system)
167 `(;; FIXME: Tests require many unpackaged libraries, see dev-requirements.txt.
170 `(("python-pyasn1" ,python-pyasn1)
171 ("python-cryptography" ,python-cryptography)))
172 (home-page "http://www.paramiko.org/")
173 (synopsis "SSHv2 protocol library")
174 (description "Paramiko is a python implementation of the SSHv2 protocol,
175 providing both client and server functionality. While it leverages a Python C
176 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
177 Python interface around SSH networking concepts.")
178 (license license:lgpl2.1+)))
180 (define-public python2-paramiko
181 (package-with-python2 python-paramiko))
183 (define-public python-ecdsa
185 (name "python-ecdsa")
191 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
196 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
197 (build-system python-build-system)
199 `(("openssl" ,openssl)))
201 "https://github.com/warner/python-ecdsa")
203 "ECDSA cryptographic signature library (pure python)")
205 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
206 Curve Digital Signature Algorithm), implemented purely in Python. With this
207 library, you can quickly create keypairs (signing key and verifying key), sign
208 messages, and verify the signatures. The keys and signatures are very short,
209 making them easy to handle and incorporate into other protocols.")
210 (license license:expat)))
212 (define-public python2-ecdsa
213 (package-with-python2 python-ecdsa))
215 ;;; Pycrypto is abandoned upstream:
217 ;;; https://github.com/dlitz/pycrypto/issues/173
219 ;;; TODO Remove this package from GNU Guix.
220 (define-public python-pycrypto
222 (name "python-pycrypto")
227 (uri (pypi-uri "pycrypto" version))
228 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
231 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
232 (build-system python-build-system)
238 (modify-phases %standard-phases
239 (add-before 'build 'set-build-env
240 ;; pycrypto runs an autoconf configure script behind the scenes
241 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
242 (home-page "http://www.pycrypto.org/")
243 (synopsis "Cryptographic modules for Python")
245 "Pycrypto is a collection of both secure hash functions (such as SHA256
246 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
247 etc.). The package is structured to make adding new modules easy.")
248 (license license:public-domain)))
250 (define-public python2-pycrypto
251 (let ((pycrypto (package-with-python2 python-pycrypto)))
252 (package (inherit pycrypto)
254 `(("python" ,python-2)
257 (package-inputs pycrypto)))))))
259 (define-public python-keyring
261 (name "python-keyring")
266 (uri (pypi-uri "keyring" version))
269 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
270 (build-system python-build-system)
272 `(("python-setuptools-scm" ,python-setuptools-scm)))
274 `(("python-pycrypto" ,python-pycrypto)))
276 `(#:tests? #f)) ;TODO: tests require pytest
277 (home-page "https://github.com/jaraco/keyring")
278 (synopsis "Store and access your passwords safely")
280 "The Python keyring lib provides a easy way to access the system keyring
281 service from python. It can be used in any application that needs safe
283 ;; "MIT" and PSF dual license
284 (license license:x11)))
286 (define-public python2-keyring
287 (package-with-python2 python-keyring))
289 (define-public python-certifi
291 (name "python-certifi")
292 (version "2017.1.23")
295 (uri (pypi-uri "certifi" version))
298 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
299 (build-system python-build-system)
300 (home-page "https://certifi.io/")
301 (synopsis "Python CA certificate bundle")
303 "Certifi is a Python library that contains a CA certificate bundle, which
304 is used by the Requests library to verify HTTPS requests.")
305 (license license:asl2.0)))
307 (define-public python2-certifi
308 (package-with-python2 python-certifi))
310 (define-public python-cryptography-vectors
312 (name "python-cryptography-vectors")
317 (uri (pypi-uri "cryptography_vectors" version))
320 "122na0c6r24ch2ifyr4ccjyih0inpqy7bc5za77699g3pa22rd98"))))
321 (build-system python-build-system)
322 (home-page "https://github.com/pyca/cryptography")
323 (synopsis "Test vectors for the cryptography package")
325 "This package contains test vectors for the cryptography package.")
326 ;; Distributed under either BSD-3 or ASL2.0
327 (license (list license:bsd-3 license:asl2.0))))
329 (define-public python2-cryptography-vectors
330 (package-with-python2 python-cryptography-vectors))
332 (define-public python-cryptography
334 (name "python-cryptography")
339 (uri (pypi-uri "cryptography" version))
342 "0qrgip8vgcpk7v1jwf67mg50np5iprxrv8qrg8p382hkd6zrbhlz"))))
343 (build-system python-build-system)
345 `(("openssl" ,openssl)))
347 `(("python-asn1crypto" ,python-asn1crypto)
348 ("python-cffi" ,python-cffi)
349 ("python-six" ,python-six)
350 ("python-idna" ,python-idna)
351 ("python-iso8601" ,python-iso8601)))
353 `(("python-cryptography-vectors" ,python-cryptography-vectors)
354 ("python-hypothesis" ,python-hypothesis)
355 ("python-pretend" ,python-pretend)
356 ("python-pytz" ,python-pytz)
357 ("python-pytest" ,python-pytest)))
358 (home-page "https://github.com/pyca/cryptography")
359 (synopsis "Cryptographic recipes and primitives for Python")
361 "cryptography is a package which provides cryptographic recipes and
362 primitives to Python developers. It aims to be the “cryptographic standard
363 library” for Python. The package includes both high level recipes, and low
364 level interfaces to common cryptographic algorithms such as symmetric ciphers,
365 message digests and key derivation functions.")
366 ;; Distributed under either BSD-3 or ASL2.0
367 (license (list license:bsd-3 license:asl2.0))
368 (properties `((python2-variant . ,(delay python2-cryptography))))))
370 (define-public python2-cryptography
371 (let ((crypto (package-with-python2
372 (strip-python2-variant python-cryptography))))
373 (package (inherit crypto)
375 `(("python2-ipaddress" ,python2-ipaddress)
376 ("python2-backport-ssl-match-hostname"
377 ,python2-backport-ssl-match-hostname)
378 ("python2-enum34" ,python2-enum34)
379 ,@(package-propagated-inputs crypto))))))
381 (define-public python-pyopenssl
383 (name "python-pyopenssl")
388 (uri (pypi-uri "pyOpenSSL" version))
391 "0wv78mwsdqbxqwdwllf4maqybhbj3vb8328ia04hnb558sxcy41c"))))
392 (build-system python-build-system)
395 (modify-phases %standard-phases
397 (add-after 'install 'check
398 (lambda* (#:key inputs outputs #:allow-other-keys)
399 (add-installed-pythonpath inputs outputs)
400 (zero? (system* "py.test" "-v" "-k"
402 ;; This test tries to look up certificates from
403 ;; the compiled-in default path in OpenSSL, which
404 ;; does not exist in the build environment.
405 "not test_fallback_default_verify_paths "
406 ;; This test attempts to make a connection to
407 ;; an external web service.
408 "and not test_set_default_verify_paths"))))))))
410 `(("python-cryptography" ,python-cryptography)
411 ("python-six" ,python-six)))
413 `(("openssl" ,openssl)))
415 `(("python-flaky" ,python-flaky)
416 ("python-pretend" ,python-pretend)
417 ("python-pytest" ,python-pytest)))
418 (home-page "https://github.com/pyca/pyopenssl")
419 (synopsis "Python wrapper module around the OpenSSL library")
421 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
423 (license license:asl2.0)))
425 (define-public python2-pyopenssl
426 (package-with-python2 python-pyopenssl))
428 (define-public python-ed25519
430 (name "python-ed25519")
435 (uri (pypi-uri "ed25519" version))
438 "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499"))))
439 (build-system python-build-system)
440 (home-page "https://github.com/warner/python-ed25519")
441 (synopsis "Ed25519 public-key signatures")
442 (description "Ed25519 public-key signatures")
443 (license license:expat)))
445 (define-public python2-ed25519
446 (package-with-python2 python-ed25519))
448 (define-public python-axolotl-curve25519
450 (name "python-axolotl-curve25519")
456 (url "https://github.com/tgalal/python-axolotl-curve25519")
457 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
458 (file-name (string-append name "-" version "-checkout"))
461 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
462 (build-system python-build-system)
464 `(;; Prevent creation of the egg. This works around
465 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
466 #:configure-flags '("--root=/")))
467 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
468 (synopsis "Python wrapper for curve25519 library")
469 (description "This is a python wrapper for the curve25519 library
470 with ed25519 signatures. The C code was pulled from
471 libaxolotl-android. At the moment this wrapper is meant for use by
473 (license (list license:gpl3 ; Most files
474 license:bsd-3)))) ; curve/curve25519-donna.c
476 (define-public python2-axolotl-curve25519
477 (package-with-python2 python-axolotl-curve25519))
479 (define-public python-axolotl
481 (name "python-axolotl")
487 "https://github.com/tgalal/python-axolotl/archive/"
489 (file-name (string-append name "-" version ".tar.gz"))
490 (patches (search-patches "python-axolotl-AES-fix.patch"))
492 (base32 "0badsgkgz0ir3hqynxzsfjgacppi874syvvmgccc6j164053x6zm"))))
493 (build-system python-build-system)
496 (modify-phases %standard-phases
497 ;; Don't install tests
498 (add-before 'install 'remove-tests
500 (for-each delete-file-recursively
501 '("axolotl/tests" "build/lib/axolotl/tests"))
504 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
505 ("python-dateutil" ,python-dateutil)
506 ("python-protobuf" ,python-protobuf)
507 ("python-pycrypto" ,python-pycrypto)))
508 (home-page "https://github.com/tgalal/python-axolotl")
509 (synopsis "Python port of libaxolotl-android")
510 (description "This is a python port of libaxolotl-android. This
511 is a ratcheting forward secrecy protocol that works in synchronous and
512 asynchronous messaging environments.")
513 (license license:gpl3)))
515 (define-public python2-axolotl
516 (package-with-python2 python-axolotl))
518 ;; SlowAES isn't compatible with Python 3.
519 (define-public python2-slowaes
521 (name "python2-slowaes")
526 (uri (pypi-uri "slowaes" version))
529 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
530 (build-system python-build-system)
531 (arguments `(#:python ,python-2))
532 (home-page "http://code.google.com/p/slowaes/")
533 (synopsis "Implementation of AES in Python")
534 (description "This package contains an implementation of AES in Python.
535 This implementation is slow (hence the project name) but still useful when
536 faster ones are not available.")
537 (license license:asl2.0)))
539 (define-public python-pyaes
541 (name "python-pyaes")
546 (uri (pypi-uri "pyaes" version))
549 "13vdaff15k0jyfcss4b4xvfgm8xyv0nrbyw5n1qc7lrqbi0b3h82"))))
550 (build-system python-build-system)
551 (home-page "https://github.com/ricmoo/pyaes")
552 (synopsis "Implementation of AES in Python")
553 (description "This package contains a pure-Python implementation of the
554 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
556 (license license:expat)))
558 (define-public python2-pyaes
559 (package-with-python2 python-pyaes))
561 (define-public python-asn1crypto
563 (name "python-asn1crypto")
568 (uri (string-append "https://github.com/wbond/asn1crypto/archive/"
570 (file-name (string-append name "-" version ".tar.gz"))
573 "1kn910896l3knmilla1c9ly20q181s43w1ah08lzkbm1h3j6pcz0"))))
574 (build-system python-build-system)
575 (home-page "https://github.com/wbond/asn1crypto")
576 (synopsis "ASN.1 parser and serializer in Python")
577 (description "asn1crypto is an ASN.1 parser and serializer with definitions
578 for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7,
579 PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
580 (license license:expat)))
582 (define-public python2-asn1crypto
583 (package-with-python2 python-asn1crypto))
585 (define-public python-pynacl
587 (name "python-pynacl")
592 (uri (pypi-uri "PyNaCl" version))
593 (modules '((guix build utils)))
594 ;; Remove bundled libsodium
595 (snippet '(begin (delete-file-recursively "src/libsodium")
599 "01vjq0pxyw1mxaqy013hzs8nknmvg3kpzlzmh69jxznyipgvria5"))))
600 (build-system python-build-system)
603 (modify-phases %standard-phases
604 (add-before 'build 'use-system-sodium
606 (setenv "SODIUM_INSTALL" "system")
609 `(("python-hypothesis" ,python-hypothesis)
610 ("python-pytest" ,python-pytest)))
612 `(("python-cffi" ,python-cffi)
613 ("python-six" ,python-six)
614 ("libsodium" ,libsodium)))
615 (home-page "https://github.com/pyca/pynacl/")
616 (synopsis "Python bindings to libsodium")
618 "PyNaCl is a Python binding to libsodium, which is a fork of the
619 Networking and Cryptography library. These libraries have a stated goal
620 of improving usability, security and speed.")
621 (license license:asl2.0)))
623 (define-public python2-pynacl
624 (package-with-python2 python-pynacl))
626 (define-public python2-pgpdump
628 (name "python2-pgpdump")
633 (uri (pypi-uri "pgpdump" version))
636 "0s4nh8h7qsdj2yf29bspjs1zvxd4lcd11r6g11dp7fppgf2h0iqw"))))
637 (build-system python-build-system)
639 ;; Currently fails to build with Python 3.
640 (arguments `(#:python ,python-2))
642 (home-page "https://github.com/toofishes/python-pgpdump")
643 (synopsis "Python library for parsing PGP packets")
645 "Python-pgpdump is an OpenPGP packet parser based on
646 @uref{http://www.mew.org/~kazu/proj/pgpdump/, pgpdump}. It notably supports:
649 @item signature packets;
650 @item public key packets;
651 @item secret key packets;
652 @item trust, user ID, and user attribute packets;
653 @item ASCII-armor decoding and CRC check.
655 (license license:bsd-3)))
657 (define-public python2-roca-detect
659 (name "python2-roca-detect")
664 (uri (pypi-uri "roca-detect" version))
667 "1di4akyw2lf5r8zfwvyhkilz8jv8g4b66rgaqwfabmjwma6gnw27"))))
668 (build-system python-build-system)
670 ;; TODO: apk_parse_ph4, pyjks
671 `(("python2-dateutil" ,python2-dateutil)
672 ("python2-six" ,python2-six)
673 ("python2-cryptography" ,python2-cryptography)
674 ("python2-future" ,python2-future)
675 ("python2-coloredlogs" ,python2-coloredlogs)
676 ("python2-pgpdump" ,python2-pgpdump)))
678 `(;; Basic testing routine is quite simple and works with Py3
679 ;; but the rest of the code that processes the different
680 ;; key formats and extracts the modulus for inspection is
681 ;; not yet fully py3 ready.
683 (home-page "https://github.com/crocs-muni/roca")
684 (synopsis "ROCA detection tool")
686 "This tool is related to the paper entitled @i{Return of the
687 Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli}. It
688 enables you to test public RSA keys for a presence of the described
689 vulnerability. Currently the tool supports the following key formats: X.509
690 Certificate (DER encoded, PEM encoded), RSA PEM (encoded private key, public
691 key), SSH public key, ASC-encoded OpenPGP key, APK Android application, LDIFF
693 (license license:gpl3)))
695 (define-public python-ecpy
702 (uri (pypi-uri "ECPy" version))
705 "090fqnj8z0xm44jrfpll7j45r68m6kp7mjr7yxzg93j42h3sj285"))))
706 (build-system python-build-system)
708 `(("python-future" ,python-future)))
709 (home-page "https://github.com/ubinity/ECPy")
710 (synopsis "Pure Python Elliptic Curve Library")
711 (description "This package provides a Elliptic Curve Library in pure
713 (license license:asl2.0)))
715 (define-public python2-ecpy
716 (package-with-python2 python-ecpy))
718 (define-public python-josepy
720 (name "python-josepy")
724 (uri (pypi-uri "josepy" version))
727 "11khz8malzrv375b27jjkv66z6z6khdx1v5mkkr4vq16gp3n4p7v"))))
728 (build-system python-build-system)
730 ;; The tests require flake8 >= 3.5, which is not yet packaged.
733 `(("python-cryptography" ,python-cryptography)
734 ("python-pyopenssl" ,python-pyopenssl)
735 ("python-six" ,python-six)))
736 ;; TODO Enable when we have flake8 >= 3.5.
738 ; `(("python-coverage" ,python-coverage)
739 ; ("python-flake8" ,python-flake8)
740 ; ("python-isort" ,python-isort)
741 ; ("python-mock" ,python-mock)
742 ; ("python-pytest" ,python-pytest)
743 ; ("python-pytest-cov" ,python-pytest-cov)
744 ; ("python-pytest-cache" ,python-pytest-cache)
745 ; ("python-pytest-flake8" ,python-pytest-flake8)))
746 (home-page "https://github.com/certbot/josepy")
747 (synopsis "JOSE protocol implementation in Python")
748 (description "This package provides a Python implementation of the JOSE
749 protocol (Javascript Object Signing and Encryption).")
750 (license license:asl2.0)))
752 (define-public python2-josepy
753 (package-with-python2 python-josepy))
755 (define-public python-pycryptodome
757 (name "python-pycryptodome")
762 (uri (pypi-uri "pycryptodome" version))
765 "15mc1h5ij1b6hcqvb048kb4k0ip64n2ky0zz0rml2s78ylv7g5dp"))))
766 (build-system python-build-system)
767 (home-page "https://www.pycryptodome.org")
768 (synopsis "Cryptographic library for Python")
769 (description "This package provides a cryptographic library for Python.
771 It brings the following enhancements with respect to the last official version
775 @item Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
776 @item Accelerated AES on Intel platforms via AES-NI
777 @item First class support for PyPy
778 @item Elliptic curves cryptography (NIST P-256 curve only)
779 @item Better and more compact API (nonce and iv attributes for ciphers,
780 automatic generation of random nonces and IVs, simplified CTR cipher mode, and
782 @item SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
783 @item Salsa20 and ChaCha20 stream ciphers
784 @item scrypt and HKDF
785 @item Deterministic (EC)DSA
786 @item Password-protected PKCS#8 key containers
787 @item Shamir’s Secret Sharing scheme
788 @item Random numbers get sourced directly from the OS (and not from a CSPRNG
790 @item Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
791 @item Major clean ups and simplification of the code base
793 (license license:bsd-2)))
795 (define-public python2-pycryptodome
796 (package-with-python2 python-pycryptodome))
798 (define-public python-m2crypto
800 (name "python-m2crypto")
805 (uri (pypi-uri "M2Crypto" version))
807 (base32 "1h16gpilrnlzc0iyj1mnd1iqh8wchzjsxjqw9n344glimg2s5zm0"))))
808 (build-system python-build-system)
809 (inputs `(("openssl" ,openssl)))
810 (propagated-inputs `(("python-typing" ,python-typing)))
811 (home-page "https://gitlab.com/m2crypto/m2crypto")
812 (synopsis "Python crypto and TLS toolkit")
813 (description "@code{M2Crypto} is a complete Python wrapper for OpenSSL
814 featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
815 (including AES); TLS functionality to implement clients and servers; HTTPS
816 extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
817 AuthCookies for web session management; FTP/TLS client and server; S/MIME;
818 M2Crypto can also be used to provide TLS for Twisted. Smartcards supported
819 through the Engine interface.")
820 (license license:expat)))
822 (define-public python2-m2crypto
823 (package-with-python2 python-m2crypto))