gnu: Remove python2-pyaudio.
[jackhill/guix/guix.git] / gnu / packages / haskell-crypto.scm
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>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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))
36
37 (define-public ghc-asn1-types
38 (package
39 (name "ghc-asn1-types")
40 (version "0.3.4")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append "https://hackage.haskell.org/package/"
44 "asn1-types/asn1-types-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "1a119qxhxhr0yn37r26dkydm6g5kykdkx98ghb59i4ipa6i95vkq"))))
49 (build-system haskell-build-system)
50 (inputs
51 (list ghc-memory ghc-hourglass))
52 (home-page "https://github.com/vincenthz/hs-asn1-types")
53 (synopsis "ASN.1 types for Haskell")
54 (description
55 "The package provides the standard types for dealing with the ASN.1
56 format.")
57 (license license:bsd-3)))
58
59 (define-public ghc-asn1-encoding
60 (package
61 (name "ghc-asn1-encoding")
62 (version "0.9.6")
63 (source (origin
64 (method url-fetch)
65 (uri (string-append "https://hackage.haskell.org/package/"
66 "asn1-encoding/asn1-encoding-"
67 version ".tar.gz"))
68 (sha256
69 (base32
70 "02nsr30h5yic1mk7znf0q4z3n560ip017n60hg7ya25rsfmxxy6r"))))
71 (build-system haskell-build-system)
72 (inputs
73 (list ghc-hourglass ghc-asn1-types))
74 (native-inputs
75 (list ghc-tasty ghc-tasty-quickcheck))
76 (home-page "https://github.com/vincenthz/hs-asn1")
77 (synopsis "ASN1 data reader and writer in RAW, BER and DER forms")
78 (description
79 "This package provides a reader and writer for ASN1 data in raw form with
80 supports for high level forms of ASN1 (BER, and DER).")
81 (license license:bsd-3)))
82
83 (define-public ghc-asn1-parse
84 (package
85 (name "ghc-asn1-parse")
86 (version "0.9.5")
87 (source (origin
88 (method url-fetch)
89 (uri (string-append "https://hackage.haskell.org/package/"
90 "asn1-parse/asn1-parse-"
91 version ".tar.gz"))
92 (sha256
93 (base32
94 "17pk8y3nwv9b9i5j15qlmwi7fmq9ab2z4kfpjk2rvcrh9lsf27wg"))))
95 (build-system haskell-build-system)
96 (inputs
97 (list ghc-asn1-types ghc-asn1-encoding))
98 (home-page "https://github.com/vincenthz/hs-asn1")
99 (synopsis "Simple monadic parser for ASN1 stream types")
100 (description
101 "This package provides a simple monadic parser for ASN1 stream types,
102 when ASN1 pattern matching is not convenient.")
103 (license license:bsd-3)))
104
105 (define-public ghc-crypto-api
106 (package
107 (name "ghc-crypto-api")
108 (version "0.13.3")
109 (source
110 (origin
111 (method url-fetch)
112 (uri (string-append "https://hackage.haskell.org/package/"
113 "crypto-api-" version "/"
114 "crypto-api-" version ".tar.gz"))
115 (sha256
116 (base32
117 "19bsmkqkpnvh01b77pmyarx00fic15j4hvg4pzscrj4prskrx2i9"))))
118 (build-system haskell-build-system)
119 (inputs (list ghc-cereal ghc-tagged ghc-entropy))
120 (home-page "https://github.com/TomMD/crypto-api")
121 (synopsis "Provides generic interface for cryptographic operations
122 for Haskell")
123 (description "This Haskell package provides a generic interface for
124 cryptographic operations (hashes, ciphers, randomness).
125
126 Maintainers of hash and cipher implementations are encouraged to add instances
127 for the classes defined in @code{Crypto.Classes}. @code{Crypto} users are
128 similarly encouraged to use the interfaces defined in the @code{Classes} module.
129
130 Any concepts or functions of general use to more than one cryptographic
131 algorithm (ex: padding) is within scope of this package.")
132 (license license:bsd-3)))
133
134 (define-public ghc-crypto-api-tests
135 (package
136 (name "ghc-crypto-api-tests")
137 (version "0.3")
138 (source
139 (origin
140 (method url-fetch)
141 (uri (string-append "https://hackage.haskell.org/package/"
142 "crypto-api-tests-" version "/"
143 "crypto-api-tests-" version ".tar.gz"))
144 (sha256
145 (base32
146 "0w3j43jdrlj28jryp18hc6q84nkl2yf4vs1hhgrsk7gb9kfyqjpl"))))
147 (build-system haskell-build-system)
148 (outputs '("out" "static" "doc"))
149 (inputs (list ghc-test-framework-quickcheck2
150 ghc-crypto-api
151 ghc-cereal
152 ghc-test-framework
153 ghc-test-framework-hunit
154 ghc-hunit
155 ghc-quickcheck))
156 (home-page "https://github.com/TomMD/crypto-api-tests")
157 (synopsis "Test framework and KATs for cryptographic operations for Haskell")
158 (description "This Haskell package provides a test framework for hash and
159 cipher operations using the crypto-api interface. Known answer tests (KATs)
160 for common cryptographic algorithms are included.")
161 (license license:bsd-3)))
162
163 (define-public ghc-cryptohash
164 (package
165 (name "ghc-cryptohash")
166 (version "0.11.9")
167 (source
168 (origin
169 (method url-fetch)
170 (uri (string-append
171 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
172 version ".tar.gz"))
173 (sha256
174 (base32
175 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
176 (build-system haskell-build-system)
177 (inputs
178 (list ghc-byteable
179 ghc-cryptonite
180 ghc-memory
181 ghc-hunit
182 ghc-quickcheck
183 ghc-tasty
184 ghc-tasty-quickcheck
185 ghc-tasty-hunit))
186 (home-page "https://github.com/vincenthz/hs-cryptohash")
187 (synopsis "Collection of cryptographic hashes in Haskell")
188 (description
189 "A collection of crypto hashes, with a practical incremental and one-pass,
190 pure APIs, with performance close to the fastest implementations available in
191 other languages. The implementations are made in C with a haskell FFI wrapper
192 that hides the C implementation.")
193 (license license:bsd-3)))
194
195 (define-public ghc-cryptohash-md5
196 (package
197 (name "ghc-cryptohash-md5")
198 (version "0.11.101.0")
199 (source
200 (origin
201 (method url-fetch)
202 (uri (string-append "https://hackage.haskell.org/package/"
203 "cryptohash-md5-" version "/"
204 "cryptohash-md5-" version ".tar.gz"))
205 (sha256
206 (base32
207 "018g13hkmq5782i24b4518hcd926fl6x6fh5hd7b9wlxwc5dn21v"))))
208 (build-system haskell-build-system)
209 (native-inputs (list ghc-base16-bytestring ghc-puremd5 ghc-tasty
210 ghc-tasty-hunit ghc-tasty-quickcheck))
211 (home-page "https://github.com/hvr/cryptohash-md5")
212 (synopsis "MD5 implementation for Haskell")
213 (description "This Haskell package provides implementation of MD5.")
214 (license license:bsd-3)))
215
216 (define-public ghc-cryptohash-sha1
217 (package
218 (name "ghc-cryptohash-sha1")
219 (version "0.11.100.1")
220 (source
221 (origin
222 (method url-fetch)
223 (uri (string-append "https://hackage.haskell.org/package/"
224 "cryptohash-sha1-" version "/"
225 "cryptohash-sha1-" version ".tar.gz"))
226 (sha256
227 (base32
228 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
229 (build-system haskell-build-system)
230 (arguments
231 `(#:cabal-revision
232 ("6" "10rpxrmqgwihmplczglwxf5q3l13z9j3kvi065z884y4dymmnkgc")
233 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
234 (native-inputs (list ghc-base16-bytestring ghc-sha ghc-tasty
235 ghc-tasty-quickcheck ghc-hunit))
236 (home-page "https://github.com/hvr/cryptohash-sha1")
237 (synopsis "SHA-1 implementation for Haskell")
238 (description "This Haskell package provides an incremental and one-pass,
239 pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
240 including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
241 performance close to the fastest implementations available in other languages.
242
243 The implementation is made in C with a haskell FFI wrapper that hides
244 the C implementation.")
245 (license license:bsd-3)))
246
247 (define-public ghc-cryptohash-sha256
248 (package
249 (name "ghc-cryptohash-sha256")
250 (version "0.11.102.1")
251 (source
252 (origin
253 (method url-fetch)
254 (uri (string-append "https://hackage.haskell.org/package/"
255 "cryptohash-sha256-" version "/"
256 "cryptohash-sha256-" version ".tar.gz"))
257 (sha256
258 (base32
259 "1xkb7iqplbw4fy1122p79xf1zcb7k44rl0wmfj1q06l7cdqxr9vk"))))
260 (build-system haskell-build-system)
261 (arguments
262 `(#:cabal-revision
263 ("1" "0v5ppc7r2lxbk49h1kwj4b5vyb1dw2fnppykvp5m9rm0p3vhlykr")
264 #:tests? #f)) ; TODO: tasty ==1.1.*
265 (native-inputs
266 (list ghc-base16-bytestring ghc-sha ghc-tasty ghc-tasty-hunit
267 ghc-tasty-quickcheck))
268 (home-page "https://github.com/hvr/cryptohash-sha1")
269 (synopsis "SHA-256 implementation for Haskell")
270 (description "This Haskell package provides an incremental and
271 one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2,
272 SHA-256 cryptographic hash algorithm}, with performance close to the
273 fastest implementations available in other languages.
274
275 The implementation is made in C with a haskell FFI wrapper that hides
276 the C implementation.")
277 (license license:bsd-3)))
278
279 (define-public ghc-cryptonite
280 (package
281 (name "ghc-cryptonite")
282 (version "0.29")
283 (source (origin
284 (method url-fetch)
285 (uri (string-append "https://hackage.haskell.org/package/"
286 "cryptonite/cryptonite-"
287 version ".tar.gz"))
288 (sha256
289 (base32
290 "13xhp3hshb8x06bw37kp16c9jpjmgfn06nkj9drz745fv8f04fnq"))))
291 (build-system haskell-build-system)
292 ;; FIXME: tests are broken.
293 ;; See https://github.com/haskell-crypto/cryptonite/issues/260
294 (arguments '(#:tests? #f))
295 (outputs '("out" "static" "doc"))
296 (inputs
297 (list ghc-basement ghc-memory ghc-byteable))
298 (native-inputs
299 (list ghc-tasty ghc-tasty-quickcheck ghc-tasty-hunit ghc-tasty-kat))
300 (home-page "https://github.com/haskell-crypto/cryptonite")
301 (synopsis "Cryptography primitives")
302 (description
303 "This package is a repository of cryptographic primitives for Haskell.
304 It supports a wide range of symmetric ciphers, cryptographic hash functions,
305 public key algorithms, key derivation numbers, cryptographic random number
306 generators, and more.")
307 (license license:bsd-3)))
308
309 (define-public ghc-digest
310 (package
311 (name "ghc-digest")
312 (version "0.0.1.3")
313 (source
314 (origin
315 (method url-fetch)
316 (uri (string-append
317 "https://hackage.haskell.org/package/digest/digest-"
318 version
319 ".tar.gz"))
320 (sha256
321 (base32
322 "1l5383l5pvp018rj3vabrppnzcqrr2g0dvgvmsrbjdn02wzab5jm"))))
323 (build-system haskell-build-system)
324 (arguments
325 `(#:extra-directories ("zlib")))
326 (inputs
327 (list zlib))
328 (home-page
329 "https://hackage.haskell.org/package/digest")
330 (synopsis
331 "Various cryptographic hashes for bytestrings")
332 (description
333 "This package provides efficient cryptographic hash implementations for
334 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
335 are implemented as FFI bindings to efficient code from zlib.")
336 (license license:bsd-3)))
337
338 (define-public ghc-entropy
339 (package
340 (name "ghc-entropy")
341 (version "0.4.1.6")
342 (source
343 (origin
344 (method url-fetch)
345 (uri (string-append "https://hackage.haskell.org/package/"
346 "entropy-" version "/"
347 "entropy-" version ".tar.gz"))
348 (sha256
349 (base32 "0qmzz0zgad13zl0kjrxz6cxg8ckn2w8saas2a2j72vbafpzmkixd"))))
350 (build-system haskell-build-system)
351 (home-page "https://github.com/TomMD/entropy")
352 (synopsis "Provides platform independent entropy source for Haskell")
353 (description "This Haskell package provides a platform independent method
354 to obtain cryptographically strong entropy.")
355 (license license:bsd-3)))
356
357 (define-public ghc-pem
358 (package
359 (name "ghc-pem")
360 (version "0.2.4")
361 (source (origin
362 (method url-fetch)
363 (uri (string-append "https://hackage.haskell.org/package/"
364 "pem/pem-" version ".tar.gz"))
365 (sha256
366 (base32
367 "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
368 (build-system haskell-build-system)
369 (inputs
370 (list ghc-basement ghc-memory))
371 (native-inputs
372 (list ghc-test-framework ghc-test-framework-quickcheck2
373 ghc-test-framework-hunit ghc-hunit ghc-quickcheck))
374 (home-page "https://github.com/vincenthz/hs-pem")
375 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
376 (description
377 "This library provides readers and writers for the @dfn{Privacy Enhanced
378 Mail} (PEM) format.")
379 (license license:bsd-3)))
380
381 (define-public ghc-puremd5
382 (package
383 (name "ghc-puremd5")
384 (version "2.1.4")
385 (source
386 (origin
387 (method url-fetch)
388 (uri (string-append "https://hackage.haskell.org/package/"
389 "pureMD5-" version "/"
390 "pureMD5-" version ".tar.gz"))
391 (sha256
392 (base32
393 "0qwkvxwi9wh6knn69rg2hvc8ngmv1if77kmpcnp0xqr0l30fwavq"))))
394 (build-system haskell-build-system)
395 (inputs (list ghc-cereal ghc-crypto-api ghc-tagged))
396 (native-inputs (list ghc-crypto-api-tests ghc-quickcheck
397 ghc-test-framework ghc-test-framework-quickcheck2
398 ghc-pretty-hex))
399 (home-page "https://github.com/TomMD/pureMD5")
400 (synopsis "Haskell implementation of the MD5 hash algorithm")
401 (description "This package provides a Haskell-only implementation of
402 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
403 interface.")
404 (license license:bsd-3)))
405
406 (define-public ghc-sha
407 (package
408 (name "ghc-sha")
409 (version "1.6.4.4")
410 (source (origin
411 (method url-fetch)
412 (uri (string-append "https://hackage.haskell.org/package/"
413 "SHA/SHA-" version ".tar.gz"))
414 (sha256
415 (base32
416 "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
417 (build-system haskell-build-system)
418 (native-inputs
419 (list ghc-quickcheck ghc-test-framework
420 ghc-test-framework-quickcheck2))
421 (home-page "https://hackage.haskell.org/package/SHA")
422 (synopsis "SHA suite of message digest functions")
423 (description
424 "This library implements the SHA suite of message digest functions,
425 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
426 SHA-based HMAC routines. The functions have been tested against most of the
427 NIST and RFC test vectors for the various functions. While some attention has
428 been paid to performance, these do not presently reach the speed of well-tuned
429 libraries, like OpenSSL.")
430 (license license:bsd-3)))
431
432 (define-public ghc-x509
433 (package
434 (name "ghc-x509")
435 (version "1.7.5")
436 (source (origin
437 (method url-fetch)
438 (uri (string-append "https://hackage.haskell.org/package/"
439 "x509/x509-" version ".tar.gz"))
440 (sha256
441 (base32
442 "1j67c35g8334jx7x32hh6awhr43dplp0qwal5gnlkmx09axzrc5i"))))
443 (build-system haskell-build-system)
444 (inputs
445 (list ghc-memory
446 ghc-hourglass
447 ghc-pem
448 ghc-asn1-types
449 ghc-asn1-encoding
450 ghc-asn1-parse
451 ghc-cryptonite))
452 (native-inputs
453 (list ghc-tasty ghc-tasty-quickcheck))
454 (home-page "https://github.com/vincenthz/hs-certificate")
455 (synopsis "X509 reader and writer")
456 (description
457 "This library provides functions to read and write X509 certificates.")
458 (license license:bsd-3)))
459
460 (define-public ghc-x509-store
461 (package
462 (name "ghc-x509-store")
463 (version "1.6.7")
464 (source (origin
465 (method url-fetch)
466 (uri (string-append "https://hackage.haskell.org/package/"
467 "x509-store/x509-store-"
468 version ".tar.gz"))
469 (sha256
470 (base32
471 "1y8yyr1i95jkllg8k0z54k5v4vachp848clc07m33xpxidn3b1lp"))))
472 (build-system haskell-build-system)
473 (inputs
474 (list ghc-pem ghc-asn1-types ghc-asn1-encoding ghc-cryptonite
475 ghc-x509))
476 (native-inputs
477 (list ghc-tasty ghc-tasty-hunit))
478 (home-page "https://github.com/vincenthz/hs-certificate")
479 (synopsis "X.509 collection accessing and storing methods")
480 (description
481 "This package provides functions for accessing and storing X.509
482 collections, certificates, revocation lists, and exception lists.")
483 (license license:bsd-3)))
484
485 (define-public ghc-x509-validation
486 (package
487 (name "ghc-x509-validation")
488 (version "1.6.11")
489 (source (origin
490 (method url-fetch)
491 (uri (string-append "https://hackage.haskell.org/package/"
492 "x509-validation/x509-validation-"
493 version ".tar.gz"))
494 (sha256
495 (base32
496 "16yihzljql3z8w5rgdl95fv3hgk7yd86kbl9b3glllsark5j2hzr"))))
497 (build-system haskell-build-system)
498 (inputs
499 (list ghc-memory
500 ghc-byteable
501 ghc-hourglass
502 ghc-data-default-class
503 ghc-pem
504 ghc-asn1-types
505 ghc-asn1-encoding
506 ghc-x509
507 ghc-x509-store
508 ghc-cryptonite))
509 (native-inputs
510 (list ghc-tasty ghc-tasty-hunit))
511 (home-page "https://github.com/vincenthz/hs-certificate")
512 (synopsis "X.509 certificate and revocation list validation")
513 (description
514 "This package provides functions for X.509 certificate and revocation
515 list validation.")
516 (license license:bsd-3)))
517
518 (define-public ghc-x509-system
519 (package
520 (name "ghc-x509-system")
521 (version "1.6.6")
522 (source (origin
523 (method url-fetch)
524 (uri (string-append "https://hackage.haskell.org/package/"
525 "x509-system/x509-system-"
526 version ".tar.gz"))
527 (sha256
528 (base32
529 "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
530 (build-system haskell-build-system)
531 (inputs
532 (list ghc-pem ghc-x509 ghc-x509-store))
533 (home-page "https://github.com/vincenthz/hs-certificate")
534 (synopsis "Handle system X.509 accessors and storage")
535 (description
536 "This package provides a library to handle system accessors and storage
537 for X.509 certificates.")
538 (license license:bsd-3)))
539
540 (define-public ghc-crypto-cipher-types
541 (package
542 (name "ghc-crypto-cipher-types")
543 (version "0.0.9")
544 (source
545 (origin
546 (method url-fetch)
547 (uri (string-append "https://hackage.haskell.org/package/"
548 "crypto-cipher-types-" version "/"
549 "crypto-cipher-types-" version ".tar.gz"))
550 (sha256
551 (base32
552 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
553 (build-system haskell-build-system)
554 (inputs (list ghc-byteable ghc-securemem))
555 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
556 (synopsis "Generic cryptography cipher types for Haskell")
557 (description "This Haskell package provides basic typeclasses and types
558 for symmetric ciphers.")
559 (license license:bsd-3)))
560
561 (define-public ghc-cipher-aes
562 (package
563 (name "ghc-cipher-aes")
564 (version "0.2.11")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (string-append "https://hackage.haskell.org/package/"
569 "cipher-aes-" version "/"
570 "cipher-aes-" version ".tar.gz"))
571 (sha256
572 (base32
573 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
574 (build-system haskell-build-system)
575 (inputs (list ghc-byteable ghc-securemem ghc-crypto-cipher-types))
576 (native-inputs (list ghc-quickcheck ghc-test-framework
577 ghc-test-framework-quickcheck2
578 ghc-crypto-cipher-tests))
579 (home-page "https://github.com/vincenthz/hs-cipher-aes")
580 (synopsis "AES cipher implementation with advanced mode of operations for
581 Haskell")
582 (description "This Haskell package provides AES cipher implementation.
583
584 The modes of operations available are ECB (Electronic code book), CBC (Cipher
585 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
586 GCM (Galois Counter Mode).
587
588 The AES implementation uses AES-NI when available (on x86 and x86-64
589 architecture), but fallback gracefully to a software C implementation.
590
591 The software implementation uses S-Boxes, which might suffer for cache timing
592 issues. However do notes that most other known software implementations,
593 including very popular one (openssl, gnutls) also uses similar
594 implementation. If it matters for your case, you should make sure you have
595 AES-NI available, or you'll need to use a different implementation.")
596 (license license:bsd-3)))
597
598 (define-public ghc-crypto-random
599 (package
600 (name "ghc-crypto-random")
601 (version "0.0.9")
602 (source
603 (origin
604 (method url-fetch)
605 (uri (string-append "https://hackage.haskell.org/package/"
606 "crypto-random-" version "/"
607 "crypto-random-" version ".tar.gz"))
608 (sha256
609 (base32
610 "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
611 (build-system haskell-build-system)
612 (inputs (list ghc-securemem ghc-vector))
613 (home-page "https://github.com/vincenthz/hs-crypto-random")
614 (synopsis "Simple cryptographic random related types for Haskell")
615 (description "Simple cryptographic random related types: a safe
616 abstraction for CPRNGs.")
617 (license license:bsd-3)))
618
619 (define-public ghc-cprng-aes
620 (package
621 (name "ghc-cprng-aes")
622 (version "0.6.1")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (string-append "https://hackage.haskell.org/package/"
627 "cprng-aes-" version "/"
628 "cprng-aes-" version ".tar.gz"))
629 (sha256
630 (base32
631 "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
632 (build-system haskell-build-system)
633 (inputs (list ghc-byteable ghc-crypto-random ghc-cipher-aes))
634 (home-page "https://github.com/vincenthz/hs-cprng-aes")
635 (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
636 in Haskell")
637 (description "Simple crypto pseudo-random-number-generator with really
638 good randomness property.
639
640 Using ent, a randomness property maker on one 1Mb sample:
641
642 @itemize
643 @item Entropy = 7.999837 bits per byte.
644 @item Optimum compression would reduce the size of this 1048576 byte file by 0
645 percent.
646 @item Chi square distribution for 1048576 samples is 237.02.
647 @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
648 @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
649 @end itemize
650
651 Compared to urandom with the same sampling:
652
653 @itemize
654 @item Entropy = 7.999831 bits per byte.
655 @item Optimum compression would reduce the size of this 1048576 byte file by 0
656 percent.
657 @item Chi square distribution for 1048576 samples is 246.63.
658 @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
659 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
660 @end itemize")
661 (license license:bsd-3)))
662
663 (define-public ghc-ed25519
664 (package
665 (name "ghc-ed25519")
666 (version "0.0.5.0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (string-append
671 "https://hackage.haskell.org/package/ed25519/ed25519-"
672 version ".tar.gz"))
673 (sha256
674 (base32
675 "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
676 (build-system haskell-build-system)
677 (arguments
678 `(#:cabal-revision
679 ("3" "1yidh86ymzwmp2b449pwim6vvfcs1qgkkncbixw1zmb7wj6v167v")
680 ;; We omit these test suites because they require old versions of
681 ;; packages and packages we do not have.
682 #:configure-flags
683 '("--flags=-test-hlint -test-doctests -test-properties")))
684 (home-page "http://thoughtpolice.github.com/hs-ed25519")
685 (synopsis "Ed25519 cryptographic signatures")
686 (description "This package provides a simple, fast, self-contained
687 copy of the Ed25519 public-key signature system with a clean interface.
688 It also includes support for detached signatures, and thorough
689 documentation on the design and implementation, including usage
690 guidelines.")
691 (license license:expat)))
692
693 (define-public ghc-tls
694 (package
695 (name "ghc-tls")
696 (version "1.5.5")
697 (source (origin
698 (method url-fetch)
699 (uri (string-append "https://hackage.haskell.org/package/"
700 "tls/tls-" version ".tar.gz"))
701 (sha256
702 (base32
703 "0j1rxxq5lzs584nk19610mk7mmsqqkgfxw2qj74ibb1zsk7baj4a"))))
704 (build-system haskell-build-system)
705 (inputs
706 (list ghc-cereal
707 ghc-data-default-class
708 ghc-memory
709 ghc-cryptonite
710 ghc-asn1-types
711 ghc-asn1-encoding
712 ghc-x509
713 ghc-x509-store
714 ghc-x509-validation
715 ghc-async
716 ghc-network
717 ghc-hourglass))
718 (native-inputs
719 (list ghc-tasty ghc-tasty-quickcheck ghc-quickcheck))
720 (home-page "https://github.com/vincenthz/hs-tls")
721 (synopsis
722 "TLS/SSL protocol native implementation (Server and Client)")
723 (description
724 "Native Haskell TLS and SSL protocol implementation for server and client.
725 This provides a high-level implementation of a sensitive security protocol,
726 eliminating a common set of security issues through the use of the advanced
727 type system, high level constructions and common Haskell features. Currently
728 implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and
729 Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many
730 extensions.")
731 (license license:bsd-3)))
732
733 (define-public ghc-hsopenssl
734 (package
735 (name "ghc-hsopenssl")
736 (version "0.11.7.2")
737 (source
738 (origin
739 (method url-fetch)
740 (uri (string-append "https://hackage.haskell.org/package/"
741 "HsOpenSSL/HsOpenSSL-" version ".tar.gz"))
742 (sha256
743 (base32
744 "0ysdfl8ck3nzhx597fa13dqf31jq5gzwajlak6r91jajks9w0dl5"))))
745 (build-system haskell-build-system)
746 (arguments
747 `(#:extra-directories ("openssl")))
748 (inputs
749 (list ghc-network openssl))
750 (home-page "https://github.com/vshabanov/HsOpenSSL")
751 (synopsis "Partial OpenSSL binding for Haskell")
752 (description "HsOpenSSL is an OpenSSL binding for Haskell. It can
753 generate RSA and DSA keys, read and write PEM files, generate message
754 digests, sign and verify messages, encrypt and decrypt messages. It has
755 also some capabilities of creating SSL clients and servers. This
756 package is in production use by a number of Haskell based systems and
757 stable. You may also be interested in the tls package,
758 @uref{http://hackage.haskell.org/package/tls}, which is a pure Haskell
759 implementation of SSL.")
760 (license license:public-domain)))
761
762 (define-public ghc-openssl-streams
763 (package
764 (name "ghc-openssl-streams")
765 (version "1.2.3.0")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (string-append "https://hackage.haskell.org/package/"
770 "openssl-streams/openssl-streams-"
771 version ".tar.gz"))
772 (sha256
773 (base32
774 "10pnnpzgb5xr811kc9qdk7h2cgn6hk2yiyhnzz8f8p0fjzc0pwjm"))))
775 (build-system haskell-build-system)
776 (inputs
777 (list ghc-hsopenssl ghc-io-streams ghc-network))
778 (native-inputs
779 (list ghc-hunit ghc-test-framework ghc-test-framework-hunit))
780 (home-page "https://hackage.haskell.org/package/openssl-streams")
781 (synopsis "OpenSSL network support for io-streams")
782 (description "This library contains io-streams routines for secure
783 networking using OpenSSL (by way of HsOpenSSL).")
784 (license license:bsd-3)))
785
786 (define-public ghc-cryptonite-conduit
787 (package
788 (name "ghc-cryptonite-conduit")
789 (version "0.2.2")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (string-append "https://hackage.haskell.org/package/"
794 "cryptonite-conduit/cryptonite-conduit-"
795 version ".tar.gz"))
796 (sha256
797 (base32
798 "1bldcmda4xh52mw1wfrjljv8crhw3al7v7kv1j0vidvr7ymnjpbh"))))
799 (build-system haskell-build-system)
800 (inputs
801 (list ghc-conduit
802 ghc-conduit-extra
803 ghc-cryptonite
804 ghc-exceptions
805 ghc-memory
806 ghc-resourcet))
807 (native-inputs
808 (list ghc-conduit-combinators ghc-tasty ghc-tasty-hunit
809 ghc-tasty-quickcheck))
810 (arguments
811 `(#:cabal-revision
812 ("1" "1hh2nzfz4qpxgivfilgk4ll416lph8b2fdkzpzrmqfjglivydfmz")))
813 (home-page "https://github.com/haskell-crypto/cryptonite-conduit")
814 (synopsis "Cryptonite bridge for conduit")
815 (description "This package provides conduit interfaces for some of
816 cryptonite's implementations of cryptographic primitives.")
817 (license license:bsd-3)))