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 `(("gmp" ,gmp)
50 ("libgcrypt" ,libgcrypt)))
52 "C++ library for creating secure and fair online card games")
54 "The library provides a sort of useful classes, algorithms, and
55 high-level protocols to support an application programmer in writing such
56 software. The most remarkable feature is the absence of a trusted third
57 party (TTP), i.e. neither a central game server nor trusted hardware
58 components are necessary.
60 The corresponding cryptographic problem, actually called Mental Poker, has
61 been studied since 1979 (Shamir, Rivest, and Adleman) by many authors.
62 LibTMCG provides the first practical implementation of such protocols.")
63 (home-page "https://www.nongnu.org/libtmcg/")
64 (license license:gpl2+)))
72 (uri (string-append "mirror://savannah/dkgpg/dkgpg-" version
76 "1hpfg7akd5icj49i03z74hp9zj0xwl90bndn0hnw0hpb8lk7qcxg"))))
77 (build-system gnu-build-system)
78 (arguments '(#:configure-flags
79 '("--enable-silent-rules")
80 ;; https://savannah.nongnu.org/bugs/?58772
81 #:parallel-tests? #f))
82 (inputs `(("bzip2" ,bzip2)
84 ("libgcrypt" ,libgcrypt)
88 "Distributed Key Generation and Threshold Cryptography for OpenPGP")
90 "The Distributed Privacy Guard (DKGPG) implements Distributed Key
91 Generation (DKG) and Threshold Cryptography for OpenPGP. The generated public
92 keys are compatible with the standard and thus can be used by any
93 RFC4880-compliant application (e.g. GnuPG). The main purposes of this
94 software are distributing power among multiple parties, eliminating single
95 points of failure, and increasing the difficulty of side-channel attacks on
98 DKGPG consists of a bunch of simple command-line programs. The current
99 implementation is in experimental state and should NOT be used in production
101 (home-page "https://www.nongnu.org/dkgpg/")
102 (license license:gpl2+)))
105 ;; Packaging the currently released version requires a large number of
106 ;; patches. For now, we package a snapshot instead.
107 (let ((commit "203224f0b1505dba17837c03da603e5b98ab125a")
109 (last-version "0.13.1")
110 (day-of-release "2020-07-21"))
113 (version (git-version last-version revision commit))
117 (url "https://github.com/rnpgp/rnp")
120 (string-append name "-" (string-take commit 7) "-checkout"))
123 "1rnwhc9ys4v4mv584hmmrl0ycnqmsaigpffzm31qq337hz24zqya"))
125 (search-patches "rnp-unbundle-googletest.patch"
126 "rnp-disable-ruby-rnp-tests.patch"
127 "rnp-add-version.cmake.patch"))))
128 (build-system cmake-build-system)
129 (arguments `(#:configure-flags
130 '("-DBUILD_SHARED_LIBS=on"
131 "-DBUILD_TESTING=on")
133 (modify-phases %standard-phases
134 (add-after 'unpack 'fixes
135 (lambda* (#:key inputs #:allow-other-keys)
136 (copy-recursively (assoc-ref inputs "googletest-source")
137 "src/tests/googletest-src")
138 (substitute* "src/tests/support.cpp"
139 (("\"cp\"") (string-append "\"" (which "cp") "\"")))
140 ;; Produce a version stamp in the format the upstream
141 ;; project uses for unreleased revisions.
142 (with-output-to-file "version.txt"
145 (string-append ,last-version
147 "-g" ,(string-take commit 7)))))
151 ;; Some OpenPGP certificates used by the tests expire.
152 ;; To work around that, set the time to roughly the
154 (invoke "faketime" ,day-of-release "make" "test"))))))
156 `(("gnupg" ,gnupg) ; for tests
157 ("googletest-source" ,(package-source googletest)) ; for tests
158 ("libfaketime" ,libfaketime) ; for tests
159 ("pkg-config" ,pkg-config)
161 ("python2" ,python-2.7)))
162 (inputs `(("botan" ,botan)
167 "RFC4880-compliant OpenPGP library written in C++")
169 "Set of OpenPGP (RFC4880) tools that works on Linux, *BSD and macOS as a
170 replacement of GnuPG. It is maintained by Ribose after being forked from
171 NetPGP, itself originally written for NetBSD.
173 librnp is the library used by rnp for all OpenPGP functions, useful for
174 developers to build against. It is a “real” library, not a wrapper like GPGME
176 (home-page "https://www.rnpgp.com/")
178 ;; RNP contains code written by Ribose and code derived from netpgp.
180 ;; Ribose's BSD 2-Clause License and NetBSD's BSD 2-Clause License
183 ;; Nominet UK's Apache 2.0 Licence (netpgp).
185 ;; Nominet UK's BSD 3-Clause License (netpgp).