mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-29 10:46:52 +01:00
Add ECDSA signature primitive.
This commit is contained in:
parent
b309ab2936
commit
3aeb5a7192
2 changed files with 99 additions and 3 deletions
|
|
@ -52,6 +52,24 @@ int ecdsa_sign( const ecp_group *grp, mpi *r, mpi *s,
|
|||
const mpi *d, const unsigned char *buf, size_t blen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
|
||||
|
||||
/**
|
||||
* \brief Verify ECDSA signature of a previously hashed message
|
||||
*
|
||||
* \param grp ECP group
|
||||
* \param buf Message hash
|
||||
* \param blen Length of buf
|
||||
* \param Q Public key to use for verification
|
||||
* \param r First integer of the signature
|
||||
* \param s Second integer of the signature
|
||||
*
|
||||
* \return 0 if successful,
|
||||
* POLARSSL_ERR_ECP_BAD_INPUT_DATA if signature is invalid
|
||||
* or a POLARSSL_ERR_ECP_XXX or POLARSSL_MPI_XXX error code
|
||||
*/
|
||||
int ecdsa_verify( const ecp_group *grp,
|
||||
const unsigned char *buf, size_t blen,
|
||||
const ecp_point *Q, const mpi *r, const mpi *s);
|
||||
|
||||
/**
|
||||
* \brief Checkup routine
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue