Merge branch 'core-updates' into core-updates-next
[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 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Nils Gillmann <ng0@n0.is>
5 ;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
6 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
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.
14 ;;;
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.
19 ;;;
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/>.
22
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))
33
34 (define-public ghc-asn1-types
35 (package
36 (name "ghc-asn1-types")
37 (version "0.3.2")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "https://hackage.haskell.org/package/"
41 "asn1-types/asn1-types-"
42 version ".tar.gz"))
43 (sha256
44 (base32
45 "05vjchyqiy9n275cygffhn0ma7fz7jx52j0dcdm9qm8h9bziymqc"))))
46 (build-system haskell-build-system)
47 (inputs
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")
52 (description
53 "The package provides the standard types for dealing with the ASN.1
54 format.")
55 (license license:bsd-3)))
56
57 (define-public ghc-asn1-encoding
58 (package
59 (name "ghc-asn1-encoding")
60 (version "0.9.5")
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "https://hackage.haskell.org/package/"
64 "asn1-encoding/asn1-encoding-"
65 version ".tar.gz"))
66 (sha256
67 (base32
68 "0adgbamyq0mj1l1hdq4zyyllay714bac1wl0rih3fv1z6vykp1hy"))))
69 (build-system haskell-build-system)
70 (inputs
71 `(("ghc-hourglass" ,ghc-hourglass)
72 ("ghc-asn1-types" ,ghc-asn1-types)
73 ("ghc-text" ,ghc-text)))
74 (native-inputs
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")
79 (description
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)))
83
84 (define-public ghc-asn1-parse
85 (package
86 (name "ghc-asn1-parse")
87 (version "0.9.4")
88 (source (origin
89 (method url-fetch)
90 (uri (string-append "https://hackage.haskell.org/package/"
91 "asn1-parse/asn1-parse-"
92 version ".tar.gz"))
93 (sha256
94 (base32
95 "025prsihk5g6rdv9xlfmj0zpa0wa3qjzj5i4ilzvg7f6f3sji8y6"))))
96 (build-system haskell-build-system)
97 (inputs
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")
102 (description
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)))
106
107 (define-public ghc-crypto-api
108 (package
109 (name "ghc-crypto-api")
110 (version "0.13.3")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "https://hackage.haskell.org/package/"
115 "crypto-api-" version "/"
116 "crypto-api-" version ".tar.gz"))
117 (sha256
118 (base32
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
126 for Haskell")
127 (description "This Haskell package provides a generic interface for
128 cryptographic operations (hashes, ciphers, randomness).
129
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.
133
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)))
137
138 (define-public ghc-crypto-api-tests
139 (package
140 (name "ghc-crypto-api-tests")
141 (version "0.3")
142 (source
143 (origin
144 (method url-fetch)
145 (uri (string-append "https://hackage.haskell.org/package/"
146 "crypto-api-tests-" version "/"
147 "crypto-api-tests-" version ".tar.gz"))
148 (sha256
149 (base32
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)))
165
166 (define-public ghc-cryptohash
167 (package
168 (name "ghc-cryptohash")
169 (version "0.11.9")
170 (source
171 (origin
172 (method url-fetch)
173 (uri (string-append
174 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
175 version ".tar.gz"))
176 (sha256
177 (base32
178 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
179 (build-system haskell-build-system)
180 (inputs
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")
191 (description
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)))
197
198 (define-public ghc-cryptohash-md5
199 (package
200 (name "ghc-cryptohash-md5")
201 (version "0.11.100.1")
202 (source
203 (origin
204 (method url-fetch)
205 (uri (string-append "https://hackage.haskell.org/package/"
206 "cryptohash-md5-" version "/"
207 "cryptohash-md5-" version ".tar.gz"))
208 (sha256
209 (base32
210 "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
211 (build-system haskell-build-system)
212 (arguments
213 `(#:cabal-revision
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)))
225
226 (define-public ghc-cryptohash-sha1
227 (package
228 (name "ghc-cryptohash-sha1")
229 (version "0.11.100.1")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (string-append "https://hackage.haskell.org/package/"
234 "cryptohash-sha1-" version "/"
235 "cryptohash-sha1-" version ".tar.gz"))
236 (sha256
237 (base32
238 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
239 (build-system haskell-build-system)
240 (arguments
241 `(#:cabal-revision
242 ("2" "0xas0nbq9bfdzlj6k565ibizv1cqvzfzsdj6q9pdiiwyxqblqc3m")
243 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
244 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
245 ("ghc-sha" ,ghc-sha)
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.
255
256 The implementation is made in C with a haskell FFI wrapper that hides
257 the C implementation.")
258 (license license:bsd-3)))
259
260 (define-public ghc-cryptohash-sha256
261 (package
262 (name "ghc-cryptohash-sha256")
263 (version "0.11.101.0")
264 (source
265 (origin
266 (method url-fetch)
267 (uri (string-append "https://hackage.haskell.org/package/"
268 "cryptohash-sha256-" version "/"
269 "cryptohash-sha256-" version ".tar.gz"))
270 (sha256
271 (base32
272 "1p85vajcgw9hmq8zsz9krzx0vxh7aggwbg5w9ws8w97avcsn8xaj"))))
273 (build-system haskell-build-system)
274 (arguments
275 `(#:cabal-revision
276 ("1" "19birnmwga1yh82l4jqc3fygqkqcf5y8dlldnxfswngkzc3rvwp3")
277 #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
278 (inputs
279 `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
280 (native-inputs
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.
291
292 The implementation is made in C with a haskell FFI wrapper that hides
293 the C implementation.")
294 (license license:bsd-3)))
295
296 (define-public ghc-cryptonite
297 (package
298 (name "ghc-cryptonite")
299 (version "0.25")
300 (source (origin
301 (method url-fetch)
302 (uri (string-append "https://hackage.haskell.org/package/"
303 "cryptonite/cryptonite-"
304 version ".tar.gz"))
305 (sha256
306 (base32
307 "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9"))))
308 (build-system haskell-build-system)
309 (inputs
310 `(("ghc-basement" ,ghc-basement)
311 ("ghc-memory" ,ghc-memory)
312 ("ghc-byteable" ,ghc-byteable)))
313 (native-inputs
314 `(("ghc-tasty" ,ghc-tasty)
315 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
316 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
317 ("ghc-tasty-kat" ,ghc-tasty-kat)))
318 (home-page "https://github.com/haskell-crypto/cryptonite")
319 (synopsis "Cryptography primitives")
320 (description
321 "This package is a repository of cryptographic primitives for Haskell.
322 It supports a wide range of symmetric ciphers, cryptographic hash functions,
323 public key algorithms, key derivation numbers, cryptographic random number
324 generators, and more.")
325 (license license:bsd-3)))
326
327 (define-public ghc-digest
328 (package
329 (name "ghc-digest")
330 (version "0.0.1.2")
331 (source
332 (origin
333 (method url-fetch)
334 (uri (string-append
335 "https://hackage.haskell.org/package/digest/digest-"
336 version
337 ".tar.gz"))
338 (sha256
339 (base32
340 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
341 (build-system haskell-build-system)
342 (inputs
343 `(("zlib" ,zlib)))
344 (home-page
345 "https://hackage.haskell.org/package/digest")
346 (synopsis
347 "Various cryptographic hashes for bytestrings")
348 (description
349 "This package provides efficient cryptographic hash implementations for
350 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
351 are implemented as FFI bindings to efficient code from zlib.")
352 (license license:bsd-3)))
353
354 (define-public ghc-entropy
355 (package
356 (name "ghc-entropy")
357 (version "0.4.1.1")
358 (source
359 (origin
360 (method url-fetch)
361 (uri (string-append "https://hackage.haskell.org/package/"
362 "entropy-" version "/"
363 "entropy-" version ".tar.gz"))
364 (sha256
365 (base32
366 "1ahz5g148l6sax3dy505na2513i99c7bxix68jja5kbx4f271zcf"))))
367 (build-system haskell-build-system)
368 (home-page "https://github.com/TomMD/entropy")
369 (synopsis "Provides platform independent entropy source for Haskell")
370 (description "This Haskell package provides a platform independent method
371 to obtain cryptographically strong entropy.")
372 (license license:bsd-3)))
373
374 (define-public ghc-pem
375 (package
376 (name "ghc-pem")
377 (version "0.2.4")
378 (source (origin
379 (method url-fetch)
380 (uri (string-append "https://hackage.haskell.org/package/"
381 "pem/pem-" version ".tar.gz"))
382 (sha256
383 (base32
384 "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
385 (build-system haskell-build-system)
386 (inputs
387 `(("ghc-basement" ,ghc-basement)
388 ("ghc-memory" ,ghc-memory)))
389 (native-inputs
390 `(("ghc-test-framework" ,ghc-test-framework)
391 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
392 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
393 ("ghc-hunit" ,ghc-hunit)
394 ("ghc-quickcheck" ,ghc-quickcheck)))
395 (home-page "https://github.com/vincenthz/hs-pem")
396 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
397 (description
398 "This library provides readers and writers for the @dfn{Privacy Enhanced
399 Mail} (PEM) format.")
400 (license license:bsd-3)))
401
402 (define-public ghc-puremd5
403 (package
404 (name "ghc-puremd5")
405 (version "2.1.3")
406 (source
407 (origin
408 (method url-fetch)
409 (uri (string-append "https://hackage.haskell.org/package/"
410 "pureMD5-" version "/"
411 "pureMD5-" version ".tar.gz"))
412 (sha256
413 (base32
414 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
415 (build-system haskell-build-system)
416 (inputs `(("ghc-cereal" ,ghc-cereal)
417 ("ghc-crypto-api" ,ghc-crypto-api)
418 ("ghc-tagged" ,ghc-tagged)))
419 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
420 ("ghc-quickcheck" ,ghc-quickcheck)
421 ("ghc-test-framework" ,ghc-test-framework)
422 ("ghc-test-framework-quickcheck2"
423 ,ghc-test-framework-quickcheck2)
424 ("ghc-pretty-hex" ,ghc-pretty-hex)))
425 (home-page "https://github.com/TomMD/pureMD5")
426 (synopsis "Haskell implementation of the MD5 hash algorithm")
427 (description "This package provides a Haskell-only implementation of
428 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
429 interface.")
430 (license license:bsd-3)))
431
432 (define-public ghc-sha
433 (package
434 (name "ghc-sha")
435 (version "1.6.4.4")
436 (source (origin
437 (method url-fetch)
438 (uri (string-append "https://hackage.haskell.org/package/"
439 "SHA/SHA-" version ".tar.gz"))
440 (sha256
441 (base32
442 "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
443 (build-system haskell-build-system)
444 (native-inputs
445 `(("ghc-quickcheck" ,ghc-quickcheck)
446 ("ghc-test-framework" ,ghc-test-framework)
447 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
448 (home-page "https://hackage.haskell.org/package/SHA")
449 (synopsis "SHA suite of message digest functions")
450 (description
451 "This library implements the SHA suite of message digest functions,
452 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
453 SHA-based HMAC routines. The functions have been tested against most of the
454 NIST and RFC test vectors for the various functions. While some attention has
455 been paid to performance, these do not presently reach the speed of well-tuned
456 libraries, like OpenSSL.")
457 (license license:bsd-3)))
458
459 (define-public ghc-x509
460 (package
461 (name "ghc-x509")
462 (version "1.7.3")
463 (source (origin
464 (method url-fetch)
465 (uri (string-append "https://hackage.haskell.org/package/"
466 "x509/x509-" version ".tar.gz"))
467 (sha256
468 (base32
469 "0mkk29g32fs70bqkikg83v45h9jig9c8aail3mrdqwxpkfa0yx21"))))
470 (build-system haskell-build-system)
471 (inputs
472 `(("ghc-memory" ,ghc-memory)
473 ("ghc-hourglass" ,ghc-hourglass)
474 ("ghc-pem" ,ghc-pem)
475 ("ghc-asn1-types" ,ghc-asn1-types)
476 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
477 ("ghc-asn1-parse" ,ghc-asn1-parse)
478 ("ghc-cryptonite" ,ghc-cryptonite)))
479 (native-inputs
480 `(("ghc-tasty" ,ghc-tasty)
481 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
482 (home-page "https://github.com/vincenthz/hs-certificate")
483 (synopsis "X509 reader and writer")
484 (description
485 "This library provides functions to read and write X509 certificates.")
486 (license license:bsd-3)))
487
488 (define-public ghc-x509-store
489 (package
490 (name "ghc-x509-store")
491 (version "1.6.6")
492 (source (origin
493 (method url-fetch)
494 (uri (string-append "https://hackage.haskell.org/package/"
495 "x509-store/x509-store-"
496 version ".tar.gz"))
497 (sha256
498 (base32
499 "0dbndqmnmyixxc7308nyq3zlkhz9dff4rbcw2a49c77rbicny9va"))))
500 (build-system haskell-build-system)
501 (inputs
502 `(("ghc-pem" ,ghc-pem)
503 ("ghc-asn1-types" ,ghc-asn1-types)
504 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
505 ("ghc-cryptonite" ,ghc-cryptonite)
506 ("ghc-x509" ,ghc-x509)))
507 (native-inputs
508 `(("ghc-tasty" ,ghc-tasty)
509 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
510 (home-page "https://github.com/vincenthz/hs-certificate")
511 (synopsis "X.509 collection accessing and storing methods")
512 (description
513 "This package provides functions for accessing and storing X.509
514 collections, certificates, revocation lists, and exception lists.")
515 (license license:bsd-3)))
516
517 (define-public ghc-x509-validation
518 (package
519 (name "ghc-x509-validation")
520 (version "1.6.10")
521 (source (origin
522 (method url-fetch)
523 (uri (string-append "https://hackage.haskell.org/package/"
524 "x509-validation/x509-validation-"
525 version ".tar.gz"))
526 (sha256
527 (base32
528 "1ms51scawldgyfcim5a2qlgyn3rnrclyh205d6djaa1569vrs73n"))))
529 (build-system haskell-build-system)
530 (inputs
531 `(("ghc-memory" ,ghc-memory)
532 ("ghc-byteable" ,ghc-byteable)
533 ("ghc-hourglass" ,ghc-hourglass)
534 ("ghc-data-default-class" ,ghc-data-default-class)
535 ("ghc-pem" ,ghc-pem)
536 ("ghc-asn1-types" ,ghc-asn1-types)
537 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
538 ("ghc-x509" ,ghc-x509)
539 ("ghc-x509-store" ,ghc-x509-store)
540 ("ghc-cryptonite" ,ghc-cryptonite)))
541 (native-inputs
542 `(("ghc-tasty" ,ghc-tasty)
543 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
544 (home-page "https://github.com/vincenthz/hs-certificate")
545 (synopsis "X.509 certificate and revocation list validation")
546 (description
547 "This package provides functions for X.509 certificate and revocation
548 list validation.")
549 (license license:bsd-3)))
550
551 (define-public ghc-x509-system
552 (package
553 (name "ghc-x509-system")
554 (version "1.6.6")
555 (source (origin
556 (method url-fetch)
557 (uri (string-append "https://hackage.haskell.org/package/"
558 "x509-system/x509-system-"
559 version ".tar.gz"))
560 (sha256
561 (base32
562 "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
563 (build-system haskell-build-system)
564 (inputs
565 `(("ghc-pem" ,ghc-pem)
566 ("ghc-x509" ,ghc-x509)
567 ("ghc-x509-store" ,ghc-x509-store)))
568 (home-page "https://github.com/vincenthz/hs-certificate")
569 (synopsis "Handle system X.509 accessors and storage")
570 (description
571 "This package provides a library to handle system accessors and storage
572 for X.509 certificates.")
573 (license license:bsd-3)))
574
575 (define-public ghc-crypto-cipher-types
576 (package
577 (name "ghc-crypto-cipher-types")
578 (version "0.0.9")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append "https://hackage.haskell.org/package/"
583 "crypto-cipher-types-" version "/"
584 "crypto-cipher-types-" version ".tar.gz"))
585 (sha256
586 (base32
587 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
588 (build-system haskell-build-system)
589 (inputs `(("ghc-byteable" ,ghc-byteable)
590 ("ghc-securemem" ,ghc-securemem)))
591 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
592 (synopsis "Generic cryptography cipher types for Haskell")
593 (description "This Haskell package provides basic typeclasses and types
594 for symmetric ciphers.")
595 (license license:bsd-3)))
596
597 (define-public ghc-cipher-aes
598 (package
599 (name "ghc-cipher-aes")
600 (version "0.2.11")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (string-append "https://hackage.haskell.org/package/"
605 "cipher-aes-" version "/"
606 "cipher-aes-" version ".tar.gz"))
607 (sha256
608 (base32
609 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
610 (build-system haskell-build-system)
611 (inputs `(("ghc-byteable" ,ghc-byteable)
612 ("ghc-securemem" ,ghc-securemem)
613 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
614 (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
615 ("ghc-test-framework" ,ghc-test-framework)
616 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
617 ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
618 (home-page "https://github.com/vincenthz/hs-cipher-aes")
619 (synopsis "AES cipher implementation with advanced mode of operations for
620 Haskell")
621 (description "This Haskell package provides AES cipher implementation.
622
623 The modes of operations available are ECB (Electronic code book), CBC (Cipher
624 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
625 GCM (Galois Counter Mode).
626
627 The AES implementation uses AES-NI when available (on x86 and x86-64
628 architecture), but fallback gracefully to a software C implementation.
629
630 The software implementation uses S-Boxes, which might suffer for cache timing
631 issues. However do notes that most other known software implementations,
632 including very popular one (openssl, gnutls) also uses similar
633 implementation. If it matters for your case, you should make sure you have
634 AES-NI available, or you'll need to use a different implementation.")
635 (license license:bsd-3)))
636
637 (define-public ghc-crypto-random
638 (package
639 (name "ghc-crypto-random")
640 (version "0.0.9")
641 (source
642 (origin
643 (method url-fetch)
644 (uri (string-append "https://hackage.haskell.org/package/"
645 "crypto-random-" version "/"
646 "crypto-random-" version ".tar.gz"))
647 (sha256
648 (base32
649 "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
650 (build-system haskell-build-system)
651 (inputs `(("ghc-securemem" ,ghc-securemem)
652 ("ghc-vector" ,ghc-vector)))
653 (home-page "https://github.com/vincenthz/hs-crypto-random")
654 (synopsis "Simple cryptographic random related types for Haskell")
655 (description "Simple cryptographic random related types: a safe
656 abstraction for CPRNGs.")
657 (license license:bsd-3)))
658
659 (define-public ghc-cprng-aes
660 (package
661 (name "ghc-cprng-aes")
662 (version "0.6.1")
663 (source
664 (origin
665 (method url-fetch)
666 (uri (string-append "https://hackage.haskell.org/package/"
667 "cprng-aes-" version "/"
668 "cprng-aes-" version ".tar.gz"))
669 (sha256
670 (base32
671 "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
672 (build-system haskell-build-system)
673 (inputs `(("ghc-byteable" ,ghc-byteable)
674 ("ghc-crypto-random" ,ghc-crypto-random)
675 ("ghc-cipher-aes" ,ghc-cipher-aes)))
676 (home-page "https://github.com/vincenthz/hs-cprng-aes")
677 (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
678 in Haskell")
679 (description "Simple crypto pseudo-random-number-generator with really
680 good randomness property.
681
682 Using ent, a randomness property maker on one 1Mb sample:
683
684 @itemize
685 @item Entropy = 7.999837 bits per byte.
686 @item Optimum compression would reduce the size of this 1048576 byte file by 0
687 percent.
688 @item Chi square distribution for 1048576 samples is 237.02.
689 @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
690 @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
691 @end itemize
692
693 Compared to urandom with the same sampling:
694
695 @itemize
696 @item Entropy = 7.999831 bits per byte.
697 @item Optimum compression would reduce the size of this 1048576 byte file by 0
698 percent.
699 @item Chi square distribution for 1048576 samples is 246.63.
700 @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
701 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
702 @end itemize")
703 (license license:bsd-3)))
704
705 (define-public ghc-ed25519
706 (package
707 (name "ghc-ed25519")
708 (version "0.0.5.0")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://hackage.haskell.org/package/ed25519/ed25519-"
714 version ".tar.gz"))
715 (sha256
716 (base32
717 "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
718 (build-system haskell-build-system)
719 (arguments
720 `(#:cabal-revision
721 ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
722 ;; We omit these test suites because they require old versions of
723 ;; packages and packages we do not have.
724 #:configure-flags
725 '("--flags=-test-hlint -test-doctests -test-properties")))
726 (home-page "http://thoughtpolice.github.com/hs-ed25519")
727 (synopsis "Ed25519 cryptographic signatures")
728 (description "This package provides a simple, fast, self-contained
729 copy of the Ed25519 public-key signature system with a clean interface.
730 It also includes support for detached signatures, and thorough
731 documentation on the design and implementation, including usage
732 guidelines.")
733 (license license:expat)))