gnu: r-go-db: Update to 3.5.0.
[jackhill/guix/guix.git] / gnu / packages / haskell-crypto.scm
CommitLineData
f24eba89
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
3;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
4;;; Copyright © 2016 ng0 <ng0@infotropique.org>
5;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages haskell-crypto)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages haskell)
26 #:use-module (gnu packages haskell-check)
27 #:use-module (guix build-system haskell)
28 #:use-module (guix download)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix utils))
32
33(define-public ghc-asn1-types
34 (package
35 (name "ghc-asn1-types")
36 (version "0.3.1")
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "https://hackage.haskell.org/package/"
40 "asn1-types/asn1-types-"
41 version ".tar.gz"))
42 (sha256
43 (base32
44 "1iif9yrh4mmj249gyvam0zb2vb3jnlz777gahh2z9sx00dsx9rja"))))
45 (build-system haskell-build-system)
46 (inputs
47 `(("ghc-memory" ,ghc-memory)
48 ("ghc-hourglass" ,ghc-hourglass)))
49 (home-page "https://github.com/vincenthz/hs-asn1-types")
50 (synopsis "ASN.1 types for Haskell")
51 (description
52 "The package provides the standard types for dealing with the ASN.1
53format.")
54 (license license:bsd-3)))
55
56(define-public ghc-asn1-encoding
57 (package
58 (name "ghc-asn1-encoding")
59 (version "0.9.3")
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "https://hackage.haskell.org/package/"
63 "asn1-encoding/asn1-encoding-"
64 version ".tar.gz"))
65 (sha256
66 (base32
67 "01ki5msrpccgdbdiaaa5a9zw0icp1hki4hca8qx6hzlp0rcf1mwh"))))
68 (build-system haskell-build-system)
69 (inputs
70 `(("ghc-hourglass" ,ghc-hourglass)
71 ("ghc-asn1-types" ,ghc-asn1-types)
72 ("ghc-text" ,ghc-text)
73 ("ghc-mtl" ,ghc-mtl)))
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
81supports 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,
104when 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.2")
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 "1vc27qcgbg7hf50rkqhlrs58zn1888ilh4b6wrrm07bnm48xacak"))))
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
126for Haskell")
127 (description "This Haskell package provides a generic interface for
128cryptographic operations (hashes, ciphers, randomness).
129
130Maintainers of hash and cipher implementations are encouraged to add instances
131for the classes defined in @code{Crypto.Classes}. @code{Crypto} users are
132similarly encouraged to use the interfaces defined in the @code{Classes} module.
133
134Any concepts or functions of general use to more than one cryptographic
135algorithm (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
162cipher operations using the crypto-api interface. Known answer tests (KATs)
163for 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,
193pure APIs, with performance close to the fastest implementations available in
194other languages. The implementations are made in C with a haskell FFI wrapper
195that 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 `(#:tests? #f)) ; tests require old version of ghc-hunit (0.9)
214 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
215 ("ghc-puremd5" ,ghc-puremd5)
216 ("ghc-tasty" ,ghc-tasty)
217 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
218 ("ghc-hunit" ,ghc-hunit)))
219 (home-page "https://github.com/hvr/cryptohash-md5")
220 (synopsis "MD5 implementation for Haskell")
221 (description "This Haskell package provides implementation of MD5.")
222 (license license:bsd-3)))
223
224(define-public ghc-cryptohash-sha1
225 (package
226 (name "ghc-cryptohash-sha1")
227 (version "0.11.100.1")
228 (source
229 (origin
230 (method url-fetch)
231 (uri (string-append "https://hackage.haskell.org/package/"
232 "cryptohash-sha1-" version "/"
233 "cryptohash-sha1-" version ".tar.gz"))
234 (sha256
235 (base32
236 "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
237 (build-system haskell-build-system)
238 (arguments
239 `(#:tests? #f)) ; tests require old version of ghc-hunit (0.9)
240 (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
241 ("ghc-sha" ,ghc-sha)
242 ("ghc-tasty" ,ghc-tasty)
243 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
244 ("ghc-hunit" ,ghc-hunit)))
245 (home-page "https://github.com/hvr/cryptohash-sha1")
246 (synopsis "SHA-1 implementation for Haskell")
247 (description "This Haskell package provides an incremental and one-pass,
248pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm},
249including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with
250performance close to the fastest implementations available in other languages.
251
252The implementation is made in C with a haskell FFI wrapper that hides
253the C implementation.")
254 (license license:bsd-3)))
255
256(define-public ghc-cryptonite
257 (package
258 (name "ghc-cryptonite")
259 (version "0.19")
260 (source (origin
261 (method url-fetch)
262 (uri (string-append "https://hackage.haskell.org/package/"
263 "cryptonite/cryptonite-"
264 version ".tar.gz"))
265 (sha256
266 (base32
267 "1rw5k34vpn4134yrzdhf0rsshsrkixfbv9ap18di2n00z2cw1shw"))))
268 (build-system haskell-build-system)
269 (inputs
270 `(("ghc-memory" ,ghc-memory)
271 ("ghc-byteable" ,ghc-byteable)))
272 (native-inputs
273 `(("ghc-tasty" ,ghc-tasty)
274 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
275 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
276 ("ghc-tasty-kat" ,ghc-tasty-kat)))
277 (home-page "https://github.com/haskell-crypto/cryptonite")
278 (synopsis "Cryptography primitives")
279 (description
280 "This package is a repository of cryptographic primitives for Haskell.
281It supports a wide range of symmetric ciphers, cryptographic hash functions,
282public key algorithms, key derivation numbers, cryptographic random number
283generators, and more.")
284 (license license:bsd-3)))
285
286(define-public ghc-digest
287 (package
288 (name "ghc-digest")
289 (version "0.0.1.2")
290 (source
291 (origin
292 (method url-fetch)
293 (uri (string-append
294 "https://hackage.haskell.org/package/digest/digest-"
295 version
296 ".tar.gz"))
297 (sha256
298 (base32
299 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
300 (build-system haskell-build-system)
301 (inputs
302 `(("zlib" ,zlib)))
303 (home-page
304 "https://hackage.haskell.org/package/digest")
305 (synopsis
306 "Various cryptographic hashes for bytestrings")
307 (description
308 "This package provides efficient cryptographic hash implementations for
309strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
310are implemented as FFI bindings to efficient code from zlib.")
311 (license license:bsd-3)))
312
313(define-public ghc-entropy
314 (package
315 (name "ghc-entropy")
316 (version "0.3.8")
317 (source
318 (origin
319 (method url-fetch)
320 (uri (string-append "https://hackage.haskell.org/package/"
321 "entropy-" version "/"
322 "entropy-" version ".tar.gz"))
323 (sha256
324 (base32
325 "1l3lfigqvdlmxkz1wl7zdkmc0i2r5p6z4xzhiw8xdsbsw7aljfkl"))))
326 (build-system haskell-build-system)
327 (home-page "https://github.com/TomMD/entropy")
328 (synopsis "Provides platform independent entropy source for Haskell")
329 (description "This Haskell package provides a platform independent method
330to obtain cryptographically strong entropy.")
331 (license license:bsd-3)))
332
333(define-public ghc-pem
334 (package
335 (name "ghc-pem")
336 (version "0.2.2")
337 (source (origin
338 (method url-fetch)
339 (uri (string-append "https://hackage.haskell.org/package/"
340 "pem/pem-" version ".tar.gz"))
341 (sha256
342 (base32
343 "162sk5sg22w21wqz5qv8kx6ibxp99v5p20g3nknhm1kddk3hha1p"))))
344 (build-system haskell-build-system)
345 (inputs
346 `(("ghc-mtl" ,ghc-mtl)
347 ("ghc-base64-bytestring" ,ghc-base64-bytestring)))
348 (native-inputs
349 `(("ghc-test-framework" ,ghc-test-framework)
350 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
351 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
352 ("ghc-hunit" ,ghc-hunit)
353 ("ghc-quickcheck" ,ghc-quickcheck)))
354 (home-page "https://github.com/vincenthz/hs-pem")
355 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
356 (description
357 "This library provides readers and writers for the @dfn{Privacy Enhanced
358Mail} (PEM) format.")
359 (license license:bsd-3)))
360
361(define-public ghc-puremd5
362 (package
363 (name "ghc-puremd5")
364 (version "2.1.3")
365 (source
366 (origin
367 (method url-fetch)
368 (uri (string-append "https://hackage.haskell.org/package/"
369 "pureMD5-" version "/"
370 "pureMD5-" version ".tar.gz"))
371 (sha256
372 (base32
373 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
374 (build-system haskell-build-system)
375 (inputs `(("ghc-cereal" ,ghc-cereal)
376 ("ghc-crypto-api" ,ghc-crypto-api)
377 ("ghc-tagged" ,ghc-tagged)))
378 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
379 ("ghc-quickcheck" ,ghc-quickcheck)
380 ("ghc-test-framework" ,ghc-test-framework)
381 ("ghc-test-framework-quickcheck2"
382 ,ghc-test-framework-quickcheck2)
383 ("ghc-pretty-hex" ,ghc-pretty-hex)))
384 (home-page "https://github.com/TomMD/pureMD5")
385 (synopsis "Haskell implementation of the MD5 hash algorithm")
386 (description "This package provides a Haskell-only implementation of
387the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
388interface.")
389 (license license:bsd-3)))
390
391(define-public ghc-sha
392 (package
393 (name "ghc-sha")
394 (version "1.6.4.2")
395 (source (origin
396 (method url-fetch)
397 (uri (string-append "https://hackage.haskell.org/package/"
398 "SHA/SHA-" version ".tar.gz"))
399 (sha256
400 (base32
401 "134ajm87fm4lpsw86m9q8apv20dw4bpk46raa389zr6bcdpifw64"))))
402 (build-system haskell-build-system)
403 (native-inputs
404 `(("ghc-quickcheck" ,ghc-quickcheck)
405 ("ghc-test-framework" ,ghc-test-framework)
406 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
407 (home-page "https://hackage.haskell.org/package/SHA")
408 (synopsis "SHA suite of message digest functions")
409 (description
410 "This library implements the SHA suite of message digest functions,
411according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
412SHA-based HMAC routines. The functions have been tested against most of the
413NIST and RFC test vectors for the various functions. While some attention has
414been paid to performance, these do not presently reach the speed of well-tuned
415libraries, like OpenSSL.")
416 (license license:bsd-3)))
417
418(define-public ghc-x509
419 (package
420 (name "ghc-x509")
421 (version "1.6.3")
422 (source (origin
423 (method url-fetch)
424 (uri (string-append "https://hackage.haskell.org/package/"
425 "x509/x509-" version ".tar.gz"))
426 (sha256
427 (base32
428 "1pmsby29abn485fvnymsgipvb3p1ch9c591xj5ncszkf0ivjiiin"))))
429 (build-system haskell-build-system)
430 (inputs
431 `(("ghc-memory" ,ghc-memory)
432 ("ghc-mtl" ,ghc-mtl)
433 ("ghc-hourglass" ,ghc-hourglass)
434 ("ghc-pem" ,ghc-pem)
435 ("ghc-asn1-types" ,ghc-asn1-types)
436 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
437 ("ghc-asn1-parse" ,ghc-asn1-parse)
438 ("ghc-cryptonite" ,ghc-cryptonite)))
439 (native-inputs
440 `(("ghc-tasty" ,ghc-tasty)
441 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
442 (home-page "https://github.com/vincenthz/hs-certificate")
443 (synopsis "X509 reader and writer")
444 (description
445 "This library provides functions to read and write X509 certificates.")
446 (license license:bsd-3)))
447
448(define-public ghc-x509-store
449 (package
450 (name "ghc-x509-store")
451 (version "1.6.1")
452 (source (origin
453 (method url-fetch)
454 (uri (string-append "https://hackage.haskell.org/package/"
455 "x509-store/x509-store-"
456 version ".tar.gz"))
457 (sha256
458 (base32
459 "01abx528i9f7djq2772xyna8x2mykrnwqkcfrapcx7z3bhprvml3"))))
460 (build-system haskell-build-system)
461 (inputs
462 `(("ghc-mtl" ,ghc-mtl)
463 ("ghc-pem" ,ghc-pem)
464 ("ghc-asn1-types" ,ghc-asn1-types)
465 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
466 ("ghc-cryptonite" ,ghc-cryptonite)
467 ("ghc-x509" ,ghc-x509)))
468 (home-page "https://github.com/vincenthz/hs-certificate")
469 (synopsis "X.509 collection accessing and storing methods")
470 (description
471 "This package provides functions for accessing and storing X.509
472collections, certificates, revocation lists, and exception lists.")
473 (license license:bsd-3)))
474
475(define-public ghc-x509-validation
476 (package
477 (name "ghc-x509-validation")
478 (version "1.6.3")
479 (source (origin
480 (method url-fetch)
481 (uri (string-append "https://hackage.haskell.org/package/"
482 "x509-validation/x509-validation-"
483 version ".tar.gz"))
484 (sha256
485 (base32
486 "1qr1v561hdlhjgqjv9pj9mbk0q1xf2mr1j67ghy93nlxxyzd7dw0"))))
487 (build-system haskell-build-system)
488 (inputs
489 `(("ghc-memory" ,ghc-memory)
490 ("ghc-byteable" ,ghc-byteable)
491 ("ghc-mtl" ,ghc-mtl)
492 ("ghc-hourglass" ,ghc-hourglass)
493 ("ghc-data-default-class" ,ghc-data-default-class)
494 ("ghc-pem" ,ghc-pem)
495 ("ghc-asn1-types" ,ghc-asn1-types)
496 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
497 ("ghc-x509" ,ghc-x509)
498 ("ghc-x509-store" ,ghc-x509-store)
499 ("ghc-cryptonite" ,ghc-cryptonite)))
500 (home-page "https://github.com/vincenthz/hs-certificate")
501 (synopsis "X.509 certificate and revocation list validation")
502 (description
503 "This package provides functions for X.509 certificate and revocation
504list validation.")
505 (license license:bsd-3)))
506
507(define-public ghc-x509-system
508 (package
509 (name "ghc-x509-system")
510 (version "1.6.1")
511 (source (origin
512 (method url-fetch)
513 (uri (string-append "https://hackage.haskell.org/package/"
514 "x509-system/x509-system-"
515 version ".tar.gz"))
516 (sha256
517 (base32
518 "10qf60d2f9jqwnbrhsb2cwpi86xg66m6dxndlxw967v1cdb3h6gf"))))
519 (build-system haskell-build-system)
520 (inputs
521 `(("ghc-mtl" ,ghc-mtl)
522 ("ghc-pem" ,ghc-pem)
523 ("ghc-x509" ,ghc-x509)
524 ("ghc-x509-store" ,ghc-x509-store)))
525 (home-page "https://github.com/vincenthz/hs-certificate")
526 (synopsis "Handle system X.509 accessors and storage")
527 (description
528 "This package provides a library to handle system accessors and storage
529for X.509 certificates.")
530 (license license:bsd-3)))