+
+(define-public ghc-crypto-cipher-types
+ (package
+ (name "ghc-crypto-cipher-types")
+ (version "0.0.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "crypto-cipher-types-" version "/"
+ "crypto-cipher-types-" version ".tar.gz"))
+ (sha256
+ (base32
+ "03qa1i1kj07pfrxsi7fiaqnnd0vi94jd4jfswbmnm4gp1nvzcwr0"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-byteable" ,ghc-byteable)
+ ("ghc-securemem" ,ghc-securemem)))
+ (home-page "https://github.com/vincenthz/hs-crypto-cipher")
+ (synopsis "Generic cryptography cipher types for Haskell")
+ (description "This Haskell package provides basic typeclasses and types
+for symmetric ciphers.")
+ (license license:bsd-3)))
+
+(define-public ghc-cipher-aes
+ (package
+ (name "ghc-cipher-aes")
+ (version "0.2.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "cipher-aes-" version "/"
+ "cipher-aes-" version ".tar.gz"))
+ (sha256
+ (base32
+ "05ahz6kjq0fl1w66gpiqy0vndli5yx1pbsbw9ni3viwqas4p3cfk"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-byteable" ,ghc-byteable)
+ ("ghc-securemem" ,ghc-securemem)
+ ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
+ (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
+ ("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
+ ("ghc-crypto-cipher-tests" ,ghc-crypto-cipher-tests)))
+ (home-page "https://github.com/vincenthz/hs-cipher-aes")
+ (synopsis "AES cipher implementation with advanced mode of operations for
+Haskell")
+ (description "This Haskell package provides AES cipher implementation.
+
+The modes of operations available are ECB (Electronic code book), CBC (Cipher
+block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
+GCM (Galois Counter Mode).
+
+The AES implementation uses AES-NI when available (on x86 and x86-64
+architecture), but fallback gracefully to a software C implementation.
+
+The software implementation uses S-Boxes, which might suffer for cache timing
+issues. However do notes that most other known software implementations,
+including very popular one (openssl, gnutls) also uses similar
+implementation. If it matters for your case, you should make sure you have
+AES-NI available, or you'll need to use a different implementation.")
+ (license license:bsd-3)))
+
+(define-public ghc-crypto-random
+ (package
+ (name "ghc-crypto-random")
+ (version "0.0.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "crypto-random-" version "/"
+ "crypto-random-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0139kbbb2h7vshf68y3fvjda29lhj7jjwl4vq78w4y8k8hc7l2hp"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-securemem" ,ghc-securemem)
+ ("ghc-vector" ,ghc-vector)))
+ (home-page "https://github.com/vincenthz/hs-crypto-random")
+ (synopsis "Simple cryptographic random related types for Haskell")
+ (description "Simple cryptographic random related types: a safe
+abstraction for CPRNGs.")
+ (license license:bsd-3)))
+
+(define-public ghc-cprng-aes
+ (package
+ (name "ghc-cprng-aes")
+ (version "0.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "cprng-aes-" version "/"
+ "cprng-aes-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1wr15kbmk1g3l8a75n0iwbzqg24ixv78slwzwb2q6rlcvq0jlnb4"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-byteable" ,ghc-byteable)
+ ("ghc-crypto-random" ,ghc-crypto-random)
+ ("ghc-cipher-aes" ,ghc-cipher-aes)))
+ (home-page "https://github.com/vincenthz/hs-cprng-aes")
+ (synopsis "Crypto Pseudo Random Number Generator using AES in counter mode
+in Haskell")
+ (description "Simple crypto pseudo-random-number-generator with really
+good randomness property.
+
+Using ent, a randomness property maker on one 1Mb sample:
+
+@itemize
+@item Entropy = 7.999837 bits per byte.
+@item Optimum compression would reduce the size of this 1048576 byte file by 0
+percent.
+@item Chi square distribution for 1048576 samples is 237.02.
+@item Arithmbetic mean value of data bytes is 127.3422 (127.5 = random).
+@item Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
+@end itemize
+
+Compared to urandom with the same sampling:
+
+@itemize
+@item Entropy = 7.999831 bits per byte.
+@item Optimum compression would reduce the size of this 1048576 byte file by 0
+percent.
+@item Chi square distribution for 1048576 samples is 246.63.
+@item Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
+@item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
+@end itemize")
+ (license license:bsd-3)))
+
+(define-public ghc-ed25519
+ (package
+ (name "ghc-ed25519")
+ (version "0.0.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/ed25519/ed25519-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
+ (build-system haskell-build-system)
+ (arguments
+ `(#:cabal-revision
+ ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
+ ;; We omit these test suites because they require old versions of
+ ;; packages and packages we do not have.
+ #:configure-flags
+ '("--flags=-test-hlint -test-doctests -test-properties")))
+ (home-page "http://thoughtpolice.github.com/hs-ed25519")
+ (synopsis "Ed25519 cryptographic signatures")
+ (description "This package provides a simple, fast, self-contained
+copy of the Ed25519 public-key signature system with a clean interface.
+It also includes support for detached signatures, and thorough
+documentation on the design and implementation, including usage
+guidelines.")
+ (license license:expat)))
+
+(define-public ghc-tls
+ (package
+ (name "ghc-tls")
+ (version "1.4.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "tls/tls-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-cereal" ,ghc-cereal)
+ ("ghc-data-default-class" ,ghc-data-default-class)
+ ("ghc-memory" ,ghc-memory)
+ ("ghc-cryptonite" ,ghc-cryptonite)
+ ("ghc-asn1-types" ,ghc-asn1-types)
+ ("ghc-asn1-encoding" ,ghc-asn1-encoding)
+ ("ghc-x509" ,ghc-x509)
+ ("ghc-x509-store" ,ghc-x509-store)
+ ("ghc-x509-validation" ,ghc-x509-validation)
+ ("ghc-async" ,ghc-async)
+ ("ghc-network" ,ghc-network)
+ ("ghc-hourglass" ,ghc-hourglass)))
+ (native-inputs
+ `(("ghc-tasty" ,ghc-tasty)
+ ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+ ("ghc-quickcheck" ,ghc-quickcheck)))
+ (home-page "https://github.com/vincenthz/hs-tls")
+ (synopsis
+ "TLS/SSL protocol native implementation (Server and Client)")
+ (description
+ "Native Haskell TLS and SSL protocol implementation for server and client.
+This provides a high-level implementation of a sensitive security protocol,
+eliminating a common set of security issues through the use of the advanced
+type system, high level constructions and common Haskell features. Currently
+implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and
+Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many
+extensions.")
+ (license license:bsd-3)))
+
+(define-public ghc-hsopenssl
+ (package
+ (name "ghc-hsopenssl")
+ (version "0.11.4.17")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "HsOpenSSL/HsOpenSSL-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0qivl9clmybfglwxqp2sq308rv4ia4rhwshcsc8b029bvpp0mpsi"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-network" ,ghc-network)
+ ("openssl" ,openssl)))
+ (home-page "https://github.com/vshabanov/HsOpenSSL")
+ (synopsis "Partial OpenSSL binding for Haskell")
+ (description "HsOpenSSL is an OpenSSL binding for Haskell. It can
+generate RSA and DSA keys, read and write PEM files, generate message
+digests, sign and verify messages, encrypt and decrypt messages. It has
+also some capabilities of creating SSL clients and servers. This
+package is in production use by a number of Haskell based systems and
+stable. You may also be interested in the tls package,
+@uref{http://hackage.haskell.org/package/tls}, which is a pure Haskell
+implementation of SSL.")
+ (license license:public-domain)))
+
+(define-public ghc-openssl-streams
+ (package
+ (name "ghc-openssl-streams")
+ (version "1.2.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "openssl-streams/openssl-streams-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0rplym6ayydkpr7x9mw3l13p0vzzfzzxw244d7sd3jcvaxpv0rmr"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-hsopenssl" ,ghc-hsopenssl)
+ ("ghc-io-streams" ,ghc-io-streams)
+ ("ghc-network" ,ghc-network)))
+ (native-inputs
+ `(("ghc-hunit" ,ghc-hunit)
+ ("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
+ (home-page "https://hackage.haskell.org/package/openssl-streams")
+ (synopsis "OpenSSL network support for io-streams")
+ (description "This library contains io-streams routines for secure
+networking using OpenSSL (by way of HsOpenSSL).")
+ (license license:bsd-3)))