1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
3 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Nikita <nikita@n0.is>
5 ;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
6 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages haskell-crypto)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages haskell)
28 #:use-module (gnu packages haskell-check)
29 #:use-module (gnu packages haskell-xyz)
30 #:use-module (gnu packages tls)
31 #:use-module (guix build-system haskell)
32 #:use-module (guix download)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix packages)
35 #:use-module (guix utils))
37 (define-public ghc-asn1-types
39 (name "ghc-asn1-types")
43 (uri (string-append "https://hackage.haskell.org/package/"
44 "asn1-types/asn1-types-"
48 "162lacdl9jr42pdhaj9hxqlba6hjxm6g866anna74q6v3cvw5ssp"))))
49 (build-system haskell-build-system)
51 `(("ghc-memory" ,ghc-memory)
52 ("ghc-hourglass" ,ghc-hourglass)))
53 (home-page "https://github.com/vincenthz/hs-asn1-types")
54 (synopsis "ASN.1 types for Haskell")
56 "The package provides the standard types for dealing with the ASN.1
58 (license license:bsd-3)))
60 (define-public ghc-asn1-encoding
62 (name "ghc-asn1-encoding")
66 (uri (string-append "https://hackage.haskell.org/package/"
67 "asn1-encoding/asn1-encoding-"
71 "02nsr30h5yic1mk7znf0q4z3n560ip017n60hg7ya25rsfmxxy6r"))))
72 (build-system haskell-build-system)
74 `(("ghc-hourglass" ,ghc-hourglass)
75 ("ghc-asn1-types" ,ghc-asn1-types)))
77 `(("ghc-tasty" ,ghc-tasty)
78 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
79 (home-page "https://github.com/vincenthz/hs-asn1")
80 (synopsis "ASN1 data reader and writer in RAW, BER and DER forms")
82 "This package provides a reader and writer for ASN1 data in raw form with
83 supports for high level forms of ASN1 (BER, and DER).")
84 (license license:bsd-3)))
86 (define-public ghc-asn1-parse
88 (name "ghc-asn1-parse")
92 (uri (string-append "https://hackage.haskell.org/package/"
93 "asn1-parse/asn1-parse-"
97 "17pk8y3nwv9b9i5j15qlmwi7fmq9ab2z4kfpjk2rvcrh9lsf27wg"))))
98 (build-system haskell-build-system)
100 `(("ghc-asn1-types" ,ghc-asn1-types)
101 ("ghc-asn1-encoding" ,ghc-asn1-encoding)))
102 (home-page "https://github.com/vincenthz/hs-asn1")
103 (synopsis "Simple monadic parser for ASN1 stream types")
105 "This package provides a simple monadic parser for ASN1 stream types,
106 when ASN1 pattern matching is not convenient.")
107 (license license:bsd-3)))
109 (define-public ghc-crypto-api
111 (name "ghc-crypto-api")
116 (uri (string-append "https://hackage.haskell.org/package/"
117 "crypto-api-" version "/"
118 "crypto-api-" version ".tar.gz"))
121 "19bsmkqkpnvh01b77pmyarx00fic15j4hvg4pzscrj4prskrx2i9"))))
122 (build-system haskell-build-system)
123 (inputs `(("ghc-cereal" ,ghc-cereal)
124 ("ghc-tagged" ,ghc-tagged)
125 ("ghc-entropy" ,ghc-entropy)))
126 (home-page "https://github.com/TomMD/crypto-api")
127 (synopsis "Provides generic interface for cryptographic operations
129 (description "This Haskell package provides a generic interface for
130 cryptographic operations (hashes, ciphers, randomness).
132 Maintainers of hash and cipher implementations are encouraged to add instances
133 for the classes defined in @code{Crypto.Classes}. @code{Crypto} users are
134 similarly encouraged to use the interfaces defined in the @code{Classes} module.
136 Any concepts or functions of general use to more than one cryptographic
137 algorithm (ex: padding) is within scope of this package.")
138 (license license:bsd-3)))
140 (define-public ghc-crypto-api-tests
142 (name "ghc-crypto-api-tests")
147 (uri (string-append "https://hackage.haskell.org/package/"
148 "crypto-api-tests-" version "/"
149 "crypto-api-tests-" version ".tar.gz"))
152 "0w3j43jdrlj28jryp18hc6q84nkl2yf4vs1hhgrsk7gb9kfyqjpl"))))
153 (build-system haskell-build-system)
154 (outputs '("out" "static" "doc"))
155 (inputs `(("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
156 ("ghc-crypto-api" ,ghc-crypto-api)
157 ("ghc-cereal" ,ghc-cereal)
158 ("ghc-test-framework" ,ghc-test-framework)
159 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
160 ("ghc-hunit" ,ghc-hunit)
161 ("ghc-quickcheck" ,ghc-quickcheck)))
162 (home-page "https://github.com/TomMD/crypto-api-tests")
163 (synopsis "Test framework and KATs for cryptographic operations for Haskell")
164 (description "This Haskell package provides a test framework for hash and
165 cipher operations using the crypto-api interface. Known answer tests (KATs)
166 for common cryptographic algorithms are included.")
167 (license license:bsd-3)))
169 (define-public ghc-cryptohash
171 (name "ghc-cryptohash")
177 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
181 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
182 (build-system haskell-build-system)
184 `(("ghc-byteable" ,ghc-byteable)
185 ("ghc-cryptonite" ,ghc-cryptonite)
186 ("ghc-memory" ,ghc-memory)
187 ("ghc-hunit" ,ghc-hunit)
188 ("ghc-quickcheck" ,ghc-quickcheck)
189 ("ghc-tasty" ,ghc-tasty)
190 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
191 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
192 (home-page "https://github.com/vincenthz/hs-cryptohash")
193 (synopsis "Collection of cryptographic hashes in Haskell")
195 "A collection of crypto hashes, with a practical incremental and one-pass,
196 pure APIs, with performance close to the fastest implementations available in
197 other languages. The implementations are made in C with a haskell FFI wrapper
198 that hides the C implementation.")
199 (license license:bsd-3)))
201 (define-public ghc-cryptohash-md5
203 (name "ghc-cryptohash-md5")
204 (version "0.11.100.1")
208 (uri (string-append "https://hackage.haskell.org/package/"
209 "cryptohash-md5-" version "/"
210 "cryptohash-md5-" version ".tar.gz"))
213 "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
214 (build-system haskell-build-system)
217 ("4" "0gzaibjkipijwj9m9l6wrhfk5s3kdvfbhdl7cl1373cjfs41v0m3")
218 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
219 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
220 ("ghc-puremd5" ,ghc-puremd5)
221 ("ghc-tasty" ,ghc-tasty)
222 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
223 ("ghc-hunit" ,ghc-hunit)))
224 (home-page "https://github.com/hvr/cryptohash-md5")
225 (synopsis "MD5 implementation for Haskell")
226 (description "This Haskell package provides implementation of MD5.")
227 (license license:bsd-3)))
229 (define-public ghc-cryptohash-sha1
231 (name "ghc-cryptohash-sha1")
232 (version "0.11.100.1")
236 (uri (string-append "https://hackage.haskell.org/package/"
237 "cryptohash-sha1-" version "/"
238 "cryptohash-sha1-" version ".tar.gz"))
241 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
242 (build-system haskell-build-system)
245 ("4" "0qb2wasfc4dpf6f9ahvhlv8njb3p3p9iwblg4032ssi95cg85718")
246 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
247 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
249 ("ghc-tasty" ,ghc-tasty)
250 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
251 ("ghc-hunit" ,ghc-hunit)))
252 (home-page "https://github.com/hvr/cryptohash-sha1")
253 (synopsis "SHA-1 implementation for Haskell")
254 (description "This Haskell package provides an incremental and one-pass,
255 pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
256 including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
257 performance close to the fastest implementations available in other languages.
259 The implementation is made in C with a haskell FFI wrapper that hides
260 the C implementation.")
261 (license license:bsd-3)))
263 (define-public ghc-cryptohash-sha256
265 (name "ghc-cryptohash-sha256")
266 (version "0.11.101.0")
270 (uri (string-append "https://hackage.haskell.org/package/"
271 "cryptohash-sha256-" version "/"
272 "cryptohash-sha256-" version ".tar.gz"))
275 "1p85vajcgw9hmq8zsz9krzx0vxh7aggwbg5w9ws8w97avcsn8xaj"))))
276 (build-system haskell-build-system)
279 ("3" "1arhz4y792kx439s2zv9x291gvvl2zxcfx9sq0nxsjlz7c3hpyp1")
280 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
282 `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
284 `(("ghc-sha" ,ghc-sha)
285 ("ghc-tasty" ,ghc-tasty)
286 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
287 ("ghc-hunit" ,ghc-hunit)))
288 (home-page "https://github.com/hvr/cryptohash-sha1")
289 (synopsis "SHA-256 implementation for Haskell")
290 (description "This Haskell package provides an incremental and
291 one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2,
292 SHA-256 cryptographic hash algorithm}, with performance close to the
293 fastest implementations available in other languages.
295 The implementation is made in C with a haskell FFI wrapper that hides
296 the C implementation.")
297 (license license:bsd-3)))
299 (define-public ghc-cryptonite
301 (name "ghc-cryptonite")
305 (uri (string-append "https://hackage.haskell.org/package/"
306 "cryptonite/cryptonite-"
310 "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9"))))
311 (build-system haskell-build-system)
312 ;; FIXME: tests are broken.
313 ;; See https://github.com/haskell-crypto/cryptonite/issues/260
314 (arguments '(#:tests? #f))
315 (outputs '("out" "static" "doc"))
317 `(("ghc-basement" ,ghc-basement)
318 ("ghc-memory" ,ghc-memory)
319 ("ghc-byteable" ,ghc-byteable)))
321 `(("ghc-tasty" ,ghc-tasty)
322 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
323 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
324 ("ghc-tasty-kat" ,ghc-tasty-kat)))
325 (home-page "https://github.com/haskell-crypto/cryptonite")
326 (synopsis "Cryptography primitives")
328 "This package is a repository of cryptographic primitives for Haskell.
329 It supports a wide range of symmetric ciphers, cryptographic hash functions,
330 public key algorithms, key derivation numbers, cryptographic random number
331 generators, and more.")
332 (license license:bsd-3)))
334 (define-public ghc-digest
342 "https://hackage.haskell.org/package/digest/digest-"
347 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
348 (build-system haskell-build-system)
350 `(#:extra-directories ("zlib")))
354 "https://hackage.haskell.org/package/digest")
356 "Various cryptographic hashes for bytestrings")
358 "This package provides efficient cryptographic hash implementations for
359 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
360 are implemented as FFI bindings to efficient code from zlib.")
361 (license license:bsd-3)))
363 (define-public ghc-entropy
370 (uri (string-append "https://hackage.haskell.org/package/"
371 "entropy-" version "/"
372 "entropy-" version ".tar.gz"))
374 (base32 "0szf8hi1pi8g0kxnkcymh65gk1b0niyl1nnkckzdqyar87qal0jm"))))
375 (build-system haskell-build-system)
376 (home-page "https://github.com/TomMD/entropy")
377 (synopsis "Provides platform independent entropy source for Haskell")
378 (description "This Haskell package provides a platform independent method
379 to obtain cryptographically strong entropy.")
380 (license license:bsd-3)))
382 (define-public ghc-pem
388 (uri (string-append "https://hackage.haskell.org/package/"
389 "pem/pem-" version ".tar.gz"))
392 "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
393 (build-system haskell-build-system)
395 `(("ghc-basement" ,ghc-basement)
396 ("ghc-memory" ,ghc-memory)))
398 `(("ghc-test-framework" ,ghc-test-framework)
399 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
400 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
401 ("ghc-hunit" ,ghc-hunit)
402 ("ghc-quickcheck" ,ghc-quickcheck)))
403 (home-page "https://github.com/vincenthz/hs-pem")
404 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
406 "This library provides readers and writers for the @dfn{Privacy Enhanced
407 Mail} (PEM) format.")
408 (license license:bsd-3)))
410 (define-public ghc-puremd5
417 (uri (string-append "https://hackage.haskell.org/package/"
418 "pureMD5-" version "/"
419 "pureMD5-" version ".tar.gz"))
422 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
423 (build-system haskell-build-system)
424 (inputs `(("ghc-cereal" ,ghc-cereal)
425 ("ghc-crypto-api" ,ghc-crypto-api)
426 ("ghc-tagged" ,ghc-tagged)))
427 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
428 ("ghc-quickcheck" ,ghc-quickcheck)
429 ("ghc-test-framework" ,ghc-test-framework)
430 ("ghc-test-framework-quickcheck2"
431 ,ghc-test-framework-quickcheck2)
432 ("ghc-pretty-hex" ,ghc-pretty-hex)))
433 (home-page "https://github.com/TomMD/pureMD5")
434 (synopsis "Haskell implementation of the MD5 hash algorithm")
435 (description "This package provides a Haskell-only implementation of
436 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
438 (license license:bsd-3)))
440 (define-public ghc-sha
446 (uri (string-append "https://hackage.haskell.org/package/"
447 "SHA/SHA-" version ".tar.gz"))
450 "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
451 (build-system haskell-build-system)
453 `(("ghc-quickcheck" ,ghc-quickcheck)
454 ("ghc-test-framework" ,ghc-test-framework)
455 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
456 (home-page "https://hackage.haskell.org/package/SHA")
457 (synopsis "SHA suite of message digest functions")
459 "This library implements the SHA suite of message digest functions,
460 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
461 SHA-based HMAC routines. The functions have been tested against most of the
462 NIST and RFC test vectors for the various functions. While some attention has
463 been paid to performance, these do not presently reach the speed of well-tuned
464 libraries, like OpenSSL.")
465 (license license:bsd-3)))
467 (define-public ghc-x509
473 (uri (string-append "https://hackage.haskell.org/package/"
474 "x509/x509-" version ".tar.gz"))
477 "1j67c35g8334jx7x32hh6awhr43dplp0qwal5gnlkmx09axzrc5i"))))
478 (build-system haskell-build-system)
480 `(("ghc-memory" ,ghc-memory)
481 ("ghc-hourglass" ,ghc-hourglass)
483 ("ghc-asn1-types" ,ghc-asn1-types)
484 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
485 ("ghc-asn1-parse" ,ghc-asn1-parse)
486 ("ghc-cryptonite" ,ghc-cryptonite)))
488 `(("ghc-tasty" ,ghc-tasty)
489 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
490 (home-page "https://github.com/vincenthz/hs-certificate")
491 (synopsis "X509 reader and writer")
493 "This library provides functions to read and write X509 certificates.")
494 (license license:bsd-3)))
496 (define-public ghc-x509-store
498 (name "ghc-x509-store")
502 (uri (string-append "https://hackage.haskell.org/package/"
503 "x509-store/x509-store-"
507 "1y8yyr1i95jkllg8k0z54k5v4vachp848clc07m33xpxidn3b1lp"))))
508 (build-system haskell-build-system)
510 `(("ghc-pem" ,ghc-pem)
511 ("ghc-asn1-types" ,ghc-asn1-types)
512 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
513 ("ghc-cryptonite" ,ghc-cryptonite)
514 ("ghc-x509" ,ghc-x509)))
516 `(("ghc-tasty" ,ghc-tasty)
517 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
518 (home-page "https://github.com/vincenthz/hs-certificate")
519 (synopsis "X.509 collection accessing and storing methods")
521 "This package provides functions for accessing and storing X.509
522 collections, certificates, revocation lists, and exception lists.")
523 (license license:bsd-3)))
525 (define-public ghc-x509-validation
527 (name "ghc-x509-validation")
531 (uri (string-append "https://hackage.haskell.org/package/"
532 "x509-validation/x509-validation-"
536 "16yihzljql3z8w5rgdl95fv3hgk7yd86kbl9b3glllsark5j2hzr"))))
537 (build-system haskell-build-system)
539 `(("ghc-memory" ,ghc-memory)
540 ("ghc-byteable" ,ghc-byteable)
541 ("ghc-hourglass" ,ghc-hourglass)
542 ("ghc-data-default-class" ,ghc-data-default-class)
544 ("ghc-asn1-types" ,ghc-asn1-types)
545 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
546 ("ghc-x509" ,ghc-x509)
547 ("ghc-x509-store" ,ghc-x509-store)
548 ("ghc-cryptonite" ,ghc-cryptonite)))
550 `(("ghc-tasty" ,ghc-tasty)
551 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
552 (home-page "https://github.com/vincenthz/hs-certificate")
553 (synopsis "X.509 certificate and revocation list validation")
555 "This package provides functions for X.509 certificate and revocation
557 (license license:bsd-3)))
559 (define-public ghc-x509-system
561 (name "ghc-x509-system")
565 (uri (string-append "https://hackage.haskell.org/package/"
566 "x509-system/x509-system-"
570 "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
571 (build-system haskell-build-system)
573 `(("ghc-pem" ,ghc-pem)
574 ("ghc-x509" ,ghc-x509)
575 ("ghc-x509-store" ,ghc-x509-store)))
576 (home-page "https://github.com/vincenthz/hs-certificate")
577 (synopsis "Handle system X.509 accessors and storage")
579 "This package provides a library to handle system accessors and storage
580 for X.509 certificates.")
581 (license license:bsd-3)))
583 (define-public ghc-crypto-cipher-types
585 (name "ghc-crypto-cipher-types")
590 (uri (string-append "https://hackage.haskell.org/package/"
591 "crypto-cipher-types-" version "/"
592 "crypto-cipher-types-" version ".tar.gz"))
595 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
596 (build-system haskell-build-system)
597 (inputs `(("ghc-byteable" ,ghc-byteable)
598 ("ghc-securemem" ,ghc-securemem)))
599 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
600 (synopsis "Generic cryptography cipher types for Haskell")
601 (description "This Haskell package provides basic typeclasses and types
602 for symmetric ciphers.")
603 (license license:bsd-3)))
605 (define-public ghc-cipher-aes
607 (name "ghc-cipher-aes")
612 (uri (string-append "https://hackage.haskell.org/package/"
613 "cipher-aes-" version "/"
614 "cipher-aes-" version ".tar.gz"))
617 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
618 (build-system haskell-build-system)
619 (inputs `(("ghc-byteable" ,ghc-byteable)
620 ("ghc-securemem" ,ghc-securemem)
621 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
622 (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
623 ("ghc-test-framework" ,ghc-test-framework)
624 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
625 ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
626 (home-page "https://github.com/vincenthz/hs-cipher-aes")
627 (synopsis "AES cipher implementation with advanced mode of operations for
629 (description "This Haskell package provides AES cipher implementation.
631 The modes of operations available are ECB (Electronic code book), CBC (Cipher
632 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
633 GCM (Galois Counter Mode).
635 The AES implementation uses AES-NI when available (on x86 and x86-64
636 architecture), but fallback gracefully to a software C implementation.
638 The software implementation uses S-Boxes, which might suffer for cache timing
639 issues. However do notes that most other known software implementations,
640 including very popular one (openssl, gnutls) also uses similar
641 implementation. If it matters for your case, you should make sure you have
642 AES-NI available, or you'll need to use a different implementation.")
643 (license license:bsd-3)))
645 (define-public ghc-crypto-random
647 (name "ghc-crypto-random")
652 (uri (string-append "https://hackage.haskell.org/package/"
653 "crypto-random-" version "/"
654 "crypto-random-" version ".tar.gz"))
657 "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
658 (build-system haskell-build-system)
659 (inputs `(("ghc-securemem" ,ghc-securemem)
660 ("ghc-vector" ,ghc-vector)))
661 (home-page "https://github.com/vincenthz/hs-crypto-random")
662 (synopsis "Simple cryptographic random related types for Haskell")
663 (description "Simple cryptographic random related types: a safe
664 abstraction for CPRNGs.")
665 (license license:bsd-3)))
667 (define-public ghc-cprng-aes
669 (name "ghc-cprng-aes")
674 (uri (string-append "https://hackage.haskell.org/package/"
675 "cprng-aes-" version "/"
676 "cprng-aes-" version ".tar.gz"))
679 "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
680 (build-system haskell-build-system)
681 (inputs `(("ghc-byteable" ,ghc-byteable)
682 ("ghc-crypto-random" ,ghc-crypto-random)
683 ("ghc-cipher-aes" ,ghc-cipher-aes)))
684 (home-page "https://github.com/vincenthz/hs-cprng-aes")
685 (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
687 (description "Simple crypto pseudo-random-number-generator with really
688 good randomness property.
690 Using ent, a randomness property maker on one 1Mb sample:
693 @item Entropy = 7.999837 bits per byte.
694 @item Optimum compression would reduce the size of this 1048576 byte file by 0
696 @item Chi square distribution for 1048576 samples is 237.02.
697 @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
698 @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
701 Compared to urandom with the same sampling:
704 @item Entropy = 7.999831 bits per byte.
705 @item Optimum compression would reduce the size of this 1048576 byte file by 0
707 @item Chi square distribution for 1048576 samples is 246.63.
708 @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
709 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
711 (license license:bsd-3)))
713 (define-public ghc-ed25519
721 "https://hackage.haskell.org/package/ed25519/ed25519-"
725 "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
726 (build-system haskell-build-system)
729 ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
730 ;; We omit these test suites because they require old versions of
731 ;; packages and packages we do not have.
733 '("--flags=-test-hlint -test-doctests -test-properties")))
734 (home-page "http://thoughtpolice.github.com/hs-ed25519")
735 (synopsis "Ed25519 cryptographic signatures")
736 (description "This package provides a simple, fast, self-contained
737 copy of the Ed25519 public-key signature system with a clean interface.
738 It also includes support for detached signatures, and thorough
739 documentation on the design and implementation, including usage
741 (license license:expat)))
743 (define-public ghc-tls
749 (uri (string-append "https://hackage.haskell.org/package/"
750 "tls/tls-" version ".tar.gz"))
753 "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
754 (build-system haskell-build-system)
756 `(("ghc-cereal" ,ghc-cereal)
757 ("ghc-data-default-class" ,ghc-data-default-class)
758 ("ghc-memory" ,ghc-memory)
759 ("ghc-cryptonite" ,ghc-cryptonite)
760 ("ghc-asn1-types" ,ghc-asn1-types)
761 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
762 ("ghc-x509" ,ghc-x509)
763 ("ghc-x509-store" ,ghc-x509-store)
764 ("ghc-x509-validation" ,ghc-x509-validation)
765 ("ghc-async" ,ghc-async)
766 ("ghc-network" ,ghc-network)
767 ("ghc-hourglass" ,ghc-hourglass)))
769 `(("ghc-tasty" ,ghc-tasty)
770 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
771 ("ghc-quickcheck" ,ghc-quickcheck)))
772 (home-page "https://github.com/vincenthz/hs-tls")
774 "TLS/SSL protocol native implementation (Server and Client)")
776 "Native Haskell TLS and SSL protocol implementation for server and client.
777 This provides a high-level implementation of a sensitive security protocol,
778 eliminating a common set of security issues through the use of the advanced
779 type system, high level constructions and common Haskell features. Currently
780 implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and
781 Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many
783 (license license:bsd-3)))
785 (define-public ghc-hsopenssl
787 (name "ghc-hsopenssl")
788 (version "0.11.4.17")
792 (uri (string-append "https://hackage.haskell.org/package/"
793 "HsOpenSSL/HsOpenSSL-" version ".tar.gz"))
796 "0qivl9clmybfglwxqp2sq308rv4ia4rhwshcsc8b029bvpp0mpsi"))))
797 (build-system haskell-build-system)
799 `(#:extra-directories ("openssl")))
801 `(("ghc-network" ,ghc-network)
802 ("openssl" ,openssl)))
803 (home-page "https://github.com/vshabanov/HsOpenSSL")
804 (synopsis "Partial OpenSSL binding for Haskell")
805 (description "HsOpenSSL is an OpenSSL binding for Haskell. It can
806 generate RSA and DSA keys, read and write PEM files, generate message
807 digests, sign and verify messages, encrypt and decrypt messages. It has
808 also some capabilities of creating SSL clients and servers. This
809 package is in production use by a number of Haskell based systems and
810 stable. You may also be interested in the tls package,
811 @uref{http://hackage.haskell.org/package/tls}, which is a pure Haskell
812 implementation of SSL.")
813 (license license:public-domain)))
815 (define-public ghc-openssl-streams
817 (name "ghc-openssl-streams")
822 (uri (string-append "https://hackage.haskell.org/package/"
823 "openssl-streams/openssl-streams-"
827 "0rplym6ayydkpr7x9mw3l13p0vzzfzzxw244d7sd3jcvaxpv0rmr"))))
828 (build-system haskell-build-system)
830 `(("ghc-hsopenssl" ,ghc-hsopenssl)
831 ("ghc-io-streams" ,ghc-io-streams)
832 ("ghc-network" ,ghc-network)))
834 `(("ghc-hunit" ,ghc-hunit)
835 ("ghc-test-framework" ,ghc-test-framework)
836 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
837 (home-page "https://hackage.haskell.org/package/openssl-streams")
838 (synopsis "OpenSSL network support for io-streams")
839 (description "This library contains io-streams routines for secure
840 networking using OpenSSL (by way of HsOpenSSL).")
841 (license license:bsd-3)))
843 (define-public ghc-cryptonite-conduit
845 (name "ghc-cryptonite-conduit")
850 (uri (string-append "https://hackage.haskell.org/package/"
851 "cryptonite-conduit/cryptonite-conduit-"
855 "1bldcmda4xh52mw1wfrjljv8crhw3al7v7kv1j0vidvr7ymnjpbh"))))
856 (build-system haskell-build-system)
858 `(("ghc-conduit" ,ghc-conduit)
859 ("ghc-conduit-extra" ,ghc-conduit-extra)
860 ("ghc-cryptonite" ,ghc-cryptonite)
861 ("ghc-exceptions" ,ghc-exceptions)
862 ("ghc-memory" ,ghc-memory)
863 ("ghc-resourcet" ,ghc-resourcet)))
865 `(("ghc-conduit-combinators" ,ghc-conduit-combinators)
866 ("ghc-tasty" ,ghc-tasty)
867 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
868 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
871 ("1" "1hh2nzfz4qpxgivfilgk4ll416lph8b2fdkzpzrmqfjglivydfmz")))
872 (home-page "https://github.com/haskell-crypto/cryptonite-conduit")
873 (synopsis "Cryptonite bridge for conduit")
874 (description "This package provides conduit interfaces for some of
875 cryptonite's implementations of cryptographic primitives.")
876 (license license:bsd-3)))