Skip to content

Commit 0b3dd8d

Browse files
Merge pull request #318 from gilles-peskine-arm/prr_573-remainder-crypto
Finish side-porting commits from mbedtls-restricted that missed the split
2 parents f0d8700 + 73a1f37 commit 0b3dd8d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

include/mbedtls/check_config.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
#error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites"
135135
#endif
136136

137-
#if defined(MBEDTLS_ECP_C) && ( !defined(MBEDTLS_BIGNUM_C) || ( \
137+
#if defined(MBEDTLS_ECP_C) && ( !defined(MBEDTLS_BIGNUM_C) || ( \
138138
!defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) && \
139139
!defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) && \
140140
!defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && \
@@ -145,7 +145,9 @@
145145
!defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) && \
146146
!defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) && \
147147
!defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) && \
148-
!defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) )
148+
!defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) && \
149+
!defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) && \
150+
!defined(MBEDTLS_ECP_DP_CURVE448_ENABLED) ) )
149151
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
150152
#endif
151153

include/mbedtls/rsa.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)