## Elliptic curve cryptography

Mirage-crypto-ec implements public key cryptography with named elliptic curves. Ephemeral key exchanges with Diffie-Hellman and digital signatures (ECDSA) are implemented.

The arithmetic operations uses code generated by fiat-crypto which is proven to consume a constant amount of time, independent of the input values.

`type error = [ `

`| `Invalid_range`

`| `Invalid_format`

`| `Invalid_length`

`| `Not_on_curve`

`| `At_infinity`

`| `Low_order`

` ]`

`val pp_error : Stdlib.Format.formatter -> error -> unit`

Pretty printer for errors

`exception Message_too_long`

Raised if the provided message is too long for the curve.

`module type Dh = sig ... end`

Diffie-Hellman key exchange.

`module type Dsa = sig ... end`

Digital signature algorithm.

`module type Dh_dsa = sig ... end`

Elliptic curve with Diffie-Hellman and DSA.

The NIST P-224 curve, also known as SECP224R1. Please note that decompression is not supported for P-224 public keys.

The NIST P-256 curve, also known as SECP256R1.

The NIST P-384 curve, also known as SECP384R1.

The NIST P-521 curve, also known as SECP521R1.

Curve 25519 Diffie-Hellman, also known as X25519.

Curve 25519 DSA, also known as Ed25519.