sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Curve 25519 DSA, also known as Ed25519.
priv_of_cstruct cs
decodes a private key from the buffer cs
. If the provided data is invalid, an error is returned.
val priv_to_cstruct : priv -> Cstruct.t
priv_to_cstruct p
encode the private key p
to a buffer.
pub_of_cstruct cs
decodes a public key from the buffer cs
. If the provided data is invalid, an error is returned.
val pub_to_cstruct : pub -> Cstruct.t
pub_to_cstruct p
encodes the public key p
into a buffer.
val generate : ?g:Mirage_crypto_rng.g -> unit -> priv * pub
generate ~g ()
generates a key pair.
val sign : key:priv -> Cstruct.t -> Cstruct.t
sign ~key msg
signs the message msg
using the private key
. The result is the concatenation of r
and s
, as specified in RFC 8032.
val verify : key:pub -> Cstruct.t -> msg:Cstruct.t -> bool
verify ~key signature msg
verifies the signature
on the message msg
with the public key
. The return value is true
if verification was successful, false
otherwise.