1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-07 06:42:56 +03:00
Commit Graph

90 Commits

Author SHA1 Message Date
Minos Galanakis
2fc59949b2 Added MBEDTLS_PSA_CRYPTO_RNG_STRENGTH to tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-08-06 10:50:27 +01:00
Ronald Cron
fb03d1391b depends.py: Remove cipher_padding domain
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
0668036ada Replace MBEDTLS_AES_C
Replace the remaining instances of MBEDTLS_AES_C
as a configuration option.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
e13c7015ea all.sh: Remove unset of now removed legacy symmetric crypto options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
892bb61294 all.sh: Remove unset of now removed legacy RSA config options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
772a8ad219 all.sh: Remove unset of now removed legacy hash config options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
abafe32c79 Merge pull request #10297 from ronald-cron-arm/remove-legacy-crypto-options-preparation-1
Remove legacy crypto options preparation-1
2025-07-16 14:06:30 +00:00
Ronald Cron
9edf4c54b6 test_psa_crypto_config_accel_rsa_crypto: Disable MBEDTLS_GENPRIME
Disable MBEDTLS_GENPRIME in the
test_psa_crypto_config_accel_rsa_crypto component.
This should likely have been the case already,
as all RSA crypto in this component is expected
to be provided by the test driver.

This change is necessary following the previous
commit to prevent analyze_outcomes.py from
complaining that, as MBEDTLS_GENPRIME tests are
passing in both the driver and reference
components, they should not be ignored.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-15 15:40:57 +02:00
Ronald Cron
e0b06eb3a1 test_xts: Remove temporarily file earlier
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-15 09:32:44 +02:00
Ronald Cron
f256f8ac3e Add test_xts component
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-11 18:00:12 +02:00
Ronald Cron
b5c6fcc4c9 test_psa_crypto_config_accel_cipher_aead_cmac: Disable POLY1305
In preparation of the removal of the configuration
option MBEDTLS_POLY1305_C, disable it in
test_psa_crypto_config_accel_cipher_aead_cmac as
it will be not possible to enable it when
CHACHA20_POLY1305 is accelerated.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-11 18:00:06 +02:00
Ronald Cron
3f12006441 build_psa_config_file: Check PSA_WANT_ALG_CMAC instead of MBEDTLS_CMAC_C
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-11 17:59:29 +02:00
Ronald Cron
bd28acf240 ssl-opt.sh: Remove dependencies on built-in CBC and AES
Remove dependencies on MBEDTLS_CIPHER_MODE_CBC and
MBEDTLS_AES_C, as these options will no longer be
available once they are removed from the configuration.

The affected tests rely on the built-in CBC and AES
implementations. With the removal of
MBEDTLS_CIPHER_MODE_CBC and MBEDTLS_AES_C as
configuration options, there is no longer a mechanism
in ssl-opt.sh to express these dependencies.

