mbedtls_ecdsa_read_signature() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...
CodeScopeSTM32 Libraries and SamplesmbedTLSmbedtls_ecdsa_read_signature()

mbedtls_ecdsa_read_signature() function

This function reads and verifies an ECDSA signature. \see ecp.h

Syntax

int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx,     const unsigned char *hash,     size_t hlen,     const unsigned char *sig,     size_t slen );
Implemented in ecdsa.c:722

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.

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. An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_ERR_MPI_XXX error code on failure for any other reason.

Notes

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.

References

LocationReferrerText
ecdsa.c:722
int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx,
ecdsa.h:428
int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx,
pk_wrap.c:482ecdsa_verify_wrap()
ret = mbedtls_ecdsa_read_signature( (mbedtls_ecdsa_context *) ctx,

Call Tree

Functions calling mbedtls_ecdsa_read_signature()
Functions called by mbedtls_ecdsa_read_signature()
all items filtered out
mbedtls_ecdsa_read_signature()