Commit Graph

6946 Commits

Author SHA1 Message Date
Thomas Daubney
72a88e7255 Remove MBEDTLS_MD5_PROCESS_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Elena Uziunaite
83a0d9deec Replace MBEDTLS_SSL_HAVE_GCM with PSA_WANT_ALG_GCM
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-08-02 09:52:20 +01:00
Elena Uziunaite
6121a344dd Replace MBEDTLS_SSL_HAVE_AES with PSA_WANT_KEY_TYPE_AES
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-30 18:42:19 +01:00
Paul Elliott
3962a38fa6
Merge pull request #9287 from Wenxing-hou/fix_some_typo
Fix some typo for include folder
2024-07-17 13:11:45 +00:00
Thomas Daubney
75246c0bea Remove irrelevant documentation notes
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:15:32 +01:00
Thomas Daubney
25bcf27c1a Remove MBEDTLS_SHA512_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:15:29 +01:00
Thomas Daubney
b248a93b3d Remove MBEDTLS_MD5_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:15:06 +01:00
Thomas Daubney
efc65e1168 Remove MBEDTLS_CMAC_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:14:43 +01:00
Thomas Daubney
027535c8a5 Remove MBEDTLS_SHA256_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:13:45 +01:00
Thomas Daubney
30c7701a1d Remove MBEDTLS_RIPEMD160_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:13:22 +01:00
Thomas Daubney
2cd12de614 Remove MBEDTLS_SHA1_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-15 12:05:07 +01:00
Thomas Daubney
25e2be16db Remove MBEDTLS_NIST_KW_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:55 +01:00
Thomas Daubney
a9ea6f8dd2 Remove MBEDTLS_DES_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:55 +01:00
Thomas Daubney
064f1df98f Remove MBEDTLS_ARIA_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:51 +01:00
Thomas Daubney
e9fe311ea6 Remove MBEDTLS_CAMELLIA_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:34 +01:00
Thomas Daubney
c7cb810c22 Remove MBEDTLS_GCM_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:07 +01:00
Thomas Daubney
b4914cfeb5 Remove MBEDTLS_CCM_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:04 +01:00
Thomas Daubney
4137609776 Remove MBEDTLS_AES_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:13:37 +01:00
Bence Szépkúti
3f2d9b6a4d
Merge pull request #9268 from tom-daubney-arm/remove_symmetric_crypto_alt_interface
Remove symmetric crypto alt interface
2024-07-12 13:27:04 +00:00
Wenxing Hou
b4d03cc179 Fix some typo for include folder
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
2024-07-12 15:16:33 +08:00
Elena Uziunaite
4e6a3681e1 Replace MBEDTLS_MD_CAN_SHA256 in md.h, ssl.h, and entropy.h
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-11 11:13:35 +03:00
Thomas Daubney
f60ff02cf3 Remove MBEDTLS_CHACHA20_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-11 09:13:28 +01:00
Thomas Daubney
af28a17bb6 Remove MBEDTLS_CHACHAPOLY_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-11 09:13:28 +01:00
Thomas Daubney
f7ca94aea6 Remove MBEDTLS_POLY1305_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-11 09:13:28 +01:00
Thomas Daubney
9da1769237 Remove MBEDTLS_ECP_ALT and associated options
Also removed are all options of the form
MBEDTLS_ECP_XXX_ALT as well as
MBEDTLS_ECP_NO_FALLBACK.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-05 14:35:10 +01:00
Thomas Daubney
e647d8f77a Remove MBEDTLS_ECJPAKE_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-05 14:35:10 +01:00
Thomas Daubney
5edad7f89f Remove MBEDTLS_DHM_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-05 14:35:10 +01:00
Thomas Daubney
f47b66eca5 Remove MBEDTLS_RSA_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-05 14:35:10 +01:00
Elena Uziunaite
cf5e3dd9f0 Replace MBEDTLS_MD_CAN_SHA384 in md.h and ssl.h
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-03 10:20:48 +01:00
Ronald Cron
550a18d4d6 Move Mbed TLS crypto headers
Move all the header files (roughly the crypto
and platform ones) necessary to build the
crypto library to
tf-psa-crypto/drivers/builtin/include/mbedtls.

Exceptions:
. some configuration related files that will not
be necessary anymore when the work on the
configuration file(s) is completed.
. build_info.h as TF-PSA-Crypto will have its
own when we had its CMake build system.

