Skip to content

Commit 5bdfca9

Browse files
author
Hanno Becker
committed
Further RSA documentation improvements
1 parent 05cf6da commit 5bdfca9

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

include/mbedtls/rsa.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,10 @@ int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx,
725725
* return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
726726
*
727727
* \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.
729732
* \param p_rng The RNG context to be passed to \p f_rng. This may be
730733
* \c NULL if \p f_rng is \c NULL or doesn't need a context.
731734
* \param mode The mode of operation. This must be either
@@ -771,7 +774,10 @@ int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx,
771774
* return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
772775
*
773776
* \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.
775781
* \param p_rng The RNG context to be passed to \p f_rng. This may be
776782
* \c NULL if \p f_rng is \c NULL or doesn't need a context.
777783
* \param mode The mode of operation. This must be either
@@ -877,9 +883,10 @@ int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx,
877883
* return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
878884
*
879885
* \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.
883890
* \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
884891
* if \p f_rng is \c NULL or doesn't need a context argument.
885892
* \param mode The mode of operation. This must be either

0 commit comments

Comments
 (0)