1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages openpgp)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix git-download)
23 #:use-module (guix build-system cmake)
24 #:use-module (guix build-system gnu)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages check)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages crypto)
30 #:use-module (gnu packages gnupg)
31 #:use-module (gnu packages multiprecision)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages python)
34 #:use-module (gnu packages web))
36 (define-public libtmcg
42 (uri (string-append "mirror://savannah/libtmcg/libTMCG-" version
46 "179b5jx3mqs9hgsj8cfwk6x8qib60kw9szk9fkz6s1gl3v83mnyx"))))
47 (build-system gnu-build-system)
48 (arguments '(#:configure-flags '("--enable-silent-rules")))
49 (inputs (list gmp libgcrypt))
51 "C++ library for creating secure and fair online card games")
53 "The library provides a sort of useful classes, algorithms, and
54 high-level protocols to support an application programmer in writing such
55 software. The most remarkable feature is the absence of a trusted third
56 party (TTP), i.e. neither a central game server nor trusted hardware
57 components are necessary.
59 The corresponding cryptographic problem, actually called Mental Poker, has
60 been studied since 1979 (Shamir, Rivest, and Adleman) by many authors.
61 LibTMCG provides the first practical implementation of such protocols.")
62 (home-page "https://www.nongnu.org/libtmcg/")
63 (license license:gpl2+)))
71 (uri (string-append "mirror://savannah/dkgpg/dkgpg-" version
75 "1hpfg7akd5icj49i03z74hp9zj0xwl90bndn0hnw0hpb8lk7qcxg"))))
76 (build-system gnu-build-system)
77 (arguments '(#:configure-flags
78 '("--enable-silent-rules")
79 ;; https://savannah.nongnu.org/bugs/?58772
80 #:parallel-tests? #f))
81 (inputs (list bzip2 gmp libgcrypt libtmcg zlib))
83 "Distributed Key Generation and Threshold Cryptography for OpenPGP")
85 "The Distributed Privacy Guard (DKGPG) implements Distributed Key
86 Generation (DKG) and Threshold Cryptography for OpenPGP. The generated public
87 keys are compatible with the standard and thus can be used by any
88 RFC4880-compliant application (e.g. GnuPG). The main purposes of this
89 software are distributing power among multiple parties, eliminating single
90 points of failure, and increasing the difficulty of side-channel attacks on
93 DKGPG consists of a bunch of simple command-line programs. The current
94 implementation is in experimental state and should NOT be used in production
96 (home-page "https://www.nongnu.org/dkgpg/")
97 (license license:gpl2+)))
100 ;; Packaging the currently released version requires a large number of
101 ;; patches. For now, we package a snapshot instead.
102 (let ((commit "203224f0b1505dba17837c03da603e5b98ab125a")
104 (last-version "0.13.1")
105 (day-of-release "2020-07-21"))
108 (version (git-version last-version revision commit))
112 (url "https://github.com/rnpgp/rnp")
115 (string-append name "-" (string-take commit 7) "-checkout"))
118 "1rnwhc9ys4v4mv584hmmrl0ycnqmsaigpffzm31qq337hz24zqya"))
120 (search-patches "rnp-unbundle-googletest.patch"
121 "rnp-disable-ruby-rnp-tests.patch"
122 "rnp-add-version.cmake.patch"))))
123 (build-system cmake-build-system)
124 (arguments `(#:configure-flags
125 '("-DBUILD_SHARED_LIBS=on"
126 "-DBUILD_TESTING=on")
128 (modify-phases %standard-phases
129 (add-after 'unpack 'fixes
130 (lambda* (#:key inputs #:allow-other-keys)
131 (copy-recursively (assoc-ref inputs "googletest-source")
132 "src/tests/googletest-src")
133 (substitute* "src/tests/support.cpp"
134 (("\"cp\"") (string-append "\"" (which "cp") "\"")))
135 ;; Produce a version stamp in the format the upstream
136 ;; project uses for unreleased revisions.
137 (with-output-to-file "version.txt"
140 (string-append ,last-version
142 "-g" ,(string-take commit 7)))))
146 ;; Some OpenPGP certificates used by the tests expire.
147 ;; To work around that, set the time to roughly the
149 (invoke "faketime" ,day-of-release "make" "test"))))))
151 `(("gnupg" ,gnupg) ; for tests
152 ("googletest-source" ,(package-source googletest)) ; for tests
153 ("libfaketime" ,libfaketime) ; for tests
154 ("pkg-config" ,pkg-config)
156 ("python2" ,python-2.7)))
157 (inputs (list botan bzip2 json-c zlib))
159 "RFC4880-compliant OpenPGP library written in C++")
161 "Set of OpenPGP (RFC4880) tools that works on Linux, *BSD and macOS as a
162 replacement of GnuPG. It is maintained by Ribose after being forked from
163 NetPGP, itself originally written for NetBSD.
165 librnp is the library used by rnp for all OpenPGP functions, useful for
166 developers to build against. It is a “real” library, not a wrapper like GPGME
168 (home-page "https://www.rnpgp.com/")
170 ;; RNP contains code written by Ribose and code derived from netpgp.
172 ;; Ribose's BSD 2-Clause License and NetBSD's BSD 2-Clause License
175 ;; Nominet UK's Apache 2.0 Licence (netpgp).
177 ;; Nominet UK's BSD 3-Clause License (netpgp).