For the time being all headers are kept public
but eventually all headers in
tf-psa-crypto/drivers/builtin/include/mbedtls
will be private and the ones that remain
public (e.g. lms.h, pk.h probably ...) will be
moved to tf-psa-crypto/include/tf-psa-crypto/.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-01 14:59:35 +02:00
Ronald Cron
f0481f562a
Merge pull request #9258 from tom-daubney-arm/drop_padlock_support
Drop support for VIA Padlock
2024-06-26 07:36:04 +00:00
Thomas Daubney
4e5d183d78 Correct pluralisation errors in comments
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-25 15:21:48 +01:00
Manuel Pégourié-Gonnard
82658eb90c
Merge pull request #9138 from valeriosetti/issue9126
Do not perform adjustments on legacy crypto from PSA, when MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
2024-06-24 07:30:32 +00:00
Thomas Daubney
0d915a90ea Remove final references to padlock
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-20 16:45:51 +01:00
Ronald Cron
de0d7e6cd0
Merge pull request #9247 from ronald-cron-arm/move-psa-headers
Move PSA headers to a new tf-psa-crypto directory
2024-06-18 18:48:24 +00:00
Valerio Setti
0c0e418d63 config_psa: do not update legacy symbols in client-only PSA build
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-14 16:44:12 +02:00
Thomas Daubney
62af02c063 Drop support for VIA Padlock
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-14 10:37:13 +01:00
Ronald Cron
2581d91fda Adapt libraries installation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13 09:02:30 +02:00
Ronald Cron
d80134b56d Move PSA headers
Move PSA headers to tf-psa-crypto
directory.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-12 15:22:26 +02:00
Sam Berry
3504c88916 Fix incorrect array length in function prototype
Issue #9179 (MBEDTLS_SSL_CID_OUT_LEN_MAX changed to
MBEDTLS_SSL_CID_IN_LEN_MAX in library\ssl.h and library\ssl_tls.c)

Signed-off-by: Sam Berry <sam.berry@arm.com>
2024-06-11 14:46:31 +01:00
Tom Cosgrove
98ffc8e7c3
Merge pull request #9178 from valeriosetti/fix-psa-cmac
adjust_legacy_crypto: enable CIPHER_C when PSA CMAC is builtin
2024-06-03 15:35:32 +00:00
Valerio Setti
351efa0ece crypto.h: fix documentation for some functions
Some functions has input parameters which are erroneously
reported as "param[out]" in the documentation. This commit
fixes them.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-03 11:17:37 +02:00
Gilles Peskine
c8d45cd3fc Error on unexpectedly defined symbols
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-29 09:44:20 +02:00
Gilles Peskine
9df7806b37 Tweak wording
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-29 09:44:20 +02:00
Gilles Peskine
690fb5e0b0 Warn if mbedtls_config.h is included manually
Some projects using Mbed TLS have migrated their configuration
file (config.h -> mbedtls_config.h, or MBEDTLS_CONFIG_FILE) from Mbed TLS
2.x, and kept including check_config.h. This is unnecessary since Mbed TLS
3.0, and increasingly in 3.x it may report spurious errors because the
configuration adjustments have not been done yet.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-29 09:44:20 +02:00
Gilles Peskine
0b8ece6beb Error out if *adjust* headers are included manually
Some projects using Mbed TLS have migrated their configuration
file (config.h -> mbedtls_config.h, or MBEDTLS_CONFIG_FILE) from Mbed TLS
2.x, and kept including check_config.h. This is unnecessary since Mbed TLS
3.0, and increasingly in 3.x it may report spurious errors because the
configuration adjustments have not been done yet. This has led some
projects to include configuration adjustment headers manually, but only
partially or in the wrong order, which can result in silent inconsistencies.
Error out if this happens, with a message mentioning check_config.h since
that's the likely root cause.

```
perl -i -pe '$name = $ARGV; $name =~ s!include/!!; $name =~ s!_adjust_.*!_adjust_*.h!; $_ .= "\n#if !defined(MBEDTLS_CONFIG_FILES_READ)\n#error \"Do not include $name manually! This can lead to problems, \" \\\n    \"up to and including runtime errors such as buffer overflows. \" \\\n    \"If you're trying to fix a complaint from check_config.h, just remove it \" \\\n    \"from your configuration file: since Mbed TLS 3.0, it is included \" \\\n    \"automatically at the right time.\"\n#endif /* !MBEDTLS_CONFIG_FILES_READ */\n" if /^#define .*_H$/' include/*/*adjust*.h
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-29 09:44:20 +02:00
Gilles Peskine
d33eb55cce Macros to indicate the finalization level of the configuration
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-29 09:44:20 +02:00
Gilles Peskine
975e74cb1f Document check-config.h and *adjust*.h as internal headers
Including *adjust*.h directly is likely to cause them to be applied at the
wrong time, resulting in an invalid or unintended configuration.

Including check_config.h at the wrong time is likely to cause spurious
errors.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-29 09:44:20 +02:00
Valerio Setti
a37ea269a9 adjust_legacy_crypto: enable CIPHER_C when PSA CMAC is builtin
psa_crypto_mac.c uses mbedtls_cipher_xxx() functions to perform
CMAC operations. Therefore we need to enable CIPHER_C when
PSA CMAC is builtin.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-24 14:37:05 +02:00
Ronald Cron
b48c8704e6 Fix crypto_adjust_config_dependencies.h documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:34:11 +02:00