From 974ca0d947a5c67f6eaa0b04d315fda4a606658d Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 18 Dec 2018 18:03:24 +0000 Subject: [PATCH] Fix documentation bug on necessity of RNG in RSA PKCS v1.5 --- include/mbedtls/rsa.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/mbedtls/rsa.h b/include/mbedtls/rsa.h index bec74a9ce8..ed65a34452 100644 --- a/include/mbedtls/rsa.h +++ b/include/mbedtls/rsa.h @@ -588,12 +588,12 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx, * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED. * * \param ctx The initialized RSA context to use. - * \param f_rng The RNG to use. If PKCS#1 v2.1 padding encoding is - * used, this must be provided. Additionally, it is - * used for blinding if \p mode is #MBEDTLS_RSA_PRIVATE - * and should be provided in this case; see - * mbedtls_rsa_private() for more. It is ignored - * for PKCS#1 v1.5 padding with #MBEDTLS_RSA_PUBLIC. + * \param f_rng The RNG to use. It is mandatory for PKCS#1 v2.1 padding + * encoding, and for PKCS#1 v1.5 padding encoding when used + * with \p mode set to #MBEDTLS_RSA_PUBLIC. For PKCS#1 v1.5 + * padding encoding and \p mode set to #MBEDTLS_RSA_PRIVATE, + * it is used for blinding and should be provided in this + * case; see mbedtls_rsa_private() for more. * \param p_rng The RNG context to be passed to \p f_rng. May be * \c NULL if \p f_rng is \c NULL or if \p f_rng doesn't * need a context argument.