Commit | Line | Data |
---|---|---|
f24eba89 RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> | |
b7032e19 | 3 | ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
4a78fd46 | 4 | ;;; Copyright © 2016 Nils Gillmann <ng0@n0.is> |
f24eba89 | 5 | ;;; Copyright © 2017 rsiddharth <s@ricketyspace.net> |
c24bfc3d | 6 | ;;; Copyright © 2017 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) | |
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") | |
17c3a50d | 37 | (version "0.3.2") |
f24eba89 RW |
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 | |
17c3a50d | 45 | "05vjchyqiy9n275cygffhn0ma7fz7jx52j0dcdm9qm8h9bziymqc")))) |
f24eba89 RW |
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") | |
c24bfc3d | 60 | (version "0.9.5") |
f24eba89 RW |
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 | |
c24bfc3d | 68 | "0adgbamyq0mj1l1hdq4zyyllay714bac1wl0rih3fv1z6vykp1hy")))) |
f24eba89 RW |
69 | (build-system haskell-build-system) |
70 | (inputs | |
71 | `(("ghc-hourglass" ,ghc-hourglass) | |
72 | ("ghc-asn1-types" ,ghc-asn1-types) | |
f54f0475 | 73 | ("ghc-text" ,ghc-text))) |
f24eba89 RW |
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 | |
81 | supports 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, | |
104 | when 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") | |
0f108b33 | 110 | (version "0.13.3") |
f24eba89 RW |
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 | |
0f108b33 | 119 | "19bsmkqkpnvh01b77pmyarx00fic15j4hvg4pzscrj4prskrx2i9")))) |
f24eba89 RW |
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 | |
126 | for Haskell") | |
127 | (description "This Haskell package provides a generic interface for | |
128 | cryptographic operations (hashes, ciphers, randomness). | |
129 | ||
130 | Maintainers of hash and cipher implementations are encouraged to add instances | |
131 | for the classes defined in @code{Crypto.Classes}. @code{Crypto} users are | |
132 | similarly encouraged to use the interfaces defined in the @code{Classes} module. | |
133 | ||
134 | Any concepts or functions of general use to more than one cryptographic | |
135 | algorithm (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 | |
162 | cipher operations using the crypto-api interface. Known answer tests (KATs) | |
163 | for 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, | |
193 | pure APIs, with performance close to the fastest implementations available in | |
194 | other languages. The implementations are made in C with a haskell FFI wrapper | |
195 | that 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 | |
6ef7c05c TS |
213 | `(#:cabal-revision |
214 | ("2" "0vyb9cfvpfxpslxvvhd48gw37i9g8ry5x63xwxd9q7xfiqhs7p3a") | |
215 | #:tests? #f)) ; tests require old version of ghc-hunit (0.9) | |
f24eba89 RW |
216 | (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring) |
217 | ("ghc-puremd5" ,ghc-puremd5) | |
218 | ("ghc-tasty" ,ghc-tasty) | |
219 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) | |
220 | ("ghc-hunit" ,ghc-hunit))) | |
221 | (home-page "https://github.com/hvr/cryptohash-md5") | |
222 | (synopsis "MD5 implementation for Haskell") | |
223 | (description "This Haskell package provides implementation of MD5.") | |
224 | (license license:bsd-3))) | |
225 | ||
226 | (define-public ghc-cryptohash-sha1 | |
227 | (package | |
228 | (name "ghc-cryptohash-sha1") | |
229 | (version "0.11.100.1") | |
230 | (source | |
231 | (origin | |
232 | (method url-fetch) | |
233 | (uri (string-append "https://hackage.haskell.org/package/" | |
234 | "cryptohash-sha1-" version "/" | |
235 | "cryptohash-sha1-" version ".tar.gz")) | |
236 | (sha256 | |
237 | (base32 | |
238 | "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w")))) | |
239 | (build-system haskell-build-system) | |
240 | (arguments | |
f89bf674 TS |
241 | `(#:cabal-revision |
242 | ("2" "0xas0nbq9bfdzlj6k565ibizv1cqvzfzsdj6q9pdiiwyxqblqc3m") | |
243 | #:tests? #f)) ; tests require old version of ghc-hunit (0.9) | |
f24eba89 RW |
244 | (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring) |
245 | ("ghc-sha" ,ghc-sha) | |
246 | ("ghc-tasty" ,ghc-tasty) | |
247 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) | |
248 | ("ghc-hunit" ,ghc-hunit))) | |
249 | (home-page "https://github.com/hvr/cryptohash-sha1") | |
250 | (synopsis "SHA-1 implementation for Haskell") | |
251 | (description "This Haskell package provides an incremental and one-pass, | |
252 | pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm}, | |
253 | including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with | |
254 | performance close to the fastest implementations available in other languages. | |
255 | ||
256 | The implementation is made in C with a haskell FFI wrapper that hides | |
257 | the C implementation.") | |
258 | (license license:bsd-3))) | |
259 | ||
260 | (define-public ghc-cryptonite | |
261 | (package | |
262 | (name "ghc-cryptonite") | |
5b5dbece | 263 | (version "0.25") |
f24eba89 RW |
264 | (source (origin |
265 | (method url-fetch) | |
266 | (uri (string-append "https://hackage.haskell.org/package/" | |
267 | "cryptonite/cryptonite-" | |
268 | version ".tar.gz")) | |
269 | (sha256 | |
270 | (base32 | |
5b5dbece | 271 | "131wbbdr5yavs5k1ah9sz6fqx1ffyvaxf66pwjzsfc47mwc1mgl9")))) |
f24eba89 RW |
272 | (build-system haskell-build-system) |
273 | (inputs | |
5b5dbece RW |
274 | `(("ghc-basement" ,ghc-basement) |
275 | ("ghc-memory" ,ghc-memory) | |
f24eba89 RW |
276 | ("ghc-byteable" ,ghc-byteable))) |
277 | (native-inputs | |
278 | `(("ghc-tasty" ,ghc-tasty) | |
279 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) | |
280 | ("ghc-tasty-hunit" ,ghc-tasty-hunit) | |
281 | ("ghc-tasty-kat" ,ghc-tasty-kat))) | |
282 | (home-page "https://github.com/haskell-crypto/cryptonite") | |
283 | (synopsis "Cryptography primitives") | |
284 | (description | |
285 | "This package is a repository of cryptographic primitives for Haskell. | |
286 | It supports a wide range of symmetric ciphers, cryptographic hash functions, | |
287 | public key algorithms, key derivation numbers, cryptographic random number | |
288 | generators, and more.") | |
289 | (license license:bsd-3))) | |
290 | ||
291 | (define-public ghc-digest | |
292 | (package | |
293 | (name "ghc-digest") | |
294 | (version "0.0.1.2") | |
295 | (source | |
296 | (origin | |
297 | (method url-fetch) | |
298 | (uri (string-append | |
299 | "https://hackage.haskell.org/package/digest/digest-" | |
300 | version | |
301 | ".tar.gz")) | |
302 | (sha256 | |
303 | (base32 | |
304 | "04gy2zp8yzvv7j9bdfvmfzcz3sqyqa6rwslqcn4vyair2vmif5v4")))) | |
305 | (build-system haskell-build-system) | |
306 | (inputs | |
307 | `(("zlib" ,zlib))) | |
308 | (home-page | |
309 | "https://hackage.haskell.org/package/digest") | |
310 | (synopsis | |
311 | "Various cryptographic hashes for bytestrings") | |
312 | (description | |
313 | "This package provides efficient cryptographic hash implementations for | |
314 | strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they | |
315 | are implemented as FFI bindings to efficient code from zlib.") | |
316 | (license license:bsd-3))) | |
317 | ||
318 | (define-public ghc-entropy | |
319 | (package | |
320 | (name "ghc-entropy") | |
a7427ff7 | 321 | (version "0.4.1.1") |
f24eba89 RW |
322 | (source |
323 | (origin | |
324 | (method url-fetch) | |
325 | (uri (string-append "https://hackage.haskell.org/package/" | |
326 | "entropy-" version "/" | |
327 | "entropy-" version ".tar.gz")) | |
328 | (sha256 | |
329 | (base32 | |
a7427ff7 | 330 | "1ahz5g148l6sax3dy505na2513i99c7bxix68jja5kbx4f271zcf")))) |
f24eba89 RW |
331 | (build-system haskell-build-system) |
332 | (home-page "https://github.com/TomMD/entropy") | |
333 | (synopsis "Provides platform independent entropy source for Haskell") | |
334 | (description "This Haskell package provides a platform independent method | |
335 | to obtain cryptographically strong entropy.") | |
336 | (license license:bsd-3))) | |
337 | ||
338 | (define-public ghc-pem | |
339 | (package | |
340 | (name "ghc-pem") | |
9720cca2 | 341 | (version "0.2.4") |
f24eba89 RW |
342 | (source (origin |
343 | (method url-fetch) | |
344 | (uri (string-append "https://hackage.haskell.org/package/" | |
345 | "pem/pem-" version ".tar.gz")) | |
346 | (sha256 | |
347 | (base32 | |
9720cca2 | 348 | "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p")))) |
f24eba89 RW |
349 | (build-system haskell-build-system) |
350 | (inputs | |
9720cca2 TS |
351 | `(("ghc-basement" ,ghc-basement) |
352 | ("ghc-memory" ,ghc-memory))) | |
f24eba89 RW |
353 | (native-inputs |
354 | `(("ghc-test-framework" ,ghc-test-framework) | |
355 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) | |
356 | ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) | |
357 | ("ghc-hunit" ,ghc-hunit) | |
358 | ("ghc-quickcheck" ,ghc-quickcheck))) | |
359 | (home-page "https://github.com/vincenthz/hs-pem") | |
360 | (synopsis "Privacy Enhanced Mail (PEM) format reader and writer") | |
361 | (description | |
362 | "This library provides readers and writers for the @dfn{Privacy Enhanced | |
363 | Mail} (PEM) format.") | |
364 | (license license:bsd-3))) | |
365 | ||
366 | (define-public ghc-puremd5 | |
367 | (package | |
368 | (name "ghc-puremd5") | |
369 | (version "2.1.3") | |
370 | (source | |
371 | (origin | |
372 | (method url-fetch) | |
373 | (uri (string-append "https://hackage.haskell.org/package/" | |
374 | "pureMD5-" version "/" | |
375 | "pureMD5-" version ".tar.gz")) | |
376 | (sha256 | |
377 | (base32 | |
378 | "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy")))) | |
379 | (build-system haskell-build-system) | |
380 | (inputs `(("ghc-cereal" ,ghc-cereal) | |
381 | ("ghc-crypto-api" ,ghc-crypto-api) | |
382 | ("ghc-tagged" ,ghc-tagged))) | |
383 | (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests) | |
384 | ("ghc-quickcheck" ,ghc-quickcheck) | |
385 | ("ghc-test-framework" ,ghc-test-framework) | |
386 | ("ghc-test-framework-quickcheck2" | |
387 | ,ghc-test-framework-quickcheck2) | |
388 | ("ghc-pretty-hex" ,ghc-pretty-hex))) | |
389 | (home-page "https://github.com/TomMD/pureMD5") | |
390 | (synopsis "Haskell implementation of the MD5 hash algorithm") | |
391 | (description "This package provides a Haskell-only implementation of | |
392 | the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class | |
393 | interface.") | |
394 | (license license:bsd-3))) | |
395 | ||
396 | (define-public ghc-sha | |
397 | (package | |
398 | (name "ghc-sha") | |
c1c35c3b | 399 | (version "1.6.4.4") |
f24eba89 RW |
400 | (source (origin |
401 | (method url-fetch) | |
402 | (uri (string-append "https://hackage.haskell.org/package/" | |
403 | "SHA/SHA-" version ".tar.gz")) | |
404 | (sha256 | |
405 | (base32 | |
c1c35c3b | 406 | "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb")))) |
f24eba89 RW |
407 | (build-system haskell-build-system) |
408 | (native-inputs | |
409 | `(("ghc-quickcheck" ,ghc-quickcheck) | |
410 | ("ghc-test-framework" ,ghc-test-framework) | |
411 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2))) | |
412 | (home-page "https://hackage.haskell.org/package/SHA") | |
413 | (synopsis "SHA suite of message digest functions") | |
414 | (description | |
415 | "This library implements the SHA suite of message digest functions, | |
416 | according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the | |
417 | SHA-based HMAC routines. The functions have been tested against most of the | |
418 | NIST and RFC test vectors for the various functions. While some attention has | |
419 | been paid to performance, these do not presently reach the speed of well-tuned | |
420 | libraries, like OpenSSL.") | |
421 | (license license:bsd-3))) | |
422 | ||
423 | (define-public ghc-x509 | |
424 | (package | |
425 | (name "ghc-x509") | |
bb7d443d | 426 | (version "1.7.3") |
f24eba89 RW |
427 | (source (origin |
428 | (method url-fetch) | |
429 | (uri (string-append "https://hackage.haskell.org/package/" | |
430 | "x509/x509-" version ".tar.gz")) | |
431 | (sha256 | |
432 | (base32 | |
bb7d443d | 433 | "0mkk29g32fs70bqkikg83v45h9jig9c8aail3mrdqwxpkfa0yx21")))) |
f24eba89 RW |
434 | (build-system haskell-build-system) |
435 | (inputs | |
436 | `(("ghc-memory" ,ghc-memory) | |
f24eba89 RW |
437 | ("ghc-hourglass" ,ghc-hourglass) |
438 | ("ghc-pem" ,ghc-pem) | |
439 | ("ghc-asn1-types" ,ghc-asn1-types) | |
440 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
441 | ("ghc-asn1-parse" ,ghc-asn1-parse) | |
442 | ("ghc-cryptonite" ,ghc-cryptonite))) | |
443 | (native-inputs | |
444 | `(("ghc-tasty" ,ghc-tasty) | |
445 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck))) | |
446 | (home-page "https://github.com/vincenthz/hs-certificate") | |
447 | (synopsis "X509 reader and writer") | |
448 | (description | |
449 | "This library provides functions to read and write X509 certificates.") | |
450 | (license license:bsd-3))) | |
451 | ||
452 | (define-public ghc-x509-store | |
453 | (package | |
454 | (name "ghc-x509-store") | |
245a2555 | 455 | (version "1.6.6") |
f24eba89 RW |
456 | (source (origin |
457 | (method url-fetch) | |
458 | (uri (string-append "https://hackage.haskell.org/package/" | |
459 | "x509-store/x509-store-" | |
460 | version ".tar.gz")) | |
461 | (sha256 | |
462 | (base32 | |
245a2555 | 463 | "0dbndqmnmyixxc7308nyq3zlkhz9dff4rbcw2a49c77rbicny9va")))) |
f24eba89 RW |
464 | (build-system haskell-build-system) |
465 | (inputs | |
f54f0475 | 466 | `(("ghc-pem" ,ghc-pem) |
f24eba89 RW |
467 | ("ghc-asn1-types" ,ghc-asn1-types) |
468 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
469 | ("ghc-cryptonite" ,ghc-cryptonite) | |
470 | ("ghc-x509" ,ghc-x509))) | |
245a2555 TS |
471 | (native-inputs |
472 | `(("ghc-tasty" ,ghc-tasty) | |
473 | ("ghc-tasty-hunit" ,ghc-tasty-hunit))) | |
f24eba89 RW |
474 | (home-page "https://github.com/vincenthz/hs-certificate") |
475 | (synopsis "X.509 collection accessing and storing methods") | |
476 | (description | |
477 | "This package provides functions for accessing and storing X.509 | |
478 | collections, certificates, revocation lists, and exception lists.") | |
479 | (license license:bsd-3))) | |
480 | ||
481 | (define-public ghc-x509-validation | |
482 | (package | |
483 | (name "ghc-x509-validation") | |
17051405 | 484 | (version "1.6.5") |
f24eba89 RW |
485 | (source (origin |
486 | (method url-fetch) | |
487 | (uri (string-append "https://hackage.haskell.org/package/" | |
488 | "x509-validation/x509-validation-" | |
489 | version ".tar.gz")) | |
490 | (sha256 | |
491 | (base32 | |
17051405 | 492 | "190w1sr3w6w49v3yvqz4grb0v09ym4gll3n8bxwijvbvcybk3xyi")))) |
f24eba89 RW |
493 | (build-system haskell-build-system) |
494 | (inputs | |
495 | `(("ghc-memory" ,ghc-memory) | |
496 | ("ghc-byteable" ,ghc-byteable) | |
f24eba89 RW |
497 | ("ghc-hourglass" ,ghc-hourglass) |
498 | ("ghc-data-default-class" ,ghc-data-default-class) | |
499 | ("ghc-pem" ,ghc-pem) | |
500 | ("ghc-asn1-types" ,ghc-asn1-types) | |
501 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
502 | ("ghc-x509" ,ghc-x509) | |
503 | ("ghc-x509-store" ,ghc-x509-store) | |
504 | ("ghc-cryptonite" ,ghc-cryptonite))) | |
505 | (home-page "https://github.com/vincenthz/hs-certificate") | |
506 | (synopsis "X.509 certificate and revocation list validation") | |
507 | (description | |
508 | "This package provides functions for X.509 certificate and revocation | |
509 | list validation.") | |
510 | (license license:bsd-3))) | |
511 | ||
512 | (define-public ghc-x509-system | |
513 | (package | |
514 | (name "ghc-x509-system") | |
ea9aaa6e | 515 | (version "1.6.4") |
f24eba89 RW |
516 | (source (origin |
517 | (method url-fetch) | |
518 | (uri (string-append "https://hackage.haskell.org/package/" | |
519 | "x509-system/x509-system-" | |
520 | version ".tar.gz")) | |
521 | (sha256 | |
522 | (base32 | |
ea9aaa6e | 523 | "0k7zc0xp7r6kqmi39rpiicvq78xb0pr2cq6q5s3kmmsshllg13nr")))) |
f24eba89 RW |
524 | (build-system haskell-build-system) |
525 | (inputs | |
f54f0475 | 526 | `(("ghc-pem" ,ghc-pem) |
f24eba89 RW |
527 | ("ghc-x509" ,ghc-x509) |
528 | ("ghc-x509-store" ,ghc-x509-store))) | |
529 | (home-page "https://github.com/vincenthz/hs-certificate") | |
530 | (synopsis "Handle system X.509 accessors and storage") | |
531 | (description | |
532 | "This package provides a library to handle system accessors and storage | |
533 | for X.509 certificates.") | |
534 | (license license:bsd-3))) | |
aab6df5b | 535 | |
536 | (define-public ghc-crypto-cipher-types | |
537 | (package | |
538 | (name "ghc-crypto-cipher-types") | |
539 | (version "0.0.9") | |
540 | (source | |
541 | (origin | |
542 | (method url-fetch) | |
543 | (uri (string-append "https://hackage.haskell.org/package/" | |
544 | "crypto-cipher-types-" version "/" | |
545 | "crypto-cipher-types-" version ".tar.gz")) | |
546 | (sha256 | |
547 | (base32 | |
548 | "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0")))) | |
549 | (build-system haskell-build-system) | |
550 | (inputs `(("ghc-byteable" ,ghc-byteable) | |
551 | ("ghc-securemem" ,ghc-securemem))) | |
552 | (home-page "https://github.com/vincenthz/hs-crypto-cipher") | |
553 | (synopsis "Generic cryptography cipher types for Haskell") | |
554 | (description "This Haskell package provides basic typeclasses and types | |
555 | for symmetric ciphers.") | |
556 | (license license:bsd-3))) | |
d91acee7 | 557 | |
558 | (define-public ghc-cipher-aes | |
559 | (package | |
560 | (name "ghc-cipher-aes") | |
561 | (version "0.2.11") | |
562 | (source | |
563 | (origin | |
564 | (method url-fetch) | |
565 | (uri (string-append "https://hackage.haskell.org/package/" | |
566 | "cipher-aes-" version "/" | |
567 | "cipher-aes-" version ".tar.gz")) | |
568 | (sha256 | |
569 | (base32 | |
570 | "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk")))) | |
571 | (build-system haskell-build-system) | |
572 | (inputs `(("ghc-byteable" ,ghc-byteable) | |
573 | ("ghc-securemem" ,ghc-securemem) | |
574 | ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types))) | |
575 | (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck) | |
576 | ("ghc-test-framework" ,ghc-test-framework) | |
577 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) | |
578 | ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests))) | |
579 | (home-page "https://github.com/vincenthz/hs-cipher-aes") | |
580 | (synopsis "AES cipher implementation with advanced mode of operations for | |
581 | Haskell") | |
582 | (description "This Haskell package provides AES cipher implementation. | |
583 | ||
584 | The modes of operations available are ECB (Electronic code book), CBC (Cipher | |
585 | block chaining), CTR (Counter), XTS (XEX with ciphertext stealing), | |
586 | GCM (Galois Counter Mode). | |
587 | ||
588 | The AES implementation uses AES-NI when available (on x86 and x86-64 | |
589 | architecture), but fallback gracefully to a software C implementation. | |
590 | ||
591 | The software implementation uses S-Boxes, which might suffer for cache timing | |
592 | issues. However do notes that most other known software implementations, | |
593 | including very popular one (openssl, gnutls) also uses similar | |
594 | implementation. If it matters for your case, you should make sure you have | |
595 | AES-NI available, or you'll need to use a different implementation.") | |
596 | (license license:bsd-3))) | |
13c28167 | 597 | |
598 | (define-public ghc-crypto-random | |
599 | (package | |
600 | (name "ghc-crypto-random") | |
601 | (version "0.0.9") | |
602 | (source | |
603 | (origin | |
604 | (method url-fetch) | |
605 | (uri (string-append "https://hackage.haskell.org/package/" | |
606 | "crypto-random-" version "/" | |
607 | "crypto-random-" version ".tar.gz")) | |
608 | (sha256 | |
609 | (base32 | |
610 | "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp")))) | |
611 | (build-system haskell-build-system) | |
612 | (inputs `(("ghc-securemem" ,ghc-securemem) | |
613 | ("ghc-vector" ,ghc-vector))) | |
614 | (home-page "https://github.com/vincenthz/hs-crypto-random") | |
615 | (synopsis "Simple cryptographic random related types for Haskell") | |
616 | (description "Simple cryptographic random related types: a safe | |
617 | abstraction for CPRNGs.") | |
618 | (license license:bsd-3))) | |
7565a308 | 619 | |
620 | (define-public ghc-cprng-aes | |
621 | (package | |
622 | (name "ghc-cprng-aes") | |
623 | (version "0.6.1") | |
624 | (source | |
625 | (origin | |
626 | (method url-fetch) | |
627 | (uri (string-append "https://hackage.haskell.org/package/" | |
628 | "cprng-aes-" version "/" | |
629 | "cprng-aes-" version ".tar.gz")) | |
630 | (sha256 | |
631 | (base32 | |
632 | "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4")))) | |
633 | (build-system haskell-build-system) | |
634 | (inputs `(("ghc-byteable" ,ghc-byteable) | |
635 | ("ghc-crypto-random" ,ghc-crypto-random) | |
636 | ("ghc-cipher-aes" ,ghc-cipher-aes))) | |
637 | (home-page "https://github.com/vincenthz/hs-cprng-aes") | |
638 | (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode | |
639 | in Haskell") | |
640 | (description "Simple crypto pseudo-random-number-generator with really | |
641 | good randomness property. | |
642 | ||
643 | Using ent, a randomness property maker on one 1Mb sample: | |
644 | ||
645 | @itemize | |
646 | @item Entropy = 7.999837 bits per byte. | |
647 | @item Optimum compression would reduce the size of this 1048576 byte file by 0 | |
648 | percent. | |
649 | @item Chi square distribution for 1048576 samples is 237.02. | |
650 | @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random). | |
651 | @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent). | |
652 | @end itemize | |
653 | ||
654 | Compared to urandom with the same sampling: | |
655 | ||
656 | @itemize | |
657 | @item Entropy = 7.999831 bits per byte. | |
658 | @item Optimum compression would reduce the size of this 1048576 byte file by 0 | |
659 | percent. | |
660 | @item Chi square distribution for 1048576 samples is 246.63. | |
661 | @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random). | |
662 | @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent). | |
663 | @end itemize") | |
664 | (license license:bsd-3))) |