summary refs log tree commit diff
path: root/gnu/packages/crypto.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-03-01 17:33:00 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-03-01 17:33:00 +0100
commit19464173bafdc42adfc8dd7277c491c40ddef66b (patch)
tree2842e0f62404e307ef0432f2ccce8b5ce60ab392 /gnu/packages/crypto.scm
parent85ef07c4b278200db7c396f4021146916588f2fb (diff)
parent81bb55459af85c408977470673e718ed1c0d6a25 (diff)
downloadguix-19464173bafdc42adfc8dd7277c491c40ddef66b.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/crypto.scm')
-rw-r--r--gnu/packages/crypto.scm50
1 files changed, 49 insertions, 1 deletions
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 92333753be..e0d4f27874 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox>
 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
@@ -68,6 +68,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build utils)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26))
 
@@ -927,3 +928,50 @@ Features:
 that allows for importing token seeds, generating token codes, and various
 utility/testing functions.")
     (license license:lgpl2.1+)))
+
+(define-public hpenc
+  (package
+    (name "hpenc")
+    (version "3.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/vstakhov/hpenc")
+                     (commit version)))
+              (sha256
+               (base32
+                "1fb5yi3d2k8kd4zm7liiqagpz610y168xrr1cvn7cbq314jm2my1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No test suite
+       #:make-flags
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             ;; Build the program and the docs.
+             "SUBDIRS=src doc")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ; No ./configure script
+         (add-after 'unpack 'patch-path
+           (lambda _
+             (substitute* '("src/Makefile" "doc/Makefile")
+               (("/usr/bin/install")
+                "install"))))
+         (add-before 'install 'make-output-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (man1 (string-append out "/share/man/man1")))
+               (mkdir-p bin)
+               (mkdir-p man1)
+               #t))))))
+    (inputs
+     `(("libsodium" ,libsodium)
+       ("openssl" ,openssl)))
+    (synopsis "High-performance command-line tool for stream encryption")
+    (description "Hpenc is a command-line tool for performing authenticated
+encryption (AES-GCM and ChaCha20-Poly1305) of streaming data.  It does not
+perform an asymmetric key exchange, instead requiring the user to distribute
+pre-shared keys out of band.  It is designed to handle large amounts of data
+quickly by using all your CPU cores and hardware acceleration.")
+    (home-page "https://github.com/vstakhov/hpenc")
+    (license license:bsd-3)))