1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
3 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages crypto)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages pkg-config)
24 #:use-module (gnu packages libbsd)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu))
30 (define-public libsodium
36 (uri (list (string-append
37 "http://download.libsodium.org/libsodium/"
38 "releases/libsodium-" version ".tar.gz")
40 "https://download.libsodium.org/libsodium/"
41 "releases/old/libsodium-" version ".tar.gz")))
44 "19f9vf0shfp4rc4l791r6xjg06z4i8psj1zkjkm3z5b640yzxlff"))))
45 (build-system gnu-build-system)
46 (synopsis "Portable NaCl-based crypto library")
48 "Sodium is a new easy-to-use high-speed software library for network
49 communication, encryption, decryption, signatures, etc.")
51 (home-page "http://libsodium.org")))
53 (define-public signify
59 (uri (string-append "https://github.com/aperezdc/signify/"
60 "archive/v" version ".tar.gz"))
61 (file-name (string-append name "-" version ".tar.gz"))
64 "0kfv2k1fqck31vwlnicavb0h541ilad9zd7j8zz8x2kx36wwqpr7"))))
65 (build-system gnu-build-system)
66 ;; TODO Build with libwaive (described in README.md), to implement something
67 ;; like OpenBSD's pledge().
69 `(#:tests? #f ; no test suite
72 (string-append "PREFIX=" (assoc-ref %outputs "out")))
74 (modify-phases %standard-phases
75 (delete 'configure))))
77 `(("pkg-config" ,pkg-config)))
79 `(("libbsd" ,libbsd)))
80 (synopsis "Create and verify cryptographic signatures")
81 (description "The signify utility creates and verifies cryptographic
82 signatures using the elliptic curve Ed25519. This is a Linux port of the
83 OpenBSD tool of the same name.")
84 (home-page "https://github.com/aperezdc/signify")
85 ;; This package includes third-party code that was originally released under
86 ;; various non-copyleft licenses. See the source files for clarification.
87 (license (list bsd-3 bsd-4 expat isc public-domain
88 (non-copyleft "file://base64.c"
89 "See base64.c in the distribution for
90 the license from IBM.")))))