Function esp_idf_svc::hal::sys::mbedtls_ecdsa_verify
source ยท pub unsafe extern "C" fn mbedtls_ecdsa_verify(
grp: *mut mbedtls_ecp_group,
buf: *const u8,
blen: usize,
Q: *const mbedtls_ecp_point,
r: *const mbedtls_mpi,
s: *const mbedtls_mpi,
) -> i32
Expand description
\brief This function verifies the ECDSA signature of a previously-hashed message.
\note If the bitlength of the message hash is larger than the bitlength of the group order, then the hash is truncated as defined in Standards for Efficient Cryptography Group (SECG): SEC1 Elliptic Curve Cryptography, section 4.1.4, step 3.
\see ecp.h
\param grp The ECP group to use. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load(). \param buf The hashed content that was signed. This must be a readable buffer of length \p blen Bytes. It may be \c NULL if \p blen is zero. \param blen The length of \p buf in Bytes. \param Q The public key to use for verification. This must be initialized and setup. \param r The first integer of the signature. This must be initialized. \param s The second integer of the signature. This must be initialized.
\return \c 0 on success. \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code on failure.