diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2020-02-19 15:17:48 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2020-02-19 15:17:48 +0000 |
commit | 564074c28409fda50ac3c7353ffa8ec575653062 (patch) | |
tree | bf0cca48a6d06e3526aac84fb8b960eb88b8d67e /drivers | |
parent | b296bb10aab0fdab31c2cfe27c1169922f470afa (diff) | |
parent | 495599cd0a56143f9e5159f354b5718ac84e7431 (diff) | |
download | platform_external_arm-trusted-firmware-564074c28409fda50ac3c7353ffa8ec575653062.tar.gz platform_external_arm-trusted-firmware-564074c28409fda50ac3c7353ffa8ec575653062.tar.bz2 platform_external_arm-trusted-firmware-564074c28409fda50ac3c7353ffa8ec575653062.zip |
Merge "TBBR: Reduce size of ECDSA key buffers" into integration
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/auth/tbbr/tbbr_cot.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/auth/tbbr/tbbr_cot.c b/drivers/auth/tbbr/tbbr_cot.c index 6dd4ae252..2f1f451b1 100644 --- a/drivers/auth/tbbr/tbbr_cot.c +++ b/drivers/auth/tbbr/tbbr_cot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -18,7 +18,12 @@ /* - * Maximum key and hash sizes (in DER format) + * Maximum key and hash sizes (in DER format). + * + * Both RSA and ECDSA keys may be used at the same time. In this case, the key + * buffers must be big enough to hold either. As RSA keys are bigger than ECDSA + * ones for all key sizes we support, they impose the minimum size of these + * buffers. */ #if TF_MBEDTLS_USE_RSA #if TF_MBEDTLS_KEY_SIZE == 1024 @@ -32,8 +37,8 @@ #else #error "Invalid value for TF_MBEDTLS_KEY_SIZE" #endif -#else -#define PK_DER_LEN 294 +#else /* Only using ECDSA keys. */ +#define PK_DER_LEN 91 #endif #define HASH_DER_LEN 83 |