32263 Commits

Author SHA1 Message Date
Ronald Cron
fee08b45e2
Merge pull request #9760 from ronald-cron-arm/tf-psa-crypto-cmake
Finalize the integration of the TF-PSA-Crypto build system into the Mbed TLS one
2024-11-15 17:05:16 +00:00
Ronald Cron
8237484318 cmake: Use TF_PSA_CRYPTO_CONFIG_FILE to prefix crypto targets
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-15 15:05:34 +01:00
Ronald Cron
d779e95720 Fix cmake option name
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 16:25:34 +01:00
Ronald Cron
0cc68601e6
Merge pull request #9611 from gabor-mezei-arm/9142_update_depends.py_cipher_chaining_domain
Update the `cipher_chaining` domain to use PSA macros in `depends.py`
2024-11-14 14:32:35 +00:00
Ronald Cron
939ce9d0d5 Remove mbedtls_test
Use tf_psa_crypto_test instead.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 13:52:36 +01:00
Ronald Cron
bea67a1ebf Fix everest build
Fix everest build following the merge of
9490. By the way removed an unnecessary
link of the everest lib to mbedtls test
executable. It comes through the mbedtls
library that gets it from the tfpsacrypto
library.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 11:27:49 +01:00
Manuel Pégourié-Gonnard
824a8dcde3
Merge pull request #9769 from mpg/move-all-core-dev
Move all-core and all-helpers to the framework
2024-11-14 09:51:24 +00:00
Ronald Cron
0381a98114 cmake: Move copy of crypto libraries to mbedtls
Move copy of crypto libraries to mbedtls as this
copy does not make sense in TF-PSA-Crypto context.
Also copy all of them, not just tfpsacrypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
8126a686d9 cmake: Rename mbedcrypto library to tfpsacrypto
Do not do the same in the make build system yet,
cmake build system only scope for this PR.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
b7d0e52e16 cmake: Rename mbedcrypto target to tfpsacrypto
Rename mbedcrypto target to tfpsacrypto and
prefix all cmake related variables with
tfpsacrypto instead of mbedcrypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
020e026779 cmake: tf-psa-crypto: Add cmake_subproject test program
The empty framework directory is temporary. It will be
removed when TF-PSA-Crypto uses its framework submodule.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:21 +01:00
Manuel Pégourié-Gonnard
845cc54d69 Update framework pointer
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-14 09:14:51 +01:00
Ronald Cron
1a52bc4802 cmake: mbedtls: Propagate options and target prefix
Propagate mbedtls options named differently in
TF-PSA-Crypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
97cfd707ee tf-psa-crypto: cmake: Let TF-PSA-Crypto.cmake be the top cmake file
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
d3b33a2e81 Finalize TF-PSA-Crypto.cmake to become the top cmake file
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
ba850f3207 Rename export MbedTLSTargets to TF-PSA-CryptoTargets
Keep installations on MbedTLSTargets export
crypto libraries for the sake of mbedtls.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
2609fe9155 cmake: tf-psa-crypto: Rename mbedtls_test to tf_psa_crypto_test
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto cmake build
system into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
a9219ff73d Add project prefix to API documentation targets
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto build system
into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
169393e6ae Restrict the definition of memcheck/lcov targets
Restrict the definition of memcheck/lcov targets
to the case where Mbed TLS/TF-PSA-Crypto is the
main project. To avoid conflict between the
targets when the integration of the TF-PSA-Crypto
build system into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
564b1cb643 tf-psa-crypto: cmake: Fix target for compile options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
735dd65035 Fix mbedcrypto pkg-config file
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
13a7ccec76 Align all.sh tf-psa-crypto components naming
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:29 +01:00
Ronald Cron
211bf6de21 cmake: Fix config files compile definitions
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 08:52:20 +01:00
Gabor Mezei
6763a5546a
Update comments
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
655c487edb
Update dependencies
Added `MBEDTLS_CIPHER_MODE_XTS` as a dependency for `PSA_WANT_ALG_XTS`.
Otherwise, `MBEDTLS_CIPHER_MODE_XTS` is always enabled which enables a
lot of code we would like to be disabled when testing CFB/CTR... only.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
af198c2ee5
Rename variable
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
242806ad6f
Update dependencies
All cipher padding methods depend on CBC. To aviod switching it off
add this dependency to all of the methods and handle it as a common dependency.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
a5f35296bd
Update comment
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
95be5fb18b
Add support for common dependencies in exclusive groups
When elements of an exclusive group have dependencies in common turning them off
breaks the elements build. Support added to handle and ignore these dependencies
when only one of the elements is enabled.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
e191c0358e
Update the dependencies of the cipher algorithms
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
5a61086748
Test all cipher algorithm
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
6f77baff68
Use PSA macros for the chipher_chaining domain
Exclude the XTS mode because it is not implemented via the PSA API.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:25:05 +01:00
Manuel Pégourié-Gonnard
30e8eb9847 Update path to all-core.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-12 11:57:46 +01:00
Manuel Pégourié-Gonnard
8f00e5e03a Update framework pointer
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-12 11:53:34 +01:00
Manuel Pégourié-Gonnard
06f8f9e1b3 Move all-{core,helpers}.sh out of Mbed TLS
Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
2024-11-12 11:36:40 +01:00
Janos Follath
241b9012a0
Merge pull request #9490 from waleed-elmelegy-arm/add-iop-key-agrmnt-api
Add PSA interruptible key agreement APIs
2024-11-11 09:29:16 +00:00
Ronald Cron
101816b41f
Merge pull request #9612 from gabor-mezei-arm/9141_update_depends.py_cipher_id_domain
Update the `cipher_id` domain to use PSA macros in `depends.py`
2024-11-08 15:32:39 +00:00
Gilles Peskine
4c58e89976
Merge pull request #9613 from gilles-peskine-arm/remove-rsa-psk-key-exchange
Remove RSA-PSK key exchange
2024-11-07 15:09:05 +00:00
Waleed Elmelegy
947afa05d6 Remove designated initializers from ECDH compile time initializers
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-07 15:06:28 +00:00
Manuel Pégourié-Gonnard
e248de54bf
Merge pull request #9720 from mpg/all.sh-tf-psa-crypto-dev
All.sh add support for tf-psa-crypto components
2024-11-07 08:49:44 +00:00
Paul Elliott
fc140d0c6b
Merge pull request #9672 from gilles-peskine-arm/coverity-20241004
Fix edge cases of mbedtls_psa_raw_to_der and mbedtls_psa_der_to_raw
2024-11-06 19:03:13 +00:00
Gilles Peskine
b48d5263c5
Merge pull request #9758 from gilles-peskine-arm/move-test_suite_psa_crypto_ecp
Move new test suite to the tf-psa-crypto directory
2024-11-06 17:56:30 +00:00
Waleed Elmelegy
7817da0833 Improve and fix compile initializers for ECDH/ECP
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
a4d0fd1143 Fix a typo and a mistake in ECDH conext compile time initalizer
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
97041ed399 Fix Documentation issue in mbedtls_psa_key_agreement_iop_setup()
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
e980fbe291 Fix codestyle in ECDH compile time initilaizers
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
f840b3a2c0 Add compile time initilaizers to ECDH and bignum structs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
280e22518e Add small fixes to iop key agreement APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
cd721b9870 Add a common key agreement parameter validation function across iop and normal APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
18df1c560a Refactor and improve interuptible key agreement builtin implementation
- rename psa_driver_wrapper_key_agreement_xxx to
  psa_driver_wrapper_key_agreement_iop_xxx.
- reorganise the paraemters of psa_driver_wrapper_key_agreement_setup

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00