crypton: Cryptography Primitives
crypton is a low-level cryptography library.
To achieve high performance, it utilizes C and assembly
language to define FFI bindings, structuring them
in a way that makes them easy to use.
[Skip to Readme]
Modules
- Crypto
- Cipher
- Crypto.Cipher.AES
- Crypto.Cipher.AES.GCM
- Crypto.Cipher.AESGCMSIV
- Crypto.Cipher.Blowfish
- Crypto.Cipher.CAST5
- Crypto.Cipher.Camellia
- Crypto.Cipher.ChaCha
- Crypto.Cipher.ChaCha.Poly1305
- Crypto.Cipher.ChaChaPoly1305
- Crypto.Cipher.DES
- Crypto.Cipher.RC4
- Crypto.Cipher.Salsa
- Crypto.Cipher.TripleDES
- Crypto.Cipher.Twofish
- Crypto.Cipher.Types
- Crypto.Cipher.Utils
- Crypto.Cipher.XSalsa
- Crypto.Cipher.AES
- ConstructHash
- Crypto.ConstructHash.MiyaguchiPreneel
- Data
- Crypto.Data.AFIS
- Crypto.Data.Padding
- Crypto.Debug
- Crypto.ECC
- Crypto.ECC.Edwards25519
- Crypto.Error
- Crypto.Hash
- Crypto.Hash.Algorithms
- Crypto.Hash.IO
- KDF
- Crypto.KDF.Argon2
- Crypto.KDF.BCrypt
- Crypto.KDF.BCryptPBKDF
- Crypto.KDF.HKDF
- Crypto.KDF.PBKDF2
- Crypto.KDF.Scrypt
- MAC
- Crypto.MAC.CMAC
- Crypto.MAC.HMAC
- Crypto.MAC.KMAC
- Crypto.MAC.KeyedBlake2
- Crypto.MAC.Poly1305
- Number
- Crypto.Number.Basic
- Crypto.Number.F2m
- Crypto.Number.Generate
- Crypto.Number.ModArithmetic
- Crypto.Number.Nat
- Crypto.Number.Prime
- Crypto.Number.Serialize
- Crypto.Number.Serialize.Internal
- Crypto.Number.Serialize.Internal.LE
- Crypto.Number.Serialize.LE
- Crypto.Number.Serialize.Internal
- Crypto.OTP
- PubKey
- Crypto.PubKey.Curve25519
- Crypto.PubKey.Curve448
- Crypto.PubKey.DH
- Crypto.PubKey.DSA
- ECC
- Crypto.PubKey.ECC.DH
- Crypto.PubKey.ECC.ECDSA
- Crypto.PubKey.ECC.Generate
- Crypto.PubKey.ECC.P256
- Crypto.PubKey.ECC.Prim
- Crypto.PubKey.ECC.Types
- Crypto.PubKey.ECDSA
- Crypto.PubKey.ECIES
- Crypto.PubKey.Ed25519
- Crypto.PubKey.Ed448
- Crypto.PubKey.EdDSA
- Crypto.PubKey.ElGamal
- Crypto.PubKey.MaskGenFunction
- Crypto.PubKey.RSA
- Crypto.PubKey.RSA.OAEP
- Crypto.PubKey.RSA.PKCS15
- Crypto.PubKey.RSA.PSS
- Crypto.PubKey.RSA.Prim
- Crypto.PubKey.RSA.Types
- Rabin
- Crypto.PubKey.Rabin.Basic
- Crypto.PubKey.Rabin.Modified
- Crypto.PubKey.Rabin.OAEP
- Crypto.PubKey.Rabin.RW
- Crypto.PubKey.Rabin.Types
- Crypto.Random
- Crypto.Random.Entropy
- Crypto.Random.Entropy.Unsafe
- Crypto.Random.EntropyPool
- Crypto.Random.Types
- Crypto.Random.Entropy
- System
- Crypto.System.CPU
- Crypto.Tutorial
- Cipher
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| support_aesni | allow compilation with AESNI on system and architecture that supports it | Enabled |
| support_rdrand | allow compilation with RDRAND on system and architecture that supports it | Enabled |
| support_pclmuldq | Allow compilation with pclmuldq on architecture that supports it | Enabled |
| support_sse | Use SSE optimized version of (BLAKE2, ARGON2) on i386. x86-64 takes them anyway; every other architecture has no SSE to offer and ignores this flag, rather than failing to compile the sources. | Disabled |
| support_s2n_bignum | Use the vendored s2n-bignum assembly for the NIST prime curves on x86-64 and AArch64. See cbitss2nREADME.md. | Enabled |
| integer-gmp | Whether or not to use GMP for some functions | Enabled |
| support_deepseq | add deepseq instances for cryptographic types | Enabled |
| old_toolchain_inliner | use -fgnu89-inline to workaround an old compiler linker glibc issue. | Disabled |
| check_alignment | extra check on alignment in C layers, which cause lowlevel assert errors. for debugging only. | Disabled |
| use_target_attributes | use GCC / clang function attributes instead of global target options. | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- crypton-2.1.3.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.31, 0.32, 0.33, 0.34, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.1.11, 2.1.12, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.3.0 (info) |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.13 && <5), base16 (>=1.0 && <2.1), bytestring (<0.13), deepseq (<1.6), integer-gmp (<1.2), primitive (>=0.9 && <0.10), ram (>=0.20.1 && <0.23), text (<2.2), Win32 (<2.15) [details] |
| Tested with | ghc ==9.2.8 || ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.2 || ==9.12.4 || ==9.14.1 |
| License | BSD-3-Clause |
| Copyright | Vincent Hanquez <vincent@snarc.org> |
| Author | Vincent Hanquez <vincent@snarc.org> |
| Maintainer | Kazu Yamamoto <kazu@iij.ad.jp> |
| Uploaded | by KazuYamamoto at 2026-09-30T13:31:28Z |
| Revised | Revision 1 made by KazuYamamoto at 2026-11-07T05:30:51Z |
| Category | Cryptography |
| Home page | https://github.com/kazu-yamamoto/crypton |
| Bug tracker | https://github.com/kazu-yamamoto/crypton/issues |
| Source repo | head: git clone https://github.com/kazu-yamamoto/crypton |
| Distributions | Arch:1.0.6, Fedora:1.0.5, LTSHaskell:1.0.6, Stackage:1.1.5 |
| Reverse Dependencies | 142 direct, 3930 indirect [details] |
| Downloads | 8806 total (599 in the last 30 days) |
| Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs not available [build log] All reported builds failed as of 2026-09-30 [all 2 reports] |