mirleft / ocaml-nocrypto

OCaml cryptographic library
ISC License
111 stars 53 forks source link

Split off zarith-dependent modules into a separate opam package (nocrypto-asymmetric) #152

Closed hannesm closed 5 years ago

hannesm commented 5 years ago

The overall goal of this PR is to remove the dependency on zarith (and thus gmplib) from nocrypto. To achieve this goal, the separate opam package nocrypto-asymmetric was introduced. nocrypto does no longer depend on zarith. This reduces the binary size of conventional fortuna-PRNG MirageOS unikernels that don't use asymmetric cryptography by 700kB (3.5MB instead of 4.2MB, tested with mirage-skeleton's device-usage/prng and some of my DNS servers and resolvers -- which use a decent PRNG, and some hash/hmac functions for authentication).

technical notes:

some reverse dependencies are already ported to this new package layout (e.g. x509, tls)

I'd appreciate feedback, and hopefully getting this merged soon and a new release of nocrypto (0.5.4 has been around for two years now) before the end of this month.