gnu: ruby-shoulda-matchers: Update to 3.1.1.
[jackhill/guix/guix.git] / gnu / packages / crypto.scm
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>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
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.
12 ;;;
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.
17 ;;;
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/>.
20
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))
29
30 (define-public libsodium
31 (package
32 (name "libsodium")
33 (version "1.0.0")
34 (source (origin
35 (method url-fetch)
36 (uri (list (string-append
37 "http://download.libsodium.org/libsodium/"
38 "releases/libsodium-" version ".tar.gz")
39 (string-append
40 "https://download.libsodium.org/libsodium/"
41 "releases/old/libsodium-" version ".tar.gz")))
42 (sha256
43 (base32
44 "19f9vf0shfp4rc4l791r6xjg06z4i8psj1zkjkm3z5b640yzxlff"))))
45 (build-system gnu-build-system)
46 (synopsis "Portable NaCl-based crypto library")
47 (description
48 "Sodium is a new easy-to-use high-speed software library for network
49 communication, encryption, decryption, signatures, etc.")
50 (license isc)
51 (home-page "http://libsodium.org")))
52
53 (define-public signify
54 (package
55 (name "signify")
56 (version "17")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "https://github.com/aperezdc/signify/"
60 "archive/v" version ".tar.gz"))
61 (file-name (string-append name "-" version ".tar.gz"))
62 (sha256
63 (base32
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().
68 (arguments
69 `(#:tests? #f ; no test suite
70 #:make-flags
71 (list "CC=gcc"
72 (string-append "PREFIX=" (assoc-ref %outputs "out")))
73 #:phases
74 (modify-phases %standard-phases
75 (delete 'configure))))
76 (native-inputs
77 `(("pkg-config" ,pkg-config)))
78 (inputs
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.")))))