diff --git a/include/mbedtls/rsa_internal.h b/include/mbedtls/rsa_internal.h index 3b351c916c..e7ddd98a7d 100644 --- a/include/mbedtls/rsa_internal.h +++ b/include/mbedtls/rsa_internal.h @@ -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. diff --git a/library/rsa.c b/library/rsa.c index bf24a09b1f..7931673398 100644 --- a/library/rsa.c +++ b/library/rsa.c @@ -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 ) diff --git a/library/rsa_internal.c b/library/rsa_internal.c index 5e35dbf606..e28ca50b3f 100644 --- a/library/rsa_internal.c +++ b/library/rsa_internal.c @@ -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 )