package hacl-star

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

Buffers have the following size constraints:

  • pk: 64 bytes, corresponding to the "raw" representation of an elliptic curve point (see Point representation and conversions)
  • sk, k: 32 bytes
  • signature: 64 bytes
  • msg: no size requirement for variants using SHA-2 hashing (see ECDSA)
type bytes = SharedDefs.CBytes.t
val sign : sk:bytes -> msg:bytes -> k:bytes -> bytes option

sign sk msg k attempts to sign the message msg with secret key sk and signing secret k and returns the signature if successful.

val verify : pk:bytes -> msg:bytes -> signature:bytes -> bool

verify pk msg signature checks the signature of msg using public key pk and returns true if it is valid.

module Noalloc : sig ... end

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

OCaml

Innovation. Community. Security.