Go to file
pukkamustard 4abd17511a Bump version to 0.2.0. 2023-04-12 11:29:38 +02:00
.reuse initial commit 2021-02-05 13:03:24 +01:00
LICENSES Relicense as CC0-1.0 and BSD-2-Clause 2022-06-14 17:17:25 +02:00
lib monocypher: Don't use String.copy. 2023-04-12 11:25:10 +02:00
test Update to Monocypher 4.0.1 2023-04-11 21:36:15 +02:00
.gitignore initial commit 2021-02-05 13:03:24 +01:00
.ocamlformat Relicense as CC0-1.0 and BSD-2-Clause 2022-06-14 17:17:25 +02:00
CHANGELOG.md Bump version to 0.2.0. 2023-04-12 11:29:38 +02:00
README.md Fix links to licenses in Readme 2022-06-15 10:44:56 +02:00
dune monocypher.c: Move low-level C bindings to sub-library. 2023-04-12 10:38:49 +02:00
dune-project Bump version to 0.2.0. 2023-04-12 11:29:38 +02:00
guix.scm unvendor monocypher 2023-04-12 08:30:23 +02:00
monocypher.opam Bump version to 0.2.0. 2023-04-12 11:29:38 +02:00

README.md

ocaml-monocypher

This library provides OCaml bindings to the Monocypher cryptographic library. Bindings are created using the Ctypes library.

Currently only a small sub-set of Monocypher functions are available in the OCaml library (Blake2b, IETF ChaCha20 and Ed25519). Contributions to add bindings to the other Monocypher functions are very welcome! Please contact the maintainer by mail.

Why Monocypher?

Monocypher provides "Boring crypto that simply works". In particular it provides primitives required for DROMEDAR:

  • Blake2b cryptographic hash
  • ChaCha20 stream cypher
  • Ed25519 for public key signatures

Monocypher is portable, easy to build and include in projects (see also Why Monocypher?).

Related Software

hacl-star?

HACL* is a formally verified cryptographic library that provides automatically generated OCaml bindings. All necessary primitives (Blake2b, ChaCha20, Ed25519) are provided by HACL*.

However, it does not seem trivial to build HACL* directly from source (F*). One needs to rely on pre-generated C and OCaml artifacts. This library can be built completely from source code.

Furthermore, HACL* is considerably larger than Monocypher.

mirage-crypto?

mirage-crypto is a mostly OCaml implementation (with some C) of cryptographic primitives. It is maintained by the MirageOS community.

Unfortunately, mirage-crypto does not provide all necessary primitives I needed (Blake2b and Ed25519 are missing).

If in the future the necessary crypto primitive are added to mirage-crypto it would make sense to deprecate ocaml-monocypher.

vbmithr/ocaml-monocypher?

vbmithr/ocaml-monocypher does not use the Ctypes library for creating the binding. This requires some C hacking.

As the OCaml C stubs are directly in the monocypher.c file it is hard to update to a newer version of Monocypher. This library uses the Ctypes library to automatically generate bindings to C.

Acknowledgments

This library was initialy developed for DREAM project and has been supported trough NGI Pointer.

License

CC0-1.0 or BSD-2-Clause (same as Monocypher).