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