+
+(define-public libsecp256k1
+ (let ((commit "e34ceb333b1c0e6f4115ecbb80c632ac1042fa49"))
+ (package
+ (name "libsecp256k1")
+ (version (git-version "20181126" "1" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bitcoin-core/secp256k1")
+ (commit commit)))
+ (sha256
+ (base32
+ "0as78s179hcr3ysk3fw98k5wzabgnwri7vkkc17wg31lyz6ids6c"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ ;; WARNING: This package might need additional configure flags to run properly.
+ ;; See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/libsecp256k1.
+ (synopsis "C library for EC operations on curve secp256k1")
+ (description
+ "Optimized C library for EC operations on curve secp256k1.
+
+This library is a work in progress and is being used to research best
+practices. Use at your own risk.
+
+Features:
+
+@itemize
+@item secp256k1 ECDSA signing/verification and key generation.
+@item Adding/multiplying private/public keys.
+@item Serialization/parsing of private keys, public keys, signatures.
+@item Constant time, constant memory access signing and pubkey generation.
+@item Derandomized DSA (via RFC6979 or with a caller provided function.)
+@item Very efficient implementation.
+@end itemize\n")
+ (home-page "https://github.com/bitcoin-core/secp256k1")
+ (license license:unlicense))))
+
+(define-public stoken
+ (package
+ (name "stoken")
+ (version "0.92")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/stoken/"
+ "stoken-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0npgr6y85gzwksy8jkwa4yzvqwjprwnplx3yiw3ayk4f0ldlhaxa"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("nettle" ,nettle)
+ ("libxml2" ,libxml2)))
+ (home-page "http://stoken.sf.net")
+ (synopsis "Software Token for cryptographic authentication")
+ (description
+ "@code{stoken} is a token code generator compatible with RSA SecurID
+128-bit (AES) tokens. This package contains a standalone command-line program
+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)))
+ (file-name (git-file-name name 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)))
+
+(define-public minisign
+ (package
+ (name "minisign")
+ (version "0.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/jedisct1/minisign/releases/download/"
+ version "/minisign-" version ".tar.gz"))
+ (sha256
+ (base32
+ "10hhgwxf9rcdlr00shrkcyxndrc22dh5lj8k5z27xg3nc0jba3hk"))))
+ (build-system cmake-build-system)
+ (arguments
+ ; No test suite
+ `(#:tests? #f))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libsodium" ,libsodium)))
+ (home-page "https://jedisct1.github.io/minisign")
+ (synopsis "Tool to sign files and verify signatures")
+ (description
+ "Minisign is a dead simple tool to sign files and verify signatures. It is
+portable, lightweight, and uses the highly secure Ed25519 public-key signature
+system. Signature written by minisign can be verified using OpenBSD's
+signify tool: public key files and signature files are compatible. However,
+minisign uses a slightly different format to store secret keys. Minisign
+signatures include trusted comments in addition to untrusted comments.
+Trusted comments are signed, thus verified, before being displayed.")
+ (license license:isc)))