Commit | Line | Data |
---|---|---|
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> |
47956fa0 | 4 | ;;; Copyright © 2016 ng0 <ng0@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 | |
56 | format.") | |
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 | |
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") | |
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, | |
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") | |
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 | |
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 | |
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, | |
253 | pure API to the @uref{https://en.wikipedia.org/wiki/SHA-1, SHA-1 hash algorithm}, | |
254 | including @uref{https://en.wikipedia.org/wiki/HMAC, HMAC support}, with | |
255 | performance close to the fastest implementations available in other languages. | |
256 | ||
bf7e5884 TS |
257 | The implementation is made in C with a haskell FFI wrapper that hides |
258 | the 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 | |
289 | one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2, | |
290 | SHA-256 cryptographic hash algorithm}, with performance close to the | |
291 | fastest implementations available in other languages. | |
292 | ||
f24eba89 RW |
293 | The implementation is made in C with a haskell FFI wrapper that hides |
294 | the 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. | |
326 | It supports a wide range of symmetric ciphers, cryptographic hash functions, | |
327 | public key algorithms, key derivation numbers, cryptographic random number | |
328 | generators, 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) | |
346 | (inputs | |
347 | `(("zlib" ,zlib))) | |
348 | (home-page | |
349 | "https://hackage.haskell.org/package/digest") | |
350 | (synopsis | |
351 | "Various cryptographic hashes for bytestrings") | |
352 | (description | |
353 | "This package provides efficient cryptographic hash implementations for | |
354 | strict and lazy bytestrings. For now, CRC32 and Adler32 are supported; they | |
355 | are implemented as FFI bindings to efficient code from zlib.") | |
356 | (license license:bsd-3))) | |
357 | ||
358 | (define-public ghc-entropy | |
359 | (package | |
360 | (name "ghc-entropy") | |
a3748d44 | 361 | (version "0.4.1.5") |
f24eba89 RW |
362 | (source |
363 | (origin | |
364 | (method url-fetch) | |
365 | (uri (string-append "https://hackage.haskell.org/package/" | |
366 | "entropy-" version "/" | |
367 | "entropy-" version ".tar.gz")) | |
368 | (sha256 | |
a3748d44 | 369 | (base32 "0szf8hi1pi8g0kxnkcymh65gk1b0niyl1nnkckzdqyar87qal0jm")))) |
f24eba89 RW |
370 | (build-system haskell-build-system) |
371 | (home-page "https://github.com/TomMD/entropy") | |
372 | (synopsis "Provides platform independent entropy source for Haskell") | |
373 | (description "This Haskell package provides a platform independent method | |
374 | to obtain cryptographically strong entropy.") | |
375 | (license license:bsd-3))) | |
376 | ||
377 | (define-public ghc-pem | |
378 | (package | |
379 | (name "ghc-pem") | |
9720cca2 | 380 | (version "0.2.4") |
f24eba89 RW |
381 | (source (origin |
382 | (method url-fetch) | |
383 | (uri (string-append "https://hackage.haskell.org/package/" | |
384 | "pem/pem-" version ".tar.gz")) | |
385 | (sha256 | |
386 | (base32 | |
9720cca2 | 387 | "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p")))) |
f24eba89 RW |
388 | (build-system haskell-build-system) |
389 | (inputs | |
9720cca2 TS |
390 | `(("ghc-basement" ,ghc-basement) |
391 | ("ghc-memory" ,ghc-memory))) | |
f24eba89 RW |
392 | (native-inputs |
393 | `(("ghc-test-framework" ,ghc-test-framework) | |
394 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) | |
395 | ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) | |
396 | ("ghc-hunit" ,ghc-hunit) | |
397 | ("ghc-quickcheck" ,ghc-quickcheck))) | |
398 | (home-page "https://github.com/vincenthz/hs-pem") | |
399 | (synopsis "Privacy Enhanced Mail (PEM) format reader and writer") | |
400 | (description | |
401 | "This library provides readers and writers for the @dfn{Privacy Enhanced | |
402 | Mail} (PEM) format.") | |
403 | (license license:bsd-3))) | |
404 | ||
405 | (define-public ghc-puremd5 | |
406 | (package | |
407 | (name "ghc-puremd5") | |
408 | (version "2.1.3") | |
409 | (source | |
410 | (origin | |
411 | (method url-fetch) | |
412 | (uri (string-append "https://hackage.haskell.org/package/" | |
413 | "pureMD5-" version "/" | |
414 | "pureMD5-" version ".tar.gz")) | |
415 | (sha256 | |
416 | (base32 | |
417 | "0zdilz41cla2ck7mcw1a9702gyg2abq94mqahr4vci9sbs53bwxy")))) | |
418 | (build-system haskell-build-system) | |
419 | (inputs `(("ghc-cereal" ,ghc-cereal) | |
420 | ("ghc-crypto-api" ,ghc-crypto-api) | |
421 | ("ghc-tagged" ,ghc-tagged))) | |
422 | (native-inputs `(("ghc-crypto-api-tests" ,ghc-crypto-api-tests) | |
423 | ("ghc-quickcheck" ,ghc-quickcheck) | |
424 | ("ghc-test-framework" ,ghc-test-framework) | |
425 | ("ghc-test-framework-quickcheck2" | |
426 | ,ghc-test-framework-quickcheck2) | |
427 | ("ghc-pretty-hex" ,ghc-pretty-hex))) | |
428 | (home-page "https://github.com/TomMD/pureMD5") | |
429 | (synopsis "Haskell implementation of the MD5 hash algorithm") | |
430 | (description "This package provides a Haskell-only implementation of | |
431 | the MD5 digest (hash) algorithm. This now supports the @code{crypto-api} class | |
432 | interface.") | |
433 | (license license:bsd-3))) | |
434 | ||
435 | (define-public ghc-sha | |
436 | (package | |
437 | (name "ghc-sha") | |
c1c35c3b | 438 | (version "1.6.4.4") |
f24eba89 RW |
439 | (source (origin |
440 | (method url-fetch) | |
441 | (uri (string-append "https://hackage.haskell.org/package/" | |
442 | "SHA/SHA-" version ".tar.gz")) | |
443 | (sha256 | |
444 | (base32 | |
c1c35c3b | 445 | "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb")))) |
f24eba89 RW |
446 | (build-system haskell-build-system) |
447 | (native-inputs | |
448 | `(("ghc-quickcheck" ,ghc-quickcheck) | |
449 | ("ghc-test-framework" ,ghc-test-framework) | |
450 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2))) | |
451 | (home-page "https://hackage.haskell.org/package/SHA") | |
452 | (synopsis "SHA suite of message digest functions") | |
453 | (description | |
454 | "This library implements the SHA suite of message digest functions, | |
455 | according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as the | |
456 | SHA-based HMAC routines. The functions have been tested against most of the | |
457 | NIST and RFC test vectors for the various functions. While some attention has | |
458 | been paid to performance, these do not presently reach the speed of well-tuned | |
459 | libraries, like OpenSSL.") | |
460 | (license license:bsd-3))) | |
461 | ||
462 | (define-public ghc-x509 | |
463 | (package | |
464 | (name "ghc-x509") | |
1f795ab0 | 465 | (version "1.7.5") |
f24eba89 RW |
466 | (source (origin |
467 | (method url-fetch) | |
468 | (uri (string-append "https://hackage.haskell.org/package/" | |
469 | "x509/x509-" version ".tar.gz")) | |
470 | (sha256 | |
471 | (base32 | |
1f795ab0 | 472 | "1j67c35g8334jx7x32hh6awhr43dplp0qwal5gnlkmx09axzrc5i")))) |
f24eba89 RW |
473 | (build-system haskell-build-system) |
474 | (inputs | |
475 | `(("ghc-memory" ,ghc-memory) | |
f24eba89 RW |
476 | ("ghc-hourglass" ,ghc-hourglass) |
477 | ("ghc-pem" ,ghc-pem) | |
478 | ("ghc-asn1-types" ,ghc-asn1-types) | |
479 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
480 | ("ghc-asn1-parse" ,ghc-asn1-parse) | |
481 | ("ghc-cryptonite" ,ghc-cryptonite))) | |
482 | (native-inputs | |
483 | `(("ghc-tasty" ,ghc-tasty) | |
484 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck))) | |
485 | (home-page "https://github.com/vincenthz/hs-certificate") | |
486 | (synopsis "X509 reader and writer") | |
487 | (description | |
488 | "This library provides functions to read and write X509 certificates.") | |
489 | (license license:bsd-3))) | |
490 | ||
491 | (define-public ghc-x509-store | |
492 | (package | |
493 | (name "ghc-x509-store") | |
25ed6005 | 494 | (version "1.6.7") |
f24eba89 RW |
495 | (source (origin |
496 | (method url-fetch) | |
497 | (uri (string-append "https://hackage.haskell.org/package/" | |
498 | "x509-store/x509-store-" | |
499 | version ".tar.gz")) | |
500 | (sha256 | |
501 | (base32 | |
25ed6005 | 502 | "1y8yyr1i95jkllg8k0z54k5v4vachp848clc07m33xpxidn3b1lp")))) |
f24eba89 RW |
503 | (build-system haskell-build-system) |
504 | (inputs | |
f54f0475 | 505 | `(("ghc-pem" ,ghc-pem) |
f24eba89 RW |
506 | ("ghc-asn1-types" ,ghc-asn1-types) |
507 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
508 | ("ghc-cryptonite" ,ghc-cryptonite) | |
509 | ("ghc-x509" ,ghc-x509))) | |
245a2555 TS |
510 | (native-inputs |
511 | `(("ghc-tasty" ,ghc-tasty) | |
512 | ("ghc-tasty-hunit" ,ghc-tasty-hunit))) | |
f24eba89 RW |
513 | (home-page "https://github.com/vincenthz/hs-certificate") |
514 | (synopsis "X.509 collection accessing and storing methods") | |
515 | (description | |
516 | "This package provides functions for accessing and storing X.509 | |
517 | collections, certificates, revocation lists, and exception lists.") | |
518 | (license license:bsd-3))) | |
519 | ||
520 | (define-public ghc-x509-validation | |
521 | (package | |
522 | (name "ghc-x509-validation") | |
693bcfe2 | 523 | (version "1.6.11") |
f24eba89 RW |
524 | (source (origin |
525 | (method url-fetch) | |
526 | (uri (string-append "https://hackage.haskell.org/package/" | |
527 | "x509-validation/x509-validation-" | |
528 | version ".tar.gz")) | |
529 | (sha256 | |
530 | (base32 | |
693bcfe2 | 531 | "16yihzljql3z8w5rgdl95fv3hgk7yd86kbl9b3glllsark5j2hzr")))) |
f24eba89 RW |
532 | (build-system haskell-build-system) |
533 | (inputs | |
534 | `(("ghc-memory" ,ghc-memory) | |
535 | ("ghc-byteable" ,ghc-byteable) | |
f24eba89 RW |
536 | ("ghc-hourglass" ,ghc-hourglass) |
537 | ("ghc-data-default-class" ,ghc-data-default-class) | |
538 | ("ghc-pem" ,ghc-pem) | |
539 | ("ghc-asn1-types" ,ghc-asn1-types) | |
540 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
541 | ("ghc-x509" ,ghc-x509) | |
542 | ("ghc-x509-store" ,ghc-x509-store) | |
543 | ("ghc-cryptonite" ,ghc-cryptonite))) | |
bb84b01d TS |
544 | (native-inputs |
545 | `(("ghc-tasty" ,ghc-tasty) | |
546 | ("ghc-tasty-hunit" ,ghc-tasty-hunit))) | |
f24eba89 RW |
547 | (home-page "https://github.com/vincenthz/hs-certificate") |
548 | (synopsis "X.509 certificate and revocation list validation") | |
549 | (description | |
550 | "This package provides functions for X.509 certificate and revocation | |
551 | list validation.") | |
552 | (license license:bsd-3))) | |
553 | ||
554 | (define-public ghc-x509-system | |
555 | (package | |
556 | (name "ghc-x509-system") | |
ddbe0207 | 557 | (version "1.6.6") |
f24eba89 RW |
558 | (source (origin |
559 | (method url-fetch) | |
560 | (uri (string-append "https://hackage.haskell.org/package/" | |
561 | "x509-system/x509-system-" | |
562 | version ".tar.gz")) | |
563 | (sha256 | |
564 | (base32 | |
ddbe0207 | 565 | "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20")))) |
f24eba89 RW |
566 | (build-system haskell-build-system) |
567 | (inputs | |
f54f0475 | 568 | `(("ghc-pem" ,ghc-pem) |
f24eba89 RW |
569 | ("ghc-x509" ,ghc-x509) |
570 | ("ghc-x509-store" ,ghc-x509-store))) | |
571 | (home-page "https://github.com/vincenthz/hs-certificate") | |
572 | (synopsis "Handle system X.509 accessors and storage") | |
573 | (description | |
574 | "This package provides a library to handle system accessors and storage | |
575 | for X.509 certificates.") | |
576 | (license license:bsd-3))) | |
aab6df5b | 577 | |
578 | (define-public ghc-crypto-cipher-types | |
579 | (package | |
580 | (name "ghc-crypto-cipher-types") | |
581 | (version "0.0.9") | |
582 | (source | |
583 | (origin | |
584 | (method url-fetch) | |
585 | (uri (string-append "https://hackage.haskell.org/package/" | |
586 | "crypto-cipher-types-" version "/" | |
587 | "crypto-cipher-types-" version ".tar.gz")) | |
588 | (sha256 | |
589 | (base32 | |
590 | "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0")))) | |
591 | (build-system haskell-build-system) | |
592 | (inputs `(("ghc-byteable" ,ghc-byteable) | |
593 | ("ghc-securemem" ,ghc-securemem))) | |
594 | (home-page "https://github.com/vincenthz/hs-crypto-cipher") | |
595 | (synopsis "Generic cryptography cipher types for Haskell") | |
596 | (description "This Haskell package provides basic typeclasses and types | |
597 | for symmetric ciphers.") | |
598 | (license license:bsd-3))) | |
d91acee7 | 599 | |
600 | (define-public ghc-cipher-aes | |
601 | (package | |
602 | (name "ghc-cipher-aes") | |
603 | (version "0.2.11") | |
604 | (source | |
605 | (origin | |
606 | (method url-fetch) | |
607 | (uri (string-append "https://hackage.haskell.org/package/" | |
608 | "cipher-aes-" version "/" | |
609 | "cipher-aes-" version ".tar.gz")) | |
610 | (sha256 | |
611 | (base32 | |
612 | "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk")))) | |
613 | (build-system haskell-build-system) | |
614 | (inputs `(("ghc-byteable" ,ghc-byteable) | |
615 | ("ghc-securemem" ,ghc-securemem) | |
616 | ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types))) | |
617 | (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck) | |
618 | ("ghc-test-framework" ,ghc-test-framework) | |
619 | ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) | |
620 | ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests))) | |
621 | (home-page "https://github.com/vincenthz/hs-cipher-aes") | |
622 | (synopsis "AES cipher implementation with advanced mode of operations for | |
623 | Haskell") | |
624 | (description "This Haskell package provides AES cipher implementation. | |
625 | ||
626 | The modes of operations available are ECB (Electronic code book), CBC (Cipher | |
627 | block chaining), CTR (Counter), XTS (XEX with ciphertext stealing), | |
628 | GCM (Galois Counter Mode). | |
629 | ||
630 | The AES implementation uses AES-NI when available (on x86 and x86-64 | |
631 | architecture), but fallback gracefully to a software C implementation. | |
632 | ||
633 | The software implementation uses S-Boxes, which might suffer for cache timing | |
634 | issues. However do notes that most other known software implementations, | |
635 | including very popular one (openssl, gnutls) also uses similar | |
636 | implementation. If it matters for your case, you should make sure you have | |
637 | AES-NI available, or you'll need to use a different implementation.") | |
638 | (license license:bsd-3))) | |
13c28167 | 639 | |
640 | (define-public ghc-crypto-random | |
641 | (package | |
642 | (name "ghc-crypto-random") | |
643 | (version "0.0.9") | |
644 | (source | |
645 | (origin | |
646 | (method url-fetch) | |
647 | (uri (string-append "https://hackage.haskell.org/package/" | |
648 | "crypto-random-" version "/" | |
649 | "crypto-random-" version ".tar.gz")) | |
650 | (sha256 | |
651 | (base32 | |
652 | "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp")))) | |
653 | (build-system haskell-build-system) | |
654 | (inputs `(("ghc-securemem" ,ghc-securemem) | |
655 | ("ghc-vector" ,ghc-vector))) | |
656 | (home-page "https://github.com/vincenthz/hs-crypto-random") | |
657 | (synopsis "Simple cryptographic random related types for Haskell") | |
658 | (description "Simple cryptographic random related types: a safe | |
659 | abstraction for CPRNGs.") | |
660 | (license license:bsd-3))) | |
7565a308 | 661 | |
662 | (define-public ghc-cprng-aes | |
663 | (package | |
664 | (name "ghc-cprng-aes") | |
665 | (version "0.6.1") | |
666 | (source | |
667 | (origin | |
668 | (method url-fetch) | |
669 | (uri (string-append "https://hackage.haskell.org/package/" | |
670 | "cprng-aes-" version "/" | |
671 | "cprng-aes-" version ".tar.gz")) | |
672 | (sha256 | |
673 | (base32 | |
674 | "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4")))) | |
675 | (build-system haskell-build-system) | |
676 | (inputs `(("ghc-byteable" ,ghc-byteable) | |
677 | ("ghc-crypto-random" ,ghc-crypto-random) | |
678 | ("ghc-cipher-aes" ,ghc-cipher-aes))) | |
679 | (home-page "https://github.com/vincenthz/hs-cprng-aes") | |
680 | (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode | |
681 | in Haskell") | |
682 | (description "Simple crypto pseudo-random-number-generator with really | |
683 | good randomness property. | |
684 | ||
685 | Using ent, a randomness property maker on one 1Mb sample: | |
686 | ||
687 | @itemize | |
688 | @item Entropy = 7.999837 bits per byte. | |
689 | @item Optimum compression would reduce the size of this 1048576 byte file by 0 | |
690 | percent. | |
691 | @item Chi square distribution for 1048576 samples is 237.02. | |
692 | @item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random). | |
693 | @item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent). | |
694 | @end itemize | |
695 | ||
696 | Compared to urandom with the same sampling: | |
697 | ||
698 | @itemize | |
699 | @item Entropy = 7.999831 bits per byte. | |
700 | @item Optimum compression would reduce the size of this 1048576 byte file by 0 | |
701 | percent. | |
702 | @item Chi square distribution for 1048576 samples is 246.63. | |
703 | @item Arithmetic mean value of data bytes is 127.6347 (127.5 = random). | |
704 | @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent). | |
705 | @end itemize") | |
706 | (license license:bsd-3))) | |
5a88cff2 TS |
707 | |
708 | (define-public ghc-ed25519 | |
709 | (package | |
710 | (name "ghc-ed25519") | |
711 | (version "0.0.5.0") | |
712 | (source | |
713 | (origin | |
714 | (method url-fetch) | |
715 | (uri (string-append | |
716 | "https://hackage.haskell.org/package/ed25519/ed25519-" | |
717 | version ".tar.gz")) | |
718 | (sha256 | |
719 | (base32 | |
720 | "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq")))) | |
721 | (build-system haskell-build-system) | |
722 | (arguments | |
723 | `(#:cabal-revision | |
724 | ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f") | |
725 | ;; We omit these test suites because they require old versions of | |
726 | ;; packages and packages we do not have. | |
727 | #:configure-flags | |
728 | '("--flags=-test-hlint -test-doctests -test-properties"))) | |
729 | (home-page "http://thoughtpolice.github.com/hs-ed25519") | |
730 | (synopsis "Ed25519 cryptographic signatures") | |
731 | (description "This package provides a simple, fast, self-contained | |
732 | copy of the Ed25519 public-key signature system with a clean interface. | |
733 | It also includes support for detached signatures, and thorough | |
734 | documentation on the design and implementation, including usage | |
735 | guidelines.") | |
736 | (license license:expat))) | |
c44667cc LC |
737 | |
738 | (define-public ghc-tls | |
739 | (package | |
740 | (name "ghc-tls") | |
741 | (version "1.4.1") | |
742 | (source (origin | |
743 | (method url-fetch) | |
744 | (uri (string-append "https://hackage.haskell.org/package/" | |
745 | "tls/tls-" version ".tar.gz")) | |
746 | (sha256 | |
747 | (base32 | |
748 | "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv")))) | |
749 | (build-system haskell-build-system) | |
750 | (inputs | |
751 | `(("ghc-cereal" ,ghc-cereal) | |
752 | ("ghc-data-default-class" ,ghc-data-default-class) | |
753 | ("ghc-memory" ,ghc-memory) | |
754 | ("ghc-cryptonite" ,ghc-cryptonite) | |
755 | ("ghc-asn1-types" ,ghc-asn1-types) | |
756 | ("ghc-asn1-encoding" ,ghc-asn1-encoding) | |
757 | ("ghc-x509" ,ghc-x509) | |
758 | ("ghc-x509-store" ,ghc-x509-store) | |
759 | ("ghc-x509-validation" ,ghc-x509-validation) | |
760 | ("ghc-async" ,ghc-async) | |
761 | ("ghc-network" ,ghc-network) | |
762 | ("ghc-hourglass" ,ghc-hourglass))) | |
763 | (native-inputs | |
764 | `(("ghc-tasty" ,ghc-tasty) | |
765 | ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) | |
766 | ("ghc-quickcheck" ,ghc-quickcheck))) | |
767 | (home-page "https://github.com/vincenthz/hs-tls") | |
768 | (synopsis | |
769 | "TLS/SSL protocol native implementation (Server and Client)") | |
770 | (description | |
771 | "Native Haskell TLS and SSL protocol implementation for server and client. | |
772 | This provides a high-level implementation of a sensitive security protocol, | |
773 | eliminating a common set of security issues through the use of the advanced | |
774 | type system, high level constructions and common Haskell features. Currently | |
775 | implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and | |
776 | Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many | |
777 | extensions.") | |
778 | (license license:bsd-3))) | |
779 | ||
0925b804 RV |
780 | (define-public ghc-hsopenssl |
781 | (package | |
782 | (name "ghc-hsopenssl") | |
d23edfce | 783 | (version "0.11.4.17") |
0925b804 RV |
784 | (source |
785 | (origin | |
786 | (method url-fetch) | |
787 | (uri (string-append "https://hackage.haskell.org/package/" | |
788 | "HsOpenSSL/HsOpenSSL-" version ".tar.gz")) | |
789 | (sha256 | |
790 | (base32 | |
d23edfce | 791 | "0qivl9clmybfglwxqp2sq308rv4ia4rhwshcsc8b029bvpp0mpsi")))) |
0925b804 RV |
792 | (build-system haskell-build-system) |
793 | (inputs | |
794 | `(("ghc-network" ,ghc-network) | |
795 | ("openssl" ,openssl))) | |
0925b804 RV |
796 | (home-page "https://github.com/vshabanov/HsOpenSSL") |
797 | (synopsis "Partial OpenSSL binding for Haskell") | |
798 | (description "HsOpenSSL is an OpenSSL binding for Haskell. It can | |
799 | generate RSA and DSA keys, read and write PEM files, generate message | |
800 | digests, sign and verify messages, encrypt and decrypt messages. It has | |
801 | also some capabilities of creating SSL clients and servers. This | |
802 | package is in production use by a number of Haskell based systems and | |
803 | stable. You may also be interested in the tls package, | |
804 | @uref{http://hackage.haskell.org/package/tls}, which is a pure Haskell | |
805 | implementation of SSL.") | |
806 | (license license:public-domain))) | |
4ba66e6f RV |
807 | |
808 | (define-public ghc-openssl-streams | |
809 | (package | |
810 | (name "ghc-openssl-streams") | |
a627e599 | 811 | (version "1.2.2.0") |
4ba66e6f RV |
812 | (source |
813 | (origin | |
814 | (method url-fetch) | |
815 | (uri (string-append "https://hackage.haskell.org/package/" | |
816 | "openssl-streams/openssl-streams-" | |
817 | version ".tar.gz")) | |
818 | (sha256 | |
819 | (base32 | |
a627e599 | 820 | "0rplym6ayydkpr7x9mw3l13p0vzzfzzxw244d7sd3jcvaxpv0rmr")))) |
4ba66e6f RV |
821 | (build-system haskell-build-system) |
822 | (inputs | |
823 | `(("ghc-hsopenssl" ,ghc-hsopenssl) | |
824 | ("ghc-io-streams" ,ghc-io-streams) | |
825 | ("ghc-network" ,ghc-network))) | |
826 | (native-inputs | |
827 | `(("ghc-hunit" ,ghc-hunit) | |
828 | ("ghc-test-framework" ,ghc-test-framework) | |
829 | ("ghc-test-framework-hunit" ,ghc-test-framework-hunit))) | |
3ef91e15 | 830 | (home-page "https://hackage.haskell.org/package/openssl-streams") |
4ba66e6f RV |
831 | (synopsis "OpenSSL network support for io-streams") |
832 | (description "This library contains io-streams routines for secure | |
833 | networking using OpenSSL (by way of HsOpenSSL).") | |
834 | (license license:bsd-3))) |