From 90ea4fd201568470044197b2463338c5f32a993b Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Thu, 15 Feb 2024 15:42:24 +0100 Subject: [PATCH] pk: fix documentation for sign/verify and encrypt/decrypt Remove exception warnings about PKCS1v1.5, since now both padding formats are treated properly no matter if USE_PSA_CRYPTO is defined or not. Signed-off-by: Valerio Setti --- include/mbedtls/pk.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h index 919543cc6..c37121f8a 100644 --- a/include/mbedtls/pk.h +++ b/include/mbedtls/pk.h @@ -616,10 +616,6 @@ int mbedtls_pk_get_psa_attributes(const mbedtls_pk_context *pk, * #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid * signature in \p sig but its length is less than \p sig_len, * or a specific error code. - * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * Use \c mbedtls_pk_verify_ext( MBEDTLS_PK_RSASSA_PSS, ... ) - * to verify RSASSA_PSS signatures. */ int mbedtls_pk_verify(mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, const unsigned char *hash, size_t hash_len, @@ -708,10 +704,6 @@ int mbedtls_pk_verify_ext(mbedtls_pk_type_t type, const void *options, * * \return 0 on success, or a specific error code. * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * There is no interface in the PK module to make RSASSA-PSS - * signatures yet. - * * \note For RSA, md_alg may be MBEDTLS_MD_NONE if hash_len != 0. * For ECDSA, md_alg may never be MBEDTLS_MD_NONE. */ @@ -806,8 +798,6 @@ int mbedtls_pk_sign_restartable(mbedtls_pk_context *ctx, * \param f_rng RNG function, must not be \c NULL. * \param p_rng RNG parameter * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * * \return 0 on success, or a specific error code. */ int mbedtls_pk_decrypt(mbedtls_pk_context *ctx, @@ -829,8 +819,6 @@ int mbedtls_pk_decrypt(mbedtls_pk_context *ctx, * * \note \p f_rng is used for padding generation. * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * * \return 0 on success, or a specific error code. */ int mbedtls_pk_encrypt(mbedtls_pk_context *ctx,