Function hacl_sys::Hacl_P256_ecdsa_verif_without_hash
source · pub unsafe extern "C" fn Hacl_P256_ecdsa_verif_without_hash(
msg_len: u32,
msg: *mut u8,
public_key: *mut u8,
signature_r: *mut u8,
signature_s: *mut u8
) -> bool
Expand description
Verify an ECDSA signature WITHOUT hashing first.
This function is intended to receive a hash of the input. For convenience, we recommend using one of the hash-and-verify combined functions above.
The argument msg
MUST be at least 32 bytes (i.e. msg_len >= 32
).
The function returns true
if the signature is valid and false
otherwise.
The argument msg
points to msg_len
bytes of valid memory, i.e., uint8_t[msg_len].
The argument public_key
(x || y) points to 64 bytes of valid memory, i.e., uint8_t[64].
The arguments signature_r
and signature_s
point to 32 bytes of valid memory, i.e., uint8_t[32].
The function also checks whether public_key
is valid