| #
f1318bff |
| 06-May-2025 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge changes from topic "psa_key_id_mgmt" into integration
* changes: feat(auth): extend REGISTER_CRYPTO_LIB calls feat(bl): adding psa crypto - crypto_mod_finish() feat(fvp): increase BL1 RW
Merge changes from topic "psa_key_id_mgmt" into integration
* changes: feat(auth): extend REGISTER_CRYPTO_LIB calls feat(bl): adding psa crypto - crypto_mod_finish() feat(fvp): increase BL1 RW for PSA Crypto feat(auth): mbedtls psa key id mgmt feat(auth): add crypto_mod_finish() function feat(auth): add update of current_pk_oid in auth feat(auth): add util file for current pk_oid feat(auth): increase mbedtls heap for PSA RSA feat(auth): introducing auth.mk
show more ...
|
| #
95d49c62 |
| 25-Apr-2025 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
feat(auth): extend REGISTER_CRYPTO_LIB calls
Extend REGISTER_CRYPTO_LIB calls with NULL to allow for the addition of the cryto_mod_finish() function.
Signed-off-by: Lauren Wehrmeister <lauren.wehrm
feat(auth): extend REGISTER_CRYPTO_LIB calls
Extend REGISTER_CRYPTO_LIB calls with NULL to allow for the addition of the cryto_mod_finish() function.
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: If41ed1be50e1d98b42b266c7905269f142bb67c7
show more ...
|
| #
dc5d4852 |
| 08-Nov-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "fix(mbedtls): fix error return code for calc_hash" into integration
|
| #
885bd91f |
| 08-Nov-2024 |
Ryan Everett <ryan.everett@arm.com> |
fix(mbedtls): fix error return code for calc_hash
Make this function return values from crypto_ret_value. The previous method of returning the mbedtls error code on failure meant that the authentica
fix(mbedtls): fix error return code for calc_hash
Make this function return values from crypto_ret_value. The previous method of returning the mbedtls error code on failure meant that the authentication module couldn't correctly parse failures from this function.
Change-Id: I9fe6eba1fc79e8f81004f8cd202781aea907e963 Signed-off-by: Ryan Everett <ryan.everett@arm.com>
show more ...
|
| #
b692987c |
| 09-May-2024 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge "feat(mbedtls): update config for 3.6.0" into integration
|
| #
55aed7d7 |
| 10-Apr-2024 |
Jimmy Brisson <jimmy.brisson@arm.com> |
feat(mbedtls): update config for 3.6.0
Further, remove reliance of mbedtls_md_psa_alg_from_type on the actual values of the PSA_ALG_... defines.
And work around a prior bug that would try to import
feat(mbedtls): update config for 3.6.0
Further, remove reliance of mbedtls_md_psa_alg_from_type on the actual values of the PSA_ALG_... defines.
And work around a prior bug that would try to import a SubjectPublicKeyInfo into a PSA key. Instead, we import the SubjectPublicKey itself.
Change-Id: Ib345b0bd4f2994f366629ed162d18814fd05aa2b Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
show more ...
|
| #
fb45d56c |
| 19-Jun-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "fix-for-hash-lengths" into integration
* changes: fix(auth): allow hashes of different lengths feat(juno): add mbedtls_asn1_get_len symbol in ROMlib feat(fvp): add mb
Merge changes from topic "fix-for-hash-lengths" into integration
* changes: fix(auth): allow hashes of different lengths feat(juno): add mbedtls_asn1_get_len symbol in ROMlib feat(fvp): add mbedtls_asn1_get_len symbol in ROMlib
show more ...
|
| #
22a53545 |
| 30-May-2023 |
Demi Marie Obenour <demiobenour@gmail.com> |
fix(auth): allow hashes of different lengths
Trusted Board Boot supports multiple hash algorithms, including SHA-256, SHA-384, and SHA-512. These algorithms produce hashes of different lengths, so
fix(auth): allow hashes of different lengths
Trusted Board Boot supports multiple hash algorithms, including SHA-256, SHA-384, and SHA-512. These algorithms produce hashes of different lengths, so the resulting DER-encoded hash objects are also of different lengths. However, the common Trusted Board Boot code only stores the contents of the object, not its length. Before commit f47547b35462571636a76b737602e827ae43bc24, this was harmless: ASN.1 objects are self-delimiting, and any excess padding was ignored. f47547b35462571636a76b737602e827ae43bc24 changed the code to reject excess padding. However, this breaks using a shorter hash in a build that supports longer hashes: the shorter hash will have padding after it, and verify_hash() will reject it. This was found by an Arm customer: TF-A v2.9 refused to boot, even though TF-A v2.6 (which did not have f47547b35462571636a76b737602e827ae43bc24) worked just fine.
Storing the length of the hash turns out to be quite difficult. However, it turns out that hashes verified by verify_hash() always come from the ROTPK or an X.509 certificate extension. Furthermore, _all_ X.509 certificate extensions used by Trusted Board Boot are ASN.1 DER encoded, so it is possible to reject padding in get_ext(). Padding after the ROTPK is harmless, and it is better to ignore that padding than to refuse to boot the system.
Change-Id: I28a19d7783e6036b65e86426d78c8e5b2ed6f542 Fixes: f47547b35462571636a76b737602e827ae43bc24 ("fix(auth): reject invalid padding in digests") Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
show more ...
|
| #
7c7e7b62 |
| 24-Apr-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "mb/trusted-boot-update" into integration
* changes: refactor(auth)!: unify REGISTER_CRYPTO_LIB refactor(auth): replace plat_convert_pk docs(auth): add auth_decrypt in
Merge changes from topic "mb/trusted-boot-update" into integration
* changes: refactor(auth)!: unify REGISTER_CRYPTO_LIB refactor(auth): replace plat_convert_pk docs(auth): add auth_decrypt in CM chapter feat(auth): compare platform and certificate ROTPK for authentication docs(auth): add 'calc_hash' function's details in CM
show more ...
|
| #
dee99f10 |
| 15-Mar-2023 |
Yann Gautier <yann.gautier@st.com> |
refactor(auth)!: unify REGISTER_CRYPTO_LIB
Have only one definition for REGISTER_CRYPTO_LIB macro, with all the possible fields. Worst case adds 4 u64 to crypto_lib_desc. While at it, correct some M
refactor(auth)!: unify REGISTER_CRYPTO_LIB
Have only one definition for REGISTER_CRYPTO_LIB macro, with all the possible fields. Worst case adds 4 u64 to crypto_lib_desc. While at it, correct some MISRA violations: MC3R1.R12.1: (advisory) The precedence of operators within expressions should be made explicit.
Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I1342a20e6eef2354753182c2a81ff959e03e5c81
show more ...
|
| #
4ac5b394 |
| 24-Jan-2023 |
Yann Gautier <yann.gautier@foss.st.com> |
refactor(auth): replace plat_convert_pk
Following discussions in the reviews of the patch that introduced plat_convert_pk() function [1], it was decided to deprecate it to avoid weak function declar
refactor(auth): replace plat_convert_pk
Following discussions in the reviews of the patch that introduced plat_convert_pk() function [1], it was decided to deprecate it to avoid weak function declaration. A new optional function pointer convert_pk is added to crypto_lib_desc_t. A new function crypto_mod_convert_pk() will either call crypto_lib_desc.convert_pk() if it is defined, or do the same as what was done by the weak function otherwise.
[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/17174
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Change-Id: I9358867f8bfd5e96b5ee238c066877da368e43c6
show more ...
|
| #
766d78b1 |
| 27-Feb-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "mbedtls3_support" into integration
* changes: feat(stm32mp1): add mbedtls-3.3 support config refactor(fvp): minor cleanup with TRUSTED_BOARD_BOOT style(crypto): add b
Merge changes from topic "mbedtls3_support" into integration
* changes: feat(stm32mp1): add mbedtls-3.3 support config refactor(fvp): minor cleanup with TRUSTED_BOARD_BOOT style(crypto): add braces for if statement feat(fvp): increase BL1_RW and BL2 size feat(mbedtls): add support for mbedtls-3.3 refactor(crypto): avoid using struct mbedtls_pk_rsassa_pss_options refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE
show more ...
|
| #
51e06159 |
| 12-Jan-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
feat(mbedtls): add support for mbedtls-3.3
TF-A support for mbedtls3.x has been overdue by number of releases. As per mbedtls support it was advised to use latest and greatest mbedtls-3.3. But mbedt
feat(mbedtls): add support for mbedtls-3.3
TF-A support for mbedtls3.x has been overdue by number of releases. As per mbedtls support it was advised to use latest and greatest mbedtls-3.3. But mbedtls-3.x breaks API compatibility with mbedtls-2.x
To maintain comptability for mbedtls-2.x and enable mbedtls-3.x support add a functionality into makefile to determine the major version of mbedtls and use that to selective include or compile files that are present.
With mbedtls-3.x numerous other config changes have been done. Some of the config options deprecated or enabled by default. Thus we decided to introduce a new 3.x config file part of this change for building TF-A with mbedtls-3.3.
For futher information on migrating to mbedtls 3.x refer to: https://github.com/Mbed-TLS/mbedtls/blob/development/docs/3.0-migration-guide.md
Change-Id: Ia8106d6f526809df927d608db27fe149623258ed Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| #
a8eadc51 |
| 11-Jan-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE
Currently we include MBEDTLS_CONFIG_FILE directly and if a custom config file is used it will included.
However from mbedtls-3.x onwards it di
refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE
Currently we include MBEDTLS_CONFIG_FILE directly and if a custom config file is used it will included.
However from mbedtls-3.x onwards it discourages usage of MBEDTLS_CONFIG_FILE include directly, so to resolve this and keep 2.28 compatibility include version.h which would include the custom config file if present and also would expose us with mbedtls-major-version number which could be used for selecting features and functions for mbedtls 2.28 or 3.3
Change-Id: I029992311be2a38b588ebbb350875b03ea29acdb Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| #
2439a808 |
| 03-Jan-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes Ia748b6ae,Id8a48e14,Id25ab231,Ie26eed8a,Idf48f716, ... into integration
* changes: refactor(auth): partially validate SubjectPublicKeyInfo early fix(auth): reject padding after BIT
Merge changes Ia748b6ae,Id8a48e14,Id25ab231,Ie26eed8a,Idf48f716, ... into integration
* changes: refactor(auth): partially validate SubjectPublicKeyInfo early fix(auth): reject padding after BIT STRING in signatures fix(auth): reject invalid padding in digests fix(auth): require at least one extension to be present fix(auth): forbid junk after extensions fix(auth): only accept v3 X.509 certificates
show more ...
|
| #
a8c8c5ef |
| 08-Dec-2022 |
Demi Marie Obenour <demiobenour@gmail.com> |
fix(auth): reject padding after BIT STRING in signatures
It is forbidden by ASN.1 DER.
Change-Id: Id8a48e14bb8a1a17a6481ea3fde0803723c05e31 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
|
| #
f47547b3 |
| 08-Dec-2022 |
Demi Marie Obenour <demiobenour@gmail.com> |
fix(auth): reject invalid padding in digests
Digests must not have padding after the SEQUENCE or OCTET STRING.
Change-Id: Id25ab23111781f8c8a97c2c3c8edf1cc4a4384c0 Signed-off-by: Demi Marie Obenour
fix(auth): reject invalid padding in digests
Digests must not have padding after the SEQUENCE or OCTET STRING.
Change-Id: Id25ab23111781f8c8a97c2c3c8edf1cc4a4384c0 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
show more ...
|
| #
7042fa6d |
| 06-Oct-2022 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "mb/drtm-preparatory-patches" into integration
* changes: docs(drtm): steps to run DRTM implementation docs(drtm): add platform APIs for DRTM feat(drtm): flush dcache
Merge changes from topic "mb/drtm-preparatory-patches" into integration
* changes: docs(drtm): steps to run DRTM implementation docs(drtm): add platform APIs for DRTM feat(drtm): flush dcache before DLME launch feat(drtm): invalidate icache before DLME launch feat(drtm): ensure that passed region lies within Non-Secure region of DRAM feat(fvp): add plat API to validate that passed region is non-secure feat(drtm): ensure that no SDEI event registered during dynamic launch feat(drtm): prepare EL state during dynamic launch feat(drtm): prepare DLME data for DLME launch feat(drtm): take DRTM components measurements before DLME launch feat(drtm): add a few DRTM DMA protection APIs feat(drtm): add remediation driver support in DRTM feat(fvp): add plat API to set and get the DRTM error feat(drtm): add Event Log driver support for DRTM feat(drtm): check drtm arguments during dynamic launch feat(drtm): introduce drtm dynamic launch function refactor(measured-boot): split out a few Event Log driver functions feat(drtm): retrieve DRTM features feat(drtm): add platform functions for DRTM feat(sdei): add a function to return total number of events registered feat(drtm): add PCR entries for DRTM feat(drtm): update drtm setup function refactor(crypto): change CRYPTO_SUPPORT flag to numeric feat(mbedtls): update mbedTLS driver for DRTM support feat(fvp): add crypto support in BL31 feat(crypto): update crypto module for DRTM support build(changelog): add new scope for mbedTLS and Crypto module feat(drtm): add standard DRTM service build(changelog): add new scope for DRTM service feat(fvp): increase MAX_XLAT_TABLES entries for DRTM support feat(fvp): increase BL31's stack size for DRTM support feat(fvp): add platform hooks for DRTM DMA protection
show more ...
|
| #
2bf4f27f |
| 20-Jun-2022 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
refactor(crypto): change CRYPTO_SUPPORT flag to numeric
Updated CRYPTO_SUPPORT flag to numeric to provide below supports - 1. CRYPTO_SUPPORT = 1 -> Authentication verification only 2. CRYPTO_SUPPORT
refactor(crypto): change CRYPTO_SUPPORT flag to numeric
Updated CRYPTO_SUPPORT flag to numeric to provide below supports - 1. CRYPTO_SUPPORT = 1 -> Authentication verification only 2. CRYPTO_SUPPORT = 2 -> Hash calculation only 3. CRYPTO_SUPPORT = 3 -> Authentication verification and hash calculation
Change-Id: Ib34f31457a6c87d2356d736ad2d048dc787da56f Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| #
8b653909 |
| 25-Feb-2022 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
feat(mbedtls): update mbedTLS driver for DRTM support
Updated mbedTLS driver to include mbedTLS functions necessary for a DRTM supported build.
Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm
feat(mbedtls): update mbedTLS driver for DRTM support
Updated mbedTLS driver to include mbedTLS functions necessary for a DRTM supported build.
Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com> Change-Id: If0120374a971519cf84f93e0c59e1a320a72cd97
show more ...
|
| #
b1963003 |
| 25-Jan-2022 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "decouple-tb-mb" into integration
* changes: refactor(renesas): disable CRYPTO_SUPPORT option refactor(fvp): avoid Measured-Boot dependency on Trusted-Boot refactor(me
Merge changes from topic "decouple-tb-mb" into integration
* changes: refactor(renesas): disable CRYPTO_SUPPORT option refactor(fvp): avoid Measured-Boot dependency on Trusted-Boot refactor(measured-boot): avoid Measured-Boot dependency on Trusted-Boot build: introduce CRYPTO_SUPPORT build option
show more ...
|
| #
0aa0b3af |
| 16-Dec-2021 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
refactor(measured-boot): avoid Measured-Boot dependency on Trusted-Boot
Measured-Boot and Trusted-Boot are orthogonal to each other and hence removed dependency of Trusted-Boot on Measured-Boot by m
refactor(measured-boot): avoid Measured-Boot dependency on Trusted-Boot
Measured-Boot and Trusted-Boot are orthogonal to each other and hence removed dependency of Trusted-Boot on Measured-Boot by making below changes - 1. BL1 and BL2 main functions are used for initializing Crypto module instead of the authentication module 2. Updated Crypto module registration macro for MEASURED_BOOT with only necessary callbacks for calculating image hashes 3. The 'load_auth_image' function is now used for the image measurement during Trusted or Non-Trusted Boot flow
Change-Id: I3570e80bae8ce8f5b58d84bd955aa43e925d9fff Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| #
97af8baf |
| 10-Dec-2021 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "refactor(measured-boot): add generic macros for using Crypto library" into integration
|
| #
14db963f |
| 06-Oct-2021 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
refactor(measured-boot): add generic macros for using Crypto library
It doesn't look correct to use mbed TLS defines directly in the Event Log driver as this driver may use another Crypto library in
refactor(measured-boot): add generic macros for using Crypto library
It doesn't look correct to use mbed TLS defines directly in the Event Log driver as this driver may use another Crypto library in future. Hence mbed TLS Crypto dependency on Event Log driver is removed by introducing generic Crypto defines and uses those in the Event Log driver to call Crypto functions. Also, updated mbed TLS glue layer to map these generic Crypto defines to mbed TLS library defines.
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ibc9c751f60cbce4d3f3cf049b7c53b3d05cc6735
show more ...
|
| #
46b3003b |
| 10-Mar-2020 |
Mark Dykes <mardyk01@review.trustedfirmware.org> |
Merge "Necessary fix in drivers to upgrade to mbedtls-2.18.0" into integration
|