@@ -725,7 +725,10 @@ int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx,
725
725
* return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
726
726
*
727
727
* \param ctx The initialized RSA context to use.
728
- * \param f_rng The RNG function. This is needed for #MBEDTLS_RSA_PRIVATE.
728
+ * \param f_rng The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
729
+ * this is used for blinding and should be provided; see
730
+ * mbedtls_rsa_private() for more. If \p mode is
731
+ * #MBEDTLS_RSA_PUBLIC, it is ignored.
729
732
* \param p_rng The RNG context to be passed to \p f_rng. This may be
730
733
* \c NULL if \p f_rng is \c NULL or doesn't need a context.
731
734
* \param mode The mode of operation. This must be either
@@ -771,7 +774,10 @@ int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx,
771
774
* return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
772
775
*
773
776
* \param ctx The initialized RSA context to use.
774
- * \param f_rng The RNG function. This is needed for #MBEDTLS_RSA_PRIVATE.
777
+ * \param f_rng The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
778
+ * this is used for blinding and should be provided; see
779
+ * mbedtls_rsa_private() for more. If \p mode is
780
+ * #MBEDTLS_RSA_PUBLIC, it is ignored.
775
781
* \param p_rng The RNG context to be passed to \p f_rng. This may be
776
782
* \c NULL if \p f_rng is \c NULL or doesn't need a context.
777
783
* \param mode The mode of operation. This must be either
@@ -877,9 +883,10 @@ int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx,
877
883
* return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
878
884
*
879
885
* \param ctx The initialized RSA context to use.
880
- * \param f_rng The RNG function. It is needed for PKCS#1 v2.1 encoding
881
- * and for \p mode set to #MBEDTLS_RSA_PRIVATE, and ignored
882
- * otherwise.
886
+ * \param f_rng The RNG function. If the padding mode is PKCS#1 v2.1
887
+ * and \p mode is set to #MBEDTLS_RSA_PRIVATE, it is used for
888
+ * blinding and should be provided; see mbedtls_rsa_private().
889
+ * It is ignored otherwise.
883
890
* \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
884
891
* if \p f_rng is \c NULL or doesn't need a context argument.
885
892
* \param mode The mode of operation. This must be either
0 commit comments