Documented error codes properly
This commit is contained in:
parent
ae180d0f20
commit
7cfcea349c
@ -30,7 +30,9 @@
|
|||||||
#include "bignum.h"
|
#include "bignum.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ECP Error codes
|
* ECP error codes
|
||||||
|
*
|
||||||
|
* (The functions written up to now return MPI error codes only.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +175,8 @@ void ecp_set_zero( ecp_point *pt );
|
|||||||
* \param P Destination point
|
* \param P Destination point
|
||||||
* \param Q Source point
|
* \param Q Source point
|
||||||
*
|
*
|
||||||
* \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
|
* \return 0 if successful,
|
||||||
|
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed
|
||||||
*/
|
*/
|
||||||
int ecp_copy( ecp_point *P, const ecp_point *Q );
|
int ecp_copy( ecp_point *P, const ecp_point *Q );
|
||||||
|
|
||||||
@ -185,7 +188,11 @@ int ecp_copy( ecp_point *P, const ecp_point *Q );
|
|||||||
* \param P Left-hand point
|
* \param P Left-hand point
|
||||||
* \param Q Right-hand point
|
* \param Q Right-hand point
|
||||||
*
|
*
|
||||||
* \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
|
* \return 0 if successful,
|
||||||
|
* 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)
|
||||||
*/
|
*/
|
||||||
int ecp_add( const ecp_group *grp, ecp_point *R,
|
int ecp_add( const ecp_group *grp, ecp_point *R,
|
||||||
const ecp_point *P, const ecp_point *Q );
|
const ecp_point *P, const ecp_point *Q );
|
||||||
@ -198,7 +205,11 @@ int ecp_add( const ecp_group *grp, ecp_point *R,
|
|||||||
* \param m Integer by which to multiply
|
* \param m Integer by which to multiply
|
||||||
* \param P Point to multiply
|
* \param P Point to multiply
|
||||||
*
|
*
|
||||||
* \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
|
* \return 0 if successful,
|
||||||
|
* 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)
|
||||||
*/
|
*/
|
||||||
int ecp_mul( const ecp_group *grp, ecp_point *R,
|
int ecp_mul( const ecp_group *grp, ecp_point *R,
|
||||||
const mpi *m, const ecp_point *P );
|
const mpi *m, const ecp_point *P );
|
||||||
|
@ -158,8 +158,6 @@ cleanup:
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Doubling: R = 2 * P, generic case (P != 0, R != 0)
|
* Doubling: R = 2 * P, generic case (P != 0, R != 0)
|
||||||
*
|
|
||||||
* Returns POLARSSL_ERR_MPI_XXX on error.
|
|
||||||
*/
|
*/
|
||||||
static int ecp_double_generic( const ecp_group *grp, ecp_point *R,
|
static int ecp_double_generic( const ecp_group *grp, ecp_point *R,
|
||||||
const ecp_point *P )
|
const ecp_point *P )
|
||||||
|
Loading…
Reference in New Issue
Block a user