package hacl_x25519

  1. Overview
  2. Docs

Module Hacl_ed25519Source

Ed25519, as defined by RFC 8032.

Sourcetype priv

The type of a private key.

Sourceval priv : Cstruct.t -> priv

priv p generates a private key from p, which must be 32 byte long.

Sourceval encode_priv : priv -> Cstruct.t

encode_priv p is the private key encoded into a buffer.

Sourceval priv_to_public : priv -> Cstruct.t

priv_to_public p outputs the public key of p.

Sourceval sign : priv -> Cstruct.t -> Cstruct.t

sign priv msg signs msg with priv.

Sourceval verify : pub:Cstruct.t -> msg:Cstruct.t -> signature:Cstruct.t -> bool

verify ~pub ~msg ~signature verifies the signature of the msg with the public key pub. Returns true if verification is successful, false otherwise.

OCaml

Innovation. Community. Security.