mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 10:45:36 +01:00
Swap D,E parameters in mbedtls_rsa_deduce_primes
This commit is contained in:
parent
854244abbf
commit
c36aab69b5
@ -72,8 +72,8 @@ extern "C" {
|
||||
* overwrite it.
|
||||
*
|
||||
* \param N RSA modulus N = PQ, with P, Q to be found
|
||||
* \param D RSA private exponent
|
||||
* \param E RSA public exponent
|
||||
* \param D RSA private exponent
|
||||
* \param P Pointer to MPI holding first prime factor of N on success
|
||||
* \param Q Pointer to MPI holding second prime factor of N on success
|
||||
*
|
||||
@ -87,8 +87,8 @@ extern "C" {
|
||||
* use the helper function \c mbedtls_rsa_validate_params.
|
||||
*
|
||||
*/
|
||||
int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N, mbedtls_mpi const *D,
|
||||
mbedtls_mpi const *E,
|
||||
int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N, mbedtls_mpi const *E,
|
||||
mbedtls_mpi const *D,
|
||||
mbedtls_mpi *P, mbedtls_mpi *Q );
|
||||
|
||||
/**
|
||||
|
@ -274,7 +274,7 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx )
|
||||
|
||||
if( pq_missing )
|
||||
{
|
||||
ret = mbedtls_rsa_deduce_primes( &ctx->N, &ctx->D, &ctx->E,
|
||||
ret = mbedtls_rsa_deduce_primes( &ctx->N, &ctx->E, &ctx->D,
|
||||
&ctx->P, &ctx->Q );
|
||||
if( ret != 0 )
|
||||
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA + ret );
|
||||
|
@ -66,7 +66,7 @@
|
||||
*
|
||||
*/
|
||||
int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N,
|
||||
mbedtls_mpi const *D, mbedtls_mpi const *E,
|
||||
mbedtls_mpi const *E, mbedtls_mpi const *D,
|
||||
mbedtls_mpi *P, mbedtls_mpi *Q )
|
||||
{
|
||||
int ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user