| 575c1469 | 09-Nov-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
refactor(auth): remove return_if_error() macro
The usage of this macro hinders the accuracy of code coverage data. Lines of code calling this macro always appear as covered because the test conditio
refactor(auth): remove return_if_error() macro
The usage of this macro hinders the accuracy of code coverage data. Lines of code calling this macro always appear as covered because the test condition within it always gets executed; however, the branch is not necessarily taken. Consequently, we lose branch coverage information on these error code paths.
Besides, it is debatable whether such a simple macro really improves code readability or on the contrary obfuscates the code...
For these reasons, this patch inlines the macro code everywhere it was called.
It also adds some error messages in all these places to help narrowing down authentication failures. These messages only get displayed and compiled into the binaries when building TF-A with 'LOG_VERBOSE' level of verbosity. We use the same message string everywhere in order to limit the memory footprint increase for 'LOG_VERBOSE' builds.
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Change-Id: I461078bb8c6fd6811d2cbefbe3614e17e83796f2
show more ...
|
| eaa62e82 | 22-Sep-2023 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(mbedtls-psa): use PSA crypto API during signature verification
A PSA crypto API is used for signature verification, namely psa_verify_message, which calculates the signature and verify it for t
feat(mbedtls-psa): use PSA crypto API during signature verification
A PSA crypto API is used for signature verification, namely psa_verify_message, which calculates the signature and verify it for the given signed message.
Note, this functionality is as of now tested for RSA based Key algorithm, subsequent patches will provide the signature verification support for all the key algorithms available in TF-A (provided by KEY_ALG build option).
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I16214e3cac6a7af445530a6dbd66cfc6ceedcfc6
show more ...
|
| 484b5869 | 06-Sep-2023 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(mbedtls-psa): use PSA crypto API during hash calculation
A PSA crypto API is used for hash verification, namely 'psa_hash_compute', which internally calculates hash of the given data payload.
feat(mbedtls-psa): use PSA crypto API during hash calculation
A PSA crypto API is used for hash verification, namely 'psa_hash_compute', which internally calculates hash of the given data payload.
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ic90e43e68b836ee2add4b868663cfca2340c8108
show more ...
|
| 2ed061c4 | 06-Sep-2023 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(mbedtls-psa): use PSA crypto API for hash verification
A PSA crypto API is used for hash verification, namely psa_hash_verify, which internally calculates and verifies the hash of the given dat
feat(mbedtls-psa): use PSA crypto API for hash verification
A PSA crypto API is used for hash verification, namely psa_hash_verify, which internally calculates and verifies the hash of the given data payload.
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ib48aa6b74b59aea6036333ff00f6ca566b910e60
show more ...
|
| 4eaaaa19 | 06-Sep-2023 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(mbedtls-psa): initialise mbedtls psa crypto
Initialised Mbedtls PSA cryto during Crypto init using function call 'psa_crypto_init'.
MbedTLS currently requires a Random Number Generator (RNG) o
feat(mbedtls-psa): initialise mbedtls psa crypto
Initialised Mbedtls PSA cryto during Crypto init using function call 'psa_crypto_init'.
MbedTLS currently requires a Random Number Generator (RNG) once PSA Crypto support is enabled. However, TF-A itself doesn't engage in cryptographic operations that demand randomness. Consequently, we simulate the presence of an external TRNG (through the configuration option 'MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG) while, in reality, we offer a dummy implementation of mbedtls_psa_external_get_random() that always returns an error.
Change-Id: Ife6d03909c0e6081438d2b2519ef500e5dcdb88f Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| 38f89369 | 06-Sep-2023 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(mbedtls-psa): register an ad-hoc PSA crypto driver
An ad-hoc MbedTLS PSA crypto driver is registered by compiling a new driver file, namely mbedtls_psa_crypto.c when PSA_CRYPTO=1. As of now, th
feat(mbedtls-psa): register an ad-hoc PSA crypto driver
An ad-hoc MbedTLS PSA crypto driver is registered by compiling a new driver file, namely mbedtls_psa_crypto.c when PSA_CRYPTO=1. As of now, this file is the same as mbedtls_crypto.c, but subsequent patches will update crypto functions in this file to trigger PSA crypto APIs.
Change-Id: I404c347990661d87dcf5d0501d238e36914ec3ee Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
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 ...
|
| ddd9f675 | 19-Jan-2023 |
Demi Marie Obenour <demiobenour@gmail.com> |
refactor(auth): clean up certificate length checks
The previous code was correct but unnecessarily verbose.
Change-Id: Ia19c667811a7c3b6957a0274d36076b0b16e36b7 Signed-off-by: Demi Marie Obenour <d
refactor(auth): clean up certificate length checks
The previous code was correct but unnecessarily verbose.
Change-Id: Ia19c667811a7c3b6957a0274d36076b0b16e36b7 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
show more ...
|