From 1af21bfa386db8aa3b1e72a56b30a98c35aa3090 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 11 May 2017 16:33:02 +0100 Subject: [PATCH] Improve documentation of PKCS1 decryption functions Document the preconditions on the input and output buffers for the PKCS1 decryption functions - rsa_pkcs1_decrypt - rsa_rsaes_pkcs1_v15_decrypt - rsa_rsaes_oaep_decrypt --- ChangeLog | 2 +- include/polarssl/rsa.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14a911400..a5201bf79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,7 +47,7 @@ Bugfix Changes * Avoid shadowing of time and index functions through mbed TLS function arguments. Found by inestlerode. Fixes #557. - + * Improve documentation of PKCS1 decryption functions. = mbed TLS 1.3.20 branch released 2017-06-21 diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h index 7d64f939a..5c2d875c2 100644 --- a/include/polarssl/rsa.h +++ b/include/polarssl/rsa.h @@ -378,6 +378,7 @@ int rsa_pkcs1_decrypt( rsa_context *ctx, * * \note The input buffer must be as large as the size * of ctx->N (eg. 128 bytes if RSA-1024 is used). + * */ int rsa_rsaes_pkcs1_v15_decrypt( rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), @@ -411,8 +412,9 @@ int rsa_rsaes_pkcs1_v15_decrypt( rsa_context *ctx, * the decryption of the particular ciphertext provided, * the function will return POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE. * - * \note The input buffer must be as large as the size + * \note The input buffer must be as large as the size * of ctx->N (eg. 128 bytes if RSA-1024 is used). + * */ int rsa_rsaes_oaep_decrypt( rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t),