1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Got first tests working, fixed ecp_copy()

This commit is contained in:
Manuel Pégourié-Gonnard
2012-11-05 17:27:54 +01:00
committed by Paul Bakker
parent d0dc6317e1
commit b505c2796c
3 changed files with 74 additions and 21 deletions

View File

@@ -154,6 +154,11 @@ extern "C" {
*/
void ecp_point_init( ecp_point *pt );
/**
* \brief Initialize a group (to something meaningless)
*/
void ecp_group_init( ecp_group *grp );
/**
* \brief Free the components of a point
*/
@@ -197,7 +202,7 @@ int ecp_point_read_string( ecp_point *P, int radix,
* \brief Import an ECP group from null-terminated ASCII strings
*
* \param grp Destination group
* \param radix Input numric base
* \param radix Input numeric base
* \param p Prime modulus of the base field
* \param b Constant term in the equation
* \param gx The generator's X coordinate
@@ -222,7 +227,7 @@ int ecp_group_read_string( ecp_group *grp, int radix,
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed,
* POLARSSL_ERR_MPI_DIVISION_BY_ZERO (shouldn't happen)
* (temporary, a faster version not using division will be
* used in the furture)
* used in the future)
*/
int ecp_add( const ecp_group *grp, ecp_point *R,
const ecp_point *P, const ecp_point *Q );
@@ -239,7 +244,7 @@ int ecp_add( const ecp_group *grp, ecp_point *R,
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed,
* POLARSSL_ERR_MPI_DIVISION_BY_ZERO (shouldn't happen)
* (temporary, a faster version not using division will be
* used in the furture)
* used in the future)
*/
int ecp_mul( const ecp_group *grp, ecp_point *R,
const mpi *m, const ecp_point *P );