| c999bfc6 | 15-Apr-2025 |
Joakim Bech <joakim.bech@linaro.org> |
shdr: add check for weak key sizes
Add a function is_weak_key_size(...), which checks whether a given key size (in bits) complies with current security standards. If the key size is lower than 2048,
shdr: add check for weak key sizes
Add a function is_weak_key_size(...), which checks whether a given key size (in bits) complies with current security standards. If the key size is lower than 2048, then it's considered deprecated and will make signature verification fail. Note that this only affects verifying TA and subkey signatures.
This change aligns with GlobalPlatform's decision, influenced by feedback from ANSSI, BSI, SOGIS, and NIST. For further details on the GlobalPlatform's cryptographic algorithm recommendations, see [1].
Link: https://globalplatform.org/specs-library/globalplatform-technology-cryptographic-algorithm-recommendations/ [1] Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2723d625 | 10-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: initialize buffer with calloc()
Allocate out_tmp buffer with calloc() instead of malloc() This relates to a Coverity issue where out_tmp is reported to be potentially used as uninitialized in
core: initialize buffer with calloc()
Allocate out_tmp buffer with calloc() instead of malloc() This relates to a Coverity issue where out_tmp is reported to be potentially used as uninitialized in memcpy().
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 34ce35b1 | 14-Jul-2023 |
loubaihui <loubaihui1@huawei.com> |
crypto: add X448 support
Refer to the X25519 algorithm, add the X448 algorithm framework code.
Signed-off-by: loubaihui <loubaihui1@huawei.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.o
crypto: add X448 support
Refer to the X25519 algorithm, add the X448 algorithm framework code.
Signed-off-by: loubaihui <loubaihui1@huawei.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c34d0d91 | 05-Sep-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: support loading TAs signed with a subkey
Adds support to load TAs signed with subkey or a chain of subkeys. This allows delegation of TA signing without distributing the root key. TAs signed w
core: support loading TAs signed with a subkey
Adds support to load TAs signed with subkey or a chain of subkeys. This allows delegation of TA signing without distributing the root key. TAs signed with a subkey are confined to the UUID-V5 namespace of the subkey to avoid TA UUID clashes with different subkeys.
SHDR_SUBKEY is a type of header which enables chains of public keys. The public root key is used to verify the first public subkey, which then is used to verify the next public subkey and so on.
The TA is finally verified using the last subkey. All these headers are added in front of the TA binary so everything needed to verify the TA is available when it's loaded into memory.
For example: Subkey struct shdr magic: 0x4f545348 img_type: 3 (SHDR_SUBKEY) img_size: 320 bytes algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) hash_size: 32 bytes sig_size: 256 bytes hash: f573f329fe77be686ce71647909c4ea35b5e1cd7de86369bd7d9fca31f6a4d65 struct shdr_subkey uuid: f04fa996-148a-453c-b037-1dcfbad120a6 name_size: 64 subkey_version: 1 max_depth: 4 algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) attr_count: 2 next name: "mid_level_subkey" Next header at offset: 692 (0x2b4) Subkey struct shdr magic: 0x4f545348 img_type: 3 (SHDR_SUBKEY) img_size: 320 bytes algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) hash_size: 32 bytes sig_size: 256 bytes hash: 233a6dcf1a2cf69e50cde8e20c4129157da707c76fa86ce12ee31037edef02d7 struct shdr_subkey uuid: 1a5948c5-1aa0-518c-86f4-be6f6a057b16 name_size: 64 subkey_version: 1 max_depth: 3 algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) attr_count: 2 next name: "subkey1_ta" Next header at offset: 1384 (0x568) Bootstrap TA struct shdr magic: 0x4f545348 img_type: 1 (SHDR_BOOTSTRAP_TA) img_size: 84576 bytes algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) hash_size: 32 bytes sig_size: 256 bytes hash: ea31ac7dc2cc06a9dc2853cd791dd00f784b5edc062ecfa274deeb66589b4ca5 struct shdr_bootstrap_ta uuid: 5c206987-16a3-59cc-ab0f-64b9cfc9e758 ta_version: 0 TA offset: 1712 (0x6b0) bytes TA size: 84576 (0x14a60) bytes
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_virt) Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 191f2ed4 | 30-Apr-2022 |
Andrew Davis <afd@ti.com> |
core: rng_hw: Remove __weak attribute from HW RNG functions
These function are no longer overridden by platform HW RNG drivers. Drivers only need implement hw_get_random_bytes().
Signed-off-by: And
core: rng_hw: Remove __weak attribute from HW RNG functions
These function are no longer overridden by platform HW RNG drivers. Drivers only need implement hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|