- mpi_exp_mod() now correctly handles negative base numbers (Closes ticket #52)

This commit is contained in:
Paul Bakker 2012-05-16 08:02:29 +00:00
parent 5b37784f6d
commit f6198c1513
4 changed files with 47 additions and 6 deletions

View file

@ -543,7 +543,8 @@ int mpi_mod_int( t_uint *r, const mpi *A, t_sint b );
*
* \return 0 if successful,
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed,
* POLARSSL_ERR_MPI_BAD_INPUT_DATA if N is negative or even
* POLARSSL_ERR_MPI_BAD_INPUT_DATA if N is negative or even or if
* E is negative
*
* \note _RR is used to avoid re-computing R*R mod N across
* multiple calls, which speeds up things a bit. It can