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 (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 (inputs `(("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
154 ("ghc-crypto-api" ,ghc-crypto-api)
155 ("ghc-cereal" ,ghc-cereal)
156 ("ghc-test-framework" ,ghc-test-framework)
157 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
158 ("ghc-hunit" ,ghc-hunit)
159 ("ghc-quickcheck" ,ghc-quickcheck)))
160 (home-page "https://github.com/TomMD/crypto-api-tests")
161 (synopsis "Test framework and KATs for cryptographic operations for Haskell")
162 (description "This Haskell package provides a test framework for hash and
163 cipher operations using the crypto-api interface. Known answer tests (KATs)
164 for common cryptographic algorithms are included.")
165 (license license:bsd-3)))
167 (define-public ghc-cryptohash
169 (name "ghc-cryptohash")
175 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
179 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
180 (build-system haskell-build-system)
182 `(("ghc-byteable" ,ghc-byteable)
183 ("ghc-cryptonite" ,ghc-cryptonite)
184 ("ghc-memory" ,ghc-memory)
185 ("ghc-hunit" ,ghc-hunit)
186 ("ghc-quickcheck" ,ghc-quickcheck)
187 ("ghc-tasty" ,ghc-tasty)
188 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
189 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
190 (home-page "https://github.com/vincenthz/hs-cryptohash")
191 (synopsis "Collection of cryptographic hashes in Haskell")
193 "A collection of crypto hashes, with a practical incremental and one-pass,
194 pure APIs, with performance close to the fastest implementations available in
195 other languages. The implementations are made in C with a haskell FFI wrapper
196 that hides the C implementation.")
197 (license license:bsd-3)))
199 (define-public ghc-cryptohash-md5
201 (name "ghc-cryptohash-md5")
202 (version "0.11.100.1")
206 (uri (string-append "https://hackage.haskell.org/package/"
207 "cryptohash-md5-" version "/"
208 "cryptohash-md5-" version ".tar.gz"))
211 "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
212 (build-system haskell-build-system)
215 ("4" "0gzaibjkipijwj9m9l6wrhfk5s3kdvfbhdl7cl1373cjfs41v0m3")
216 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
217 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
218 ("ghc-puremd5" ,ghc-puremd5)
219 ("ghc-tasty" ,ghc-tasty)
220 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
221 ("ghc-hunit" ,ghc-hunit)))
222 (home-page "https://github.com/hvr/cryptohash-md5")
223 (synopsis "MD5 implementation for Haskell")
224 (description "This Haskell package provides implementation of MD5.")
225 (license license:bsd-3)))
227 (define-public ghc-cryptohash-sha1
229 (name "ghc-cryptohash-sha1")
230 (version "0.11.100.1")
234 (uri (string-append "https://hackage.haskell.org/package/"
235 "cryptohash-sha1-" version "/"
236 "cryptohash-sha1-" version ".tar.gz"))
239 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
240 (build-system haskell-build-system)
243 ("4" "0qb2wasfc4dpf6f9ahvhlv8njb3p3p9iwblg4032ssi95cg85718")
244 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
245 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
247 ("ghc-tasty" ,ghc-tasty)
248 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
249 ("ghc-hunit" ,ghc-hunit)))
250 (home-page "https://github.com/hvr/cryptohash-sha1")
251 (synopsis "SHA-1 implementation for Haskell")
252 (description "This Haskell package provides an incremental and one-pass,
253 pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
254 including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
255 performance close to the fastest implementations available in other languages.
257 The implementation is made in C with a haskell FFI wrapper that hides
258 the C implementation.")
259 (license license:bsd-3)))
261 (define-public ghc-cryptohash-sha256
263 (name "ghc-cryptohash-sha256")
264 (version "0.11.101.0")
268 (uri (string-append "https://hackage.haskell.org/package/"
269 "cryptohash-sha256-" version "/"
270 "cryptohash-sha256-" version ".tar.gz"))
273 "1p85vajcgw9hmq8zsz9krzx0vxh7aggwbg5w9ws8w97avcsn8xaj"))))
274 (build-system haskell-build-system)
277 ("3" "1arhz4y792kx439s2zv9x291gvvl2zxcfx9sq0nxsjlz7c3hpyp1")
278 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
280 `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
282 `(("ghc-sha" ,ghc-sha)
283 ("ghc-tasty" ,ghc-tasty)
284 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
285 ("ghc-hunit" ,ghc-hunit)))
286 (home-page "https://github.com/hvr/cryptohash-sha1")
287 (synopsis "SHA-256 implementation for Haskell")
288 (description "This Haskell package provides an incremental and
289 one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2,
290 SHA-256 cryptographic hash algorithm}, with performance close to the
291 fastest implementations available in other languages.
293 The implementation is made in C with a haskell FFI wrapper that hides
294 the C implementation.")
295 (license license:bsd-3)))
297 (define-public ghc-cryptonite
299 (name "ghc-cryptonite")
303 (uri (string-append "https://hackage.haskell.org/package/"
304 "cryptonite/cryptonite-"
308 "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9"))))
309 (build-system haskell-build-system)
310 ;; FIXME: tests are broken.
311 ;; See https://github.com/haskell-crypto/cryptonite/issues/260
312 (arguments '(#:tests? #f))
314 `(("ghc-basement" ,ghc-basement)
315 ("ghc-memory" ,ghc-memory)
316 ("ghc-byteable" ,ghc-byteable)))
318 `(("ghc-tasty" ,ghc-tasty)
319 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
320 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
321 ("ghc-tasty-kat" ,ghc-tasty-kat)))
322 (home-page "https://github.com/haskell-crypto/cryptonite")
323 (synopsis "Cryptography primitives")
325 "This package is a repository of cryptographic primitives for Haskell.
326 It supports a wide range of symmetric ciphers, cryptographic hash functions,
327 public key algorithms, key derivation numbers, cryptographic random number
328 generators, and more.")
329 (license license:bsd-3)))
331 (define-public ghc-digest
339 "https://hackage.haskell.org/package/digest/digest-"
344 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
345 (build-system haskell-build-system)
349 "https://hackage.haskell.org/package/digest")
351 "Various cryptographic hashes for bytestrings")
353 "This package provides efficient cryptographic hash implementations for
354 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
355 are implemented as FFI bindings to efficient code from zlib.")
356 (license license:bsd-3)))
358 (define-public ghc-entropy
365 (uri (string-append "https://hackage.haskell.org/package/"
366 "entropy-" version "/"
367 "entropy-" version ".tar.gz"))
369 (base32 "0szf8hi1pi8g0kxnkcymh65gk1b0niyl1nnkckzdqyar87qal0jm"))))
370 (build-system haskell-build-system)
371 (home-page "https://github.com/TomMD/entropy")
372 (synopsis "Provides platform independent entropy source for Haskell")
373 (description "This Haskell package provides a platform independent method
374 to obtain cryptographically strong entropy.")
375 (license license:bsd-3)))
377 (define-public ghc-pem
383 (uri (string-append "https://hackage.haskell.org/package/"
384 "pem/pem-" version ".tar.gz"))
387 "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
388 (build-system haskell-build-system)
390 `(("ghc-basement" ,ghc-basement)
391 ("ghc-memory" ,ghc-memory)))
393 `(("ghc-test-framework" ,ghc-test-framework)
394 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
395 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
396 ("ghc-hunit" ,ghc-hunit)
397 ("ghc-quickcheck" ,ghc-quickcheck)))
398 (home-page "https://github.com/vincenthz/hs-pem")
399 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
401 "This library provides readers and writers for the @dfn{Privacy Enhanced
402 Mail} (PEM) format.")
403 (license license:bsd-3)))
405 (define-public ghc-puremd5
412 (uri (string-append "https://hackage.haskell.org/package/"
413 "pureMD5-" version "/"
414 "pureMD5-" version ".tar.gz"))
417 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
418 (build-system haskell-build-system)
419 (inputs `(("ghc-cereal" ,ghc-cereal)
420 ("ghc-crypto-api" ,ghc-crypto-api)
421 ("ghc-tagged" ,ghc-tagged)))
422 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
423 ("ghc-quickcheck" ,ghc-quickcheck)
424 ("ghc-test-framework" ,ghc-test-framework)
425 ("ghc-test-framework-quickcheck2"
426 ,ghc-test-framework-quickcheck2)
427 ("ghc-pretty-hex" ,ghc-pretty-hex)))
428 (home-page "https://github.com/TomMD/pureMD5")
429 (synopsis "Haskell implementation of the MD5 hash algorithm")
430 (description "This package provides a Haskell-only implementation of
431 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
433 (license license:bsd-3)))
435 (define-public ghc-sha
441 (uri (string-append "https://hackage.haskell.org/package/"
442 "SHA/SHA-" version ".tar.gz"))
445 "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
446 (build-system haskell-build-system)
448 `(("ghc-quickcheck" ,ghc-quickcheck)
449 ("ghc-test-framework" ,ghc-test-framework)
450 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
451 (home-page "https://hackage.haskell.org/package/SHA")
452 (synopsis "SHA suite of message digest functions")
454 "This library implements the SHA suite of message digest functions,
455 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
456 SHA-based HMAC routines. The functions have been tested against most of the
457 NIST and RFC test vectors for the various functions. While some attention has
458 been paid to performance, these do not presently reach the speed of well-tuned
459 libraries, like OpenSSL.")
460 (license license:bsd-3)))
462 (define-public ghc-x509
468 (uri (string-append "https://hackage.haskell.org/package/"
469 "x509/x509-" version ".tar.gz"))
472 "1j67c35g8334jx7x32hh6awhr43dplp0qwal5gnlkmx09axzrc5i"))))
473 (build-system haskell-build-system)
475 `(("ghc-memory" ,ghc-memory)
476 ("ghc-hourglass" ,ghc-hourglass)
478 ("ghc-asn1-types" ,ghc-asn1-types)
479 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
480 ("ghc-asn1-parse" ,ghc-asn1-parse)
481 ("ghc-cryptonite" ,ghc-cryptonite)))
483 `(("ghc-tasty" ,ghc-tasty)
484 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
485 (home-page "https://github.com/vincenthz/hs-certificate")
486 (synopsis "X509 reader and writer")
488 "This library provides functions to read and write X509 certificates.")
489 (license license:bsd-3)))
491 (define-public ghc-x509-store
493 (name "ghc-x509-store")
497 (uri (string-append "https://hackage.haskell.org/package/"
498 "x509-store/x509-store-"
502 "1y8yyr1i95jkllg8k0z54k5v4vachp848clc07m33xpxidn3b1lp"))))
503 (build-system haskell-build-system)
505 `(("ghc-pem" ,ghc-pem)
506 ("ghc-asn1-types" ,ghc-asn1-types)
507 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
508 ("ghc-cryptonite" ,ghc-cryptonite)
509 ("ghc-x509" ,ghc-x509)))
511 `(("ghc-tasty" ,ghc-tasty)
512 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
513 (home-page "https://github.com/vincenthz/hs-certificate")
514 (synopsis "X.509 collection accessing and storing methods")
516 "This package provides functions for accessing and storing X.509
517 collections, certificates, revocation lists, and exception lists.")
518 (license license:bsd-3)))
520 (define-public ghc-x509-validation
522 (name "ghc-x509-validation")
526 (uri (string-append "https://hackage.haskell.org/package/"
527 "x509-validation/x509-validation-"
531 "16yihzljql3z8w5rgdl95fv3hgk7yd86kbl9b3glllsark5j2hzr"))))
532 (build-system haskell-build-system)
534 `(("ghc-memory" ,ghc-memory)
535 ("ghc-byteable" ,ghc-byteable)
536 ("ghc-hourglass" ,ghc-hourglass)
537 ("ghc-data-default-class" ,ghc-data-default-class)
539 ("ghc-asn1-types" ,ghc-asn1-types)
540 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
541 ("ghc-x509" ,ghc-x509)
542 ("ghc-x509-store" ,ghc-x509-store)
543 ("ghc-cryptonite" ,ghc-cryptonite)))
545 `(("ghc-tasty" ,ghc-tasty)
546 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
547 (home-page "https://github.com/vincenthz/hs-certificate")
548 (synopsis "X.509 certificate and revocation list validation")
550 "This package provides functions for X.509 certificate and revocation
552 (license license:bsd-3)))
554 (define-public ghc-x509-system
556 (name "ghc-x509-system")
560 (uri (string-append "https://hackage.haskell.org/package/"
561 "x509-system/x509-system-"
565 "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
566 (build-system haskell-build-system)
568 `(("ghc-pem" ,ghc-pem)
569 ("ghc-x509" ,ghc-x509)
570 ("ghc-x509-store" ,ghc-x509-store)))
571 (home-page "https://github.com/vincenthz/hs-certificate")
572 (synopsis "Handle system X.509 accessors and storage")
574 "This package provides a library to handle system accessors and storage
575 for X.509 certificates.")
576 (license license:bsd-3)))
578 (define-public ghc-crypto-cipher-types
580 (name "ghc-crypto-cipher-types")
585 (uri (string-append "https://hackage.haskell.org/package/"
586 "crypto-cipher-types-" version "/"
587 "crypto-cipher-types-" version ".tar.gz"))
590 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
591 (build-system haskell-build-system)
592 (inputs `(("ghc-byteable" ,ghc-byteable)
593 ("ghc-securemem" ,ghc-securemem)))
594 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
595 (synopsis "Generic cryptography cipher types for Haskell")
596 (description "This Haskell package provides basic typeclasses and types
597 for symmetric ciphers.")
598 (license license:bsd-3)))
600 (define-public ghc-cipher-aes
602 (name "ghc-cipher-aes")
607 (uri (string-append "https://hackage.haskell.org/package/"
608 "cipher-aes-" version "/"
609 "cipher-aes-" version ".tar.gz"))
612 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
613 (build-system haskell-build-system)
614 (inputs `(("ghc-byteable" ,ghc-byteable)
615 ("ghc-securemem" ,ghc-securemem)
616 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
617 (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
618 ("ghc-test-framework" ,ghc-test-framework)
619 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
620 ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
621 (home-page "https://github.com/vincenthz/hs-cipher-aes")
622 (synopsis "AES cipher implementation with advanced mode of operations for
624 (description "This Haskell package provides AES cipher implementation.
626 The modes of operations available are ECB (Electronic code book), CBC (Cipher
627 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
628 GCM (Galois Counter Mode).
630 The AES implementation uses AES-NI when available (on x86 and x86-64
631 architecture), but fallback gracefully to a software C implementation.
633 The software implementation uses S-Boxes, which might suffer for cache timing
634 issues. However do notes that most other known software implementations,
635 including very popular one (openssl, gnutls) also uses similar
636 implementation. If it matters for your case, you should make sure you have
637 AES-NI available, or you'll need to use a different implementation.")
638 (license license:bsd-3)))
640 (define-public ghc-crypto-random
642 (name "ghc-crypto-random")
647 (uri (string-append "https://hackage.haskell.org/package/"
648 "crypto-random-" version "/"
649 "crypto-random-" version ".tar.gz"))
652 "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
653 (build-system haskell-build-system)
654 (inputs `(("ghc-securemem" ,ghc-securemem)
655 ("ghc-vector" ,ghc-vector)))
656 (home-page "https://github.com/vincenthz/hs-crypto-random")
657 (synopsis "Simple cryptographic random related types for Haskell")
658 (description "Simple cryptographic random related types: a safe
659 abstraction for CPRNGs.")
660 (license license:bsd-3)))
662 (define-public ghc-cprng-aes
664 (name "ghc-cprng-aes")
669 (uri (string-append "https://hackage.haskell.org/package/"
670 "cprng-aes-" version "/"
671 "cprng-aes-" version ".tar.gz"))
674 "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
675 (build-system haskell-build-system)
676 (inputs `(("ghc-byteable" ,ghc-byteable)
677 ("ghc-crypto-random" ,ghc-crypto-random)
678 ("ghc-cipher-aes" ,ghc-cipher-aes)))
679 (home-page "https://github.com/vincenthz/hs-cprng-aes")
680 (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
682 (description "Simple crypto pseudo-random-number-generator with really
683 good randomness property.
685 Using ent, a randomness property maker on one 1Mb sample:
688 @item Entropy = 7.999837 bits per byte.
689 @item Optimum compression would reduce the size of this 1048576 byte file by 0
691 @item Chi square distribution for 1048576 samples is 237.02.
692 @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
693 @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
696 Compared to urandom with the same sampling:
699 @item Entropy = 7.999831 bits per byte.
700 @item Optimum compression would reduce the size of this 1048576 byte file by 0
702 @item Chi square distribution for 1048576 samples is 246.63.
703 @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
704 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
706 (license license:bsd-3)))
708 (define-public ghc-ed25519
716 "https://hackage.haskell.org/package/ed25519/ed25519-"
720 "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
721 (build-system haskell-build-system)
724 ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
725 ;; We omit these test suites because they require old versions of
726 ;; packages and packages we do not have.
728 '("--flags=-test-hlint -test-doctests -test-properties")))
729 (home-page "http://thoughtpolice.github.com/hs-ed25519")
730 (synopsis "Ed25519 cryptographic signatures")
731 (description "This package provides a simple, fast, self-contained
732 copy of the Ed25519 public-key signature system with a clean interface.
733 It also includes support for detached signatures, and thorough
734 documentation on the design and implementation, including usage
736 (license license:expat)))
738 (define-public ghc-tls
744 (uri (string-append "https://hackage.haskell.org/package/"
745 "tls/tls-" version ".tar.gz"))
748 "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
749 (build-system haskell-build-system)
751 `(("ghc-cereal" ,ghc-cereal)
752 ("ghc-data-default-class" ,ghc-data-default-class)
753 ("ghc-memory" ,ghc-memory)
754 ("ghc-cryptonite" ,ghc-cryptonite)
755 ("ghc-asn1-types" ,ghc-asn1-types)
756 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
757 ("ghc-x509" ,ghc-x509)
758 ("ghc-x509-store" ,ghc-x509-store)
759 ("ghc-x509-validation" ,ghc-x509-validation)
760 ("ghc-async" ,ghc-async)
761 ("ghc-network" ,ghc-network)
762 ("ghc-hourglass" ,ghc-hourglass)))
764 `(("ghc-tasty" ,ghc-tasty)
765 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
766 ("ghc-quickcheck" ,ghc-quickcheck)))
767 (home-page "https://github.com/vincenthz/hs-tls")
769 "TLS/SSL protocol native implementation (Server and Client)")
771 "Native Haskell TLS and SSL protocol implementation for server and client.
772 This provides a high-level implementation of a sensitive security protocol,
773 eliminating a common set of security issues through the use of the advanced
774 type system, high level constructions and common Haskell features. Currently
775 implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and
776 Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many
778 (license license:bsd-3)))
780 (define-public ghc-hsopenssl
782 (name "ghc-hsopenssl")
783 (version "0.11.4.17")
787 (uri (string-append "https://hackage.haskell.org/package/"
788 "HsOpenSSL/HsOpenSSL-" version ".tar.gz"))
791 "0qivl9clmybfglwxqp2sq308rv4ia4rhwshcsc8b029bvpp0mpsi"))))
792 (build-system haskell-build-system)
794 `(("ghc-network" ,ghc-network)
795 ("openssl" ,openssl)))
796 (home-page "https://github.com/vshabanov/HsOpenSSL")
797 (synopsis "Partial OpenSSL binding for Haskell")
798 (description "HsOpenSSL is an OpenSSL binding for Haskell. It can
799 generate RSA and DSA keys, read and write PEM files, generate message
800 digests, sign and verify messages, encrypt and decrypt messages. It has
801 also some capabilities of creating SSL clients and servers. This
802 package is in production use by a number of Haskell based systems and
803 stable. You may also be interested in the tls package,
804 @uref{http://hackage.haskell.org/package/tls}, which is a pure Haskell
805 implementation of SSL.")
806 (license license:public-domain)))
808 (define-public ghc-openssl-streams
810 (name "ghc-openssl-streams")
815 (uri (string-append "https://hackage.haskell.org/package/"
816 "openssl-streams/openssl-streams-"
820 "0rplym6ayydkpr7x9mw3l13p0vzzfzzxw244d7sd3jcvaxpv0rmr"))))
821 (build-system haskell-build-system)
823 `(("ghc-hsopenssl" ,ghc-hsopenssl)
824 ("ghc-io-streams" ,ghc-io-streams)
825 ("ghc-network" ,ghc-network)))
827 `(("ghc-hunit" ,ghc-hunit)
828 ("ghc-test-framework" ,ghc-test-framework)
829 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
830 (home-page "http://hackage.haskell.org/package/openssl-streams")
831 (synopsis "OpenSSL network support for io-streams")
832 (description "This library contains io-streams routines for secure
833 networking using OpenSSL (by way of HsOpenSSL).")
834 (license license:bsd-3)))