Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
The ProScript.crypto.ED25519
interface for the elliptic curve 25519 DSA.
DSA is for computing and verifying digital signatures, in contrast to Diffie-Hellman which is for mutually exchanging keys. Use Proscript_Crypto.xDH25519
for Diffie-Hellman key exchange.
The type that will be used to represent contiguous bytes; typically either Bytes.t or Cstruct.t
checkValid s m pk
checks the message m
for a valid signature s
signed by the private key that corresponds to the raw public key pk
.
signature m sk pk
calculates the ED25519 signature of m
with a raw 32-byte secret key sk
and its corresponding raw 32-byte public key pk
created with (
publicKey
sk
.
WARNING: It is incorrect to create a ED25519 signature using a public key pk
that is not derived from the secret key sk
. You provide the pk
simply because doing so is the ProScript API, and because it can be a performance win to not recompute publicKey
each time you do a signature.
1. You need to hex encode the message.
Checks may or may not be performed to verify you gave the correct public key. Implementations have the freedom to ignore whatever public key you provide (ex. dirsp-proscript-mirage
will recompute the public key and ignore your public key).