gnu: Add ghc-cipher-aes.
[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 Nils Gillmann <ng0@n0.is>
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.25")
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 "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9"))))
269 (build-system haskell-build-system)
270 (inputs
271 `(("ghc-basement" ,ghc-basement)
272 ("ghc-memory" ,ghc-memory)
273 ("ghc-byteable" ,ghc-byteable)))
274 (native-inputs
275 `(("ghc-tasty" ,ghc-tasty)
276 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
277 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
278 ("ghc-tasty-kat" ,ghc-tasty-kat)))
279 (home-page "https://github.com/haskell-crypto/cryptonite")
280 (synopsis "Cryptography primitives")
281 (description
282 "This package is a repository of cryptographic primitives for Haskell.
283 It supports a wide range of symmetric ciphers, cryptographic hash functions,
284 public key algorithms, key derivation numbers, cryptographic random number
285 generators, and more.")
286 (license license:bsd-3)))
287
288 (define-public ghc-digest
289 (package
290 (name "ghc-digest")
291 (version "0.0.1.2")
292 (source
293 (origin
294 (method url-fetch)
295 (uri (string-append
296 "https://hackage.haskell.org/package/digest/digest-"
297 version
298 ".tar.gz"))
299 (sha256
300 (base32
301 "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4"))))
302 (build-system haskell-build-system)
303 (inputs
304 `(("zlib" ,zlib)))
305 (home-page
306 "https://hackage.haskell.org/package/digest")
307 (synopsis
308 "Various cryptographic hashes for bytestrings")
309 (description
310 "This package provides efficient cryptographic hash implementations for
311 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they
312 are implemented as FFI bindings to efficient code from zlib.")
313 (license license:bsd-3)))
314
315 (define-public ghc-entropy
316 (package
317 (name "ghc-entropy")
318 (version "0.3.8")
319 (source
320 (origin
321 (method url-fetch)
322 (uri (string-append "https://hackage.haskell.org/package/"
323 "entropy-" version "/"
324 "entropy-" version ".tar.gz"))
325 (sha256
326 (base32
327 "1l3lfigqvdlmxkz1wl7zdkmc0i2r5p6z4xzhiw8xdsbsw7aljfkl"))))
328 (build-system haskell-build-system)
329 (home-page "https://github.com/TomMD/entropy")
330 (synopsis "Provides platform independent entropy source for Haskell")
331 (description "This Haskell package provides a platform independent method
332 to obtain cryptographically strong entropy.")
333 (license license:bsd-3)))
334
335 (define-public ghc-pem
336 (package
337 (name "ghc-pem")
338 (version "0.2.2")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "https://hackage.haskell.org/package/"
342 "pem/pem-" version ".tar.gz"))
343 (sha256
344 (base32
345 "162sk5sg22w21wqz5qv8kx6ibxp99v5p20g3nknhm1kddk3hha1p"))))
346 (build-system haskell-build-system)
347 (inputs
348 `(("ghc-mtl" ,ghc-mtl)
349 ("ghc-base64-bytestring" ,ghc-base64-bytestring)))
350 (native-inputs
351 `(("ghc-test-framework" ,ghc-test-framework)
352 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
353 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
354 ("ghc-hunit" ,ghc-hunit)
355 ("ghc-quickcheck" ,ghc-quickcheck)))
356 (home-page "https://github.com/vincenthz/hs-pem")
357 (synopsis "Privacy Enhanced Mail (PEM) format reader and writer")
358 (description
359 "This library provides readers and writers for the @dfn{Privacy Enhanced
360 Mail} (PEM) format.")
361 (license license:bsd-3)))
362
363 (define-public ghc-puremd5
364 (package
365 (name "ghc-puremd5")
366 (version "2.1.3")
367 (source
368 (origin
369 (method url-fetch)
370 (uri (string-append "https://hackage.haskell.org/package/"
371 "pureMD5-" version "/"
372 "pureMD5-" version ".tar.gz"))
373 (sha256
374 (base32
375 "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy"))))
376 (build-system haskell-build-system)
377 (inputs `(("ghc-cereal" ,ghc-cereal)
378 ("ghc-crypto-api" ,ghc-crypto-api)
379 ("ghc-tagged" ,ghc-tagged)))
380 (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests)
381 ("ghc-quickcheck" ,ghc-quickcheck)
382 ("ghc-test-framework" ,ghc-test-framework)
383 ("ghc-test-framework-quickcheck2"
384 ,ghc-test-framework-quickcheck2)
385 ("ghc-pretty-hex" ,ghc-pretty-hex)))
386 (home-page "https://github.com/TomMD/pureMD5")
387 (synopsis "Haskell implementation of the MD5 hash algorithm")
388 (description "This package provides a Haskell-only implementation of
389 the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class
390 interface.")
391 (license license:bsd-3)))
392
393 (define-public ghc-sha
394 (package
395 (name "ghc-sha")
396 (version "1.6.4.2")
397 (source (origin
398 (method url-fetch)
399 (uri (string-append "https://hackage.haskell.org/package/"
400 "SHA/SHA-" version ".tar.gz"))
401 (sha256
402 (base32
403 "134ajm87fm4lpsw86m9q8apv20dw4bpk46raa389zr6bcdpifw64"))))
404 (build-system haskell-build-system)
405 (native-inputs
406 `(("ghc-quickcheck" ,ghc-quickcheck)
407 ("ghc-test-framework" ,ghc-test-framework)
408 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
409 (home-page "https://hackage.haskell.org/package/SHA")
410 (synopsis "SHA suite of message digest functions")
411 (description
412 "This library implements the SHA suite of message digest functions,
413 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the
414 SHA-based HMAC routines. The functions have been tested against most of the
415 NIST and RFC test vectors for the various functions. While some attention has
416 been paid to performance, these do not presently reach the speed of well-tuned
417 libraries, like OpenSSL.")
418 (license license:bsd-3)))
419
420 (define-public ghc-x509
421 (package
422 (name "ghc-x509")
423 (version "1.6.4")
424 (source (origin
425 (method url-fetch)
426 (uri (string-append "https://hackage.haskell.org/package/"
427 "x509/x509-" version ".tar.gz"))
428 (sha256
429 (base32
430 "0hixx76wpb4qxida017ka5zr6lrsycahrqyw8z90q9mxvndpy3my"))))
431 (build-system haskell-build-system)
432 (inputs
433 `(("ghc-memory" ,ghc-memory)
434 ("ghc-mtl" ,ghc-mtl)
435 ("ghc-hourglass" ,ghc-hourglass)
436 ("ghc-pem" ,ghc-pem)
437 ("ghc-asn1-types" ,ghc-asn1-types)
438 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
439 ("ghc-asn1-parse" ,ghc-asn1-parse)
440 ("ghc-cryptonite" ,ghc-cryptonite)))
441 (native-inputs
442 `(("ghc-tasty" ,ghc-tasty)
443 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
444 (home-page "https://github.com/vincenthz/hs-certificate")
445 (synopsis "X509 reader and writer")
446 (description
447 "This library provides functions to read and write X509 certificates.")
448 (license license:bsd-3)))
449
450 (define-public ghc-x509-store
451 (package
452 (name "ghc-x509-store")
453 (version "1.6.2")
454 (source (origin
455 (method url-fetch)
456 (uri (string-append "https://hackage.haskell.org/package/"
457 "x509-store/x509-store-"
458 version ".tar.gz"))
459 (sha256
460 (base32
461 "0yw09nwkvr324qz4sc27c0p28bz2h6gns6lkaz9mz92mgqf2dza9"))))
462 (build-system haskell-build-system)
463 (inputs
464 `(("ghc-mtl" ,ghc-mtl)
465 ("ghc-pem" ,ghc-pem)
466 ("ghc-asn1-types" ,ghc-asn1-types)
467 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
468 ("ghc-cryptonite" ,ghc-cryptonite)
469 ("ghc-x509" ,ghc-x509)))
470 (home-page "https://github.com/vincenthz/hs-certificate")
471 (synopsis "X.509 collection accessing and storing methods")
472 (description
473 "This package provides functions for accessing and storing X.509
474 collections, certificates, revocation lists, and exception lists.")
475 (license license:bsd-3)))
476
477 (define-public ghc-x509-validation
478 (package
479 (name "ghc-x509-validation")
480 (version "1.6.5")
481 (source (origin
482 (method url-fetch)
483 (uri (string-append "https://hackage.haskell.org/package/"
484 "x509-validation/x509-validation-"
485 version ".tar.gz"))
486 (sha256
487 (base32
488 "190w1sr3w6w49v3yvqz4grb0v09ym4gll3n8bxwijvbvcybk3xyi"))))
489 (build-system haskell-build-system)
490 (inputs
491 `(("ghc-memory" ,ghc-memory)
492 ("ghc-byteable" ,ghc-byteable)
493 ("ghc-mtl" ,ghc-mtl)
494 ("ghc-hourglass" ,ghc-hourglass)
495 ("ghc-data-default-class" ,ghc-data-default-class)
496 ("ghc-pem" ,ghc-pem)
497 ("ghc-asn1-types" ,ghc-asn1-types)
498 ("ghc-asn1-encoding" ,ghc-asn1-encoding)
499 ("ghc-x509" ,ghc-x509)
500 ("ghc-x509-store" ,ghc-x509-store)
501 ("ghc-cryptonite" ,ghc-cryptonite)))
502 (home-page "https://github.com/vincenthz/hs-certificate")
503 (synopsis "X.509 certificate and revocation list validation")
504 (description
505 "This package provides functions for X.509 certificate and revocation
506 list validation.")
507 (license license:bsd-3)))
508
509 (define-public ghc-x509-system
510 (package
511 (name "ghc-x509-system")
512 (version "1.6.4")
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "https://hackage.haskell.org/package/"
516 "x509-system/x509-system-"
517 version ".tar.gz"))
518 (sha256
519 (base32
520 "0k7zc0xp7r6kqmi39rpiicvq78xb0pr2cq6q5s3kmmsshllg13nr"))))
521 (build-system haskell-build-system)
522 (inputs
523 `(("ghc-mtl" ,ghc-mtl)
524 ("ghc-pem" ,ghc-pem)
525 ("ghc-x509" ,ghc-x509)
526 ("ghc-x509-store" ,ghc-x509-store)))
527 (home-page "https://github.com/vincenthz/hs-certificate")
528 (synopsis "Handle system X.509 accessors and storage")
529 (description
530 "This package provides a library to handle system accessors and storage
531 for X.509 certificates.")
532 (license license:bsd-3)))
533
534 (define-public ghc-crypto-cipher-types
535 (package
536 (name "ghc-crypto-cipher-types")
537 (version "0.0.9")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (string-append "https://hackage.haskell.org/package/"
542 "crypto-cipher-types-" version "/"
543 "crypto-cipher-types-" version ".tar.gz"))
544 (sha256
545 (base32
546 "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
547 (build-system haskell-build-system)
548 (inputs `(("ghc-byteable" ,ghc-byteable)
549 ("ghc-securemem" ,ghc-securemem)))
550 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
551 (synopsis "Generic cryptography cipher types for Haskell")
552 (description "This Haskell package provides basic typeclasses and types
553 for symmetric ciphers.")
554 (license license:bsd-3)))
555
556 (define-public ghc-cipher-aes
557 (package
558 (name "ghc-cipher-aes")
559 (version "0.2.11")
560 (source
561 (origin
562 (method url-fetch)
563 (uri (string-append "https://hackage.haskell.org/package/"
564 "cipher-aes-" version "/"
565 "cipher-aes-" version ".tar.gz"))
566 (sha256
567 (base32
568 "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
569 (build-system haskell-build-system)
570 (inputs `(("ghc-byteable" ,ghc-byteable)
571 ("ghc-securemem" ,ghc-securemem)
572 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
573 (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
574 ("ghc-test-framework" ,ghc-test-framework)
575 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
576 ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
577 (home-page "https://github.com/vincenthz/hs-cipher-aes")
578 (synopsis "AES cipher implementation with advanced mode of operations for
579 Haskell")
580 (description "This Haskell package provides AES cipher implementation.
581
582 The modes of operations available are ECB (Electronic code book), CBC (Cipher
583 block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
584 GCM (Galois Counter Mode).
585
586 The AES implementation uses AES-NI when available (on x86 and x86-64
587 architecture), but fallback gracefully to a software C implementation.
588
589 The software implementation uses S-Boxes, which might suffer for cache timing
590 issues. However do notes that most other known software implementations,
591 including very popular one (openssl, gnutls) also uses similar
592 implementation. If it matters for your case, you should make sure you have
593 AES-NI available, or you'll need to use a different implementation.")
594 (license license:bsd-3)))