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 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox>
6 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages crypto)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages autotools)
26 #:use-module (gnu packages boost)
27 #:use-module (gnu packages gettext)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages libbsd)
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages nettle)
32 #:use-module (gnu packages password-utils)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages readline)
35 #:use-module (gnu packages serialization)
36 #:use-module (gnu packages tls)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix packages)
39 #:use-module (guix download)
40 #:use-module (guix build-system gnu))
42 (define-public libsodium
48 (uri (list (string-append
49 "http://download.libsodium.org/libsodium/"
50 "releases/libsodium-" version ".tar.gz")
52 "https://download.libsodium.org/libsodium/"
53 "releases/old/libsodium-" version ".tar.gz")))
56 "1gn45g956lyz8l6iq187yc6l627vyivyp8qc5dkr6dnhdnlqddvi"))))
57 (build-system gnu-build-system)
58 (synopsis "Portable NaCl-based crypto library")
60 "Sodium is a new easy-to-use high-speed software library for network
61 communication, encryption, decryption, signatures, etc.")
63 (home-page "http://libsodium.org")))
65 (define-public signify
71 (uri (string-append "https://github.com/aperezdc/signify/"
72 "archive/v" version ".tar.gz"))
73 (file-name (string-append name "-" version ".tar.gz"))
76 "00lbjiy0gv1b1fvrd6ni4qah96ah4qf6aig05vd2hji4vs00jgwg"))))
77 (build-system gnu-build-system)
78 ;; TODO Build with libwaive (described in README.md), to implement something
79 ;; like OpenBSD's pledge().
81 `(#:tests? #f ; no test suite
84 (string-append "PREFIX=" (assoc-ref %outputs "out")))
86 (modify-phases %standard-phases
87 (delete 'configure))))
89 `(("pkg-config" ,pkg-config)))
91 `(("libbsd" ,libbsd)))
92 (synopsis "Create and verify cryptographic signatures")
93 (description "The signify utility creates and verifies cryptographic
94 signatures using the elliptic curve Ed25519. This is a Linux port of the
95 OpenBSD tool of the same name.")
96 (home-page "https://github.com/aperezdc/signify")
97 ;; This package includes third-party code that was originally released under
98 ;; various non-copyleft licenses. See the source files for clarification.
99 (license (list license:bsd-3 license:bsd-4 license:expat license:isc
100 license:public-domain (license:non-copyleft
102 "See base64.c in the distribution for
103 the license from IBM.")))))
106 (define-public opendht
115 "https://github.com/savoirfairelinux/" name
116 "/archive/" version ".tar.gz"))
117 (file-name (string-append name "-" version ".tar.gz"))
118 (modules '((guix build utils)))
121 (delete-file-recursively "src/argon2")
122 (substitute* "src/Makefile.am"
123 (("./argon2/libargon2.la") "")
124 (("SUBDIRS = argon2") ""))
125 (substitute* "src/crypto.cpp"
126 (("argon2/argon2.h") "argon2.h"))
127 (substitute* "configure.ac"
128 (("src/argon2/Makefile") ""))))
131 "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
132 (build-system gnu-build-system)
137 ("readline" ,readline)
140 `(("autoconf" ,autoconf)
141 ("pkg-config" ,pkg-config)
142 ("automake" ,automake)
143 ("libtool" ,libtool)))
145 `(#:configure-flags '("--disable-tools" "--disable-python")
146 #:phases (modify-phases %standard-phases
147 (add-before 'configure 'autoconf
149 (zero? (system* "autoreconf" "-vfi")))))))
150 (home-page "https://github.com/savoirfairelinux/opendht/")
151 (synopsis "Distributed Hash Table (DHT) library")
152 (description "OpenDHT is a Distributed Hash Table (DHT) library. It may
153 be used to manage peer-to-peer network connections as needed for real time
155 (license license:gpl3)))
165 (string-append "http://rlog.googlecode.com/files/rlog-"
169 "0y9zg0pd7vmnskwac1qdyzl282z7kb01nmn57lsg2mjdxgnywf59"))))
170 (build-system gnu-build-system)
172 `(#:phases (modify-phases %standard-phases
173 (add-before 'configure 'patch-/bin/sh
175 (substitute* "docs/Makefile.in"
176 (("/bin/sh") "sh")))))))
177 (home-page "http://www.arg0.net/rlog")
178 (synopsis "Flexible message logging library for EncFS")
180 "RLog provides message logging for EncFS. It is no longer maintained.")
181 (license license:lgpl2.1+)))
191 (string-append "https://github.com/vgough/encfs/releases/download/v"
192 version "/encfs-" version ".tar.gz"))
195 "1lfmcsk187qr6ahy8c8959p7jrk9d5rd9kcsx572850ca3zmf0la"))))
196 (build-system gnu-build-system)
198 `(#:configure-flags '("--with-boost-serialization=boost_wserialization"
199 "--with-boost-filesystem=boost_filesystem")
200 #:phases (modify-phases %standard-phases
201 (add-before 'configure 'autoconf
203 (zero? (system* "autoreconf" "-vfi")))))))
205 `(("autoconf" ,autoconf)
206 ("automake" ,automake)
207 ("gettext" ,gnu-gettext)
210 ("pkg-config" ,pkg-config)))
216 (home-page "https://vgough.github.io/encfs")
217 (synopsis "Encrypted virtual file system")
219 "EncFS creates a virtual encrypted file system in user-space. Each file
220 created under an EncFS mount point is stored as a separate encrypted file on
221 the underlying file system. Like most encrypted file systems, EncFS is meant
222 to provide security against off-line attacks, such as a drive falling into
224 (license (list license:lgpl3+ ;encfs library
225 license:gpl3+)))) ;command-line tools