ica_ed25519_verify
Purpose
Verifies the given ED25519 signature using the public key from the context against the given message. Returns 0 if the signature is valid, returns -1 if the signature is invalid or an internal error occurred. If the context does not contain the public key, it is internally derived from the private key in the context.
Format
int ica_ed25519_verify(ICA_ED25519_CTX *ctx,
unsigned char sig[64],
const unsigned char *msg,
size_t msglen);
Required hardware support
The processor must have the MSA9 facility (STFLE bit 155) installed which is available starting with IBM z15® systems.
Parameters
- ICA_ED25519_CTX *ctx
- Pointer to an ED25519 context.
- unsigned char sig[64]
- Buffer containing the signature as input.
- const unsigned char *msg
- Buffer containing the message as input.
- size_t msglen
- Length of the input message to be verified.
Return codes
- 0
- Success. Signature is OK.
- -1
- If at least one invalid parameter is given, or MSA9 is not available. Also, if deriving the public from the private key fails and if the signature could not be correctly verified.
For return codes indicating exceptions, see Return codes.