Function esp_idf_svc::sys::mbedtls_ecdsa_verify_restartable

source ยท
pub unsafe extern "C" fn mbedtls_ecdsa_verify_restartable(
    grp: *mut mbedtls_ecp_group,
    buf: *const u8,
    blen: usize,
    Q: *const mbedtls_ecp_point,
    r: *const mbedtls_mpi,
    s: *const mbedtls_mpi,
    rs_ctx: *mut c_void,
) -> i32
Expand description

\brief This function verifies the ECDSA signature of a previously-hashed message, in a restartable manner

\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. \param rs_ctx The restart context to use. This may be \c NULL to disable restarting. If it is not \c NULL, it must point to an initialized restart context.

\return \c 0 on success. \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of operations was reached: see \c mbedtls_ecp_set_max_ops(). \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code on failure.