OCaml cryptographic library
OCaml C
Latest commit 7cc9759 Nov 25, 2016 @pqwy pqwy sh -> bash
Permalink
Failed to load latest commit information.
bench warnings Oct 16, 2016
doc noasis Oct 27, 2016
lwt noasis Oct 27, 2016
mirage noasis Oct 27, 2016
pkg track ocb-stubblr Nov 5, 2016
rfc draft ietf negotiated ff dhe in tls May 28, 2015
src track ocb-stubblr Nov 5, 2016
tests noasis Oct 27, 2016
unix noasis Oct 27, 2016
.gitattributes dear github, Mar 18, 2016
.gitignore noasis Oct 27, 2016
.merlin .dotfiles Nov 3, 2015
.ocamlinit noasis Oct 27, 2016
.travis.yml track ocb-stubblr Nov 5, 2016
CHANGES.md noasis Oct 27, 2016
LICENSE.md relicense Oct 27, 2016
README.md track ocb-stubblr Nov 5, 2016
_tags noasis Oct 27, 2016
build sh -> bash Nov 25, 2016
myocamlbuild.ml track ocb-stubblr Nov 5, 2016
opam track ocb-stubblr Nov 5, 2016

README.md

Build Status

Documentation

Comments in the single interface file, nocrypto.mli. Also available online.

The documentation is a work in progress. :)

Build

pkg/pkg.ml build
  --with-unix BOOL
  --with-lwt BOOL
  --xen BOOL
  --freestanding BOOL

pkg/pkg.ml test

FAQ

RNG seeding

You get something like Fatal error: exception Uncommon.Boot.Unseeded_generator and ask yourself: "Is there a simple way to forget about seeding and have the thing working?"

(* On pure Unix: *)
let () = Nocrypto_entropy_unix.initialize ()

(* On Lwt/Unix: *)
let () = ignore @@ Nocrypto_entropy_lwt.initialize ()

Illegal instructions

Anything linking to Nocrypto dies immediately:

Program terminated with signal SIGILL, Illegal instruction.
#0  _mm_aeskeygenassist_si128 (__C=<optimized out>, __X=...)

Nocrypto has CPU acceleration support (SSE2+AES-NI), but it has no run-time autodetection yet. You compiled the library with acceleration, but you are using it on a machine that does not support it.

pkg/pkg.ml build --accelerate false force-disables non-portable code.

pkg/pkg.ml build --accelerate true force-enables non-portable code.

The flag can also be set via the NOCRYPTO_ACCELERATE environment variable. If unset, it maches the capabilities of the build machine.