• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Crypto/H25-Apr-2021-17,50711,534

benchs/H25-Apr-2021-439356

cbits/H25-Apr-2021-31,71722,286

tests/H25-Apr-2021-7,1976,079

CHANGELOG.mdH A D25-Apr-20217.9 KiB242183

LICENSEH A D08-Sep-20191.5 KiB2924

README.mdH A D25-Apr-20214.1 KiB10677

Setup.hsH A D08-Sep-201946 32

cryptonite.cabalH A D08-May-202117.9 KiB488457

README.md

1cryptonite
2==========
3
4[![Join the chat at https://gitter.im/vincenthz/cryptonite](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vincenthz/cryptonite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5[![Build Status](https://travis-ci.org/haskell-crypto/cryptonite.png?branch=master)](https://travis-ci.org/haskell-crypto/cryptonite)
6[![BSD](http://b.repl.ca/v1/license-BSD-blue.png)](http://en.wikipedia.org/wiki/BSD_licenses)
7[![Haskell](http://b.repl.ca/v1/language-haskell-lightgrey.png)](http://haskell.org)
8
9Cryptonite is a haskell repository of cryptographic primitives. Each crypto
10algorithm has specificities that are hard to wrap in common APIs and types,
11so instead of trying to provide a common ground for algorithms, this package
12provides a non-consistent low-level API.
13
14If you have no idea what you're doing, please do not use this directly.
15Instead, rely on higher level protocols or implementations.
16
17Documentation: [cryptonite on hackage](http://hackage.haskell.org/package/cryptonite)
18
19Stability
20---------
21
22Cryptonite APIs are stable, and we only strive to add, not change or remove.
23Note that because the API exposed is wide and also expose internals things (for
24power users and flexibility), certains APIs can be revised in extreme cases
25where we can't just add.
26
27Versioning
28----------
29
30Next version of `0.x` is `0.(x+1)`. There's no exceptions, or API related meaning
31behind the numbers.
32
33Each versions of stackage (going back 3 stable LTS) has a cryptonite version
34that we maintain with security fixes when necessary and are versioned with the
35following `0.x.y` scheme.
36
37Coding Style
38------------
39
40The coding style of this project mostly follows:
41[haskell-style](https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md)
42
43Support
44-------
45
46See [Haskell packages guidelines](https://github.com/vincenthz/haskell-pkg-guidelines/blob/master/README.md#support)
47
48Known Building Issues
49---------------------
50
51On OSX <= 10.7, the system compiler doesn't understand the '-maes' option, and
52with the lack of autodetection feature builtin in .cabal file, it is left on
53the user to disable the aesni. See the [Disabling AESNI] section
54
55On CentOS 7 the default C compiler includes intrinsic header files incompatible
56with per-function target options.  Solutions are to use GCC >= 4.9 or disable
57flag *use_target_attributes* (see flag configuration examples below).
58
59Disabling AESNI
60---------------
61
62It may be useful to disable AESNI for building, testing or runtime purposes.
63This is achieved with the *support_aesni* flag.
64
65As part of configure of cryptonite:
66
67```
68  cabal configure --flag='-support_aesni'
69```
70
71or as part of an installation:
72
73```
74  cabal install --constraint="cryptonite -support_aesni"
75```
76
77For help with cabal flags, see: [stackoverflow : is there a way to define flags for cabal](http://stackoverflow.com/questions/23523869/is-there-any-way-to-define-flags-for-cabal-dependencies)
78
79Enabling PCLMULDQ
80-----------------
81
82When the C toolchain supports it, enabling flag *support_pclmuldq* can bring
83additional security and performance for AES GCM.  A CPU with the necessary
84instruction set will use an alternate implementation selected at runtime.
85
86Links
87-----
88
89* [ChaCha](http://cr.yp.to/chacha.html)
90* [ChaCha-test-vectors](https://github.com/secworks/chacha_testvectors.git)
91* [Poly1305](http://cr.yp.to/mac.html)
92* [Poly1305-test-vectors](http://tools.ietf.org/html/draft-nir-cfrg-chacha20-poly1305-06#page-12)
93* [Salsa](http://cr.yp.to/snuffle.html)
94* [Salsa128-test-vectors](https://github.com/alexwebr/salsa20/blob/master/test_vectors.128)
95* [Salsa256-test-vectors](https://github.com/alexwebr/salsa20/blob/master/test_vectors.256)
96* [XSalsa](https://cr.yp.to/snuffle/xsalsa-20081128.pdf)
97* [PBKDF2](http://tools.ietf.org/html/rfc2898)
98* [PBKDF2-test-vectors](http://www.ietf.org/rfc/rfc6070.txt)
99* [Scrypt](http://www.tarsnap.com/scrypt.html)
100* [Curve25519](http://cr.yp.to/ecdh.html)
101* [Ed25519](http://ed25519.cr.yp.to/papers.html)
102* [Ed448-Goldilocks](http://ed448goldilocks.sourceforge.net/)
103* [EdDSA-test-vectors](http://www.ietf.org/rfc/rfc8032.txt)
104* [AFIS](http://clemens.endorphin.org/cryptography)
105
106