talira

Low-level cryptography library for Haskell, the maintained fork of cryptonite

open sourceBSD-3-Clause AND MIT AND ISCfree

Forked from cryptonite. A fork of cryptonite made with the original author's permission

crypton is a Haskell library of low-level cryptographic primitives (AES and AES-GCM, ChaCha20-Poly1305, hashes, RSA, ECDSA and ECDH on P-256, X25519, Ed25519 and more), with C and assembly underneath for speed. AES and GHASH use the processor's instructions on x86-64, AArch64, 32-bit ARM and ppc64le and fall back to a constant-time, table-free implementation from BearSSL elsewhere; RSA private-key operations offer blinding to resist timing attacks, and check their results against fault attacks. It's a fork of cryptonite, made with the original author's permission. Install it from Hackage as crypton.

Problems it solves

  • encrypt and sign data in a Haskell program with fast, constant-time primitives
  • replace the archived cryptonite package in my Haskell project
  • the low-level crypto a Haskell TLS implementation needs

Features

  • AES and AES-GCM with hardware instructions on x86-64, ARM and ppc64le
  • constant-time portable AES and GHASH
  • ChaCha20-Poly1305
  • RSA with blinding against timing attacks
  • ECDSA, ECDH on P-256, X25519 and Ed25519
  • C and assembly backends

Alternatives

The same job

These do what crypton does.

  1. cryptohash-sha256 Fast, pure and practical SHA-256 for Haskell

Compare crypton with the top 3