@@ -907,7 +907,8 @@ int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx,
907
907
* the size of the hash corresponding to \p md_alg.
908
908
* \param sig The buffer to hold the signature. This must be a writable
909
909
* 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.
911
912
*
912
913
* \return \c 0 if the signing operation was successful.
913
914
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -954,7 +955,8 @@ int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx,
954
955
* the size of the hash corresponding to \p md_alg.
955
956
* \param sig The buffer to hold the signature. This must be a writable
956
957
* 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.
958
960
*
959
961
* \return \c 0 if the signing operation was successful.
960
962
* \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,
1015
1017
* the size of the hash corresponding to \p md_alg.
1016
1018
* \param sig The buffer to hold the signature. This must be a writable
1017
1019
* 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.
1019
1022
*
1020
1023
* \return \c 0 if the signing operation was successful.
1021
1024
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
0 commit comments