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