crypto.ed25519_verify

crypto

ed25519_verify(pub_key, msg, sig) -> ok, err

Verify an Ed25519 signature

pub_key is the raw 32-byte public key and sig the 64-byte signature. Returns true where the signature is the key's over the message, and false where it is not.

Two things are refused as false that a looser reading takes:

Returns nil and a reason for an argument of the wrong type or length: a key that is not 32 bytes, a signature that is not 64, a message that is no string.