diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h index 0e2d57ce2c..56fe1d3036 100644 --- a/include/psa/crypto_extra.h +++ b/include/psa/crypto_extra.h @@ -1939,6 +1939,9 @@ psa_status_t psa_pake_abort(psa_pake_operation_t *operation); * * This macro must expand to a compile-time constant integer. * + * The value of this macro must be at least as large as the largest value + * returned by PSA_PAKE_OUTPUT_SIZE() + * * See also #PSA_PAKE_OUTPUT_SIZE(\p alg, \p primitive, \p step). */ #define PSA_PAKE_OUTPUT_MAX_SIZE 65 @@ -1948,6 +1951,9 @@ psa_status_t psa_pake_abort(psa_pake_operation_t *operation); * * This macro must expand to a compile-time constant integer. * + * The value of this macro must be at least as large as the largest value + * returned by PSA_PAKE_INPUT_SIZE() + * * See also #PSA_PAKE_INPUT_SIZE(\p alg, \p primitive, \p step). */ #define PSA_PAKE_INPUT_MAX_SIZE 65 diff --git a/library/psa_crypto.c b/library/psa_crypto.c index e2e0cb849d..e5a855bf40 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -7925,7 +7925,6 @@ psa_status_t psa_pake_input( goto exit; } - if (input_length == 0 || input_length > max_input_length) { status = PSA_ERROR_INVALID_ARGUMENT; goto exit;