gnu: ghc-x509-validation: Update to 1.6.5.
[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 ng0 <ng0@infotropique.org>
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 ("ghc-mtl" ,ghc-mtl)))
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.4")
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 "025prsihk5g6rdv9xlfmj0zpa0wa3qjzj5i4ilzvg7f6f3sji8y6"))))
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.2")
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 "1vc27qcgbg7hf50rkqhlrs58zn1888ilh4b6wrrm07bnm48xacak"))))
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 (inputs `(("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
154 ("ghc-crypto-api" ,ghc-crypto-api)
155 ("ghc-cereal" ,ghc-cereal)
156 ("ghc-test-framework" ,ghc-test-framework)
157 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
158 ("ghc-hunit" ,ghc-hunit)
159 ("ghc-quickcheck" ,ghc-quickcheck)))
160 (home-page "https://github.com/TomMD/crypto-api-tests")
161 (synopsis "Test framework and KATs for cryptographic operations for Haskell")
162 (description "This Haskell package provides a test framework for hash and
163 cipher operations using the crypto-api interface. Known answer tests (KATs)
164 for common cryptographic algorithms are included.")
165 (license license:bsd-3)))
166
167 (define-public ghc-cryptohash
168 (package
169 (name "ghc-cryptohash")
170 (version "0.11.9")
171 (source
172 (origin
173 (method url-fetch)
174 (uri (string-append
175 "https://hackage.haskell.org/package/cryptohash/cryptohash-"
176 version ".tar.gz"))
177 (sha256
178 (base32
179 "1yr2iyb779znj79j3fq4ky8l1y8a600a2x1fx9p5pmpwq5zq93y2"))))
180 (build-system haskell-build-system)
181 (inputs
182 `(("ghc-byteable" ,ghc-byteable)
183 ("ghc-cryptonite" ,ghc-cryptonite)
184 ("ghc-memory" ,ghc-memory)
185 ("ghc-hunit" ,ghc-hunit)
186 ("ghc-quickcheck" ,ghc-quickcheck)
187 ("ghc-tasty" ,ghc-tasty)
188 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
189 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
190 (home-page "https://github.com/vincenthz/hs-cryptohash")
191 (synopsis "Collection of cryptographic hashes in Haskell")
192 (description
193 "A collection of crypto hashes, with a practical incremental and one-pass,
194 pure APIs, with performance close to the fastest implementations available in
195 other languages. The implementations are made in C with a haskell FFI wrapper
196 that hides the C implementation.")
197 (license license:bsd-3)))
198
199 (define-public ghc-cryptohash-md5
200 (package
201 (name "ghc-cryptohash-md5")
202 (version "0.11.100.1")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (string-append "https://hackage.haskell.org/package/"
207 "cryptohash-md5-" version "/"
208 "cryptohash-md5-" version ".tar.gz"))
209 (sha256
210 (base32
211 "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
212 (build-system haskell-build-system)
213 (arguments
214 `(#:tests? #f)) ; tests require old version of ghc-hunit (0.9)
215 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
216 ("ghc-puremd5" ,ghc-puremd5)
217 ("ghc-tasty" ,ghc-tasty)
218 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
219 ("ghc-hunit" ,ghc-hunit)))
220 (home-page "https://github.com/hvr/cryptohash-md5")
221 (synopsis "MD5 implementation for Haskell")
222 (description "This Haskell package provides implementation of MD5.")
223 (license license:bsd-3)))
224
225 (define-public ghc-cryptohash-sha1
226 (package
227 (name "ghc-cryptohash-sha1")
228 (version "0.11.100.1")
229 (source
230 (origin
231 (method url-fetch)
232 (uri (string-append "https://hackage.haskell.org/package/"
233 "cryptohash-sha1-" version "/"
234 "cryptohash-sha1-" version ".tar.gz"))
235 (sha256
236 (base32
237 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
238 (build-system haskell-build-system)
239 (arguments
240 `(#:tests? #f)) ; tests require old version of ghc-hunit (0.9)
241 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
242 ("ghc-sha" ,ghc-sha)
243 ("ghc-tasty" ,ghc-tasty)
244 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
245 ("ghc-hunit" ,ghc-hunit)))
246 (home-page "https://github.com/hvr/cryptohash-sha1")
247 (synopsis "SHA-1 implementation for Haskell")
248 (description "This Haskell package provides an incremental and one-pass,
249 pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
250 including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
251 performance close to the fastest implementations available in other languages.
252
253 The implementation is made in C with a haskell FFI wrapper that hides
254 the C implementation.")
255 (license license:bsd-3)))
256
257 (define-public ghc-cryptonite
258 (package
259 (name "ghc-cryptonite")
260 (version "0.20")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "https://hackage.haskell.org/package/"
264 "cryptonite/cryptonite-"
265 version ".tar.gz"))
266 (sha256
267 (base32
268 "0m63np0affci7ba9mrkvw2flzxn0s2mk930xldc4dwijw32gl6r6"))))
269 (build-system haskell-build-system)
270 (inputs
271 `(("ghc-memory" ,ghc-memory)
272 ("ghc-byteable" ,ghc-byteable)))
273 (native-inputs
274 `(("ghc-tasty" ,ghc-tasty)
275 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
276 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
277 ("ghc-tasty-kat" ,ghc-tasty-kat)))
278 (home-page "https://github.com/haskell-crypto/cryptonite")
279 (synopsis "Cryptography primitives")
280 (description
281 "This package is a repository of cryptographic primitives for Haskell.
282 It supports a wide range of symmetric ciphers, cryptographic hash functions,
283 public key algorithms, key derivation numbers, cryptographic random number
284 generators, and more.")
285 (license license:bsd-3)))
286
287 (define-public ghc-digest
288 (package
289 (name "ghc-digest")
290 (version "0.0.1.2")
291 (source
292 (origin
293 (method url-fetch)
294 (uri (string-append
295 "https://hackage.haskell.org/package/digest/digest-"
296 version
297 ".tar.gz"))
298 (sha256
299 (base32
300 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
301 (build-system haskell-build-system)
302 (inputs
303 `(("zlib" ,zlib)))
304 (home-page
305 "https://hackage.haskell.org/package/digest")
306 (synopsis
307 "Various cryptographic hashes for bytestrings")
308 (description
309 "This package provides efficient cryptographic hash implementations for
310 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
311 are implemented as FFI bindings to efficient code from zlib.")
312 (license license:bsd-3)))
313
314 (define-public ghc-entropy
315 (package
316 (name "ghc-entropy")
317 (version "0.3.8")
318 (source
319 (origin
320 (method url-fetch)
321 (uri (string-append "https://hackage.haskell.org/package/"
322 "entropy-" version "/"
323 "entropy-" version ".tar.gz"))
324 (sha256
325 (base32
326 "1l3lfigqvdlmxkz1wl7zdkmc0i2r5p6z4xzhiw8xdsbsw7aljfkl"))))
327 (build-system haskell-build-system)
328 (home-page "https://github.com/TomMD/entropy")
329 (synopsis "Provides platform independent entropy source for Haskell")
330 (description "This Haskell package provides a platform independent method
331 to obtain cryptographically strong entropy.")
332 (license license:bsd-3)))
333
334 (define-public ghc-pem
335 (package
336 (name "ghc-pem")
337 (version "0.2.2")
338 (source (origin
339 (method url-fetch)
340 (uri (string-append "https://hackage.haskell.org/package/"
341 "pem/pem-" version ".tar.gz"))
342 (sha256
343 (base32
344 "162sk5sg22w21wqz5qv8kx6ibxp99v5p20g3nknhm1kddk3hha1p"))))
345 (build-system haskell-build-system)
346 (inputs
347 `(("ghc-mtl" ,ghc-mtl)
348 ("ghc-base64-bytestring" ,ghc-base64-bytestring)))
349 (native-inputs
350 `(("ghc-test-framework" ,ghc-test-framework)
351 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
352 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
353 ("ghc-hunit" ,ghc-hunit)
354 ("ghc-quickcheck" ,ghc-quickcheck)))
355 (home-page "https://github.com/vincenthz/hs-pem")
356 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
357 (description
358 "This library provides readers and writers for the @dfn{Privacy Enhanced
359 Mail} (PEM) format.")
360 (license license:bsd-3)))
361
362 (define-public ghc-puremd5
363 (package
364 (name "ghc-puremd5")
365 (version "2.1.3")
366 (source
367 (origin
368 (method url-fetch)
369 (uri (string-append "https://hackage.haskell.org/package/"
370 "pureMD5-" version "/"
371 "pureMD5-" version ".tar.gz"))
372 (sha256
373 (base32
374 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
375 (build-system haskell-build-system)
376 (inputs `(("ghc-cereal" ,ghc-cereal)
377 ("ghc-crypto-api" ,ghc-crypto-api)
378 ("ghc-tagged" ,ghc-tagged)))
379 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
380 ("ghc-quickcheck" ,ghc-quickcheck)
381 ("ghc-test-framework" ,ghc-test-framework)
382 ("ghc-test-framework-quickcheck2"
383 ,ghc-test-framework-quickcheck2)
384 ("ghc-pretty-hex" ,ghc-pretty-hex)))
385 (home-page "https://github.com/TomMD/pureMD5")
386 (synopsis "Haskell implementation of the MD5 hash algorithm")
387 (description "This package provides a Haskell-only implementation of
388 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
389 interface.")
390 (license license:bsd-3)))
391
392 (define-public ghc-sha
393 (package
394 (name "ghc-sha")
395 (version "1.6.4.2")
396 (source (origin
397 (method url-fetch)
398 (uri (string-append "https://hackage.haskell.org/package/"
399 "SHA/SHA-" version ".tar.gz"))
400 (sha256
401 (base32
402 "134ajm87fm4lpsw86m9q8apv20dw4bpk46raa389zr6bcdpifw64"))))
403 (build-system haskell-build-system)
404 (native-inputs
405 `(("ghc-quickcheck" ,ghc-quickcheck)
406 ("ghc-test-framework" ,ghc-test-framework)
407 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
408 (home-page "https://hackage.haskell.org/package/SHA")
409 (synopsis "SHA suite of message digest functions")
410 (description
411 "This library implements the SHA suite of message digest functions,
412 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
413 SHA-based HMAC routines. The functions have been tested against most of the
414 NIST and RFC test vectors for the various functions. While some attention has
415 been paid to performance, these do not presently reach the speed of well-tuned
416 libraries, like OpenSSL.")
417 (license license:bsd-3)))
418
419 (define-public ghc-x509
420 (package
421 (name "ghc-x509")
422 (version "1.6.4")
423 (source (origin
424 (method url-fetch)
425 (uri (string-append "https://hackage.haskell.org/package/"
426 "x509/x509-" version ".tar.gz"))
427 (sha256
428 (base32
429 "0hixx76wpb4qxida017ka5zr6lrsycahrqyw8z90q9mxvndpy3my"))))
430 (build-system haskell-build-system)
431 (inputs
432 `(("ghc-memory" ,ghc-memory)
433 ("ghc-mtl" ,ghc-mtl)
434 ("ghc-hourglass" ,ghc-hourglass)
435 ("ghc-pem" ,ghc-pem)
436 ("ghc-asn1-types" ,ghc-asn1-types)
437 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
438 ("ghc-asn1-parse" ,ghc-asn1-parse)
439 ("ghc-cryptonite" ,ghc-cryptonite)))
440 (native-inputs
441 `(("ghc-tasty" ,ghc-tasty)
442 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
443 (home-page "https://github.com/vincenthz/hs-certificate")
444 (synopsis "X509 reader and writer")
445 (description
446 "This library provides functions to read and write X509 certificates.")
447 (license license:bsd-3)))
448
449 (define-public ghc-x509-store
450 (package
451 (name "ghc-x509-store")
452 (version "1.6.2")
453 (source (origin
454 (method url-fetch)
455 (uri (string-append "https://hackage.haskell.org/package/"
456 "x509-store/x509-store-"
457 version ".tar.gz"))
458 (sha256
459 (base32
460 "0yw09nwkvr324qz4sc27c0p28bz2h6gns6lkaz9mz92mgqf2dza9"))))
461 (build-system haskell-build-system)
462 (inputs
463 `(("ghc-mtl" ,ghc-mtl)
464 ("ghc-pem" ,ghc-pem)
465 ("ghc-asn1-types" ,ghc-asn1-types)
466 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
467 ("ghc-cryptonite" ,ghc-cryptonite)
468 ("ghc-x509" ,ghc-x509)))
469 (home-page "https://github.com/vincenthz/hs-certificate")
470 (synopsis "X.509 collection accessing and storing methods")
471 (description
472 "This package provides functions for accessing and storing X.509
473 collections, certificates, revocation lists, and exception lists.")
474 (license license:bsd-3)))
475
476 (define-public ghc-x509-validation
477 (package
478 (name "ghc-x509-validation")
479 (version "1.6.5")
480 (source (origin
481 (method url-fetch)
482 (uri (string-append "https://hackage.haskell.org/package/"
483 "x509-validation/x509-validation-"
484 version ".tar.gz"))
485 (sha256
486 (base32
487 "190w1sr3w6w49v3yvqz4grb0v09ym4gll3n8bxwijvbvcybk3xyi"))))
488 (build-system haskell-build-system)
489 (inputs
490 `(("ghc-memory" ,ghc-memory)
491 ("ghc-byteable" ,ghc-byteable)
492 ("ghc-mtl" ,ghc-mtl)
493 ("ghc-hourglass" ,ghc-hourglass)
494 ("ghc-data-default-class" ,ghc-data-default-class)
495 ("ghc-pem" ,ghc-pem)
496 ("ghc-asn1-types" ,ghc-asn1-types)
497 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
498 ("ghc-x509" ,ghc-x509)
499 ("ghc-x509-store" ,ghc-x509-store)
500 ("ghc-cryptonite" ,ghc-cryptonite)))
501 (home-page "https://github.com/vincenthz/hs-certificate")
502 (synopsis "X.509 certificate and revocation list validation")
503 (description
504 "This package provides functions for X.509 certificate and revocation
505 list validation.")
506 (license license:bsd-3)))
507
508 (define-public ghc-x509-system
509 (package
510 (name "ghc-x509-system")
511 (version "1.6.1")
512 (source (origin
513 (method url-fetch)
514 (uri (string-append "https://hackage.haskell.org/package/"
515 "x509-system/x509-system-"
516 version ".tar.gz"))
517 (sha256
518 (base32
519 "10qf60d2f9jqwnbrhsb2cwpi86xg66m6dxndlxw967v1cdb3h6gf"))))
520 (build-system haskell-build-system)
521 (inputs
522 `(("ghc-mtl" ,ghc-mtl)
523 ("ghc-pem" ,ghc-pem)
524 ("ghc-x509" ,ghc-x509)
525 ("ghc-x509-store" ,ghc-x509-store)))
526 (home-page "https://github.com/vincenthz/hs-certificate")
527 (synopsis "Handle system X.509 accessors and storage")
528 (description
529 "This package provides a library to handle system accessors and storage
530 for X.509 certificates.")
531 (license license:bsd-3)))