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