mbedtls_ecdsa_read_signature_restartable() function
This function reads and verifies an ECDSA signature, in a restartable way. \see \c mbedtls_ecdsa_read_signature()
Arguments
ctx
The ECDSA context to use. This must be initialized and have a group and public key bound to it.
hash
The message hash that was signed. This must be a readable buffer of length \p size Bytes.
hlen
The size of the hash \p hash.
sig
The signature to read and verify. This must be a readable buffer of length \p slen Bytes.
slen
The size of \p sig in Bytes.
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 value
\c 0 on success. #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if signature is invalid. #MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH if there is a valid signature in \p sig, but its length is less than \p siglen. #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of operations was reached: see \c mbedtls_ecp_set_max_ops(). Another \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_ERR_MPI_XXX error code on failure for any other reason.
Notes
This function is like \c mbedtls_ecdsa_read_signature() but it can return early and restart according to the limit set with \c mbedtls_ecp_set_max_ops() to reduce blocking.