Minor corrections

This commit is contained in:
Hanno Becker 2017-10-17 09:20:57 +01:00
parent 4055a3a16f
commit f8c028a2fb
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@
*
* End-users of Mbed TLS not intending to re-implement the RSA functionality
* are not expected to get into the need of making use of these functions directly,
* but instead should be able to make do with the implementation of the RSA module.
* but instead should be able to use the functions declared in rsa.h.
*
* There are two classes of helper functions:
* (1) Parameter-generating helpers. These are:
@ -163,7 +163,7 @@ int mbedtls_rsa_deduce_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q,
* if all relevant parameters are provided:
* - P prime if f_rng != NULL
* - Q prime if f_rng != NULL
* - 1 < N = PQ
* - 1 < N = P * Q
* - 1 < D, E < N
* - D and E are modular inverses modulo P-1 and Q-1
* - A non-zero error code otherwise.

View File

@ -210,7 +210,7 @@ static int rsa_check_context( mbedtls_rsa_context const *ctx, int is_priv,
#endif
/* It wouldn't lead to an error if it wasn't satisfied,
* but check for PQ >= 1 nonetheless. */
* but check for QP >= 1 nonetheless. */
#if !defined(MBEDTLS_RSA_NO_CRT)
if( is_priv &&
mbedtls_mpi_cmp_int( &ctx->QP, 0 ) <= 0 )

View File

@ -370,7 +370,7 @@ int mbedtls_rsa_validate_params( const mbedtls_mpi *N, const mbedtls_mpi *P,
#endif /* MBEDTLS_GENPRIME */
/*
* Step 2: Check that 1 < N = PQ
* Step 2: Check that 1 < N = P * Q
*/
if( P != NULL && Q != NULL && N != NULL )