12027 Commits

Author SHA1 Message Date
David Horstmann
ed91f8890f Replace tabs with spaces in Makefile
Tabs were introduced in a place where spaces are being used for
alignment. Correct this.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-19 17:15:30 +00:00
David Horstmann
0771253cf4 Properly clean instrument_record_status.h
The paths to this header in clean: targets were missed previously when
changing paths to reflect the move of the header to the framework.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
8a5b3afc5d Update paths to generated PSA test wrappers
These are not moving to the framework, so their paths are fine to stay
as they are, undo the update done through global search-replace.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
d962680cbc Update generate path to instrument_record_status.h
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
dc45951cf6 Update path to PSA crypto alt headers
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
8a8d56aa87 Update make clean target with moved test helpers
Test helpers that are now moved to the framework must be cleaned
properly.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
e6a7c247fd Update test_keys.h generation in Makefile
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
6bbd9c0b70 Update libtestdriver paths in tests/Makefile
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
cbab2ff06e Update path substitution for TF-PSA-Crypto tests
This path substitution needs to be performed on the new paths in the
framework as well.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
69b12ee121 Add tests/Makefile targets for moved test helpers
Everything that has been moved to tests/src needs a Makefile target in
order to be built.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
1b457a9e4d Undo incorrect path substitution
The find and replace of tests/src -> framework/tests/src and
tests/include -> framework/tests/include accidentally caused an
incorrect path substitution to be performed in tests/Makefile.

Undo this change and make the substitution correct again.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
306f4106cf Add the framework/tests/include path to testsuites
These need to include from the framework path as this is where most test
helpers have been moved to.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
5b93d97b95 Update references to test helpers
Replace:
* tests/src -> framework/tests/src
* tests/include -> framework/tests/include

Except for occurrences of:
* tests/src/test_helpers (since this only contains ssl_helpers.c)
* tests/src/test_certs.h
* tests/include/alt_dummy

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
531adafb0a Move some test helpers out of Mbed TLS
Everything not TLS-related and not ALT-interface-related has been moved
out of tests/src and tests/include and into the framework, except for
the PSA test wrappers.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:43 +00:00
Janos Follath
fe4b02cc69
Merge pull request #9602 from paul-elliott-arm/add_key_agreement_negative_tests
Add key agreement negative tests
2024-11-18 13:02:03 +00:00
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
Paul Elliott
66d7bcbef1 Add key export on successful key agreement
More sanity checks on key coming out of key agreement.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
2c9d398553 Add new psa_key_agreement() to key exercises
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
b1039afbd0 Regenerate PSA Sim headers
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
958bdf7f16 Add required code to psa_sim_generate.pl
Non generated code was unfortnuately added to psa_sim_crypto_server.c,
fix that by adding it to the generation scripts.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
d118cd21d6 Fix definition of psa_generate_key_iop_complete()
Incorrect usage of psa_key_id_t breaks ability to regenerate psa_sim
headers properly, should have been mbedtls_svc_key_id_t in the first
place, so replace with that.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-14 19:07:58 +00: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
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
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
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
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
Waleed Elmelegy
4cef20d00b Fix everest build issue
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
a2891a9ac9 Add PSA interuptable key agreement APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:46 +00:00
Gabor Mezei
bd8e81834f
Fix pylint issue
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-06 11:25:01 +01:00
Gilles Peskine
ae5353bb62 Move new test suite to the tf-psa-crypto directory
It's a crypto test suite, but it was added in the main tree in a careless
forward port from 3.6.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-05 17:43:02 +01:00
Gilles Peskine
fdf7db019b Remove support for RSA-PSK in compat.sh
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-05 15:49:12 +01:00
Gilles Peskine
91e7ebebfe Remove RSA_PSK suites from cipher suite lists
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-05 15:49:12 +01:00
Gilles Peskine
ac767e5c69 Remove MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Remove the configuration option MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED and all
code guarded by it. This remove support for the RSA-PSK key exchange in TLS
1.2.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-05 15:49:01 +01:00
Gilles Peskine
7dfe7c9e4a Remove RSA-PSK test cases
The test cases removed by this commit are specific to RSA-PSK, not
incidentally using RSA-PSK when testing other features, so there is no loss
of test coverage.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-05 15:48:11 +01:00
Gabor Mezei
e6cfa3b428
Update dependencies
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:12 +01:00
Gabor Mezei
fb6b0dbbfd
Use crypto_knowledge to determine the cipher key types
Replace the old implementation which uses `cipher.h` to gather
information.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:12 +01:00