package hacl-star

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Versions of these functions which write their output in a buffer passed in as an argument

Buffers have the following size constraints:

  • sk, pk: 32 bytes
  • signature: 64 bytes

EdDSA

Note: The verify function does not return a buffer so it has no been duplicated here.

val secret_to_public : sk:bytes -> pk:bytes -> unit

secret_to_public sk pk takes a secret key sk and writes the corresponding public key in pk. Buffers pk and sk must be distinct.

val sign : sk:bytes -> msg:bytes -> signature:bytes -> unit

sign sk msg signature takes secret key sk and message msg and writes the Ed25519 signature in signature.

EdDSA Expanded Signing

The buffer ks containing the expanded secret key must be 96 bytes long.

val expand_keys : sk:bytes -> ks:bytes -> unit

expand_keys sk ks takes secret key sk and writes the expanded secret key in ks.

val sign_expanded : ks:bytes -> msg:bytes -> signature:bytes -> unit

sign_expanded ks msg signature takes expanded secret key ks and message msg and writes the Ed25519 signature in signature.

OCaml

Innovation. Community. Security.