As a result, filter out these tests at the all.sh
component level when the built-in CBC and AES
implementations are not available.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-11 17:59:16 +02:00
Ari Weiler-Ofek
5d8d299f43 Disable PSA_WANT_KEY_TYPE_DES to stop DES from being re-enabled
Signed-off-by: Ari Weiler-Ofek <ariwei01@e134794.arm.com>
2025-07-09 00:18:18 +01:00
Ari Weiler-Ofek
86422e5509 Remove: DES selftest, component_test_psa_crypto_config_accel_des and dead DES mentions prior to TF-PSA-Crypto cleanup
Signed-off-by: Ari Weiler-Ofek <ariwei01@e134794.arm.com>
2025-07-07 11:29:50 +01:00
Felix Conway
43c891ae98 Remove requirement on MBEDTLS_PLATFORM_C from configs
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-06-10 13:45:34 +01:00
Gabor Mezei
2649800f7c Do not disable PSA_WANT_SHA3 macros when driver accel is used
The SW implementation is guarded with the `MBEDTLS_PSA_BUILTIN_ALG_SHA3`
macros and not enabled when driver accelaration is set. So disabling
the `PSA_WANT` macros is not needed.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-06-05 14:01:30 +02:00
Gabor Mezei
4aa974f7c7 Remove MBEDTLS_SHA3_C config option
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-06-03 17:49:23 +02:00
Gilles Peskine
2439c4c14a Merge pull request #10090 from valeriosetti/issue9618-development
[development] MBEDTLS_PLATFORM_GET_ENTROPY_ALT in 4.0
2025-05-06 22:35:03 +02:00
Valerio Setti
7ac11845d0 configs: add PLATFORM_C to configs using ENTROPY_C
This is necessary to let entropy being able to gather entropy data from
the native platform source.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Ben Taylor
1948c94385 added dependencies to test scripts
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-04-29 07:43:37 +01:00
Felix Conway
92efce2b84 [development] Remove code relating to MBEDTLS_PSA_INJECT_ENTROPY
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-28 09:01:05 +01:00
Gabor Mezei
e1e27300a2 Remove MBEDTLS_KEY_EXCHANGE_RSA_ENABLED config option
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:01 +01:00
Valerio Setti
eb63eb2a6a etests: remove MBEDTLS_DHM_C/DHM occurrencies
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-03-05 10:11:22 +01:00
Valerio Setti
8438c637ee tests: remove references to DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
Harry Ramsey
94c386a8ea Update config paths in scripts
This commit updates the moved config paths in multiple script files.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-04 12:54:15 +00:00
Valerio Setti
6e892cb630 components-configuration-crypto.sh: remove references to DHE_PSK kex
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-24 11:49:59 +01:00
Ronald Cron
9bdec11b31 Merge pull request #9815 from Harry-Ramsey/remove-irrelevant-components
Remove Irrelevant Components for 4.0
2025-01-07 13:18:15 +00:00
Ronald Cron
faadfc2513 cmake: Remove unnecessary file generation disablement
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
3dd1d3d1de Fix test_sha3_variations
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
9d262d7c13 Fix test_ccm_aes_sha256
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
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
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
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
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
Harry Ramsey
c0dd3e4988 Remove irrelevant components
This commit removes irrelevant components that are no longer needed in
the 4.0 release.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-02 10:52:05 +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
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
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
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
8ed4d94166 Merge pull request #9614 from gilles-peskine-arm/use_psa_crypto-always_on
Always enable MBEDTLS_USE_PSA_CRYPTO in all.sh
2024-10-29 14:58:55 +00:00
Gilles Peskine
665df83d34 Merge pull request #9293 from gilles-peskine-arm/outcome-check-repeated-configurations-all.sh-preliminaries
Fix some all.sh components with sub-components
2024-10-25 14:59:15 +00:00
Gilles Peskine
3982898c3a Remove legacy components with an equivalent USE_PSA component
Remove all.sh components that explicitly disable MBEDTLS_USE_PSA_CRYPTO, and
for which there is another component with MBEDTLS_USE_PSA_CRYPTO enabled
that does the same or more testing.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-24 20:37:33 +02:00
Gilles Peskine
fef912c30b Test partial ECC creation support: switch to MBEDTLS_USE_PSA_CRYPTO
With PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE disabled, test TLS 1.3 and
USE_PSA TLS 1.2.

With PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE disabled, just test crypto,
because the TLS code needs that to generate ephemeral ECDH keys but this is
not tracked properly (the ephemeral ECDH code is only gated on having ECDH).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-22 22:10:42 +02:00
Valerio Setti
8bc8172c4a test: disable dynamic key store in test_crypto_with_static_key_slots
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-10-22 17:56:36 +02:00
Valerio Setti
4d9a8219ac test: properly select MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE value
This value should be:
- OK for all EC/FFDH key pairs/public keys;
- OK for all supported public RSA keys;
- OK for RSA key pairs up to 2048 bits;
- FAIL for RSA key pairs above 2048 bits.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-10-22 17:56:36 +02:00