diff --git a/internal_api/crypto/crypto_utils.c b/internal_api/crypto/crypto_utils.c index 1d109d4..fe25318 100644 --- a/internal_api/crypto/crypto_utils.c +++ b/internal_api/crypto/crypto_utils.c @@ -544,7 +544,7 @@ bool valid_key_size_for_algorithm(uint32_t algorithm, uint32_t key) case TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256: case TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384: case TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512: - if (key >= 256 && key <= 2048) + if (key >= 256 && key <= 4096) return true; return false; diff --git a/internal_api/storage/storage_utils.c b/internal_api/storage/storage_utils.c index f45beb1..1db59ce 100644 --- a/internal_api/storage/storage_utils.c +++ b/internal_api/storage/storage_utils.c @@ -179,12 +179,12 @@ int valid_object_type_and_max_size(uint32_t obj_type, return 1; case TEE_TYPE_RSA_PUBLIC_KEY: - if (obj_size >= 256 && obj_size <= 2048) + if (obj_size >= 256 && obj_size <= 4096) return 0; return 1; case TEE_TYPE_RSA_KEYPAIR: - if (obj_size >= 256 && obj_size <= 2048) + if (obj_size >= 256 && obj_size <= 4096) return 0; return 1;