@@ -907,7 +907,8 @@ int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx,
907907 * the size of the hash corresponding to \p md_alg.
908908 * \param sig The buffer to hold the signature. This must be a writable
909909 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
910- * for an 2048-bit RSA modulus.
910+ * for an 2048-bit RSA modulus. A buffer length of
911+ * #MBEDTLS_MPI_MAX_SIZE is always safe.
911912 *
912913 * \return \c 0 if the signing operation was successful.
913914 * \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -954,7 +955,8 @@ int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx,
954955 * the size of the hash corresponding to \p md_alg.
955956 * \param sig The buffer to hold the signature. This must be a writable
956957 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
957- * for an 2048-bit RSA modulus.
958+ * for an 2048-bit RSA modulus. A buffer length of
959+ * #MBEDTLS_MPI_MAX_SIZE is always safe.
958960 *
959961 * \return \c 0 if the signing operation was successful.
960962 * \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -1015,7 +1017,8 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
10151017 * the size of the hash corresponding to \p md_alg.
10161018 * \param sig The buffer to hold the signature. This must be a writable
10171019 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
1018- * for an 2048-bit RSA modulus.
1020+ * for an 2048-bit RSA modulus. A buffer length of
1021+ * #MBEDTLS_MPI_MAX_SIZE is always safe.
10191022 *
10201023 * \return \c 0 if the signing operation was successful.
10211024 * \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
0 commit comments