nettle: safe nettle binding

[ cryptography, library, mit ] [ Propose Tags ]

safe binding for the nettle ( library. Tested with 3.4, might work with 3.2 (but not earlier).

[Skip to Readme]


[Last Documentation]

  • Crypto
    • Nettle
      • Crypto.Nettle.CCM
      • Crypto.Nettle.ChaChaPoly1305
      • Crypto.Nettle.Ciphers
      • Crypto.Nettle.HMAC
      • Crypto.Nettle.Hash
      • Crypto.Nettle.KeyedHash
      • Crypto.Nettle.UMAC


Automatic Flags

Use pkg-config to check for library dependences


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS] 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.3.0, 0.3.1,
Dependencies base (>=4 && <5), byteable (>=0.1.1 && <0.2), bytestring (>=0.10.8 && <0.13), crypto-cipher-types (>=0.0.3 && <0.1), securemem (>=0.1.9 && <0.2), tagged (>=0.8.5 && <0.9) [details]
License MIT
Copyright Stefan Bühler <>
Author Stefan Bühler <>
Maintainer Clint Adams <>
Category Cryptography
Home page
Bug tracker
Source repo head: git clone git://
Uploaded by ClintAdams at 2024-02-12T21:54:10Z
Distributions Arch:, Debian:0.3.0, NixOS:, Stackage:
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 6055 total (35 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-02-12 [all 2 reports]

Readme for nettle-

[back to package description]


This is the source repository for the "nettle" cabal package, which is a safe binding to the nettle library (tested with 3.1.1, might work with 3.0, does NOT WORK with 2.x).

The binding supports all hash functions, cipher functions, cipher modes and keyed hash functions (apart from Poly1305-AES) included in nettle (additionally the AEAD-CCM cipher mode is implemented in pure haskell).

Not included are the PBKDF2 key derivation functions, the public-key algorithms (RSA, DSA, elliptic curves, ECDSA), the pseudo-random generators (lagged Fibonacci and Yarrow), and the base64/base16 encoding/decoding functions.

Also not included are the undocumented ASN1, PGP, PKCS1 and "s-expression" functions.

The haddock generated documentation is available at

The test vectors were extracted from the nettle library and ported to haskell; they come from different sources.