Module Rfc7748

This library provides the two Diffie-Hellman-like functions defined in the eponymous RFC, x25519 and x448.

Summary

Quick Start

You can use Rfc7748.x25519 and Rfc7748.x448 as described in the example program in the source tree.

API

Below is the public API for this library. It is divided into

module type DH = sig ... end

Signature of the modules implementing the Diffie-Hellman functions for RFC 7748.

module X25519 : DH

X25519 (based on Curve25519 by Daniel J. Bernstein)

module X448 : DH

X448 (based on Ed448-Goldilocks by Mike Hamburg)

val x25519 : priv:string -> pub:string -> string

This is a shortcut for using X25519.scale without converting keys.

val x448 : priv:string -> pub:string -> string

This is a shortcut for using X448.scale without converting keys.