Expand description
Implemented according to IETF RFC 8032.
Functions§
- ed25519_
derive_ pub_ key - Returns your public key given your
priv_key
. - ed25519_
sign - Creates an Ed25519 digital signature, given a
priv_key
andmessage
. This signature can be verified by anyone, given your public key, the the originalmessage
, and the signature. - ed25519_
verify - Verifies an Ed25519 digital signature. This implementation is not constant-time, as it does not involve secret data.
- ed25519ctx_
sign - Creates an Ed25519ctx digital signature, given a
priv_key
, amessage
, and acontext
. Thecontext
is a byte slice of less than 256 bytes that describes the protocol or application the signature is for. Thecontext
should not be empty, nor should it depend on the content of themessage
. - ed25519ctx_
verify - Verifies an Ed25519ctx digital signature. This implementation is not constant-time, as it does not involve secret data.
- ed25519ph_
sign - Creates an Ed25519ph digital signature, given a
priv_key
, amessage
, and acontext
. Unlike Ed25519ctx, thecontext
here is optional, and should be left empty in the default case. Ed25519ph signs a SHA-512 hash of the inputmessage
, and is therefore vulnerable if weaknesses in SHA-512 are discovered. For this reason, it’s not recommended to use this, unless for some reason, Ed25519 is not suitable for your use-case. - ed25519ph_
verify - Verifies an Ed25519ph digital signature. This implementation is not constant-time, as it does not involve secret data.