package curve448
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=324dde8adda6e07adee445041319fe81
sha512=bb664f36f14c6a6947ec3b54d5c5f0f9b97ddb8520fdcd1d8ea093e19a1737f024e8766ad47f9b6abb20949dee19309768f7c1f17cac7372c7a775f891d08fd0
doc/README.html
curve448
X448 key agreement and Ed448 / Ed448ph signatures for OCaml, following RFC 7748 and RFC 8032. The API follows mirage-crypto-ec, with a pure OCaml backend by default and an optional C backend.
Install
Requires OCaml 4.14+, Dune 3.6+, opam 2.0+ and a 64-bit platform. The package is not yet published to opam. Install from a checkout:
git clone https://github.com/thevilledev/ocaml-curve448.git
cd ocaml-curve448
opam pin add curve448 .The package builds the pure OCaml backend and, with GCC or Clang, the C backend. See compatibility for version coverage and limitations.
Quick start
Add (libraries curve448 mirage-crypto-rng.unix) to your executable's Dune stanza, initialise the RNG once, then sign and verify:
let () =
Mirage_crypto_rng_unix.use_default ();
let priv, pub = Curve448.Ed448.generate () in
let msg = "hello" in
let signature = Curve448.Ed448.sign ~key:priv msg in
assert (Curve448.Ed448.verify ~key:pub signature ~msg)Module | Purpose | Sizes |
|---|---|---|
| Diffie–Hellman key agreement | 56-byte private key, public value and shared secret |
| Deterministic signatures, optional context | 57-byte keys, 114-byte signatures |
| Prehashed signatures, optional context | Same keys and signatures; 64-byte SHAKE256 prehash |
Usage and examples cover key agreement, contexts, prehashes and error handling. Choosing a backend explains how to select curve448.c at link time. Small-order Ed448 keys are accepted under RFC 8032; protocols that need to reject them should read the interoperability notes.
Documentation
- Documentation index — all guides and the API reference.
- Contributing — build, test and format the project.
- Testing — vectors, property tests, fuzzing and security checks.
- Design and performance.
- Changelog and release guide.
License and credits
Project code is ISC licensed. The C backend includes code from fiat-crypto, BoringSSL and tiny_sha3 under MIT and ISC; test fixtures have their own terms. See LICENSE.md and vector provenance. The API follows mirage-crypto.