package rfc7748
Not available on OCaml 5.5Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=3f63cb002d1ca83390a31ae4721dda926ca7045e424c7c0e038895aef836278c
md5=63d367245f45171feb8ee7027e0b2ace
Description
This library implements the ECDH functions 'X25519' and 'X448' as specified in RFC 7748, 'Elliptic curves for security'. In the spirit of the original publications, the public API is kept as simple as possible to make it easy to use and hard to misuse.
The current version is written in plain OCaml, leveraging Zarith for integer arithmetic. While this makes the implementation straightforward and easy to reason about, the performance is nowhere near that of DJB's implementation using floating point registers (https://cr.yp.to/ecdh.html).
Added to opam-repository:
README
OCaml-RFC7748
Elliptic curves for cryptographic purposes, based on RFC 7748.
Usage
The API contains documentation. Example use:
open Rfc7748
let _ =
let priv = X25519.private_key_of_string
"a546e36bf0527c9d3b16154b82465edd62144c0ac1fc5a18506a2244ba449ac4" in
let pub = X25519.public_key_of_string
"e6db6867583030db3594c1a424b15f7c726624ec26b3353b10a903a6d0ab1c4c" in
X25519.scale priv pub
|> X25519.string_of_public_key
|> Printf.printf "c3da55379de9c6908e94ea4df28d084f32eccf03491c71f754b4075577a28552\n == \n%s"License
BSD 2-clause, see license.
Dev Dependencies (1)
-
ounit
with-test & >= "2.0.5"
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building rfc7748 with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 1.0 (this version) | good | good | n/a | n/a | n/a |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure