Jerry Yu
fe38e948b8
Add changelog entry for anti_replay_fail
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-21 09:58:18 +08:00
Jerry Yu
cebffc3446
change time unit of ticket to milliseconds
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-21 09:58:18 +08:00
Gilles Peskine
8b1a124126
Merge pull request #8438 from yuhaoth/pr/disable-stdout-for-config-query-call
...
Disable stdout in require_*_configs_* functions
2023-11-20 18:27:03 +00:00
Valerio Setti
d0eebc1f94
ccm/gcm: improve code maintainability
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-20 15:17:53 +01:00
Gilles Peskine
885bcfc9d0
Merge pull request #7649 from yuhaoth/pr/add-command-for-server9-bad-saltlen
...
Add command for server9-bad-saltlen
2023-11-20 14:07:19 +00:00
Gilles Peskine
473ff34d59
Merge pull request #8489 from valeriosetti/issue8482
...
Make CCM* and CCM independent
2023-11-20 14:07:14 +00:00
Gilles Peskine
6267dd59c8
Merge pull request #8463 from gilles-peskine-arm/metatest-create
...
Create a metatest program
2023-11-20 14:07:08 +00:00
Manuel Pégourié-Gonnard
a4e7953f59
Merge pull request #8527 from lpy4105/issue/6324/driver-only-cipher+aead-tls-compat
...
[G3] Driver-only cipher+aead: TLS: compat.sh
2023-11-20 09:37:06 +00:00
Ronald Cron
97137f91b6
Merge pull request #7071 from yuhaoth/pr/tls13-ticket-add-max_early_data_size-field
...
TLS 1.3 EarlyData: add `max_early_data_size` field for ticket
2023-11-20 08:04:57 +00:00
BrianX7c
5c7ab6fe86
[cipher.h] Arithmetic overflow in binary left shift operation (MBEDTLS_KEY_BITLEN_SHIFT)
...
Fixing arithmetic overflow warning (C6297), if compiled in Visual Studio
Signed-off-by: BrianX7c <151365853+BrianX7c@users.noreply.github.com>
2023-11-18 11:07:37 +01:00
Valerio Setti
dd426da7b8
added changelog
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-17 08:33:31 +01:00
Thomas Daubney
dd2a09a22b
Introduce demo script for PSA hash program
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-16 18:45:55 +00:00
Thomas Daubney
13ecb691a3
Introduce function to return library/core directory
...
Add crypto_core_directory in build_tree.py so that
the libary/core directory can be returned based
on what repository we are in.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-16 18:34:58 +00:00
Matthias Schulz
70595f7983
Explicitly indicating when private fields are accessed in benchmark.c.
...
Signed-off-by: Matthias Schulz <mschulz@hilscher.com>
2023-11-16 17:43:58 +01:00
Paul Elliott
9e25936241
Rename mutex->is_valid to mutex->state
...
Rename struct member to make it more representative of its current use.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-16 15:14:16 +00:00
Paul Elliott
3774637518
Make threading helpers tests thread safe
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-16 15:13:49 +00:00
Paul Elliott
5fa986c8cb
Move handling of mutex->is_valid into threading_helpers.c
...
This is now a field only used for testing.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-16 15:13:05 +00:00
Gilles Peskine
2f40cc05f0
Improve explanations of what bad thing a metatest does
...
Especially clarify the situation with respect to mutex usage.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:13:38 +01:00
Gilles Peskine
ad2a17eb60
Uniformly use MBEDTLS_THREADING_C guards
...
Since the code compiles with MBEDTLS_THREADING_C, not just with
MBEDTLS_THREADING_PTHREAD, use MBEDTLS_THREADING_C as the guard. The runtime
behavior is only as desired under certain conditions that imply
MBEDTLS_THREADING_PTHREAD, but that's fine: no metatest is expected to pass
in all scenarios, only under specific build- and run-time conditions.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-16 15:09:48 +01:00
Ryan Everett
975d411d92
Only set slot to OCCUPIED on successful key loading
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-11-16 13:37:51 +00:00
Valerio Setti
9b7a8b2a0c
ccm/gcm: reaplace CIPHER_C functions with BLOCK_CIPHER_C ones
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-16 11:48:00 +01:00
Yanray Wang
19e4dc8df7
tls: fix unused parameter in mbedtls_ssl_cipher_to_psa
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-16 18:05:51 +08:00
Valerio Setti
8db46e4ee1
check_config: remove dependency check of CCM_C/GCM_C on CIPHER_C
...
CCM_C/GCM_C can now work with either (in order of preference) CIPHER_C
or BLOCK_CIPHER_C and the latter is auto-enabled in case the former
is not enabled. As a consequence there is no need to enforce the
dependency on CIPHER_C.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-16 10:58:27 +01:00
Valerio Setti
dbfd6a9f62
adjust_legacy_crypto: auto-enable BLOCK_CIPHER_C when CIPHER_C is not defined
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-16 10:56:00 +01:00
Pengyu Lv
7afd9a4663
Change the test messages
...
We are now testing driver-only cipher+aead with full config.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-16 17:55:25 +08:00
Yanray Wang
4ed8691f6d
ssl: move MBEDTLS_SSL_HAVE_XXX to config_adjust_legacy_crypto.h
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-16 15:20:57 +08:00
Valerio Setti
59de2ae6de
all.sh: re-enable CCM/GCM in test_full_no_cipher()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-16 08:20:27 +01:00
Yanray Wang
1a369d68aa
ssl_tls: add missing guard for mbedtls_ssl_cipher_to_psa
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-16 15:17:33 +08:00
Pengyu Lv
c5d4c46983
Add missing PSA init
...
EC might be supported through PSA, so use `MD_OR_USE_PSA_INIT`
in pk_parse_{public_}keyfile_ec.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-16 09:07:28 +08:00
Thomas Daubney
5556f908cb
Rename variables in script
...
Rename some variables in generate_driver_wrappers.py
now that the script has to work in two repositories
as opposed to just mbed tls.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-15 16:50:23 +00:00
Gilles Peskine
e7fc8a232f
Readability improvement
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-15 16:56:26 +01:00
Manuel Pégourié-Gonnard
dc848955d6
Merge pull request #8519 from mpg/block-cipher
...
[G2] Add internal module block_cipher
2023-11-15 11:53:22 +00:00
Gilles Peskine
4ebccc0396
Update PSA init for md-ligt
...
Also initialize PSA in builds where hashes are PSA-only, for the sake of
encrypted keys (otherwise PBKDF fails).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-15 11:04:30 +01:00
Gilles Peskine
799befd58e
Update to TEST_EQUAL macros for easier debuggability
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-15 11:04:23 +01:00
Pengyu Lv
f561ed8b3a
all.sh: enable compat.sh testing in psa_crypto_config_[accel/reference]_cipher_aead
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-15 17:42:55 +08:00
Manuel Pégourié-Gonnard
9e80a91f27
Merge pull request #8164 from yanrayw/adjust_tfm_configs
...
Adjust how we handle TF-M config files
2023-11-15 08:21:27 +00:00
Valerio Setti
776981ba42
psa_exercise_key: add missing #else for KNOWN_SUPPORTED_BLOCK_CIPHER
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
5e378d70e6
ssl_misc: remove DES from the list of key types supporting CBC
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
4809057ddf
changelog: use better wording and modify changelog section
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
a50b89ebab
all.sh: disable CCM_STAR_NO_TAG in test_psa_crypto_config_accel_aead()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
951faf6e7b
ChangeLog: add change log for CCM/CCM* coupling removal
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
a4b60593c1
psa_exercise_key: replace legacy symbols with PSA_WANT ones
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
ff2b06a235
all.sh: improve components for without CCM/CCM*
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
a56eb46ce6
adjust_legacy_from_psa: fix comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
a765eaa33e
test_driver_extension: fix acceleration support for CCM and CCM*
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:18:14 +01:00
Valerio Setti
51d5b196a1
all.sh: accelerate also CCM* in test_psa_crypto_config_accel_cipher_aead
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:16:46 +01:00
Valerio Setti
bdfecb6a83
all.sh: add test components for no-CCM and no-CCM*
...
The idea is to show that there is no more any dependency between
the two symbols:
- component_test_full_no_ccm() keeps ALG_CCM_STAR_NO_TAG enabled,
disables ALG_CCM and ensures that the latter does not get
re-enabled accidentally
- test_full_no_ccm_star_no_tag() keeps ALG_CCM enabled and disables
ALG_CCM_STAR_NO_TAG and ensures that the latter does not get
re-enabled accidentally
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:16:37 +01:00
Valerio Setti
c2d68f5611
adjust_legacy_from_psa: treat CCM and CCM* separately
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:16:37 +01:00
Valerio Setti
cab5eff98c
adjust_config_synonyms: make CCM and CCM* indipendent
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-15 09:16:37 +01:00
Jerry Yu
fedaeb21b3
improve document
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-15 13:59:07 +08:00