mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-26 12:35:20 +00:00
Define PSA_VENDOR_PBKDF2_MAX_ITERATIONS
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
This commit is contained in:
parent
52fe517a77
commit
e66a8ad8d6
@ -253,6 +253,10 @@
|
||||
* curve. */
|
||||
#define PSA_TLS12_ECJPAKE_TO_PMS_DATA_SIZE 32
|
||||
|
||||
/* The maximum number of iterations for PBKDF2 on this implementation, in bits.
|
||||
* This is a vendor-specific macro. This can be configured if necessary */
|
||||
#define PSA_VENDOR_PBKDF2_MAX_ITERATIONS 0xffffffff
|
||||
|
||||
/** The maximum size of a block cipher. */
|
||||
#define PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE 16
|
||||
|
||||
|
@ -6419,13 +6419,14 @@ static psa_status_t psa_pbkdf2_set_input_cost(
|
||||
return PSA_ERROR_BAD_STATE;
|
||||
}
|
||||
|
||||
if (data > 0xFFFFFFFF) {
|
||||
if (data > PSA_VENDOR_PBKDF2_MAX_ITERATIONS) {
|
||||
return PSA_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
if (data == 0) {
|
||||
return PSA_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
pbkdf2->input_cost = data;
|
||||
pbkdf2->state = PSA_PBKDF2_STATE_INPUT_COST_SET;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user