mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add documentation for new bignum functions
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
committed by
Janos Follath
parent
23a1ce90ec
commit
37b06360b3
@ -63,21 +63,57 @@ typedef enum
|
||||
MBEDTLS_MPI_MOD_EXT_REP_BE
|
||||
} mbedtls_mpi_mod_ext_rep;
|
||||
|
||||
void mbedtls_mpi_mod_residue_release( mbedtls_mpi_mod_residue *r );
|
||||
|
||||
/** Setup a residue structure.
|
||||
*
|
||||
* \param r The address of residue to setup. The size is determined by \p m.
|
||||
* \param m The address of a modulus related to \p r.
|
||||
* \param p The address of the MPI used for \p r.
|
||||
* \param pn The number of limbs of \p p.
|
||||
*
|
||||
* \return \c 0 if successful.
|
||||
* \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p r, \p m or \p p is
|
||||
* #NULL pointer or if \p p is less then \p m.
|
||||
*/
|
||||
int mbedtls_mpi_mod_residue_setup( mbedtls_mpi_mod_residue *r,
|
||||
mbedtls_mpi_mod_modulus *m,
|
||||
mbedtls_mpi_uint *p,
|
||||
size_t pn );
|
||||
|
||||
/** Unbind elements of a residue structure.
|
||||
*
|
||||
* \param r The address of residue to release.
|
||||
*/
|
||||
void mbedtls_mpi_mod_residue_release( mbedtls_mpi_mod_residue *r );
|
||||
|
||||
/** Initialize a modulus structure.
|
||||
*
|
||||
* \param m The address of a modulus.
|
||||
*/
|
||||
void mbedtls_mpi_mod_modulus_init( mbedtls_mpi_mod_modulus *m );
|
||||
|
||||
void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m );
|
||||
|
||||
/** Setup a residue structure.
|
||||
*
|
||||
* \param m The address of a modulus.
|
||||
* \param p The address of the MPI used for \p m.
|
||||
* \param pn The number of limbs of \p p.
|
||||
* \param ext_rep The external representation of \p m (eg. byte order).
|
||||
* \param int_rep The selector which representation is used.
|
||||
*
|
||||
* \return \c 0 if successful.
|
||||
* \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p m or \p p is
|
||||
* #NULL pointer or if \p ext_rep or \p int_rep is invalid.
|
||||
*/
|
||||
int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m,
|
||||
mbedtls_mpi_uint *p,
|
||||
size_t pn,
|
||||
int ext_rep,
|
||||
int int_rep );
|
||||
|
||||
/** Unbind elements of a modulus structure.
|
||||
*
|
||||
* \param m The address of a modulus.
|
||||
*/
|
||||
void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m );
|
||||
|
||||
#endif /* MBEDTLS_BIGNUM_MOD_H */
|
||||
|
Reference in New Issue
Block a user