polarssl change

This commit is contained in:
NIIBE Yutaka
2012-06-07 10:39:48 +09:00
parent 3da8a3b326
commit 2db7875da7
6 changed files with 32 additions and 11 deletions

View File

@@ -501,7 +501,7 @@ int mpi_inv_mod( mpi *X, const mpi *A, const mpi *N );
* 1 if memory allocation failed,
* POLARSSL_ERR_MPI_NOT_ACCEPTABLE if X is not prime
*/
int mpi_is_prime( mpi *X, int (*f_rng)(void *), void *p_rng );
int mpi_is_prime( mpi *X, unsigned char (*f_rng)(void *), void *p_rng );
/**
* \brief Prime number generation
@@ -517,7 +517,7 @@ int mpi_is_prime( mpi *X, int (*f_rng)(void *), void *p_rng );
* POLARSSL_ERR_MPI_BAD_INPUT_DATA if nbits is < 3
*/
int mpi_gen_prime( mpi *X, int nbits, int dh_flag,
int (*f_rng)(void *), void *p_rng );
unsigned char (*f_rng)(void *), void *p_rng );
/**
* \brief Checkup routine

View File

@@ -183,7 +183,7 @@ void rsa_init( rsa_context *ctx,
* \return 0 if successful, or an POLARSSL_ERR_RSA_XXX error code
*/
int rsa_gen_key( rsa_context *ctx,
int (*f_rng)(void *),
unsigned char (*f_rng)(void *),
void *p_rng,
int nbits, int exponent );
@@ -258,7 +258,7 @@ int rsa_private( rsa_context *ctx,
* of ctx->N (eg. 128 bytes if RSA-1024 is used).
*/
int rsa_pkcs1_encrypt( rsa_context *ctx,
int (*f_rng)(void *),
unsigned char (*f_rng)(void *),
void *p_rng,
int mode, int ilen,
const unsigned char *input,