summaryrefslogtreecommitdiff
path: root/gnu/packages/python-crypto.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-crypto.scm')
-rw-r--r--gnu/packages/python-crypto.scm38
1 files changed, 27 insertions, 11 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index c864835248e..38accb2b876 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -25,6 +25,7 @@
25;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org> 25;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
26;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> 26;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
27;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> 27;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
28;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
28;;; 29;;;
29;;; This file is part of GNU Guix. 30;;; This file is part of GNU Guix.
30;;; 31;;;
@@ -44,6 +45,7 @@
44(define-module (gnu packages python-crypto) 45(define-module (gnu packages python-crypto)
45 #:use-module (guix packages) 46 #:use-module (guix packages)
46 #:use-module (guix download) 47 #:use-module (guix download)
48 #:use-module (guix gexp)
47 #:use-module (guix git-download) 49 #:use-module (guix git-download)
48 #:use-module (guix build-system python) 50 #:use-module (guix build-system python)
49 #:use-module (gnu packages) 51 #:use-module (gnu packages)
@@ -138,9 +140,6 @@ on the Blowfish password hashing algorithm, as described in
138Password Scheme\"} by Niels Provos and David Mazieres.") 140Password Scheme\"} by Niels Provos and David Mazieres.")
139 (license license:asl2.0))) 141 (license license:asl2.0)))
140 142
141(define-public python2-bcrypt
142 (package-with-python2 python-bcrypt))
143
144(define-public python-passlib 143(define-public python-passlib
145 (package 144 (package
146 (name "python-passlib") 145 (name "python-passlib")
@@ -260,9 +259,6 @@ extension for low level cryptography (PyCrypto), Paramiko itself is a pure
260Python interface around SSH networking concepts.") 259Python interface around SSH networking concepts.")
261 (license license:lgpl2.1+))) 260 (license license:lgpl2.1+)))
262 261
263(define-public python2-paramiko
264 (package-with-python2 python-paramiko))
265
266(define-public python-ecdsa 262(define-public python-ecdsa
267 (package 263 (package
268 (name "python-ecdsa") 264 (name "python-ecdsa")
@@ -839,9 +835,6 @@ Networking and Cryptography library. These libraries have a stated goal
839of improving usability, security and speed.") 835of improving usability, security and speed.")
840 (license license:asl2.0))) 836 (license license:asl2.0)))
841 837
842(define-public python2-pynacl
843 (package-with-python2 python-pynacl))
844
845(define-public python-blurhash 838(define-public python-blurhash
846 (package 839 (package
847 (name "python-blurhash") 840 (name "python-blurhash")
@@ -936,6 +929,22 @@ protocol (Javascript Object Signing and Encryption).")
936(define-public python2-josepy 929(define-public python2-josepy
937 (package-with-python2 python-josepy)) 930 (package-with-python2 python-josepy))
938 931
932(define pycryptodome-unbundle-tomcrypt-snippet
933 #~(begin
934 ;; Unbundle libtomcrypt.
935 (delete-file-recursively "src/libtom")
936 (substitute* "src/DES.c"
937 (("#include \"libtom/tomcrypt_des.c\"")
938 "#include <tomcrypt.h>"))
939 (substitute* "setup.py"
940 (("include_dirs=\\['src/', 'src/libtom/'\\]")
941 ;; FIXME: why does '-ltomcrypt' need to be added
942 ;; manually, even when 'tomcrypt' is added to 'libraries'?
943 ;; This behaviour is not documented at
944 ;; <https://docs.python.org/3/extending/building.html>.
945 "include_dirs=['src/'], libraries=['tomcrypt', 'tommath'],
946 extra_link_args=['-ltomcrypt', '-ltommath']"))))
947
939(define-public python-pycryptodome 948(define-public python-pycryptodome
940 (package 949 (package
941 (name "python-pycryptodome") 950 (name "python-pycryptodome")
@@ -946,8 +955,13 @@ protocol (Javascript Object Signing and Encryption).")
946 (uri (pypi-uri "pycryptodome" version)) 955 (uri (pypi-uri "pycryptodome" version))
947 (sha256 956 (sha256
948 (base32 957 (base32
949 "1i4m74f88qj9ci8rpyzrbk2slmsdj5ipmwdkq6qk24byalm203li")))) 958 "1i4m74f88qj9ci8rpyzrbk2slmsdj5ipmwdkq6qk24byalm203li"))
959 (modules '((guix build utils)))
960 (snippet pycryptodome-unbundle-tomcrypt-snippet)))
950 (build-system python-build-system) 961 (build-system python-build-system)
962 (inputs
963 `(("libtomcrypt" ,libtomcrypt)
964 ("libtommath" ,libtommath)))
951 (home-page "https://www.pycryptodome.org") 965 (home-page "https://www.pycryptodome.org")
952 (synopsis "Low-level cryptographic Python library") 966 (synopsis "Low-level cryptographic Python library")
953 (description 967 (description
@@ -1000,7 +1014,9 @@ PyCryptodome variants, the other being python-pycryptodomex.")
1000 (method url-fetch) 1014 (method url-fetch)
1001 (uri (pypi-uri "pycryptodomex" version)) 1015 (uri (pypi-uri "pycryptodomex" version))
1002 (sha256 1016 (sha256
1003 (base32 "0lbx4qk3xmwqiidhmkj8qa7bh2lf8bwzg0xjpsh2w5zqjrc7qnvv")))) 1017 (base32 "0lbx4qk3xmwqiidhmkj8qa7bh2lf8bwzg0xjpsh2w5zqjrc7qnvv"))
1018 (modules '((guix build utils)))
1019 (snippet pycryptodome-unbundle-tomcrypt-snippet)))
1004 (description 1020 (description
1005 "PyCryptodome is a self-contained Python package of low-level 1021 "PyCryptodome is a self-contained Python package of low-level
1006cryptographic primitives. It's not a wrapper to a separate C library like 1022cryptographic primitives. It's not a wrapper to a separate C library like