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 ng0 <ng0@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 (guix build-system haskell)
29 #:use-module (guix download)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix utils))
34 (define-public ghc-asn1-types
36 (name "ghc-asn1-types")
40 (uri (string-append "https://hackage.haskell.org/package/"
41 "asn1-types/asn1-types-"
45 "05vjchyqiy9n275cygffhn0ma7fz7jx52j0dcdm9qm8h9bziymqc"))))
46 (build-system haskell-build-system)
48 `(("ghc-memory" ,ghc-memory)
49 ("ghc-hourglass" ,ghc-hourglass)))
50 (home-page "https://github.com/vincenthz/hs-asn1-types")
51 (synopsis "ASN.1 types for Haskell")
53 "The package provides the standard types for dealing with the ASN.1
55 (license license:bsd-3)))
57 (define-public ghc-asn1-encoding
59 (name "ghc-asn1-encoding")
63 (uri (string-append "https://hackage.haskell.org/package/"
64 "asn1-encoding/asn1-encoding-"
68 "0adgbamyq0mj1l1hdq4zyyllay714bac1wl0rih3fv1z6vykp1hy"))))
69 (build-system haskell-build-system)
71 `(("ghc-hourglass" ,ghc-hourglass)
72 ("ghc-asn1-types" ,ghc-asn1-types)
73 ("ghc-text" ,ghc-text)))
75 `(("ghc-tasty" ,ghc-tasty)
76 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
77 (home-page "https://github.com/vincenthz/hs-asn1")
78 (synopsis "ASN1 data reader and writer in RAW, BER and DER forms")
80 "This package provides a reader and writer for ASN1 data in raw form with
81 supports for high level forms of ASN1 (BER, and DER).")
82 (license license:bsd-3)))
84 (define-public ghc-asn1-parse
86 (name "ghc-asn1-parse")
90 (uri (string-append "https://hackage.haskell.org/package/"
91 "asn1-parse/asn1-parse-"
95 "025prsihk5g6rdv9xlfmj0zpa0wa3qjzj5i4ilzvg7f6f3sji8y6"))))
96 (build-system haskell-build-system)
98 `(("ghc-asn1-types" ,ghc-asn1-types)
99 ("ghc-asn1-encoding" ,ghc-asn1-encoding)))
100 (home-page "https://github.com/vincenthz/hs-asn1")
101 (synopsis "Simple monadic parser for ASN1 stream types")
103 "This package provides a simple monadic parser for ASN1 stream types,
104 when ASN1 pattern matching is not convenient.")
105 (license license:bsd-3)))
107 (define-public ghc-crypto-api
109 (name "ghc-crypto-api")
114 (uri (string-append "https://hackage.haskell.org/package/"
115 "crypto-api-" version "/"
116 "crypto-api-" version ".tar.gz"))
119 "19bsmkqkpnvh01b77pmyarx00fic15j4hvg4pzscrj4prskrx2i9"))))
120 (build-system haskell-build-system)
121 (inputs `(("ghc-cereal" ,ghc-cereal)
122 ("ghc-tagged" ,ghc-tagged)
123 ("ghc-entropy" ,ghc-entropy)))
124 (home-page "https://github.com/TomMD/crypto-api")
125 (synopsis "Provides generic interface for cryptographic operations
127 (description "This Haskell package provides a generic interface for
128 cryptographic operations (hashes, ciphers, randomness).
130 Maintainers of hash and cipher implementations are encouraged to add instances
131 for the classes defined in @code{Crypto.Classes}. @code{Crypto} users are
132 similarly encouraged to use the interfaces defined in the @code{Classes} module.
134 Any concepts or functions of general use to more than one cryptographic
135 algorithm (ex: padding) is within scope of this package.")
136 (license license:bsd-3)))
138 (define-public ghc-crypto-api-tests
140 (name "ghc-crypto-api-tests")
145 (uri (string-append "https://hackage.haskell.org/package/"
146 "crypto-api-tests-" version "/"
147 "crypto-api-tests-" version ".tar.gz"))
150 "0w3j43jdrlj28jryp18hc6q84nkl2yf4vs1hhgrsk7gb9kfyqjpl"))))
151 (build-system haskell-build-system)
152 (inputs `(("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
153 ("ghc-crypto-api" ,ghc-crypto-api)
154 ("ghc-cereal" ,ghc-cereal)
155 ("ghc-test-framework" ,ghc-test-framework)
156 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
157 ("ghc-hunit" ,ghc-hunit)
158 ("ghc-quickcheck" ,ghc-quickcheck)))
159 (home-page "https://github.com/TomMD/crypto-api-tests")
160 (synopsis "Test framework and KATs for cryptographic operations for Haskell")
161 (description "This Haskell package provides a test framework for hash and
162 cipher operations using the crypto-api interface. Known answer tests (KATs)
163 for common cryptographic algorithms are included.")
164 (license license:bsd-3)))
166 (define-public ghc-cryptohash
168 (name "ghc-cryptohash")
174 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
178 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
179 (build-system haskell-build-system)
181 `(("ghc-byteable" ,ghc-byteable)
182 ("ghc-cryptonite" ,ghc-cryptonite)
183 ("ghc-memory" ,ghc-memory)
184 ("ghc-hunit" ,ghc-hunit)
185 ("ghc-quickcheck" ,ghc-quickcheck)
186 ("ghc-tasty" ,ghc-tasty)
187 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
188 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
189 (home-page "https://github.com/vincenthz/hs-cryptohash")
190 (synopsis "Collection of cryptographic hashes in Haskell")
192 "A collection of crypto hashes, with a practical incremental and one-pass,
193 pure APIs, with performance close to the fastest implementations available in
194 other languages. The implementations are made in C with a haskell FFI wrapper
195 that hides the C implementation.")
196 (license license:bsd-3)))
198 (define-public ghc-cryptohash-md5
200 (name "ghc-cryptohash-md5")
201 (version "0.11.100.1")
205 (uri (string-append "https://hackage.haskell.org/package/"
206 "cryptohash-md5-" version "/"
207 "cryptohash-md5-" version ".tar.gz"))
210 "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
211 (build-system haskell-build-system)
214 ("2" "0vyb9cfvpfxpslxvvhd48gw37i9g8ry5x63xwxd9q7xfiqhs7p3a")
215 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
216 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
217 ("ghc-puremd5" ,ghc-puremd5)
218 ("ghc-tasty" ,ghc-tasty)
219 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
220 ("ghc-hunit" ,ghc-hunit)))
221 (home-page "https://github.com/hvr/cryptohash-md5")
222 (synopsis "MD5 implementation for Haskell")
223 (description "This Haskell package provides implementation of MD5.")
224 (license license:bsd-3)))
226 (define-public ghc-cryptohash-sha1
228 (name "ghc-cryptohash-sha1")
229 (version "0.11.100.1")
233 (uri (string-append "https://hackage.haskell.org/package/"
234 "cryptohash-sha1-" version "/"
235 "cryptohash-sha1-" version ".tar.gz"))
238 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
239 (build-system haskell-build-system)
242 ("2" "0xas0nbq9bfdzlj6k565ibizv1cqvzfzsdj6q9pdiiwyxqblqc3m")
243 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
244 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
246 ("ghc-tasty" ,ghc-tasty)
247 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
248 ("ghc-hunit" ,ghc-hunit)))
249 (home-page "https://github.com/hvr/cryptohash-sha1")
250 (synopsis "SHA-1 implementation for Haskell")
251 (description "This Haskell package provides an incremental and one-pass,
252 pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
253 including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
254 performance close to the fastest implementations available in other languages.
256 The implementation is made in C with a haskell FFI wrapper that hides
257 the C implementation.")
258 (license license:bsd-3)))
260 (define-public ghc-cryptohash-sha256
262 (name "ghc-cryptohash-sha256")
263 (version "0.11.101.0")
267 (uri (string-append "https://hackage.haskell.org/package/"
268 "cryptohash-sha256-" version "/"
269 "cryptohash-sha256-" version ".tar.gz"))
272 "1p85vajcgw9hmq8zsz9krzx0vxh7aggwbg5w9ws8w97avcsn8xaj"))))
273 (build-system haskell-build-system)
276 ("1" "19birnmwga1yh82l4jqc3fygqkqcf5y8dlldnxfswngkzc3rvwp3")
277 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
279 `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
281 `(("ghc-sha" ,ghc-sha)
282 ("ghc-tasty" ,ghc-tasty)
283 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
284 ("ghc-hunit" ,ghc-hunit)))
285 (home-page "https://github.com/hvr/cryptohash-sha1")
286 (synopsis "SHA-256 implementation for Haskell")
287 (description "This Haskell package provides an incremental and
288 one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2,
289 SHA-256 cryptographic hash algorithm}, with performance close to the
290 fastest implementations available in other languages.
292 The implementation is made in C with a haskell FFI wrapper that hides
293 the C implementation.")
294 (license license:bsd-3)))
296 (define-public ghc-cryptonite
298 (name "ghc-cryptonite")
302 (uri (string-append "https://hackage.haskell.org/package/"
303 "cryptonite/cryptonite-"
307 "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9"))))
308 (build-system haskell-build-system)
309 ;; FIXME: tests are broken.
310 ;; See https://github.com/haskell-crypto/cryptonite/issues/260
311 (arguments '(#:tests? #f))
313 `(("ghc-basement" ,ghc-basement)
314 ("ghc-memory" ,ghc-memory)
315 ("ghc-byteable" ,ghc-byteable)))
317 `(("ghc-tasty" ,ghc-tasty)
318 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
319 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
320 ("ghc-tasty-kat" ,ghc-tasty-kat)))
321 (home-page "https://github.com/haskell-crypto/cryptonite")
322 (synopsis "Cryptography primitives")
324 "This package is a repository of cryptographic primitives for Haskell.
325 It supports a wide range of symmetric ciphers, cryptographic hash functions,
326 public key algorithms, key derivation numbers, cryptographic random number
327 generators, and more.")
328 (license license:bsd-3)))
330 (define-public ghc-digest
338 "https://hackage.haskell.org/package/digest/digest-"
343 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
344 (build-system haskell-build-system)
348 "https://hackage.haskell.org/package/digest")
350 "Various cryptographic hashes for bytestrings")
352 "This package provides efficient cryptographic hash implementations for
353 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
354 are implemented as FFI bindings to efficient code from zlib.")
355 (license license:bsd-3)))
357 (define-public ghc-entropy
364 (uri (string-append "https://hackage.haskell.org/package/"
365 "entropy-" version "/"
366 "entropy-" version ".tar.gz"))
368 (base32 "1fgf47l9klwn1xssbcbq6by651vikd8hlfxhiwd5bqzxr1jnlgrf"))))
369 (build-system haskell-build-system)
370 (home-page "https://github.com/TomMD/entropy")
371 (synopsis "Provides platform independent entropy source for Haskell")
372 (description "This Haskell package provides a platform independent method
373 to obtain cryptographically strong entropy.")
374 (license license:bsd-3)))
376 (define-public ghc-pem
382 (uri (string-append "https://hackage.haskell.org/package/"
383 "pem/pem-" version ".tar.gz"))
386 "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
387 (build-system haskell-build-system)
389 `(("ghc-basement" ,ghc-basement)
390 ("ghc-memory" ,ghc-memory)))
392 `(("ghc-test-framework" ,ghc-test-framework)
393 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
394 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
395 ("ghc-hunit" ,ghc-hunit)
396 ("ghc-quickcheck" ,ghc-quickcheck)))
397 (home-page "https://github.com/vincenthz/hs-pem")
398 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
400 "This library provides readers and writers for the @dfn{Privacy Enhanced
401 Mail} (PEM) format.")
402 (license license:bsd-3)))
404 (define-public ghc-puremd5
411 (uri (string-append "https://hackage.haskell.org/package/"
412 "pureMD5-" version "/"
413 "pureMD5-" version ".tar.gz"))
416 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
417 (build-system haskell-build-system)
418 (inputs `(("ghc-cereal" ,ghc-cereal)
419 ("ghc-crypto-api" ,ghc-crypto-api)
420 ("ghc-tagged" ,ghc-tagged)))
421 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
422 ("ghc-quickcheck" ,ghc-quickcheck)
423 ("ghc-test-framework" ,ghc-test-framework)
424 ("ghc-test-framework-quickcheck2"
425 ,ghc-test-framework-quickcheck2)
426 ("ghc-pretty-hex" ,ghc-pretty-hex)))
427 (home-page "https://github.com/TomMD/pureMD5")
428 (synopsis "Haskell implementation of the MD5 hash algorithm")
429 (description "This package provides a Haskell-only implementation of
430 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
432 (license license:bsd-3)))
434 (define-public ghc-sha
440 (uri (string-append "https://hackage.haskell.org/package/"
441 "SHA/SHA-" version ".tar.gz"))
444 "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
445 (build-system haskell-build-system)
447 `(("ghc-quickcheck" ,ghc-quickcheck)
448 ("ghc-test-framework" ,ghc-test-framework)
449 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
450 (home-page "https://hackage.haskell.org/package/SHA")
451 (synopsis "SHA suite of message digest functions")
453 "This library implements the SHA suite of message digest functions,
454 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
455 SHA-based HMAC routines. The functions have been tested against most of the
456 NIST and RFC test vectors for the various functions. While some attention has
457 been paid to performance, these do not presently reach the speed of well-tuned
458 libraries, like OpenSSL.")
459 (license license:bsd-3)))
461 (define-public ghc-x509
467 (uri (string-append "https://hackage.haskell.org/package/"
468 "x509/x509-" version ".tar.gz"))
471 "1j67c35g8334jx7x32hh6awhr43dplp0qwal5gnlkmx09axzrc5i"))))
472 (build-system haskell-build-system)
474 `(("ghc-memory" ,ghc-memory)
475 ("ghc-hourglass" ,ghc-hourglass)
477 ("ghc-asn1-types" ,ghc-asn1-types)
478 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
479 ("ghc-asn1-parse" ,ghc-asn1-parse)
480 ("ghc-cryptonite" ,ghc-cryptonite)))
482 `(("ghc-tasty" ,ghc-tasty)
483 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
484 (home-page "https://github.com/vincenthz/hs-certificate")
485 (synopsis "X509 reader and writer")
487 "This library provides functions to read and write X509 certificates.")
488 (license license:bsd-3)))
490 (define-public ghc-x509-store
492 (name "ghc-x509-store")
496 (uri (string-append "https://hackage.haskell.org/package/"
497 "x509-store/x509-store-"
501 "1y8yyr1i95jkllg8k0z54k5v4vachp848clc07m33xpxidn3b1lp"))))
502 (build-system haskell-build-system)
504 `(("ghc-pem" ,ghc-pem)
505 ("ghc-asn1-types" ,ghc-asn1-types)
506 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
507 ("ghc-cryptonite" ,ghc-cryptonite)
508 ("ghc-x509" ,ghc-x509)))
510 `(("ghc-tasty" ,ghc-tasty)
511 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
512 (home-page "https://github.com/vincenthz/hs-certificate")
513 (synopsis "X.509 collection accessing and storing methods")
515 "This package provides functions for accessing and storing X.509
516 collections, certificates, revocation lists, and exception lists.")
517 (license license:bsd-3)))
519 (define-public ghc-x509-validation
521 (name "ghc-x509-validation")
525 (uri (string-append "https://hackage.haskell.org/package/"
526 "x509-validation/x509-validation-"
530 "16yihzljql3z8w5rgdl95fv3hgk7yd86kbl9b3glllsark5j2hzr"))))
531 (build-system haskell-build-system)
533 `(("ghc-memory" ,ghc-memory)
534 ("ghc-byteable" ,ghc-byteable)
535 ("ghc-hourglass" ,ghc-hourglass)
536 ("ghc-data-default-class" ,ghc-data-default-class)
538 ("ghc-asn1-types" ,ghc-asn1-types)
539 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
540 ("ghc-x509" ,ghc-x509)
541 ("ghc-x509-store" ,ghc-x509-store)
542 ("ghc-cryptonite" ,ghc-cryptonite)))
544 `(("ghc-tasty" ,ghc-tasty)
545 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
546 (home-page "https://github.com/vincenthz/hs-certificate")
547 (synopsis "X.509 certificate and revocation list validation")
549 "This package provides functions for X.509 certificate and revocation
551 (license license:bsd-3)))
553 (define-public ghc-x509-system
555 (name "ghc-x509-system")
559 (uri (string-append "https://hackage.haskell.org/package/"
560 "x509-system/x509-system-"
564 "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
565 (build-system haskell-build-system)
567 `(("ghc-pem" ,ghc-pem)
568 ("ghc-x509" ,ghc-x509)
569 ("ghc-x509-store" ,ghc-x509-store)))
570 (home-page "https://github.com/vincenthz/hs-certificate")
571 (synopsis "Handle system X.509 accessors and storage")
573 "This package provides a library to handle system accessors and storage
574 for X.509 certificates.")
575 (license license:bsd-3)))
577 (define-public ghc-crypto-cipher-types
579 (name "ghc-crypto-cipher-types")
584 (uri (string-append "https://hackage.haskell.org/package/"
585 "crypto-cipher-types-" version "/"
586 "crypto-cipher-types-" version ".tar.gz"))
589 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
590 (build-system haskell-build-system)
591 (inputs `(("ghc-byteable" ,ghc-byteable)
592 ("ghc-securemem" ,ghc-securemem)))
593 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
594 (synopsis "Generic cryptography cipher types for Haskell")
595 (description "This Haskell package provides basic typeclasses and types
596 for symmetric ciphers.")
597 (license license:bsd-3)))
599 (define-public ghc-cipher-aes
601 (name "ghc-cipher-aes")
606 (uri (string-append "https://hackage.haskell.org/package/"
607 "cipher-aes-" version "/"
608 "cipher-aes-" version ".tar.gz"))
611 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
612 (build-system haskell-build-system)
613 (inputs `(("ghc-byteable" ,ghc-byteable)
614 ("ghc-securemem" ,ghc-securemem)
615 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
616 (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
617 ("ghc-test-framework" ,ghc-test-framework)
618 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
619 ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
620 (home-page "https://github.com/vincenthz/hs-cipher-aes")
621 (synopsis "AES cipher implementation with advanced mode of operations for
623 (description "This Haskell package provides AES cipher implementation.
625 The modes of operations available are ECB (Electronic code book), CBC (Cipher
626 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
627 GCM (Galois Counter Mode).
629 The AES implementation uses AES-NI when available (on x86 and x86-64
630 architecture), but fallback gracefully to a software C implementation.
632 The software implementation uses S-Boxes, which might suffer for cache timing
633 issues. However do notes that most other known software implementations,
634 including very popular one (openssl, gnutls) also uses similar
635 implementation. If it matters for your case, you should make sure you have
636 AES-NI available, or you'll need to use a different implementation.")
637 (license license:bsd-3)))
639 (define-public ghc-crypto-random
641 (name "ghc-crypto-random")
646 (uri (string-append "https://hackage.haskell.org/package/"
647 "crypto-random-" version "/"
648 "crypto-random-" version ".tar.gz"))
651 "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
652 (build-system haskell-build-system)
653 (inputs `(("ghc-securemem" ,ghc-securemem)
654 ("ghc-vector" ,ghc-vector)))
655 (home-page "https://github.com/vincenthz/hs-crypto-random")
656 (synopsis "Simple cryptographic random related types for Haskell")
657 (description "Simple cryptographic random related types: a safe
658 abstraction for CPRNGs.")
659 (license license:bsd-3)))
661 (define-public ghc-cprng-aes
663 (name "ghc-cprng-aes")
668 (uri (string-append "https://hackage.haskell.org/package/"
669 "cprng-aes-" version "/"
670 "cprng-aes-" version ".tar.gz"))
673 "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
674 (build-system haskell-build-system)
675 (inputs `(("ghc-byteable" ,ghc-byteable)
676 ("ghc-crypto-random" ,ghc-crypto-random)
677 ("ghc-cipher-aes" ,ghc-cipher-aes)))
678 (home-page "https://github.com/vincenthz/hs-cprng-aes")
679 (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
681 (description "Simple crypto pseudo-random-number-generator with really
682 good randomness property.
684 Using ent, a randomness property maker on one 1Mb sample:
687 @item Entropy = 7.999837 bits per byte.
688 @item Optimum compression would reduce the size of this 1048576 byte file by 0
690 @item Chi square distribution for 1048576 samples is 237.02.
691 @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
692 @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
695 Compared to urandom with the same sampling:
698 @item Entropy = 7.999831 bits per byte.
699 @item Optimum compression would reduce the size of this 1048576 byte file by 0
701 @item Chi square distribution for 1048576 samples is 246.63.
702 @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
703 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
705 (license license:bsd-3)))
707 (define-public ghc-ed25519
715 "https://hackage.haskell.org/package/ed25519/ed25519-"
719 "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
720 (build-system haskell-build-system)
723 ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
724 ;; We omit these test suites because they require old versions of
725 ;; packages and packages we do not have.
727 '("--flags=-test-hlint -test-doctests -test-properties")))
728 (home-page "http://thoughtpolice.github.com/hs-ed25519")
729 (synopsis "Ed25519 cryptographic signatures")
730 (description "This package provides a simple, fast, self-contained
731 copy of the Ed25519 public-key signature system with a clean interface.
732 It also includes support for detached signatures, and thorough
733 documentation on the design and implementation, including usage
735 (license license:expat)))
737 (define-public ghc-tls
743 (uri (string-append "https://hackage.haskell.org/package/"
744 "tls/tls-" version ".tar.gz"))
747 "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
748 (build-system haskell-build-system)
750 `(("ghc-cereal" ,ghc-cereal)
751 ("ghc-data-default-class" ,ghc-data-default-class)
752 ("ghc-memory" ,ghc-memory)
753 ("ghc-cryptonite" ,ghc-cryptonite)
754 ("ghc-asn1-types" ,ghc-asn1-types)
755 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
756 ("ghc-x509" ,ghc-x509)
757 ("ghc-x509-store" ,ghc-x509-store)
758 ("ghc-x509-validation" ,ghc-x509-validation)
759 ("ghc-async" ,ghc-async)
760 ("ghc-network" ,ghc-network)
761 ("ghc-hourglass" ,ghc-hourglass)))
763 `(("ghc-tasty" ,ghc-tasty)
764 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
765 ("ghc-quickcheck" ,ghc-quickcheck)))
766 (home-page "https://github.com/vincenthz/hs-tls")
768 "TLS/SSL protocol native implementation (Server and Client)")
770 "Native Haskell TLS and SSL protocol implementation for server and client.
771 This provides a high-level implementation of a sensitive security protocol,
772 eliminating a common set of security issues through the use of the advanced
773 type system, high level constructions and common Haskell features. Currently
774 implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and
775 Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many
777 (license license:bsd-3)))