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>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages haskell-crypto)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages haskell)
27 #:use-module (gnu packages haskell-check)
28 #:use-module (gnu packages haskell-xyz)
29 #:use-module (gnu packages tls)
30 #:use-module (guix build-system haskell)
31 #:use-module (guix download)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix utils))
36 (define-public ghc-asn1-types
38 (name "ghc-asn1-types")
42 (uri (string-append "https://hackage.haskell.org/package/"
43 "asn1-types/asn1-types-"
47 "162lacdl9jr42pdhaj9hxqlba6hjxm6g866anna74q6v3cvw5ssp"))))
48 (build-system haskell-build-system)
50 `(("ghc-memory" ,ghc-memory)
51 ("ghc-hourglass" ,ghc-hourglass)))
52 (home-page "https://github.com/vincenthz/hs-asn1-types")
53 (synopsis "ASN.1 types for Haskell")
55 "The package provides the standard types for dealing with the ASN.1
57 (license license:bsd-3)))
59 (define-public ghc-asn1-encoding
61 (name "ghc-asn1-encoding")
65 (uri (string-append "https://hackage.haskell.org/package/"
66 "asn1-encoding/asn1-encoding-"
70 "02nsr30h5yic1mk7znf0q4z3n560ip017n60hg7ya25rsfmxxy6r"))))
71 (build-system haskell-build-system)
73 `(("ghc-hourglass" ,ghc-hourglass)
74 ("ghc-asn1-types" ,ghc-asn1-types)))
76 `(("ghc-tasty" ,ghc-tasty)
77 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
78 (home-page "https://github.com/vincenthz/hs-asn1")
79 (synopsis "ASN1 data reader and writer in RAW, BER and DER forms")
81 "This package provides a reader and writer for ASN1 data in raw form with
82 supports for high level forms of ASN1 (BER, and DER).")
83 (license license:bsd-3)))
85 (define-public ghc-asn1-parse
87 (name "ghc-asn1-parse")
91 (uri (string-append "https://hackage.haskell.org/package/"
92 "asn1-parse/asn1-parse-"
96 "17pk8y3nwv9b9i5j15qlmwi7fmq9ab2z4kfpjk2rvcrh9lsf27wg"))))
97 (build-system haskell-build-system)
99 `(("ghc-asn1-types" ,ghc-asn1-types)
100 ("ghc-asn1-encoding" ,ghc-asn1-encoding)))
101 (home-page "https://github.com/vincenthz/hs-asn1")
102 (synopsis "Simple monadic parser for ASN1 stream types")
104 "This package provides a simple monadic parser for ASN1 stream types,
105 when ASN1 pattern matching is not convenient.")
106 (license license:bsd-3)))
108 (define-public ghc-crypto-api
110 (name "ghc-crypto-api")
115 (uri (string-append "https://hackage.haskell.org/package/"
116 "crypto-api-" version "/"
117 "crypto-api-" version ".tar.gz"))
120 "19bsmkqkpnvh01b77pmyarx00fic15j4hvg4pzscrj4prskrx2i9"))))
121 (build-system haskell-build-system)
122 (inputs `(("ghc-cereal" ,ghc-cereal)
123 ("ghc-tagged" ,ghc-tagged)
124 ("ghc-entropy" ,ghc-entropy)))
125 (home-page "https://github.com/TomMD/crypto-api")
126 (synopsis "Provides generic interface for cryptographic operations
128 (description "This Haskell package provides a generic interface for
129 cryptographic operations (hashes, ciphers, randomness).
131 Maintainers of hash and cipher implementations are encouraged to add instances
132 for the classes defined in @code{Crypto.Classes}. @code{Crypto} users are
133 similarly encouraged to use the interfaces defined in the @code{Classes} module.
135 Any concepts or functions of general use to more than one cryptographic
136 algorithm (ex: padding) is within scope of this package.")
137 (license license:bsd-3)))
139 (define-public ghc-crypto-api-tests
141 (name "ghc-crypto-api-tests")
146 (uri (string-append "https://hackage.haskell.org/package/"
147 "crypto-api-tests-" version "/"
148 "crypto-api-tests-" version ".tar.gz"))
151 "0w3j43jdrlj28jryp18hc6q84nkl2yf4vs1hhgrsk7gb9kfyqjpl"))))
152 (build-system haskell-build-system)
153 (outputs '("out" "static" "doc"))
154 (inputs `(("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
155 ("ghc-crypto-api" ,ghc-crypto-api)
156 ("ghc-cereal" ,ghc-cereal)
157 ("ghc-test-framework" ,ghc-test-framework)
158 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
159 ("ghc-hunit" ,ghc-hunit)
160 ("ghc-quickcheck" ,ghc-quickcheck)))
161 (home-page "https://github.com/TomMD/crypto-api-tests")
162 (synopsis "Test framework and KATs for cryptographic operations for Haskell")
163 (description "This Haskell package provides a test framework for hash and
164 cipher operations using the crypto-api interface. Known answer tests (KATs)
165 for common cryptographic algorithms are included.")
166 (license license:bsd-3)))
168 (define-public ghc-cryptohash
170 (name "ghc-cryptohash")
176 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
180 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
181 (build-system haskell-build-system)
183 `(("ghc-byteable" ,ghc-byteable)
184 ("ghc-cryptonite" ,ghc-cryptonite)
185 ("ghc-memory" ,ghc-memory)
186 ("ghc-hunit" ,ghc-hunit)
187 ("ghc-quickcheck" ,ghc-quickcheck)
188 ("ghc-tasty" ,ghc-tasty)
189 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
190 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
191 (home-page "https://github.com/vincenthz/hs-cryptohash")
192 (synopsis "Collection of cryptographic hashes in Haskell")
194 "A collection of crypto hashes, with a practical incremental and one-pass,
195 pure APIs, with performance close to the fastest implementations available in
196 other languages. The implementations are made in C with a haskell FFI wrapper
197 that hides the C implementation.")
198 (license license:bsd-3)))
200 (define-public ghc-cryptohash-md5
202 (name "ghc-cryptohash-md5")
203 (version "0.11.100.1")
207 (uri (string-append "https://hackage.haskell.org/package/"
208 "cryptohash-md5-" version "/"
209 "cryptohash-md5-" version ".tar.gz"))
212 "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
213 (build-system haskell-build-system)
216 ("4" "0gzaibjkipijwj9m9l6wrhfk5s3kdvfbhdl7cl1373cjfs41v0m3")
217 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
218 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
219 ("ghc-puremd5" ,ghc-puremd5)
220 ("ghc-tasty" ,ghc-tasty)
221 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
222 ("ghc-hunit" ,ghc-hunit)))
223 (home-page "https://github.com/hvr/cryptohash-md5")
224 (synopsis "MD5 implementation for Haskell")
225 (description "This Haskell package provides implementation of MD5.")
226 (license license:bsd-3)))
228 (define-public ghc-cryptohash-sha1
230 (name "ghc-cryptohash-sha1")
231 (version "0.11.100.1")
235 (uri (string-append "https://hackage.haskell.org/package/"
236 "cryptohash-sha1-" version "/"
237 "cryptohash-sha1-" version ".tar.gz"))
240 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
241 (build-system haskell-build-system)
244 ("4" "0qb2wasfc4dpf6f9ahvhlv8njb3p3p9iwblg4032ssi95cg85718")
245 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
246 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
248 ("ghc-tasty" ,ghc-tasty)
249 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
250 ("ghc-hunit" ,ghc-hunit)))
251 (home-page "https://github.com/hvr/cryptohash-sha1")
252 (synopsis "SHA-1 implementation for Haskell")
253 (description "This Haskell package provides an incremental and one-pass,
254 pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
255 including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
256 performance close to the fastest implementations available in other languages.
258 The implementation is made in C with a haskell FFI wrapper that hides
259 the C implementation.")
260 (license license:bsd-3)))
262 (define-public ghc-cryptohash-sha256
264 (name "ghc-cryptohash-sha256")
265 (version "0.11.101.0")
269 (uri (string-append "https://hackage.haskell.org/package/"
270 "cryptohash-sha256-" version "/"
271 "cryptohash-sha256-" version ".tar.gz"))
274 "1p85vajcgw9hmq8zsz9krzx0vxh7aggwbg5w9ws8w97avcsn8xaj"))))
275 (build-system haskell-build-system)
278 ("3" "1arhz4y792kx439s2zv9x291gvvl2zxcfx9sq0nxsjlz7c3hpyp1")
279 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
281 `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
283 `(("ghc-sha" ,ghc-sha)
284 ("ghc-tasty" ,ghc-tasty)
285 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
286 ("ghc-hunit" ,ghc-hunit)))
287 (home-page "https://github.com/hvr/cryptohash-sha1")
288 (synopsis "SHA-256 implementation for Haskell")
289 (description "This Haskell package provides an incremental and
290 one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2,
291 SHA-256 cryptographic hash algorithm}, with performance close to the
292 fastest implementations available in other languages.
294 The implementation is made in C with a haskell FFI wrapper that hides
295 the C implementation.")
296 (license license:bsd-3)))
298 (define-public ghc-cryptonite
300 (name "ghc-cryptonite")
304 (uri (string-append "https://hackage.haskell.org/package/"
305 "cryptonite/cryptonite-"
309 "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9"))))
310 (build-system haskell-build-system)
311 ;; FIXME: tests are broken.
312 ;; See https://github.com/haskell-crypto/cryptonite/issues/260
313 (arguments '(#:tests? #f))
314 (outputs '("out" "static" "doc"))
316 `(("ghc-basement" ,ghc-basement)
317 ("ghc-memory" ,ghc-memory)
318 ("ghc-byteable" ,ghc-byteable)))
320 `(("ghc-tasty" ,ghc-tasty)
321 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
322 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
323 ("ghc-tasty-kat" ,ghc-tasty-kat)))
324 (home-page "https://github.com/haskell-crypto/cryptonite")
325 (synopsis "Cryptography primitives")
327 "This package is a repository of cryptographic primitives for Haskell.
328 It supports a wide range of symmetric ciphers, cryptographic hash functions,
329 public key algorithms, key derivation numbers, cryptographic random number
330 generators, and more.")
331 (license license:bsd-3)))
333 (define-public ghc-digest
341 "https://hackage.haskell.org/package/digest/digest-"
346 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
347 (build-system haskell-build-system)
349 `(#:extra-directories ("zlib")))
353 "https://hackage.haskell.org/package/digest")
355 "Various cryptographic hashes for bytestrings")
357 "This package provides efficient cryptographic hash implementations for
358 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
359 are implemented as FFI bindings to efficient code from zlib.")
360 (license license:bsd-3)))
362 (define-public ghc-entropy
369 (uri (string-append "https://hackage.haskell.org/package/"
370 "entropy-" version "/"
371 "entropy-" version ".tar.gz"))
373 (base32 "0szf8hi1pi8g0kxnkcymh65gk1b0niyl1nnkckzdqyar87qal0jm"))))
374 (build-system haskell-build-system)
375 (home-page "https://github.com/TomMD/entropy")
376 (synopsis "Provides platform independent entropy source for Haskell")
377 (description "This Haskell package provides a platform independent method
378 to obtain cryptographically strong entropy.")
379 (license license:bsd-3)))
381 (define-public ghc-pem
387 (uri (string-append "https://hackage.haskell.org/package/"
388 "pem/pem-" version ".tar.gz"))
391 "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
392 (build-system haskell-build-system)
394 `(("ghc-basement" ,ghc-basement)
395 ("ghc-memory" ,ghc-memory)))
397 `(("ghc-test-framework" ,ghc-test-framework)
398 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
399 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
400 ("ghc-hunit" ,ghc-hunit)
401 ("ghc-quickcheck" ,ghc-quickcheck)))
402 (home-page "https://github.com/vincenthz/hs-pem")
403 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
405 "This library provides readers and writers for the @dfn{Privacy Enhanced
406 Mail} (PEM) format.")
407 (license license:bsd-3)))
409 (define-public ghc-puremd5
416 (uri (string-append "https://hackage.haskell.org/package/"
417 "pureMD5-" version "/"
418 "pureMD5-" version ".tar.gz"))
421 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
422 (build-system haskell-build-system)
423 (inputs `(("ghc-cereal" ,ghc-cereal)
424 ("ghc-crypto-api" ,ghc-crypto-api)
425 ("ghc-tagged" ,ghc-tagged)))
426 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
427 ("ghc-quickcheck" ,ghc-quickcheck)
428 ("ghc-test-framework" ,ghc-test-framework)
429 ("ghc-test-framework-quickcheck2"
430 ,ghc-test-framework-quickcheck2)
431 ("ghc-pretty-hex" ,ghc-pretty-hex)))
432 (home-page "https://github.com/TomMD/pureMD5")
433 (synopsis "Haskell implementation of the MD5 hash algorithm")
434 (description "This package provides a Haskell-only implementation of
435 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
437 (license license:bsd-3)))
439 (define-public ghc-sha
445 (uri (string-append "https://hackage.haskell.org/package/"
446 "SHA/SHA-" version ".tar.gz"))
449 "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
450 (build-system haskell-build-system)
452 `(("ghc-quickcheck" ,ghc-quickcheck)
453 ("ghc-test-framework" ,ghc-test-framework)
454 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
455 (home-page "https://hackage.haskell.org/package/SHA")
456 (synopsis "SHA suite of message digest functions")
458 "This library implements the SHA suite of message digest functions,
459 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
460 SHA-based HMAC routines. The functions have been tested against most of the
461 NIST and RFC test vectors for the various functions. While some attention has
462 been paid to performance, these do not presently reach the speed of well-tuned
463 libraries, like OpenSSL.")
464 (license license:bsd-3)))
466 (define-public ghc-x509
472 (uri (string-append "https://hackage.haskell.org/package/"
473 "x509/x509-" version ".tar.gz"))
476 "1j67c35g8334jx7x32hh6awhr43dplp0qwal5gnlkmx09axzrc5i"))))
477 (build-system haskell-build-system)
479 `(("ghc-memory" ,ghc-memory)
480 ("ghc-hourglass" ,ghc-hourglass)
482 ("ghc-asn1-types" ,ghc-asn1-types)
483 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
484 ("ghc-asn1-parse" ,ghc-asn1-parse)
485 ("ghc-cryptonite" ,ghc-cryptonite)))
487 `(("ghc-tasty" ,ghc-tasty)
488 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
489 (home-page "https://github.com/vincenthz/hs-certificate")
490 (synopsis "X509 reader and writer")
492 "This library provides functions to read and write X509 certificates.")
493 (license license:bsd-3)))
495 (define-public ghc-x509-store
497 (name "ghc-x509-store")
501 (uri (string-append "https://hackage.haskell.org/package/"
502 "x509-store/x509-store-"
506 "1y8yyr1i95jkllg8k0z54k5v4vachp848clc07m33xpxidn3b1lp"))))
507 (build-system haskell-build-system)
509 `(("ghc-pem" ,ghc-pem)
510 ("ghc-asn1-types" ,ghc-asn1-types)
511 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
512 ("ghc-cryptonite" ,ghc-cryptonite)
513 ("ghc-x509" ,ghc-x509)))
515 `(("ghc-tasty" ,ghc-tasty)
516 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
517 (home-page "https://github.com/vincenthz/hs-certificate")
518 (synopsis "X.509 collection accessing and storing methods")
520 "This package provides functions for accessing and storing X.509
521 collections, certificates, revocation lists, and exception lists.")
522 (license license:bsd-3)))
524 (define-public ghc-x509-validation
526 (name "ghc-x509-validation")
530 (uri (string-append "https://hackage.haskell.org/package/"
531 "x509-validation/x509-validation-"
535 "16yihzljql3z8w5rgdl95fv3hgk7yd86kbl9b3glllsark5j2hzr"))))
536 (build-system haskell-build-system)
538 `(("ghc-memory" ,ghc-memory)
539 ("ghc-byteable" ,ghc-byteable)
540 ("ghc-hourglass" ,ghc-hourglass)
541 ("ghc-data-default-class" ,ghc-data-default-class)
543 ("ghc-asn1-types" ,ghc-asn1-types)
544 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
545 ("ghc-x509" ,ghc-x509)
546 ("ghc-x509-store" ,ghc-x509-store)
547 ("ghc-cryptonite" ,ghc-cryptonite)))
549 `(("ghc-tasty" ,ghc-tasty)
550 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
551 (home-page "https://github.com/vincenthz/hs-certificate")
552 (synopsis "X.509 certificate and revocation list validation")
554 "This package provides functions for X.509 certificate and revocation
556 (license license:bsd-3)))
558 (define-public ghc-x509-system
560 (name "ghc-x509-system")
564 (uri (string-append "https://hackage.haskell.org/package/"
565 "x509-system/x509-system-"
569 "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
570 (build-system haskell-build-system)
572 `(("ghc-pem" ,ghc-pem)
573 ("ghc-x509" ,ghc-x509)
574 ("ghc-x509-store" ,ghc-x509-store)))
575 (home-page "https://github.com/vincenthz/hs-certificate")
576 (synopsis "Handle system X.509 accessors and storage")
578 "This package provides a library to handle system accessors and storage
579 for X.509 certificates.")
580 (license license:bsd-3)))
582 (define-public ghc-crypto-cipher-types
584 (name "ghc-crypto-cipher-types")
589 (uri (string-append "https://hackage.haskell.org/package/"
590 "crypto-cipher-types-" version "/"
591 "crypto-cipher-types-" version ".tar.gz"))
594 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
595 (build-system haskell-build-system)
596 (inputs `(("ghc-byteable" ,ghc-byteable)
597 ("ghc-securemem" ,ghc-securemem)))
598 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
599 (synopsis "Generic cryptography cipher types for Haskell")
600 (description "This Haskell package provides basic typeclasses and types
601 for symmetric ciphers.")
602 (license license:bsd-3)))
604 (define-public ghc-cipher-aes
606 (name "ghc-cipher-aes")
611 (uri (string-append "https://hackage.haskell.org/package/"
612 "cipher-aes-" version "/"
613 "cipher-aes-" version ".tar.gz"))
616 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
617 (build-system haskell-build-system)
618 (inputs `(("ghc-byteable" ,ghc-byteable)
619 ("ghc-securemem" ,ghc-securemem)
620 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
621 (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
622 ("ghc-test-framework" ,ghc-test-framework)
623 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
624 ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
625 (home-page "https://github.com/vincenthz/hs-cipher-aes")
626 (synopsis "AES cipher implementation with advanced mode of operations for
628 (description "This Haskell package provides AES cipher implementation.
630 The modes of operations available are ECB (Electronic code book), CBC (Cipher
631 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
632 GCM (Galois Counter Mode).
634 The AES implementation uses AES-NI when available (on x86 and x86-64
635 architecture), but fallback gracefully to a software C implementation.
637 The software implementation uses S-Boxes, which might suffer for cache timing
638 issues. However do notes that most other known software implementations,
639 including very popular one (openssl, gnutls) also uses similar
640 implementation. If it matters for your case, you should make sure you have
641 AES-NI available, or you'll need to use a different implementation.")
642 (license license:bsd-3)))
644 (define-public ghc-crypto-random
646 (name "ghc-crypto-random")
651 (uri (string-append "https://hackage.haskell.org/package/"
652 "crypto-random-" version "/"
653 "crypto-random-" version ".tar.gz"))
656 "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
657 (build-system haskell-build-system)
658 (inputs `(("ghc-securemem" ,ghc-securemem)
659 ("ghc-vector" ,ghc-vector)))
660 (home-page "https://github.com/vincenthz/hs-crypto-random")
661 (synopsis "Simple cryptographic random related types for Haskell")
662 (description "Simple cryptographic random related types: a safe
663 abstraction for CPRNGs.")
664 (license license:bsd-3)))
666 (define-public ghc-cprng-aes
668 (name "ghc-cprng-aes")
673 (uri (string-append "https://hackage.haskell.org/package/"
674 "cprng-aes-" version "/"
675 "cprng-aes-" version ".tar.gz"))
678 "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
679 (build-system haskell-build-system)
680 (inputs `(("ghc-byteable" ,ghc-byteable)
681 ("ghc-crypto-random" ,ghc-crypto-random)
682 ("ghc-cipher-aes" ,ghc-cipher-aes)))
683 (home-page "https://github.com/vincenthz/hs-cprng-aes")
684 (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
686 (description "Simple crypto pseudo-random-number-generator with really
687 good randomness property.
689 Using ent, a randomness property maker on one 1Mb sample:
692 @item Entropy = 7.999837 bits per byte.
693 @item Optimum compression would reduce the size of this 1048576 byte file by 0
695 @item Chi square distribution for 1048576 samples is 237.02.
696 @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
697 @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
700 Compared to urandom with the same sampling:
703 @item Entropy = 7.999831 bits per byte.
704 @item Optimum compression would reduce the size of this 1048576 byte file by 0
706 @item Chi square distribution for 1048576 samples is 246.63.
707 @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
708 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
710 (license license:bsd-3)))
712 (define-public ghc-ed25519
720 "https://hackage.haskell.org/package/ed25519/ed25519-"
724 "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
725 (build-system haskell-build-system)
728 ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
729 ;; We omit these test suites because they require old versions of
730 ;; packages and packages we do not have.
732 '("--flags=-test-hlint -test-doctests -test-properties")))
733 (home-page "http://thoughtpolice.github.com/hs-ed25519")
734 (synopsis "Ed25519 cryptographic signatures")
735 (description "This package provides a simple, fast, self-contained
736 copy of the Ed25519 public-key signature system with a clean interface.
737 It also includes support for detached signatures, and thorough
738 documentation on the design and implementation, including usage
740 (license license:expat)))
742 (define-public ghc-tls
748 (uri (string-append "https://hackage.haskell.org/package/"
749 "tls/tls-" version ".tar.gz"))
752 "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
753 (build-system haskell-build-system)
755 `(("ghc-cereal" ,ghc-cereal)
756 ("ghc-data-default-class" ,ghc-data-default-class)
757 ("ghc-memory" ,ghc-memory)
758 ("ghc-cryptonite" ,ghc-cryptonite)
759 ("ghc-asn1-types" ,ghc-asn1-types)
760 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
761 ("ghc-x509" ,ghc-x509)
762 ("ghc-x509-store" ,ghc-x509-store)
763 ("ghc-x509-validation" ,ghc-x509-validation)
764 ("ghc-async" ,ghc-async)
765 ("ghc-network" ,ghc-network)
766 ("ghc-hourglass" ,ghc-hourglass)))
768 `(("ghc-tasty" ,ghc-tasty)
769 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
770 ("ghc-quickcheck" ,ghc-quickcheck)))
771 (home-page "https://github.com/vincenthz/hs-tls")
773 "TLS/SSL protocol native implementation (Server and Client)")
775 "Native Haskell TLS and SSL protocol implementation for server and client.
776 This provides a high-level implementation of a sensitive security protocol,
777 eliminating a common set of security issues through the use of the advanced
778 type system, high level constructions and common Haskell features. Currently
779 implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and
780 Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many
782 (license license:bsd-3)))
784 (define-public ghc-hsopenssl
786 (name "ghc-hsopenssl")
787 (version "0.11.4.17")
791 (uri (string-append "https://hackage.haskell.org/package/"
792 "HsOpenSSL/HsOpenSSL-" version ".tar.gz"))
795 "0qivl9clmybfglwxqp2sq308rv4ia4rhwshcsc8b029bvpp0mpsi"))))
796 (build-system haskell-build-system)
798 `(#:extra-directories ("openssl")))
800 `(("ghc-network" ,ghc-network)
801 ("openssl" ,openssl)))
802 (home-page "https://github.com/vshabanov/HsOpenSSL")
803 (synopsis "Partial OpenSSL binding for Haskell")
804 (description "HsOpenSSL is an OpenSSL binding for Haskell. It can
805 generate RSA and DSA keys, read and write PEM files, generate message
806 digests, sign and verify messages, encrypt and decrypt messages. It has
807 also some capabilities of creating SSL clients and servers. This
808 package is in production use by a number of Haskell based systems and
809 stable. You may also be interested in the tls package,
810 @uref{http://hackage.haskell.org/package/tls}, which is a pure Haskell
811 implementation of SSL.")
812 (license license:public-domain)))
814 (define-public ghc-openssl-streams
816 (name "ghc-openssl-streams")
821 (uri (string-append "https://hackage.haskell.org/package/"
822 "openssl-streams/openssl-streams-"
826 "0rplym6ayydkpr7x9mw3l13p0vzzfzzxw244d7sd3jcvaxpv0rmr"))))
827 (build-system haskell-build-system)
829 `(("ghc-hsopenssl" ,ghc-hsopenssl)
830 ("ghc-io-streams" ,ghc-io-streams)
831 ("ghc-network" ,ghc-network)))
833 `(("ghc-hunit" ,ghc-hunit)
834 ("ghc-test-framework" ,ghc-test-framework)
835 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
836 (home-page "https://hackage.haskell.org/package/openssl-streams")
837 (synopsis "OpenSSL network support for io-streams")
838 (description "This library contains io-streams routines for secure
839 networking using OpenSSL (by way of HsOpenSSL).")
840 (license license:bsd-3)))