3278 Commits

Author SHA1 Message Date
Minos Galanakis
a17ffc7a0b test suites: Refactored component_test_ccm_aes_sha256.
This commit moves the tf-psa-crypto configuration options
for this test to `crypto-config-ccm-aes-sha256.h`.

A blank MbedTLS configuration file is now used for the library
side.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 10:41:11 +00:00
Minos Galanakis
473241e5b2 build_cmake_custom_config_file: Added test coverage for crypto_user_config.h
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 10:41:11 +00:00
Minos Galanakis
00b641c206 test_components: Updated config.py to use -c for setting CRYPTO_CONFIG_H entries.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
2154ce2040 component_test_ccm_aes_sha256: Workaround for split libtestdriver config.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
4f619e12e7 Renamed MBEDTLS_PSA_CRYPTO_CONFIG_FILE & MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
Files have been renamed respectively to:
- TF_PSA_CRYPTO_CONFIG_FILE
- TF_PSA_CRYPTO_USER_CONFIG_FILE

As per design proposal:
https://github.com/Mbed-TLS/mbedtls/blob/development/docs/proposed/config-split.md

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
c6e58aa4ac test_memsan_constant_flow_psa: Set to not re-generate files.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
5da58e5c18 tests/configs: Adjusted for migration of MBEDTLS_PSA_CRYPTO_CONFIG_FILE.
Moving forward the MBEDTLS_PSA_CRYPTO_CONFIG_FILE now resides in the
ts-psa/crypto configuration. This patch removes it from the library
configuration files, and updates the tests to explicitely use it.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
981d7d67e1 test-suites: Replaced NIST_KW_C with SSL_ALL_ALERT_MESSAGES
`MBEDTLS_NIST_KW_C` resides in tf-psa-crypto. This commit updates
the tests using it to use `SSL_ALL_ALERT_MESSAGES` instead.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
473b9609e8 components-build-system: Added support for psa_crypto custom configuration file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
aa2f12cc8e component-configuration-crypto: Set user-config-for-test as the MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
23452f5c0b libtestdriver: Addded crypto_config_test_driver
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Elena Uziunaite
8993fecae4 Define FRAMEWORK
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-11-27 13:15:04 +00:00
Elena Uziunaite
ef40183c34 Use new functions
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-11-27 13:15:04 +00:00
Ronald Cron
93ba625b96 Remove MBEDTLS_PSA_CRYPTO_CONFIG configuration option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-21 15:52:06 +01: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
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
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
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
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
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
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
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
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
Gabor Mezei
03cc5921be
Collect key types
Use KeyType from crypto_knowledge to use its functionality.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:12 +01:00
Gabor Mezei
06a060ddd8
Collect the cipher algorithms
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:10 +01:00
Gabor Mezei
402381d2a6
Collect the algorithms
Use Algorithm from crypto_knowledge to use its functionality.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:41:42 +01:00
Gilles Peskine
98a4f88760
Merge pull request #9751 from gilles-peskine-arm/mbedtls_psa_ecp_generate_key-no_public_key-dev
PSA ECC key generation: don't generate the public key
2024-11-04 16:36:44 +00:00
Gilles Peskine
77587ce12d Unit tests for mbedtls_psa_ecp_generate_key()
Run the function on a few different curves with shorter, just-right and
larger buffer sizes. Perform some basic sanity checks on the output (which
is random).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-04 14:07:20 +01:00
Janos Follath
e7c28d6847
Merge pull request #9727 from gilles-peskine-arm/use_psa_crypto-always_forced
Force MBEDTLS_USE_PSA_CRYPTO enabled
2024-11-04 11:32:45 +00:00
Manuel Pégourié-Gonnard
dea700dd38 all.sh: improve wrapper error reporting
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-04 11:40:44 +01:00
Manuel Pégourié-Gonnard
467b487d95
Merge pull request #9738 from mpg/drop-armcc5-dev
[dev] Drop building with armcc5 in all.sh
2024-10-31 08:12:40 +00:00
Gilles Peskine
b434192dcb Remove explicit setting of MBEDTLS_USE_PSA_CRYPTO
Now that it's always on, this is no longer necessary.
Also this is a step towards no longer being able to set it, because it soon
won't be a selectable configuration option anymore.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-30 14:23:16 +01:00
Gilles Peskine
a1be1b8fbb Remove ECJPAKE interoperability testing
We no longer have two (only partially distinct) implementations of ECJ-PAKE
cipher suites in TLS, now that the non-MBEDTLS_USE_PSA_CRYPTO implementation
is being removed.

We may want to add this testing back in the future, but we'll have to use an
old Mbed TLS instead of a differently-built one.
https://github.com/Mbed-TLS/mbedtls/issues/9740

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-30 14:23:16 +01:00