projects/guix·blob java-team · refs

1883 lines · 75.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 David Thompson <[email protected]>
3;;; Copyright © 2015, 2017, 2018, 2019, 2022 Ricardo Wurmus <[email protected]>
4;;; Copyright © 2016, 2017, 2018, 2019, 2021 Leo Famulari <[email protected]>
5;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox>
6;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2016, 2017 Nikita <[email protected]>
8;;; Copyright © 2016, 2017, 2019, 2020 Eric Bavier <[email protected]>
9;;; Copyright © 2017 Pierre Langlois <[email protected]>
10;;; Copyright © 2018, 2020, 2021, 2023, 2025 Efraim Flashner <[email protected]>
11;;; Copyright © 2018 Arun Isaac <[email protected]>
12;;; Copyright © 2018 Nicolas Goaziou <[email protected]>
13;;; Copyright © 2018, 2020 Nicolò Balzarotti <[email protected]>
14;;; Copyright © 2018 Tim Gesthuizen <[email protected]>
15;;; Copyright © 2019 Pierre Neidhardt <[email protected]>
16;;; Copyright © 2019 Tanguy Le Carrour <[email protected]>
17;;; Copyright © 2020 Marius Bakke <[email protected]>
18;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
19;;; Copyright © 2020 Brice Waegeneire <[email protected]>
20;;; Copyright © 2020 Hendur Saga <[email protected]>
21;;; Copyright © 2020 pukkamustard <[email protected]>
22;;; Copyright © 2021 Ellis Kenyő <[email protected]>
23;;; Copyright © 2021 Maxime Devos <[email protected]>
24;;; Copyright © 2021, 2022, 2025 Brendan Tildesley <[email protected]>
25;;; Copyright © 2022 Allan Adair <[email protected]>
26;;; Copyright © 2022, 2024-2025 Maxim Cournoyer <[email protected]>
27;;; Copyright © 2022 Denis 'GNUtoo' Carikli <[email protected]>
28;;; Copyright © 2023 Ivan Vilata-i-Balaguer <[email protected]>
29;;; Copyright © 2023 Foundation Devices, Inc. <[email protected]>
30;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
31;;; Copyright © 2025 Ashish SHUKLA <[email protected]>
32;;; Copyright © 2025 Robin Templeton <[email protected]>
33;;; Copyright © 2026 Hennadii Stepanov <[email protected]>
34;;; Copyright © 2026 Noé Lopez <[email protected]>
35;;; Copyright © 2026 bdunahu <[email protected]>
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52(define-module (gnu packages crypto)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages aidc)
56 #:use-module (gnu packages assembly)
57 #:use-module (gnu packages attr)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages boost)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages cpp)
65 #:use-module (gnu packages cryptsetup)
66 #:use-module (gnu packages curl)
67 #:use-module (gnu packages documentation)
68 #:use-module (gnu packages gettext)
69 #:use-module (gnu packages gnupg)
70 #:use-module (gnu packages graphviz)
71 #:use-module (gnu packages image)
72 #:use-module (gnu packages kerberos)
73 #:use-module (gnu packages libbsd)
74 #:use-module (gnu packages libffi)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages logging)
77 #:use-module (gnu packages lsof)
78 #:use-module (gnu packages man)
79 #:use-module (gnu packages multiprecision)
80 #:use-module (gnu packages nettle)
81 #:use-module (gnu packages password-utils)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages perl-check)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages python)
86 #:use-module (gnu packages python-build)
87 #:use-module (gnu packages python-xyz)
88 #:use-module (gnu packages python-check)
89 #:use-module (gnu packages python-crypto)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages search)
92 #:use-module (gnu packages serialization)
93 #:use-module (gnu packages shells)
94 #:use-module (gnu packages sqlite)
95 #:use-module (gnu packages tcl)
96 #:use-module (gnu packages tls)
97 #:use-module (gnu packages version-control)
98 #:use-module (gnu packages xml)
99 #:use-module ((guix licenses) #:prefix license:)
100 #:use-module (guix packages)
101 #:use-module (guix download)
102 #:use-module (guix git-download)
103 #:use-module (guix gexp)
104 #:use-module (guix build-system cargo)
105 #:use-module (guix build-system cmake)
106 #:use-module (guix build-system copy)
107 #:use-module (guix build-system gnu)
108 #:use-module (guix build-system perl)
109 #:use-module (guix build-system pyproject)
110 #:use-module (guix utils)
111 #:use-module (srfi srfi-1)
112 #:use-module (srfi srfi-26))
113
114(define-public crc32c
115 (package
116 (name "crc32c")
117 (version "1.1.2")
118 (source (origin
119 (method git-fetch)
120 (uri (git-reference
121 (url "https://github.com/google/crc32c")
122 (commit version)))
123 (file-name (git-file-name name version))
124 (sha256
125 (base32
126 "0966lyy3w5cnrs0c0fkma4hga51k54hns72l4n76944awqssap7j"))
127 (patches (search-patches "crc32c-unbundle-googletest.patch"))))
128 (build-system cmake-build-system)
129 (arguments
130 (list
131 #:configure-flags
132 #~(list "-DBUILD_SHARED_LIBS=ON"
133 "-DCRC32C_BUILD_BENCHMARKS=OFF"
134 "-DCRC32C_USE_GLOG=OFF"
135 (string-append
136 "-DCRC32C_BUILD_TESTS="
137 ;; TODO: perhaps infer #:tests?
138 (if #$(%current-target-system)
139 "OFF" "ON")))))
140 (native-inputs (list googletest-1.12))
141 (home-page "https://github.com/google/crc32c")
142 (synopsis "Cyclic redundancy check")
143 (description
144 "This package provides architecture-specific implementations of the
145CRC32C algorithm, which is specified in RFC 3720, section 12.1.")
146 (license license:bsd-3)))
147
148(define-public crcpp
149 (package
150 (name "crcpp")
151 (version "1.2.1.0")
152 (source (origin
153 (method git-fetch)
154 (uri (git-reference
155 (url "https://github.com/d-bahr/CRCpp.git")
156 (commit (string-append "release-" version))))
157 (file-name (git-file-name name version))
158 (sha256
159 (base32
160 "005hc25srr4r80md57cg9fax98c8n57ljrhxyw0chjlyq3c0d07n"))))
161 (build-system cmake-build-system)
162 (arguments
163 (list
164 #:phases
165 #~(modify-phases %standard-phases
166 (add-after 'install 'install-pkgconfig-description
167 (lambda _
168 (let ((dir (string-append #$output "/lib/pkgconfig")))
169 (mkdir-p (string-append dir))
170 (with-output-to-file (string-append dir "/CRCpp.pc")
171 (lambda _
172 (simple-format #t "\
173prefix=~a
174includedir=${prefix}/include
175
176Name: ~a
177Description: CRC (cyclic redundancy check) library for C++
178Version: ~a
179Cflags: -I${includedir}"
180 #$output #$name #$version)))))))))
181 (home-page "https://github.com/d-bahr/CRCpp")
182 (synopsis "@acronym{CRC, cyclic redundancy check} library for C++")
183 (description "CRC++ is a C++ library for calculating cyclic redundancy
184checks. It supports bit-by-bit and byte-by-byte calculation of full and
185multipart CRCs. It aims to have highly optimized algorithms that can run
186branchless for projects with a need for efficiency. Many common CRCs are
187provided out-of-the-box, such as CRC-32 (used in PKZip and Ethernet),
188CRC-XMODEM, and CRC-CCITT.")
189 (license license:bsd-3)))
190
191(define-public libblake3
192 (package
193 (name "libblake3")
194 (version "1.8.2")
195 (source
196 (origin
197 (method git-fetch)
198 (uri (git-reference
199 (url "https://github.com/BLAKE3-team/BLAKE3")
200 (commit version)))
201 (file-name (git-file-name name version))
202 (sha256
203 (base32 "1pm7285insrmpfwwal8rnp3yhvc6s2ki8b6ccmbh2qfnnl95a010"))))
204 (build-system cmake-build-system)
205 (arguments
206 (list
207 #:configure-flags
208 #~(list "-DBUILD_SHARED_LIBS=ON")
209 #:tests? #f ; XXX: there are some rust tests in the root.
210 #:phases
211 #~(modify-phases %standard-phases
212 (add-after 'unpack 'chdir
213 (lambda _
214 (chdir "c"))))))
215 (home-page "https://github.com/BLAKE3-team/BLAKE3")
216 (synopsis "Official C implementation of BLAKE3")
217 (description "This package provides a cryptographic hash function that is
218fast, secure, parallelizable, capable of incremental updates.")
219 (license (list license:asl2.0 license:cc0)))) ; dual licensed
220
221(define-public libdecaf
222 ;; The 1.0.2 release fails due to some compiler warning treated as an error
223 ;; (see: https://sourceforge.net/p/ed448goldilocks/tickets/16/). Use the
224 ;; latest commit available.
225 (let ((commit "e5cc6240690d3ffdfcbdb1e4e851954b789cd5d9")
226 (revision "0"))
227 (package
228 (name "libdecaf")
229 (version (git-version "1.0.2" revision commit))
230 (source (origin
231 (method git-fetch)
232 (uri (git-reference
233 (url "git://git.code.sf.net/p/ed448goldilocks/code")
234 (commit commit)))
235 (file-name
236 (git-file-name name version))
237 (sha256
238 (base32
239 "1gxf503cnmgsv7s0dm82rrizjhifdhdh42sfvbfsdj55syjnv1p2"))))
240 (build-system cmake-build-system)
241 (outputs '("out" "python" "doc"))
242 (arguments
243 (list #:imported-modules (append %cmake-build-system-modules
244 %pyproject-build-system-modules)
245 #:modules '((guix build cmake-build-system)
246 ((guix build pyproject-build-system) #:prefix python:)
247 (guix build utils))
248 #:configure-flags #~(list "-DENABLE_STATIC=OFF")
249 #:phases
250 #~(modify-phases %standard-phases
251 (add-after 'unpack 'patch-python-binding
252 (lambda _
253 (substitute* "python/setup.py"
254 (("gmake")
255 "make")
256 (("'\\.\\.', 'build', 'lib', 'libdecaf\\.so'")
257 "'..', '..', 'build', 'src', 'libdecaf.so'"))))
258 (add-after 'unpack 'ensure-no-mtimes-pre-1980
259 (assoc-ref python:%standard-phases 'ensure-no-mtimes-pre-1980))
260 (add-after 'install 'install-python-binding
261 (lambda* (#:key inputs outputs #:allow-other-keys)
262 (with-directory-excursion "../source/python"
263 (invoke "python" "setup.py" "install"
264 (string-append
265 "--prefix="
266 (python:site-packages inputs outputs)))))))))
267 (native-inputs (list python-minimal-wrapper python-setuptools))
268 (synopsis "Decaf Elliptic Curve Library")
269 (description "The libdecaf library is an implementation of elliptic curve
270cryptography using the Montgomery and Edwards curves Curve25519, Ed25519,
271Ed448-Goldilocks and Curve448, using the Decaf encoding.")
272 (home-page "https://ed448goldilocks.sourceforge.net/")
273 (license (list license:expat ;library
274 license:bsd-2))))) ;python bindings
275
276(define-public libsodium
277 (package
278 (name "libsodium")
279 (version "1.0.22")
280 (source
281 (origin
282 (method git-fetch)
283 (uri (git-reference
284 (url "https://github.com/jedisct1/libsodium")
285 (commit (string-append version "-RELEASE"))))
286 (file-name (git-file-name name version))
287 (sha256
288 (base32
289 "05lqdn6nzldsia5mv5a9xfvc5k0kybh9snwv7qsb135gva4bpjwk"))))
290 (build-system gnu-build-system)
291 (synopsis "Portable NaCl-based crypto library")
292 (description
293 "Sodium is a new easy-to-use high-speed software library for network
294communication, encryption, decryption, signatures, etc.")
295 (license license:isc)
296 (home-page "https://libsodium.org")))
297
298(define-public libmd
299 (package
300 (name "libmd")
301 (version "1.2.0")
302 (source (origin
303 (method url-fetch)
304 (uri
305 (list
306 (string-append "https://archive.hadrons.org/software/libmd/libmd-"
307 version ".tar.xz")
308 (string-append "https://libbsd.freedesktop.org/releases/libmd-"
309 version ".tar.xz")))
310 (sha256
311 (base32
312 "186h2gmxzshgf5bdy832yfqb1sp05slcarpcrnngn0h58fwgy5dc"))))
313 (build-system gnu-build-system)
314 (arguments
315 (list
316 #:configure-flags
317 #~(list "--disable-static")))
318 (synopsis "Message Digest functions from BSD systems")
319 (description
320 "The currently provided message digest algorithms are:
321@itemize
322@item MD2
323@item MD4
324@item MD5
325@item RIPEMD-160
326@item SHA-1
327@item SHA-2 (SHA-256, SHA-384 and SHA-512)
328@end itemize")
329 (license (list license:bsd-3
330 license:bsd-2
331 license:isc
332 license:public-domain))
333 (home-page "https://www.hadrons.org/software/libmd/")))
334
335(define-public signify
336 (package
337 (name "signify")
338 (version "32")
339 (home-page "https://github.com/aperezdc/signify")
340 (source (origin
341 (method url-fetch)
342 (uri (string-append "https://github.com/aperezdc/signify/releases"
343 "/download/v" version "/signify-" version ".tar.xz"))
344 (sha256
345 (base32
346 "1maq4wv7934gql95rr55pj419gnbj8jkrgn1f25jcg97v5zvklbd"))
347 (modules '((guix build utils)))
348 (snippet '(delete-file-recursively "libbsd"))))
349 (build-system gnu-build-system)
350 ;; TODO Build with libwaive (described in README.md), to implement something
351 ;; like OpenBSD's pledge().
352 (arguments
353 (list
354 #:make-flags
355 #~(list (string-append "CC=" #$(cc-for-target))
356 (string-append "PREFIX=" #$output))
357 #:phases
358 #~(modify-phases %standard-phases
359 (delete 'configure))))
360 (native-inputs
361 (list pkg-config))
362 (inputs
363 (list libbsd))
364 (synopsis "Create and verify cryptographic signatures")
365 (description "The signify utility creates and verifies cryptographic
366signatures using the elliptic curve Ed25519. This is a Linux port of the
367OpenBSD tool of the same name.")
368 ;; This package includes third-party code that was originally released under
369 ;; various non-copyleft licenses. See the source files for clarification.
370 (license (list license:bsd-3 license:expat license:isc
371 license:public-domain (license:non-copyleft
372 "file://base64.c"
373 "See base64.c in the distribution for
374 the license from IBM.")))))
375
376(define-public rust-minisign
377 (package
378 (name "rust-minisign")
379 (version "0.7.9")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (crate-uri "minisign" version))
384 (file-name (string-append name "-" version ".tar.gz"))
385 (sha256
386 (base32 "1rqdmnzzak7svsgcjnrb7rrbq4gv378alcnmynfq47js863i6m16"))))
387 (build-system cargo-build-system)
388 (arguments
389 `(#:install-source? #f))
390 (inputs (cargo-inputs 'rust-minisign))
391 (home-page "https://github.com/jedisct1/rust-minisign")
392 (synopsis "Crate to sign files and verify signatures")
393 (description
394 "This package provides a crate to sign files and verify signatures.")
395 (license license:expat)))
396
397(define-public keyutils
398 (package
399 (name "keyutils")
400 (version "1.6.3")
401 (source
402 (origin
403 (method git-fetch)
404 (uri (git-reference
405 (url (string-append "https://git.kernel.org/pub/scm/linux/kernel/"
406 "git/dhowells/keyutils.git"))
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
409 (sha256
410 (base32 "1095g1p5038m91wf2dxnagngpvww7ilcj8fhyviid3srvxr675i7"))
411 (modules '((guix build utils)))
412 ;; Create relative symbolic links instead of absolute ones to /lib/*.
413 (snippet '(begin
414 (substitute* "Makefile" (("\\$\\(LNS\\) \\$\\(LIBDIR\\)/")
415 "$(LNS) "))))))
416 (build-system gnu-build-system)
417 (arguments
418 (list #:make-flags
419 #~(list (string-append "CC=" #$(cc-for-target))
420 ;; "NO_ARLIB=1" would cleanly disable static libraries.
421 "RPATH=-Wl,-rpath,$(DESTDIR)$(LIBDIR)"
422 (string-append "DESTDIR=" #$output)
423 "INCLUDEDIR=/include"
424 "LIBDIR=/lib"
425 "MANDIR=/share/man"
426 "SHAREDIR=/share/keyutils")
427 #:phases
428 #~(modify-phases %standard-phases
429 (delete 'configure) ; no configure script
430 (add-after 'unpack 'avoid-embedding-timestamp
431 ;; Do not embed build timestamp
432 (lambda _
433 (substitute* "Makefile"
434 (("shell date") "shell true"))))
435 (add-after 'install 'install:static
436 (lambda _
437 (with-directory-excursion #$output
438 (for-each (lambda (file)
439 (let ((target (string-append #$output:static
440 "/" file)))
441 (format #t "~a -> ~a\n" file target)
442 (mkdir-p (dirname target))
443 (rename-file file target)))
444 (find-files "lib" "\\.a$"))))))
445 #:test-target "test"))
446 (inputs
447 (list mit-krb5))
448 (home-page "https://people.redhat.com/dhowells/keyutils/")
449 (synopsis "Linux key management utilities")
450 (description
451 "Keyutils is a set of utilities for managing the key retention facility in
452the Linux kernel, which can be used by file systems, block devices, and more to
453gain and retain the authorization and encryption keys required to perform
454secure operations.")
455 (license (list license:lgpl2.1+ ; the files keyutils.*
456 license:gpl2+)))) ; the rest
457
458(define-public ssss
459 (package
460 (name "ssss")
461 (version "0.5")
462 (source (origin
463 (method url-fetch)
464 (uri (string-append "http://point-at-infinity.org/ssss/ssss-"
465 version ".tar.gz"))
466 (sha256
467 (base32
468 "15grn2fp1x8p92kxkwbmsx8rz16g93y9grl3hfqbh1jn21ama5jx"))))
469 (build-system gnu-build-system)
470 (arguments
471 `(#:tests? #f ; No test suite
472 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
473 ,(string-append "CC=" (cc-for-target)))
474 #:phases
475 (modify-phases %standard-phases
476 (delete 'configure) ; no configuration to be done
477 (replace 'install
478 (lambda* (#:key outputs #:allow-other-keys)
479 (let* ((outdir (assoc-ref outputs "out"))
480 (bindir (string-append outdir "/bin"))
481 (docdir (string-append outdir
482 "/share/doc/ssss-"
483 ,version)))
484 (install-file "ssss-combine" bindir)
485 (install-file "ssss-split" bindir)
486 (install-file "ssss.1" docdir)
487 (install-file "ssss.1.html" docdir)
488 #t))))))
489 (inputs
490 (list gmp))
491 (native-inputs
492 (list xmltoman))
493 (home-page "http://point-at-infinity.org/ssss/")
494 (synopsis "Shamir's secret sharing scheme implementation")
495 (description "@command{ssss-split} and @command{ssss-combine} are utilities that split
496and combine secrets securely using Shamir's secret sharing scheme. This implementation
497allows for a threshold scheme where the minimum number of shares can be less than the
498total number of shares generated.")
499 (license license:gpl2+)))
500
501(define-public tomb
502 (package
503 (name "tomb")
504 (version "2.13")
505 (source
506 (origin
507 (method url-fetch)
508 (uri (string-append "https://files.dyne.org/tomb/releases/"
509 "Tomb-" version ".tar.gz"))
510 (sha256
511 (base32 "1405kw0j8i1bqyqbim8530xf6hchpf57r9p1v92aknwyn5wgny0g"))))
512 (build-system gnu-build-system)
513 (arguments
514 (list
515 #:make-flags #~(list (string-append "PREFIX=" #$output))
516 ;; TODO: Build and install gtk and qt trays
517 #:phases
518 #~(modify-phases %standard-phases
519 (delete 'configure) ;no configuration to be done
520 (add-after 'install 'i18n
521 (lambda* (#:key make-flags #:allow-other-keys)
522 (apply invoke "make" "-C" "extras/translations"
523 "install" make-flags)))
524 (add-after 'install 'cloak
525 (lambda* (#:key make-flags #:allow-other-keys)
526 (apply invoke "make" "-C" "extras/cloak" "install" make-flags)
527 (copy-recursively
528 "extras/cloak/ciphers"
529 (string-append #$output "/share/tomb/extras/cloak/ciphers"))))
530 (add-after 'install 'gtomb
531 (lambda _
532 (install-file "extras/gtomb/gtomb"
533 (string-append #$output "/bin"))))
534 (add-after 'install 'wrap
535 (lambda* (#:key inputs #:allow-other-keys)
536 (wrap-program (string-append #$output "/bin/tomb")
537 `("PATH" ":" prefix
538 (,(string-append (assoc-ref inputs "mlocate") "/bin")
539 ,@(map (lambda (program)
540 (or (and=> (which program) dirname)
541 (error "program not found:" program)))
542 ;; The size of this package explodes with:
543 ;; "unoconv" "recoll"
544 '("argon2" "seq" "mkfs.ext4" "pinentry"
545 "gpg" "cryptsetup" "gettext" "lsof"
546 "qrencode" "steghide" "findmnt" "getent")))))))
547 (delete 'check)
548 (add-after 'wrap 'check
549 (lambda* (#:key tests? #:allow-other-keys)
550 (when tests?
551 ;; Running the full tests requires sudo/root access for
552 ;; cryptsetup, which is not available in the build
553 ;; environment. But we can run `tomb dig` without root, so
554 ;; make sure that works.
555 ;;
556 ;; TODO: It Would Be Nice to check the expected "index",
557 ;; "search", "bury", and "exhume" features are available by
558 ;; querying `tomb -h`.
559 (let ((tomb (string-append #$output "/bin/tomb")))
560 (invoke tomb "dig" "-s" "10" "secrets.tomb"))))))))
561 (native-inputs
562 (list which))
563 (inputs
564 (list argon2
565 bash-minimal
566 cryptsetup-minimal
567 e2fsprogs ; for mkfs.ext4
568 gettext-minimal ; used at runtime
569 gnupg
570 lsof
571 mlocate
572 pinentry
573 qrencode
574 ;; recoll ; size explodes
575 steghide
576 ;; unoconv ; size explodes
577 util-linux
578 zsh))
579 (home-page "https://dyne.org/tomb/")
580 (synopsis "File encryption for secret data")
581 (description
582 "Tomb is an application to manage the creation and access of encrypted
583storage files: it can be operated from commandline and it can integrate with a
584user's graphical desktop.")
585 (license license:gpl3+)))
586
587(define-public scrypt
588 (package
589 (name "scrypt")
590 (version "1.3.1")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (string-append "https://www.tarsnap.com/scrypt/scrypt-"
595 version ".tgz"))
596 (sha256
597 (base32
598 "1hnl0r6pmyxiy4dmafmqk1db7wpc0x9rqpzqcwr9d2cmghcj6byz"))))
599 (build-system gnu-build-system)
600 (arguments
601 `(#:license-file-regexp "COPYRIGHT"
602 #:phases (modify-phases %standard-phases
603 (add-after 'unpack 'patch-$PATH-assumptions
604 (lambda _
605 (substitute* "configure"
606 (("\\{POSIX_PATH\\}")
607 "{PATH}"))
608 (substitute* "Makefile.in"
609 (("command -p") ""))
610 #t))
611 (add-after 'install 'install-docs
612 (lambda* (#:key outputs #:allow-other-keys)
613 (let* ((out (assoc-ref %outputs "out"))
614 (doc (string-append out "/share/doc/" ,name "-" ,version)))
615 (install-file "FORMAT" doc)
616 #t))))))
617 (inputs
618 (list openssl))
619 (home-page "https://www.tarsnap.com/scrypt.html")
620 (synopsis "Memory-hard encryption tool based on scrypt")
621 (description "This package provides a simple password-based encryption
622utility as a demonstration of the @code{scrypt} key derivation function.
623@code{Scrypt} is designed to be far more resistant against hardware brute-force
624attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.")
625 (license license:bsd-2)))
626
627(define-public libscrypt
628 (package
629 (name "libscrypt")
630 (version "1.22")
631 (source
632 (origin
633 (method git-fetch)
634 (uri (git-reference
635 (url "https://github.com/technion/libscrypt")
636 (commit (string-append "v" version))))
637 (file-name (git-file-name name version))
638 (sha256
639 (base32 "10dinz1zx8zfm81ra16s20izpm7f7j414n4i3fkdf40vbl5slra1"))))
640 (build-system gnu-build-system)
641 (outputs (list "out" "static"))
642 (arguments
643 (list #:make-flags
644 #~(list (string-append "PREFIX=" #$output)
645 (string-append "CC=" #$(cc-for-target)))
646 #:phases
647 #~(modify-phases %standard-phases
648 (delete 'configure) ; no configure script
649 (add-after 'install 'install:static
650 (lambda _
651 (install-file "libscrypt.a"
652 (string-append #$output:static "/lib")))))))
653 (home-page "https://lolware.net/libscrypt.html")
654 (synopsis "Password hashing library")
655 (description "@code{libscrypt} implements @code{scrypt} key derivation
656function. It is designed to be far more secure against hardware brute-force
657attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.")
658 (license license:bsd-3)))
659
660(define-public perl-math-random-isaac-xs
661 (package
662 (name "perl-math-random-isaac-xs")
663 (version "1.004")
664 (source
665 (origin
666 (method url-fetch)
667 (uri (string-append "mirror://cpan/authors/id/J/JA/JAWNSY/"
668 "Math-Random-ISAAC-XS-" version ".tar.gz"))
669 (sha256
670 (base32
671 "0yxqqcqvj51fn7b7j5xqhz65v74arzgainn66c6k7inijbmr1xws"))))
672 (build-system perl-build-system)
673 (native-inputs
674 (list perl-module-build perl-test-nowarnings))
675 (home-page "https://metacpan.org/release/Math-Random-ISAAC-XS")
676 (synopsis "C implementation of the ISAAC PRNG algorithm")
677 (description "ISAAC (Indirection, Shift, Accumulate, Add, and Count) is a
678fast pseudo-random number generator. It is suitable for applications where a
679significant amount of random data needs to be produced quickly, such as
680solving using the Monte Carlo method or for games. The results are uniformly
681distributed, unbiased, and unpredictable unless you know the seed.
682
683This package implements the same interface as @code{Math::Random::ISAAC}.")
684 (license license:public-domain)))
685
686(define-public perl-math-random-isaac
687 (package
688 (name "perl-math-random-isaac")
689 (version "1.004")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (string-append "mirror://cpan/authors/id/J/JA/JAWNSY/"
694 "Math-Random-ISAAC-" version ".tar.gz"))
695 (sha256
696 (base32
697 "0z1b3xbb3xz71h25fg6jgsccra7migq7s0vawx2rfzi0pwpz0wr7"))))
698 (build-system perl-build-system)
699 (native-inputs
700 (list perl-test-nowarnings))
701 (propagated-inputs
702 (list perl-math-random-isaac-xs))
703 (home-page "https://metacpan.org/release/Math-Random-ISAAC")
704 (synopsis "Perl interface to the ISAAC PRNG algorithm")
705 (description "ISAAC (Indirection, Shift, Accumulate, Add, and Count) is a
706fast pseudo-random number generator. It is suitable for applications where a
707significant amount of random data needs to be produced quickly, such as
708solving using the Monte Carlo method or for games. The results are uniformly
709distributed, unbiased, and unpredictable unless you know the seed.
710
711This package provides a Perl interface to the ISAAC pseudo random number
712generator.")
713 (license license:public-domain)))
714
715(define-public perl-crypt-random-source
716 (package
717 (name "perl-crypt-random-source")
718 (version "0.14")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/"
723 "Crypt-Random-Source-" version ".tar.gz"))
724 (sha256
725 (base32 "1rpdds3sy5l1fhngnkrsgwsmwd54wpicx3i9ds69blcskwkcwkpc"))))
726 (build-system perl-build-system)
727 (native-inputs
728 (list perl-module-build-tiny perl-test-fatal))
729 (propagated-inputs
730 (list perl-capture-tiny
731 perl-module-find
732 perl-module-runtime
733 perl-moo
734 perl-namespace-clean
735 perl-sub-exporter
736 perl-type-tiny))
737 (home-page "https://metacpan.org/release/Crypt-Random-Source")
738 (synopsis "Get weak or strong random data from pluggable sources")
739 (description "This module provides implementations for a number of
740byte-oriented sources of random data.")
741 (license license:perl-license)))
742
743(define-public perl-math-random-secure
744 (package
745 (name "perl-math-random-secure")
746 (version "0.080001")
747 (source
748 (origin
749 (method url-fetch)
750 (uri (string-append "mirror://cpan/authors/id/F/FR/FREW/"
751 "Math-Random-Secure-" version ".tar.gz"))
752 (sha256
753 (base32
754 "0dgbf4ncll4kmgkyb9fsaxn0vf2smc9dmwqzgh3259zc2zla995z"))))
755 (build-system perl-build-system)
756 (native-inputs
757 (list perl-list-moreutils perl-test-leaktrace perl-test-sharedfork
758 perl-test-warn))
759 (inputs
760 (list perl-crypt-random-source perl-math-random-isaac
761 perl-math-random-isaac-xs perl-moo))
762 (home-page "https://metacpan.org/release/Math-Random-Secure")
763 (synopsis "Cryptographically secure replacement for rand()")
764 (description "This module is intended to provide a
765cryptographically-secure replacement for Perl's built-in @code{rand} function.
766\"Cryptographically secure\", in this case, means:
767
768@enumerate
769@item No matter how many numbers you see generated by the random number
770generator, you cannot guess the future numbers, and you cannot guess the seed.
771@item There are so many possible seeds that it would take decades, centuries,
772or millennia for an attacker to try them all.
773@item The seed comes from a source that generates relatively strong random
774data on your platform, so the seed itself will be as random as possible.
775@end enumerate\n")
776 (license license:artistic2.0)))
777
778(define-public qatlib
779 (package
780 (name "qatlib")
781 (version "26.02.0")
782 (source (origin
783 (method git-fetch)
784 (uri (git-reference
785 (url "https://github.com/intel/qatlib/")
786 (commit version)))
787 (file-name (git-file-name name version))
788 (sha256
789 (base32
790 "1ly4wjw7mpvgn0270z3242bng7ailvx99mhisymf4qdhq0cvz8n2"))))
791 (build-system gnu-build-system)
792 (arguments
793 (list #:configure-flags #~(list "--disable-static"))) ;avoid large .a
794 (native-inputs (list autoconf autoconf-archive automake libtool nasm))
795 (inputs (list numactl openssl zlib))
796 (propagated-inputs (list openssl)) ;in 'Requires' of libqat.pc
797 (home-page "https://github.com/intel/qatlib")
798 (synopsis "Intel QuickAssist Technology Library (QATlib)")
799 (description "Intel QuickAssist Technology provides hardware acceleration for
800offloading security, authentication and compression services from the CPU,
801thus significantly increasing the performance and efficiency of standard
802platform solutions. Its services include symmetric encryption and
803authentication, asymmetric encryption, digital signatures, RSA, DH and ECC,
804and lossless data compression. This package provides user space libraries
805that allow access to Intel QuickAssist devices and expose the Intel
806QuickAssist APIs and sample codes.")
807 (license license:bsd-3)
808 ;; This package only supports hardware that exists on the x86_64 platform,
809 ;; and is not portable.
810 (supported-systems (list "x86_64-linux"))))
811
812(define-public crypto++
813 (package
814 (name "crypto++")
815 (version "8.9.0")
816 (source (origin
817 (method git-fetch)
818 (uri
819 (git-reference
820 (url "https://github.com/weidai11/cryptopp")
821 (commit
822 (string-append "CRYPTOPP_"
823 (string-replace-substring version "." "_")))))
824 (file-name (git-file-name name version))
825 (sha256
826 (base32
827 "153jl84s26nw85vw7hlc84plpja7adq6q2cdydr7g2b445yrlpqx"))))
828 (build-system gnu-build-system)
829 (arguments
830 (list #:make-flags
831 #~(list (string-append "PREFIX=" #$output)
832 (string-append "CC=" #$(cc-for-target))
833 (string-append "CXX=" #$(cxx-for-target))
834 (string-append "AR=" #$(ar-for-target))
835 ;; Override "/sbin/ldconfig" with simply "echo" since
836 ;; we don't need ldconfig(8).
837 "LDCONF=echo")
838 #:phases
839 #~(modify-phases %standard-phases
840 (delete 'configure)
841 (replace 'build
842 ;; By default, only the static library is built.
843 (lambda* (#:key make-flags parallel-build?
844 #:allow-other-keys)
845 (let* ((job-count (if parallel-build?
846 (number->string (parallel-job-count))
847 1))
848 (jobs (string-append "-j" job-count))
849 (target #$(if (target-mingw?)
850 "static"
851 "shared")))
852 (apply invoke "make" target jobs make-flags)
853 (apply invoke "make" "libcryptopp.pc" jobs
854 make-flags)))))))
855 (properties '((tunable? . #t)))
856 (native-inputs
857 (list unzip))
858 (home-page "https://cryptopp.com/")
859 (synopsis "C++ class library of cryptographic schemes")
860 (description "Crypto++ is a C++ class library of cryptographic schemes.")
861 ;; The compilation is distributed under the Boost license; the individual
862 ;; files in the compilation are in the public domain.
863 (license (list license:boost1.0 license:public-domain))))
864
865(define-public libb2
866 (package
867 (name "libb2")
868 (version "0.98.1")
869 (source (origin
870 (method url-fetch)
871 (uri (string-append
872 "https://github.com/BLAKE2/libb2/releases/download/v"
873 version "/libb2-" version ".tar.gz"))
874 (sha256
875 (base32
876 "0bn7yrzdixdvzm46shbhpkqbr6zyqyxiqn7a7x54ag3mrvfnyqjk"))))
877 (build-system gnu-build-system)
878 (arguments
879 `(#:configure-flags
880 (list
881 ,@(if (target-x86?)
882 ;; fat only checks for Intel optimisations
883 '("--enable-fat")
884 '())
885 "--disable-native"))) ;don't optimise at build time
886 (home-page "https://blake2.net/")
887 (synopsis "Library implementing the BLAKE2 family of hash functions")
888 (description
889 "libb2 is a portable implementation of the BLAKE2 family of cryptographic
890hash functions. It includes optimised implementations for IA-32 and AMD64
891processors, and an interface layer that automatically selects the best
892implementation for the processor it is run on.
893
894@dfn{BLAKE2} (RFC 7693) is a family of high-speed cryptographic hash functions
895that are faster than MD5, SHA-1, SHA-2, and SHA-3, yet are at least as secure
896as the latest standard, SHA-3. It is an improved version of the SHA-3 finalist
897BLAKE.")
898 (license license:public-domain)))
899
900(define-public b2sum
901 ;; Upstream doesn't seem to use a versioned release workflow, so build from
902 ;; a recent commit.
903 (let ((commit "54f4faa4c16ea34bcd59d16e8da46a64b259fc07")
904 (revision "0"))
905 (package
906 (name "b2sum")
907 (version (git-version "20190724" revision commit))
908 (source (origin
909 (method git-fetch)
910 (uri (git-reference
911 (url "https://github.com/BLAKE2/BLAKE2")
912 (commit commit)))
913 (file-name (git-file-name name version))
914 (sha256
915 (base32 "04z631v0vzl52g73v390ask5fnzi5wg83lcjkjhpmmymaz0jn152"))))
916 ;; "This code requires at least SSE2".
917 (supported-systems '("x86_64-linux"))
918 (build-system gnu-build-system)
919 (arguments
920 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
921 (string-append "PREFIX=" (assoc-ref %outputs "out")))
922 #:tests? #f ; No test suite
923 #:phases
924 (modify-phases %standard-phases
925 (add-before 'build 'change-directory
926 (lambda _
927 (chdir "b2sum")))
928 ;; Produce generic binaries
929 (add-after 'change-directory 'de-tune
930 (lambda _
931 (substitute* "makefile"
932 ((" -march=native") ""))))
933 (delete 'configure)))) ; No ./configure script
934 (home-page "https://www.blake2.net/")
935 (synopsis "BLAKE2 checksum tool")
936 (description "BLAKE2 is a cryptographic hash function faster than MD5,
937SHA-1, SHA-2, and SHA-3, yet is at least as secure as SHA-3.")
938 ;; You may also choose to redistribute this program as Apache 2.0 or the
939 ;; OpenSSL license. See 'b2sum/b2sum.c' in the source distribution.
940 (license license:cc0)
941 ;; There is a significant speedup when the compiler generates
942 ;; instructions tuned to the CPU of the running machine:
943 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51198#22
944 (properties '((tunable? . #true))))))
945
946(define-public rhash
947 (package
948 (name "rhash")
949 (version "1.4.6")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (string-append "mirror://sourceforge/rhash/rhash/" version
954 "/rhash-" version "-src.tar.gz"))
955 (file-name (string-append "rhash-" version ".tar.gz"))
956 (sha256
957 (base32
958 "0ylkxhkj4nzmb0iampn2lv7v4yw59x7dl8mdcxqcx2mfxv7ijq4z"))))
959 (build-system gnu-build-system)
960 (arguments
961 (list #:configure-flags
962 #~(list (string-append "--prefix=" #$output)
963 #$@(let ((target (%current-target-system)))
964 (if target
965 #~((string-append "--target=" #$target)
966 (string-append "--cc="
967 (assoc-ref %build-inputs "cross-gcc")
968 "/bin/" #$target "-gcc"))
969 #~())))
970 #:make-flags
971 ;; The binaries in /bin need some help finding librhash.so.0.
972 #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
973 #:test-target "test" ; ‘make check’ just checks the sources
974 #:phases
975 #~(modify-phases %standard-phases
976 (delete 'configure)
977 (add-before 'build 'configure
978 ;; ./configure is not GNU autotools' and doesn't gracefully handle
979 ;; unrecognized options, so we must call it manually.
980 (lambda* (#:key configure-flags #:allow-other-keys)
981 (apply invoke "./configure" configure-flags)))
982 (add-before 'check 'patch-/bin/sh
983 (lambda _
984 (substitute* "Makefile"
985 (("/bin/sh") (which "sh")))))
986 (add-after 'install 'install-library-extras
987 (lambda* (#:key make-flags #:allow-other-keys)
988 (apply invoke
989 "make" "-C" "librhash"
990 "install-lib-headers" "install-so-link"
991 make-flags))))))
992 (home-page "https://sourceforge.net/projects/rhash/")
993 (synopsis "Utility for computing hash sums")
994 (description "RHash is a console utility for calculation and verification
995of magnet links and a wide range of hash sums like CRC32, MD4, MD5, SHA1,
996SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R
99734.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and Snefru.")
998 (license (license:non-copyleft "file://COPYING"))))
999
1000(define-public botan
1001 (package
1002 (name "botan")
1003 (version "3.9.0")
1004 (source (origin
1005 (method git-fetch)
1006 (uri (git-reference
1007 (url "https://github.com/randombit/botan/")
1008 (commit version)))
1009 (file-name (git-file-name name version))
1010 (sha256
1011 (base32
1012 "1k5dyn39b77bfawly2yms0crbkn6g7msh16q7bxnh7dra4cnkmsn"))))
1013 (build-system gnu-build-system)
1014 (arguments
1015 (list
1016 #:phases
1017 #~(modify-phases %standard-phases
1018 (replace 'configure
1019 (lambda* (#:key inputs outputs #:allow-other-keys)
1020 ;; Upstream tests and benchmarks with -O3.
1021 (setenv "CXXFLAGS" "-O3")
1022 (invoke "python" "./configure.py"
1023 (string-append "--prefix=" #$output)
1024 "--disable-static"
1025
1026 ;; Otherwise, the `botan` executable cannot find
1027 ;; libbotan.
1028 (string-append "--ldflags=-Wl,-rpath=" #$output "/lib")
1029
1030 "--with-os-feature=getentropy"
1031 "--with-rst2man"
1032
1033 ;; Recommended by upstream
1034 "--with-zlib" "--with-bzip2" "--with-sqlite3")))
1035 (add-before 'check 'library-path-for-tests
1036 (lambda _ (setenv "LD_LIBRARY_PATH" (getcwd))))
1037 (replace 'check
1038 (lambda* (#:key tests? #:allow-other-keys)
1039 (when tests?
1040 (invoke "./botan-test")))))))
1041 (native-inputs (list python-wrapper python-docutils))
1042 (inputs (list sqlite bzip2 zlib))
1043 (synopsis "Cryptographic library in C++11")
1044 (description "Botan is a cryptography library, written in C++11, offering
1045the tools necessary to implement a range of practical systems, such as TLS/DTLS,
1046PKIX certificate handling, PKCS#11 and TPM hardware support, password hashing,
1047and post-quantum crypto schemes. In addition to the C++, botan has a C89 API
1048specifically designed to be easy to call from other languages. A Python binding
1049using ctypes is included, and several other language bindings are available.")
1050 (home-page "https://botan.randombit.net")
1051 (license license:bsd-2)))
1052
1053;; Needed explicitly by biboumi
1054(define-public botan-2
1055 (hidden-package
1056 (package
1057 (inherit botan)
1058 (name "botan")
1059 (version "2.19.3")
1060 (source
1061 (origin
1062 (method git-fetch)
1063 (uri (git-reference
1064 (url "https://github.com/randombit/botan/")
1065 (commit version)))
1066 (file-name (git-file-name name version))
1067 (sha256
1068 (base32
1069 "16dsrxb7z245hvbjzapq7qf65ip1fh2390qap30hpfd383dyvilw")))))))
1070
1071(define-public ccrypt
1072 (package
1073 (name "ccrypt")
1074 (version "1.11")
1075 (source (origin
1076 (method url-fetch)
1077 (uri (string-append "mirror://sourceforge/ccrypt/"
1078 version "/ccrypt-" version ".tar.gz"))
1079 (sha256
1080 (base32
1081 "0kx4a5mhmp73ljknl2lcccmw9z3f5y8lqw0ghaymzvln1984g75i"))))
1082 (build-system gnu-build-system)
1083 (home-page "https://ccrypt.sourceforge.net")
1084 (synopsis "Command-line utility for encrypting and decrypting files and streams")
1085 (description "@command{ccrypt} is a utility for encrypting and decrypting
1086files and streams. It was designed as a replacement for the standard unix
1087@command{crypt} utility, which is notorious for using a very weak encryption
1088algorithm. @command{ccrypt} is based on the Rijndael block cipher, a version of
1089which is also used in the Advanced Encryption Standard (AES, see
1090@url{http://www.nist.gov/aes}). This cipher is believed to provide very strong
1091security.")
1092 (license license:gpl2)))
1093
1094(define-public asignify
1095 (let ((commit "d6b3651fa96f05aeefc318f75503fc9ca77b1f58")
1096 (revision "2"))
1097 (package
1098 (name "asignify")
1099 (version (git-version "1.1" revision commit))
1100 (source (origin
1101 (method git-fetch)
1102 (uri (git-reference
1103 (url "https://github.com/vstakhov/asignify")
1104 (commit commit)))
1105 (file-name (git-file-name name version))
1106 (sha256
1107 (base32
1108 "0a6k21gb2n45bj1d2qy34lgi4qsd3ck59jxcycbxafs0wdglsyl9"))))
1109 (build-system gnu-build-system)
1110 (arguments
1111 (list
1112 #:configure-flags
1113 #~(list "--enable-openssl"
1114 (string-append "--with-openssl="
1115 #$(this-package-input "openssl")))))
1116 (native-inputs
1117 (list autoconf automake libtool))
1118 (inputs
1119 (list openssl))
1120 (home-page "https://github.com/vstakhov/asignify")
1121 (synopsis
1122 "Cryptographic authentication and encryption tool and library")
1123 (description "Asignify offers public cryptographic signatures and
1124encryption with a library or a command-line tool. The tool is heavily
1125inspired by signify as used in OpenBSD. The main goal of this project is to
1126define a high level API for signing files, validating signatures and
1127encrypting using public-key cryptography. Asignify is designed to be portable
1128and self-contained with zero external dependencies. Asignify can verify
1129OpenBSD signatures, but it cannot sign messages in OpenBSD format yet.")
1130 (license license:bsd-2))))
1131
1132(define-public embedded-json-signature
1133 ;; No releases, use latest commit.
1134 (let ((commit "2a571b0cbe8f8bdeacb02361fcf8be7c687f7778")
1135 (revision "0"))
1136 (package
1137 (name "embedded-json-signature")
1138 ;; For version, see top of EmbeddedJSONSignature.h.
1139 (version (git-version "1.0" revision commit))
1140 (source
1141 (origin
1142 (method git-fetch)
1143 (uri (git-reference
1144 (url "https://github.com/past-due/EmbeddedJSONSignature")
1145 (commit commit)))
1146 (file-name (git-file-name name version))
1147 (sha256
1148 (base32
1149 "1ixwymz6sngf378djh0yw5dg8v6iwcqyw68clnvnij8bl6a876f8"))))
1150 (build-system cmake-build-system)
1151 (arguments
1152 (list
1153 #:tests? #f ;no tests
1154 #:phases
1155 #~(modify-phases %standard-phases
1156 (add-after 'unpack 'do-shared
1157 (lambda _
1158 (substitute* "CMakeLists.txt" (("STATIC") "SHARED"))))
1159 (replace 'install ;no install phase
1160 (lambda _
1161 (let ((inc (in-vicinity #$output "include"))
1162 (lib (in-vicinity #$output "lib")))
1163 (install-file "../source/include/EmbeddedJSONSignature.h" inc)
1164 (install-file "libEmbeddedJSONSignature.so" lib)))))))
1165 (inputs (list libsodium))
1166 (home-page "https://github.com/past-due/EmbeddedJSONSignature")
1167 (synopsis "Simple embedded JSON signature algorithm for C++11 or later")
1168 (description "This package provides an @code{EmbeddedJSONSignature} C++
1169class for signing and verifying the integrity of JSON objects using
1170@code{libsodium}’s public-key signature system. Signatures are embedded into
1171the JSON object itself as a key/value pair, while verification methods allow
1172easy extraction of the unmodified object.")
1173 (license license:expat))))
1174
1175(define-public enchive
1176 (package
1177 (name "enchive")
1178 (version "3.5")
1179 (source (origin
1180 (method git-fetch)
1181 (uri (git-reference
1182 (url "https://github.com/skeeto/enchive")
1183 (commit version)))
1184 (sha256
1185 (base32
1186 "0fdrfc5l42lj2bvmv9dmkmhmm7qiszwk7cmdvnqad3fs7652g0qa"))
1187 (file-name (git-file-name name version))))
1188 (build-system gnu-build-system)
1189 (arguments
1190 (list
1191 #:tests? #f ;no check target '
1192 #:make-flags
1193 #~(list (string-append "CC=" #$(cc-for-target))
1194 (string-append "PREFIX=" #$output))
1195 #:phases
1196 #~(modify-phases %standard-phases
1197 (delete 'configure)
1198 (add-after 'install 'post-install
1199 (lambda _
1200 (install-file
1201 "enchive-mode.el"
1202 (string-append #$output "/share/emacs/site-lisp")))))))
1203 (synopsis "Encrypted personal archives")
1204 (description
1205 "Enchive is a tool to encrypt files to yourself for long-term
1206archival. It's a focused, simple alternative to more complex solutions such as
1207GnuPG or encrypted filesystems. Enchive has no external dependencies and is
1208trivial to build for local use. Portability is emphasized over performance.")
1209 (home-page "https://github.com/skeeto/enchive")
1210 (license license:unlicense)))
1211
1212(define-public libsecp256k1
1213 (package
1214 (name "libsecp256k1")
1215 (version "0.8.0")
1216 (source (origin
1217 (method git-fetch)
1218 (uri (git-reference
1219 (url "https://github.com/bitcoin-core/secp256k1")
1220 (commit (string-append "v" version))))
1221 (file-name (git-file-name name version))
1222 (sha256
1223 (base32
1224 "0n3sflwzrb0yjf4fsip4qm3yq5pg2qj88hakam7vd98r1fqk13zg"))))
1225 (build-system gnu-build-system)
1226 (arguments
1227 (list #:configure-flags
1228 #~(list
1229 "--enable-module-recovery"
1230 "--enable-experimental"
1231 "--enable-shared"
1232 "--disable-static"
1233 "--disable-benchmark")
1234 #:phases
1235 (if (%current-target-system)
1236 #~%standard-phases
1237 #~(modify-phases %standard-phases
1238 ;; These files are pre-generated, the build system is able to
1239 ;; re-generate those if not cross-compiling,
1240 (add-after 'unpack 'delete-precomputed-files
1241 (lambda _
1242 (for-each delete-file '("src/precomputed_ecmult.c"
1243 "src/precomputed_ecmult_gen.c"))))))))
1244 (native-inputs
1245 (list autoconf automake libtool))
1246 (synopsis "C library for EC operations on curve secp256k1")
1247 (description
1248 "Optimized C library for EC operations on curve secp256k1.
1249
1250Features:
1251
1252@itemize
1253@item secp256k1 ECDSA signing/verification and key generation.
1254@item Additive and multiplicative tweaking of secret/public keys.
1255@item Serialization/parsing of private keys, public keys, signatures.
1256@item Constant time, constant memory access signing and public key generation.
1257@item Derandomized ECDSA (via RFC6979 or with a caller provided function.)
1258@item Very efficient implementation.
1259@item Suitable for embedded systems.
1260@item No runtime dependencies.
1261@item Optional module for public key recovery.
1262@item Optional module for ECDH key exchange.
1263@item Optional module for Schnorr signatures according to BIP-340.
1264@end itemize\n")
1265 (home-page "https://github.com/bitcoin-core/secp256k1")
1266 (license license:expat)))
1267
1268(define-public libsecp256k1-bitcoin-cash
1269 (package
1270 (name "libsecp256k1-bitcoin-cash")
1271 (version "0.27.1")
1272 (source
1273 (origin
1274 (method git-fetch)
1275 (uri (git-reference
1276 (url "https://github.com/Bitcoin-ABC/secp256k1")
1277 (commit (string-append "v" version))))
1278 (file-name (git-file-name name version))
1279 (sha256
1280 (base32 "00g7zdwdk6ij1wv2l3wf389njq3svg0zz09i1kq77sk7p9larnfs"))))
1281 (build-system gnu-build-system)
1282 (native-inputs
1283 (list autoconf automake libtool))
1284 (arguments
1285 '(#:configure-flags '("--enable-module-recovery"
1286 "--enable-experimental"
1287 "--enable-module-ecdh"
1288 "--disable-jni"
1289 "--with-bignum=no"
1290 "--enable-module-schnorr"
1291 "--disable-static"
1292 "--enable-shared")))
1293 (synopsis "Optimized C library for EC operations on curve secp256k1")
1294 (description
1295 "Optimized C library for cryptographic operations on curve secp256k1.
1296
1297This library is used for consensus critical cryptographic operations on the
1298Bitcoin Cash network.
1299
1300Features:
1301
1302@itemize
1303@item secp256k1 ECDSA signing/verification and key generation.
1304@item secp256k1 Schnorr signing/verification (Bitcoin Cash Schnorr variant).
1305@item Additive and multiplicative tweaking of secret/public keys.
1306@item Serialization/parsing of secret keys, public keys, signatures.
1307@item Constant time, constant memory access signing and pubkey generation.
1308@item Derandomized ECDSA (via RFC6979 or with a caller provided function).
1309@item Very efficient implementation.
1310@item Suitable for embedded systems.
1311@item Optional module for public key recovery.
1312@item Optional module for ECDH key exchange (experimental).
1313@item Optional module for multiset hash (experimental).
1314@end itemize\n")
1315 (home-page "https://github.com/Bitcoin-ABC/secp256k1")
1316 (license license:expat)))
1317
1318(define-public stoken
1319 (package
1320 (name "stoken")
1321 (version "0.92")
1322 (source (origin
1323 (method url-fetch)
1324 (uri (string-append "mirror://sourceforge/stoken/"
1325 "stoken-" version ".tar.gz"))
1326 (sha256
1327 (base32
1328 "0npgr6y85gzwksy8jkwa4yzvqwjprwnplx3yiw3ayk4f0ldlhaxa"))))
1329 (build-system gnu-build-system)
1330 (native-inputs
1331 (list pkg-config))
1332 (inputs
1333 (list nettle libxml2))
1334 (home-page "https://stoken.sf.net")
1335 (synopsis "Software Token for cryptographic authentication")
1336 (description
1337 "@code{stoken} is a token code generator compatible with RSA SecurID
1338128-bit (AES) tokens. This package contains a standalone command-line program
1339that allows for importing token seeds, generating token codes, and various
1340utility/testing functions.")
1341 (license license:lgpl2.1+)))
1342
1343(define-public hpenc
1344 (package
1345 (name "hpenc")
1346 (version "3.0")
1347 (source (origin
1348 (method git-fetch)
1349 (uri (git-reference
1350 (url "https://github.com/vstakhov/hpenc")
1351 (commit version)))
1352 (file-name (git-file-name name version))
1353 (sha256
1354 (base32
1355 "1fb5yi3d2k8kd4zm7liiqagpz610y168xrr1cvn7cbq314jm2my1"))))
1356 (build-system gnu-build-system)
1357 (arguments
1358 (list
1359 #:tests? #f ; No test suite
1360 #:make-flags
1361 #~(list (string-append "PREFIX=" #$output)
1362 ;; Build the program and the docs.
1363 "SUBDIRS=src doc")
1364 #:phases
1365 #~(modify-phases %standard-phases
1366 (delete 'configure) ; No ./configure script
1367 (add-after 'unpack 'patch-path
1368 (lambda _
1369 (substitute* '("src/Makefile" "doc/Makefile")
1370 (("/usr/bin/install")
1371 "install"))))
1372 (add-before 'install 'make-output-directories
1373 (lambda _
1374 (mkdir-p (string-append #$output "/bin"))
1375 (mkdir-p (string-append #$output "/share/man/man1")))))))
1376 (inputs
1377 (list libsodium openssl))
1378 (synopsis "High-performance command-line tool for stream encryption")
1379 (description "Hpenc is a command-line tool for performing authenticated
1380encryption (AES-GCM and ChaCha20-Poly1305) of streaming data. It does not
1381perform an asymmetric key exchange, instead requiring the user to distribute
1382pre-shared keys out of band. It is designed to handle large amounts of data
1383quickly by using all your CPU cores and hardware acceleration.")
1384 (home-page "https://github.com/vstakhov/hpenc")
1385 (license license:bsd-3)))
1386
1387(define-public minisign
1388 (package
1389 (name "minisign")
1390 (version "0.12")
1391 (source
1392 (origin
1393 (method git-fetch)
1394 (uri (git-reference
1395 (url "https://github.com/jedisct1/minisign")
1396 (commit version)))
1397 (file-name (git-file-name name version))
1398 (sha256
1399 (base32 "1b7iagx8jdyhvni24qhq13qydsinbh42gvb9dgn8d9vx3f33645a"))))
1400 (build-system cmake-build-system)
1401 (arguments
1402 `(#:tests? #f)) ; no test suite
1403 (native-inputs
1404 (list pkg-config))
1405 (inputs
1406 (list libsodium))
1407 (home-page "https://jedisct1.github.io/minisign")
1408 (synopsis "Tool to sign files and verify signatures")
1409 (description
1410 "Minisign is a dead simple tool to sign files and verify signatures. It is
1411portable, lightweight, and uses the highly secure Ed25519 public-key signature
1412system. Signature written by minisign can be verified using OpenBSD's
1413signify tool: public key files and signature files are compatible. However,
1414minisign uses a slightly different format to store secret keys. Minisign
1415signatures include trusted comments in addition to untrusted comments.
1416Trusted comments are signed, thus verified, before being displayed.")
1417 (license license:isc)))
1418
1419(define-public monocypher
1420 (package
1421 (name "monocypher")
1422 (version "4.0.3")
1423 (source
1424 (origin
1425 (method git-fetch)
1426 (uri (git-reference
1427 (url "https://github.com/LoupVaillant/Monocypher")
1428 (commit version)))
1429 (file-name (git-file-name name version))
1430 (sha256
1431 (base32 "08wk5l2r5k7akxx2s525f72pwqkv0pcf69dd60zwyggylz34lw65"))))
1432 (build-system gnu-build-system)
1433 (arguments
1434 (list
1435 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1436 (string-append "PREFIX=" #$output))
1437 #:phases
1438 #~(modify-phases %standard-phases
1439 (delete 'configure)
1440 (add-before 'check 'build-tests
1441 (lambda* (#:key tests? make-flags #:allow-other-keys)
1442 (when tests?
1443 (with-directory-excursion "tests/gen"
1444 (apply invoke "make" make-flags)))))
1445 (add-after 'install 'delete-static-archive
1446 ;; Don't want, but Makefile can't be told to only build shared.
1447 (lambda _
1448 (delete-file (in-vicinity #$output "lib/libmonocypher.a")))))))
1449 (native-inputs
1450 (list libsodium ;tests only
1451 mandoc
1452 pkg-config
1453 python-cryptography ;python is test only
1454 python-minimal))
1455 (home-page "https://monocypher.org/")
1456 (synopsis "Easy to use crypto library")
1457 (description "Monocypher is an easy to use, easy to deploy, auditable crypto
1458library for C. Features include:
1459@itemize
1460@item Authenticated encryption with XChaCha20 and Poly1305 (RFC 8439)
1461@item Hashing and key derivation with BLAKE2b (and SHA-512)
1462@item Password Hashing with Argon2
1463@item Public Key Cryptography with X25519 key exchanges
1464@item Public Key Signatures with EdDSA and Ed25519
1465@end itemize")
1466 (license (list license:bsd-2 license:cc0)))) ;dual licensed
1467
1468(define-public olm
1469 (package
1470 (name "olm")
1471 (version "3.2.16")
1472 (source (origin
1473 (method git-fetch)
1474 (uri (git-reference
1475 (url "https://gitlab.matrix.org/matrix-org/olm")
1476 (commit version)))
1477 (sha256
1478 (base32
1479 "19yibssxn12q6ddl15nvqzvcf1hwqial48ng6llfafwbkfdb8z95"))
1480 (file-name (git-file-name name version))
1481 ;; Delete the bundled blob. It's free, but unauditable,
1482 ;; and apparently only required for android.
1483 (snippet '(delete-file
1484 "android/gradle/wrapper/gradle-wrapper.jar"))))
1485 (build-system cmake-build-system)
1486 (arguments
1487 (list
1488 #:phases
1489 #~(modify-phases %standard-phases
1490 (replace 'check
1491 (lambda* (#:key tests? #:allow-other-keys)
1492 (when tests?
1493 (with-directory-excursion "tests"
1494 (invoke "ctest" "."))))))))
1495 (synopsis "Implementation of the Olm and Megolm cryptographic ratchets")
1496 (description "The Olm library implements the Double Ratchet
1497cryptographic ratchet. It is written in C and C++11, and exposed as a C
1498API.")
1499 (home-page "https://gitlab.matrix.org/matrix-org/olm/")
1500 (license license:asl2.0)))
1501
1502;; TODO: This is the only Python package here, consider to build from source
1503;; directly without inheritance and move to python-crypto module.
1504(define-public python-olm
1505 (package
1506 ;; python-olm is part of olm and must be updated at the same time.
1507 (inherit olm)
1508 (name "python-olm")
1509 (build-system pyproject-build-system)
1510 (arguments
1511 (list
1512 #:phases
1513 #~(modify-phases %standard-phases
1514 (add-after 'unpack 'chdir
1515 (lambda _
1516 (chdir "python")))
1517 (add-before 'build 'set-preprocessor
1518 (lambda _
1519 (setenv "CPP" "gcc -E"))))))
1520 (inputs (list olm))
1521 (propagated-inputs
1522 (list python-cffi python-future))
1523 (native-inputs
1524 (list python-aspectlib
1525 python-pytest
1526 python-pytest-benchmark
1527 python-setuptools))
1528 (synopsis "Python bindings for Olm")
1529 (description "The Olm library implements the Double Ratchet
1530cryptographic ratchet. This package contains its Python bindings.")))
1531
1532(define-public hash-extender
1533 (let ((commit "f00b1a02eca02b0907e26726f7efe437bc396aa4")
1534 (revision "0"))
1535 (package
1536 (name "hash-extender")
1537 (version (git-version "0.02" revision commit)) ;from hash_extender.c
1538 (source (origin
1539 (method git-fetch)
1540 (uri (git-reference
1541 (url "https://github.com/iagox86/hash_extender")
1542 (commit commit)))
1543 (sha256
1544 (base32
1545 "12hh2vs8ppavjj47rgyp60cdw70lm2zqdpdv1zdgb3jgdzkg7bf2"))
1546 (file-name (git-file-name name version))))
1547 (build-system gnu-build-system)
1548 (arguments
1549 (list
1550 #:phases
1551 #~(modify-phases %standard-phases
1552 (delete 'configure)
1553 ;; See: https://github.com/iagox86/hash_extender/issues/29
1554 (delete 'check)
1555 (replace 'install
1556 (lambda _
1557 (install-file "hash_extender" (string-append #$output "/bin"))
1558 (install-file
1559 "README.md"
1560 (string-append
1561 #$output "/share/doc/hash-extender-" #$version)))))))
1562 (inputs
1563 (list openssl))
1564 (synopsis "Tool for hash length extension attacks")
1565 (description "@command{hash_extender} is a utility for performing hash
1566length extension attacks supporting MD4, MD5, RIPEMD-160, SHA-0, SHA-1,
1567SHA-256, SHA-512, and WHIRLPOOL hashes.")
1568 (home-page "https://github.com/iagox86/hash_extender")
1569 (license license:bsd-3))))
1570
1571(define-public mkp224o
1572 (package
1573 (name "mkp224o")
1574 (version "1.7.0")
1575 (source (origin
1576 (method git-fetch)
1577 (uri (git-reference
1578 (url "https://github.com/cathugger/mkp224o")
1579 (commit (string-append "v" version))))
1580 (sha256
1581 (base32
1582 "1d0mrp936if1zi8ss0mmywglsmrl0jx42x2sgnm56js8ij3g3g9q"))
1583 (file-name (git-file-name name version))))
1584 (build-system gnu-build-system)
1585 (arguments
1586 (list
1587 #:tests? #f ; no test suite
1588 #:phases
1589 #~(modify-phases %standard-phases
1590 (add-before 'configure 'set-cflags
1591 (lambda _
1592 (setenv "CFLAGS" "-O3")))
1593 (replace 'install
1594 (lambda _
1595 (install-file "mkp224o" (string-append #$output "/bin")))))))
1596 (native-inputs
1597 (list autoconf))
1598 (inputs
1599 (list libsodium))
1600 (synopsis "Tor hidden service v3 name generator")
1601 (description "@code{mkp224o} generates valid ed25519 (hidden service
1602version 3) onion addresses. It allows one to produce customized vanity .onion
1603addresses using a brute-force method.")
1604 (home-page "https://github.com/cathugger/mkp224o")
1605 (license license:cc0)))
1606
1607(define-public transcrypt
1608 (package
1609 (name "transcrypt")
1610 (version "2.3.1")
1611 (source
1612 (origin
1613 (method git-fetch)
1614 (uri (git-reference
1615 (url "https://github.com/elasticdog/transcrypt")
1616 (commit (string-append "v" version))))
1617 (sha256
1618 (base32 "1yp1s69wphhsaks46rfj2ann8z397jgvbbq22ikdwxcw96f49pmk"))
1619 (file-name (git-file-name name version))))
1620 (inputs
1621 (list git openssl))
1622 (build-system copy-build-system)
1623 (arguments
1624 (list
1625 #:install-plan
1626 #~'(("transcrypt" "bin/transcrypt")
1627 ("man/transcrypt.1" "share/man/man1/transcrypt.1")
1628 ("contrib/bash/transcrypt"
1629 "share/bash-completion/completions/transcrypt")
1630 ("contrib/zsh/_transcrypt"
1631 "share/zsh/site-functions/_transcrypt"))))
1632 (home-page "https://github.com/elasticdog/transcrypt")
1633 (synopsis "Transparently encrypt files within a git repository")
1634 (description
1635 "Transcrypt is a script to configure transparent encryption of sensitive
1636files stored in a Git repository. Files that you choose will be automatically
1637encrypted when you commit them, and automatically decrypted when you check
1638them out. The process will degrade gracefully, so even people without your
1639encryption password can safely commit changes to the repository's
1640non-encrypted files.")
1641 (license license:expat)))
1642
1643(define-public cryfs
1644 (package
1645 (name "cryfs")
1646 (version "1.0.3")
1647 (source
1648 (origin
1649 (method url-fetch)
1650 (uri (string-append
1651 "https://github.com/cryfs/cryfs/releases/download/"
1652 version "/cryfs-" version ".tar.xz"))
1653 (sha256
1654 (base32 "1zlxbch22pdwvwpplcgzpx109a4plwc4a5qlpa8190awdr0cqc0z"))
1655 (patches (search-patches "cryfs-fuse3-up.patch"))))
1656 (build-system cmake-build-system)
1657 (arguments
1658 '(#:modules ((guix build cmake-build-system)
1659 (guix build utils)
1660 (srfi srfi-1))
1661 #:configure-flags
1662 ;; Note: This also disables checking for security issues.
1663 '("-DCRYFS_UPDATE_CHECKS=OFF"
1664 "-DBUILD_TESTING=ON")
1665 ;; crypto++ is still bundled: https://github.com/cryfs/cryfs/issues/369
1666 #:phases
1667 (modify-phases %standard-phases
1668 (add-before 'configure 'fix-up
1669 (lambda* (#:key tests? #:allow-other-keys)
1670 (chdir "..") ; We end up in .github somehow
1671 ;; Install documentation with Guix defaults.
1672 (substitute* "doc/CMakeLists.txt"
1673 (("CONFIGURATIONS Release")
1674 "CONFIGURATIONS Release RelWithDebInfo"))))
1675 (replace 'check
1676 (lambda* (#:key tests? #:allow-other-keys)
1677 (when tests?
1678 (setenv "HOME" "/tmp")))))))
1679 (native-inputs
1680 (list googletest pkg-config python-wrapper))
1681 (inputs
1682 (list boost curl fuse range-v3 spdlog))
1683 (home-page "https://www.cryfs.org/")
1684 (synopsis "Encrypted FUSE filesystem for the cloud")
1685 (description "CryFS encrypts your files, so you can safely store them anywhere.
1686It works well together with cloud services like Dropbox, iCloud, OneDrive and
1687others. CryFS creates an encrypted userspace filesystem that can be mounted
1688via FUSE without root permissions. It is similar to EncFS, but provides
1689additional security and privacy measures such as hiding file sizes and directory
1690structure. However CryFS is not considered stable yet by the developers.")
1691 (license license:lgpl3+)
1692 (properties `((tunable? . #t)))))
1693
1694(define-public b3sum
1695 (package
1696 (name "b3sum")
1697 (version "1.8.4")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (crate-uri "b3sum" version))
1702 (file-name (string-append name "-" version ".tar.gz"))
1703 (sha256
1704 (base32 "0pkra5zh680cl9q92hpzmg9flz99b06bhpg7jyhymg1nkm0anw7a"))))
1705 (build-system cargo-build-system)
1706 (arguments
1707 (list
1708 #:install-source? #f
1709 #:phases
1710 #~(modify-phases %standard-phases
1711 (add-before 'check 'patch-tests
1712 (lambda _
1713 (substitute* "tests/cli_tests.rs"
1714 (("/bin/sh") (which "sh"))))))))
1715 (inputs (cargo-inputs 'b3sum))
1716 (home-page "https://github.com/BLAKE3-team/BLAKE3")
1717 (synopsis "Command line BLAKE3 checksum tool")
1718 (description "This package provides @code{b3sum}, a command line
1719checksum tool based on the BLAKE3 cryptographic hash function.")
1720 ;; Users may choose between these two licenses when redistributing the
1721 ;; program provided by this package.
1722 (license (list license:cc0 license:asl2.0))))
1723
1724(define-public libxcrypt
1725 (package
1726 (name "libxcrypt")
1727 (version "4.4.38")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri
1732 (string-append
1733 "https://github.com/besser82/libxcrypt/releases/download/v" version
1734 "/libxcrypt-" version ".tar.xz"))
1735 (sha256
1736 (base32 "1mkd42s12iagnpqk29hqi5vk2a6vkdaagn81gwr9k9vf62f4nc40"))))
1737 (build-system gnu-build-system)
1738 (native-inputs
1739 (list perl))
1740 (arguments
1741 (cond
1742 ((target-ppc32?)
1743 (list #:tests? #f)) ; TODO: Investigate test failures.
1744 ((target-mingw?)
1745 (list #:configure-flags
1746 #~(list #$(string-append "CFLAGS=-g -O2"
1747 " -Wno-error=pedantic"
1748 " -Wno-error=conversion")
1749 "ac_cv_ld_no_undefined=-no-undefined")))
1750 (else '())))
1751 (synopsis
1752 "Extended crypt library for descrypt, md5crypt, bcrypt, and others")
1753 (description
1754 "libxcrypt is a modern library for one-way hashing of passwords. It
1755supports a wide variety of both modern and historical hashing methods:
1756yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt,
1757SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt.")
1758 (home-page "https://github.com/besser82/libxcrypt")
1759 (license license:lgpl2.1)))
1760
1761(define-public libxcrypt-without-failure-tokens
1762 ;; This version of libxcrypt is used for guile-2.2.4, which is used in Guix
1763 ;; v1.0.0 and thus needs to be supported for guix time-machine.
1764 ;;
1765 ;; Guile uses the 'crypt' hashing function that used to be provided by glibc,
1766 ;; but was moved to libxcrypt around glibc 2.39. However, the crypt function
1767 ;; in libxcrypt works differently for invalid salt values: libxcrypt returnns
1768 ;; the failure token "*0" for (crypt "pass" "$X$abc"), where glibc raised
1769 ;; "Invalid argument" (EINVAL). The --disable-failure-tokens flag lets
1770 ;; libxcrypt behave in the same way as glibc.
1771 ;;
1772 ;; Guile 2.2.4 explicitly checks for the glibc behavior of crypt, and thus
1773 ;; needs libxcrypt to be compiled with --disable-failure-tokens.
1774 (hidden-package
1775 (package/inherit libxcrypt
1776 (name "libxcrypt-without-failure-tokens")
1777 (arguments
1778 (substitute-keyword-arguments arguments
1779 ((#:configure-flags flags #~'())
1780 #~(cons* "--disable-failure-tokens" #$flags)))))))
1781
1782(define-public keychain
1783 (package
1784 (name "keychain")
1785 (version "2.9.8")
1786 (source (origin
1787 (method git-fetch)
1788 (uri (git-reference
1789 (url "https://github.com/danielrobbins/keychain")
1790 (commit version)))
1791 (file-name (git-file-name name version))
1792 (sha256
1793 (base32
1794 "1ps1hm6xf12agbrgw3jpja28q6b52cpa0fgsvkyhp4j1b2hfhkf6"))))
1795 (build-system gnu-build-system)
1796 (arguments
1797 (list
1798 #:tests? #f ; No test suite
1799 #:phases
1800 #~(modify-phases %standard-phases
1801 (delete 'configure)
1802 (replace 'install
1803 (lambda _
1804 (install-file "keychain" (string-append #$output "/bin/"))
1805 (install-file "keychain.1"
1806 (string-append #$output "/share/man/man1")))))))
1807 (propagated-inputs
1808 (list procps))
1809 (native-inputs
1810 (list perl))
1811 (synopsis
1812 "SSH or GPG agent frontend that can share a single agent on the same
1813system")
1814 (description
1815 "Keychain is usually run from shell profiles like ~/.bash_profile, but
1816it is also possible to use it with non-interactive shells. It works
1817with various operating systems (including GNU/Linux and HURD) and
1818shells (like bourne-compatible, csh-compatible and fish shells). By
1819default Keychain will only start ssh-agent, but it can also be
1820configured to start gpg-agent.")
1821 (home-page "https://github.com/danielrobbins/keychain")
1822 (license license:gpl2)))
1823
1824(define-public libdigidocpp
1825 (package
1826 (name "libdigidocpp")
1827 (version "4.3.0")
1828 (source
1829 (origin
1830 (method git-fetch)
1831 (uri (git-reference
1832 (url "https://github.com/open-eid/libdigidocpp")
1833 (commit (string-append "v" version))))
1834 (file-name (git-file-name name version))
1835 (sha256
1836 (base32 "1kv1cyc8ylsxcvhsx1lgbjaar7ilf14gmcnmzclql2wd5vf1973z"))
1837 (modules '((guix build utils)))
1838 (snippet '(delete-file-recursively "src/minizip"))))
1839 (build-system cmake-build-system)
1840 (arguments (list #:test-exclude "runtest"))
1841 (native-inputs (list boost pkg-config))
1842 (inputs
1843 (list libltdl
1844 libxml2
1845 libxslt
1846 minizip-ng-compat
1847 openssl
1848 xmlsec-openssl
1849 zlib))
1850 (home-page "https://github.com/open-eid/libdigidocpp")
1851 (synopsis "DigiDoc digital signature library")
1852 (description "DigiDoc is an XML file format for documents with digital
1853signatures used by the Estonian ID card infrastructure. This library allows
1854for creation and reading of DigiDoc files.")
1855 (license license:lgpl2.1+)))
1856
1857(define-public osslsigncode
1858 (package
1859 (name "osslsigncode")
1860 (version "2.14")
1861 (source
1862 (origin
1863 (method git-fetch)
1864 (uri (git-reference
1865 (url "https://github.com/mtrojnar/osslsigncode")
1866 (commit version)))
1867 (file-name (git-file-name name version))
1868 (sha256
1869 (base32 "06ybcp9r8w0algxvvv0mz4h1cjw764b33s9b26n1dhvpl1dqc24c"))))
1870 (build-system cmake-build-system)
1871 (arguments
1872 (list
1873 #:parallel-tests? #f))
1874 (inputs (list openssl zlib))
1875 (native-inputs (list python-cryptography python-minimal-wrapper))
1876 (home-page "https://github.com/mtrojnar/osslsigncode")
1877 (synopsis
1878 "Authenticode signing for PE, CAB, CAT, MSI, APPX and script files")
1879 (description
1880 "osslsigncode is a small tool that implements part of the
1881functionality of the Microsoft tool signtool.exe - more exactly the Authenticode
1882signing and timestamping. It is based on OpenSSL.")
1883 (license license:gpl3+)))