-
Notifications
You must be signed in to change notification settings - Fork 2
Home
nacl is a fast, cross-platform Haskell binding to the nacl cryptography library, providing easy to use and understand cryptographic primitives that are suitable for a wide array of use cases.
From the NaCl homepage:
NaCl (pronounced "salt") is a new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc. NaCl's goal is to provide all of the core operations needed to build higher-level cryptographic tools.
Of course, other libraries already exist for these core operations. NaCl advances the state of the art by improving security, by improving usability, and by improving speed.
The following report contrasts NaCl with other libraries from a security perspective: (PDF) Daniel J. Bernstein, Tanja Lange, Peter Schwabe, "The security impact of a new cryptographic library".
Releases | User documentation | Examples | Acknowledgements
- Complete coverage of the core
nacl
library. - Uses portable implementations of cryptographic primitives, pulled
from nacl and SUPERCOP.
- A complete, trimmed down C library implementing all the
nacl
primitives is included in the package.
- A complete, trimmed down C library implementing all the
- Fully compatible with the
nacl
C API. - Fully portable and works out-of-the-box on Windows.
- Works on every major version of GHC since GHC 6.12.3.
- Zero dependencies.
- Extremely simple API.
- Several supplementary additions from SUPERCOP, including:
- ed25519 signatures (with detached signature support.)
- BLAKE and BLAKE2 hashes.
- A full curve25519 interface.
- siphash support as an authentication interface.
- Wanted: McBits, curve41417, chacha20
- Extra convenience additions:
- scrypt support for key-stretching, password storage, and a simple buffer/file encryption interface.
- The Getting started page will help get you up and running, and explain some of the design choices in the library.
- The Field guide will give you quick pointers on what to expect and consider when doing things in the wild.
- Primitive specification gives details on all the primitives available in the library, module by module.
- Full documentataion of the API:
- Public-key cryptography
- Secret-key cryptography
- Low-level functions
- Scrypt support
Almost all of the C code in this package was written by Dan J. Bernstein, Tanja Lange, and Jean-Philippe Aumasson.
I originally wrote a binding to nacl taking a few different approaches to packaging and the API. The development of that package was invaluable in designing this one, and friends who contributed discussion/ideas/patches in no particular order include:
- Daniel Peebles
- Michael Stone
- Johan Brinch
- Joseph Abrahamson
- Shachaf Ben-Kiki