Commit graph

28655 commits

Author SHA1 Message Date
Valerio Setti
4577bda6d5 pkcs[5|12]: use cipher enums for encrypt and decrypt
Instead of re-defining MBEDTLS_PKCS5_[EN/DE]CRYPT and
MBEDTLS_PKCS12_PBE_[EN/DE]CRYPT from scratch, since these values
are to be used with the mbedtls_cipher_setkey() function, ensure
that their value matches with enums in cipher.h.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-01 16:51:24 +01:00
Yanray Wang
744577a429 tls13: early_data: cli: check a PSK has been selected in EE
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-12-01 23:03:37 +08:00
Dave Rodgman
f1be1f6740 Remove unused code
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-01 13:53:45 +00:00
Oldes Huhuman
304fa091cf Shortening a comment line
Related to: https://github.com/Mbed-TLS/mbedtls/issues/8562

Signed-off-by: Oldes Huhuman <oldes.huhuman@gmail.com>
2023-12-01 12:23:26 +01:00
Thomas Daubney
99030e2a50 Remove trailing whitespace
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-12-01 09:52:35 +00:00
Yanray Wang
9ae6534c20 tls13: early_data: cli: improve comment
This commit improves comment of why we assign the identifier of the
ciphersuite in handshake to `ssl->session_negotiate`.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-12-01 17:46:08 +08:00
Yanray Wang
03a00768c0 tls13: early_data: cli: improve comment
This commit improves comment of the check for handshake parameters
in Encrypted Extension.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-12-01 17:40:21 +08:00
Jerry Yu
0af63dc263 improve comments and output message
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 17:18:04 +08:00
Jerry Yu
ee4d729555 print received early application data
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:53:50 +08:00
Jerry Yu
e96551276a switch inbound transform to handshake
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:53:50 +08:00
Jerry Yu
75c9ab76b5 implement parser of eoed
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:53:50 +08:00
Jerry Yu
b4ed4602f2 implement coordinate of eoed
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:34:00 +08:00
Jerry Yu
d5c3496ce2 Add dummy framework of eoed state
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:32:31 +08:00
Jerry Yu
59d420f17b empty process_end_of_early_data
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:30:34 +08:00
Ronald Cron
857d29f29a
Merge pull request #8528 from yanrayw/issue/6933/parse-max_early_data_size
TLS1.3 EarlyData: client: parse max_early_data_size
2023-12-01 08:27:26 +00:00
Jerry Yu
9b72e39701 re-introduce process_wait_flight2
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:27:08 +08:00
Jerry Yu
e32fac3d23 remove wait_flight2 state
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-12-01 16:25:16 +08:00
Dave Rodgman
422951b9ed
Merge pull request #8044 from daverodgman/msft-aarch64
Better support for MSVC aarch64 aka ARM64 and ARM64EC
2023-12-01 07:48:26 +00:00
Yanray Wang
e72dfff1d6 tls13: early_data: cli: improve comment
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-12-01 12:05:16 +08:00
Yanray Wang
2bef7fbc8d tls13: early_data: cli: remove guard to fix failure
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-12-01 12:02:56 +08:00
Thomas Daubney
db80b2301c Introduce guess_tf_psa_crypto_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 17:33:54 +00:00
Thomas Daubney
d1f2934e78 Introduce guess_mbedtls_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 17:27:42 +00:00
Thomas Daubney
56bee0344e Rename variable for better clarity
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 14:33:35 +00:00
Thomas Daubney
46588de8fc Improve documentation of crypto_core_directory
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 13:59:30 +00:00
Thomas Daubney
08c6dc4942 Rename project_crypto_name
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 13:56:09 +00:00
Dave Rodgman
059f66ce7c Remove redundant check
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-30 11:02:03 +00:00
Dave Rodgman
6eee57bc07 Merge remote-tracking branch 'origin/development' into msft-aarch64
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-30 11:01:50 +00:00
Dave Rodgman
12d1c3ad4f Use MBEDTLS_HAVE_NEON_INTRINSICS in aesce
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-30 09:38:38 +00:00
Dave Rodgman
d879b47b52 tidy up macros in mbedtls_xor
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-30 09:35:14 +00:00
Dave Rodgman
59059ec503 Merge remote-tracking branch 'origin/development' into msft-aarch64
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-30 09:34:41 +00:00
Yanray Wang
b3e207d762 tls13: early_data: cli: rename early_data parser in nst
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-30 16:49:51 +08:00
Yanray Wang
0790041dc6 Revert "tls13: early_data: cli: remove nst_ prefix"
This reverts commit 3781ab40fb.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-30 16:44:44 +08:00
Dave Rodgman
10dfe76425
Merge pull request #8573 from daverodgman/iar-aesce2
Disable hw AES on Arm for IAR
2023-11-30 08:22:09 +00:00
Yanray Wang
f4bad42670 itls13: early_data: cli: improve comment
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-30 15:58:07 +08:00
Yanray Wang
a29db7da2e tls13: early_data: cli: assign ciphersuite properly
When early_data extension is enabled and sent in ClientHello,
the client does not know if the server will accept early data
and select the first proposed pre-shared key with a ciphersuite
that is different from the ciphersuite associated to the selected
pre-shared key. To address aforementioned case, we do associated
verification when parsing early_data ext in EncryptedExtensions.
Therefore we have to assign the ciphersuite in current handshake
to session_negotiate later than the associated verification.
This won't impact decryption of EncryptedExtensions since we
compute handshake keys by the ciphersuite in handshake not via
the one in session_negotiate.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-30 14:27:38 +08:00
Dave Rodgman
f5e46fd45c
Merge pull request #8535 from daverodgman/update-tfm
Adjust to match current TF-M config
2023-11-29 16:14:06 +00:00
Gilles Peskine
18eab984c7
Merge pull request #8560 from lpy4105/issue/8423/optimize-analyze_outcomes_py
Optimize analyze_outcomes.py
2023-11-29 14:51:41 +00:00
Janos Follath
c6f1637f8c
Merge pull request #8534 from paul-elliott-arm/fix_mutex_abstraction
Make mutex abstraction and tests thread safe
2023-11-29 13:26:23 +00:00
Dave Rodgman
fb96d800ab
Merge pull request #8569 from yuhaoth/pr/fix-warning-on-arm64-gcc-5.4
fix build warning with arm64 gcc 5.4
2023-11-29 11:52:18 +00:00
Gilles Peskine
172c0b930f
Merge pull request #8561 from ronald-cron-arm/fix-ciphersuites-list-in-ssl-opt
ssl-opt.sh: Fix getting the list of supported ciphersuites.
2023-11-29 11:31:33 +00:00
Pengyu Lv
5dcfd0c613 Some improvements
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-29 18:03:28 +08:00
Dave Rodgman
51e72456f9 Automatically set MBEDTLS_NO_PLATFORM_ENTROPY in TF-M config
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-29 09:44:44 +00:00
Dave Rodgman
e4cf9b6f95 Move MBEDTLS_BLOCK_CIPHER_NO_DECRYPT to correct section
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-29 09:43:20 +00:00
Dave Rodgman
2d9b7d491a Remove references to 3.4
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-29 09:42:44 +00:00
Manuel Pégourié-Gonnard
6b5cedf51f
Merge pull request #8547 from valeriosetti/issue8483
[G2] Make PSA-AEAD work with cipher-light
2023-11-29 08:53:42 +00:00
Jerry Yu
92787e42c4 fix wrong gcc version check
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-29 16:30:38 +08:00
Jerry Yu
e743aa74b5 add non-gcc arm_neon support
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-29 15:54:32 +08:00
Jerry Yu
d33f7a8c72 improve document
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-29 15:09:21 +08:00
Jerry Yu
71fada10e5 Guards neon path
Old GCC(<7.3) reports warning in NEON path

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-29 10:38:07 +08:00
Jerry Yu
5b96b81980 Revert "fix build warning with arm64 gcc 5.4"
This reverts commit da3c206ebd.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-29 10:25:00 +08:00