mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Added ecp_sub() as a variant of ecp_add()
This commit is contained in:
parent
1c2782cc7c
commit
9674fd0d5e
4 changed files with 132 additions and 8 deletions
|
|
@ -200,6 +200,20 @@ int ecp_use_known_dp( ecp_group *grp, size_t index );
|
|||
int ecp_add( const ecp_group *grp, ecp_point *R,
|
||||
const ecp_point *P, const ecp_point *Q );
|
||||
|
||||
/**
|
||||
* \brief Subtraction: R = P - Q
|
||||
*
|
||||
* \param grp ECP group
|
||||
* \param R Destination point
|
||||
* \param P Left-hand point
|
||||
* \param Q Right-hand point
|
||||
*
|
||||
* \return 0 if successful,
|
||||
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed
|
||||
*/
|
||||
int ecp_sub( const ecp_group *grp, ecp_point *R,
|
||||
const ecp_point *P, const ecp_point *Q );
|
||||
|
||||
/**
|
||||
* \brief Multiplication by an integer: R = m * P
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue