Commit graph

27928 commits

Author SHA1 Message Date
Tom Cosgrove
257f6dd57d Fix builds in conda-forge, which doesn't have CLOCK_BOOTTIME
Fixes #8422

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-10-26 14:04:34 +01:00
Janos Follath
a365efc6f1 Threading design: fix internal links
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-26 10:22:55 +01:00
Ronald Cron
95b735530c
Merge pull request #6719 from yuhaoth/pr/tls13-early-data-add-early-data-of-client-hello
TLS 1.3: EarlyData SRV: Add early data extension parser.
2023-10-26 08:31:53 +00:00
Gilles Peskine
5d055f8206
Merge pull request #7844 from mpg/ssl-progs-usage
Fix usage & error reporting in SSL programs
2023-10-26 08:19:25 +00:00
Valerio Setti
507e08f9af analyze_outcomes: update cipher/aead data
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-26 10:05:01 +02:00
Valerio Setti
bbc46b4cc2 cipher: improve code readibility in mbedtls_cipher_setup()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-26 09:00:21 +02:00
Gilles Peskine
cc2bbfe905 Fix invocation with explicit .datax file
Don't chdir when invoking a test suite executable with an explicit .datax
file. The point of the chdir is to automatically find the .datax file (and
the relative location of the data_files directory) in typical cases. This
conflicts with the expectation that passing a relative path to a .datax file
will work.

(This is what I had originally intended, and what is documented in the
comment, but I forgot to add the argc check in the initial commit.)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:45:50 +02:00
Gilles Peskine
bf3c3fa122 Define try_chdir everywhere
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:43:10 +02:00
Dave Rodgman
d1c4fb07ee Support older IAR versions
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-25 15:07:35 +01:00
Valerio Setti
ad8b7f0306 all.sh: accelerate ALG_[STREAM_CIPHER/ECB_NO_PADDING] in accel_cipher_aead()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:39:50 +02:00
Valerio Setti
97454fde54 all.sh: accelerate CMAC in test_psa_crypto_config_accel_cipher_aead()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:27:12 +02:00
Valerio Setti
3b1559060a test_suite_psa_crypto: replace builtin dependencies with PSA_WANT
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
9d9b4b547f test_suite_cipher: use TEST_ASSUME() to evaluate supported ciphers
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
5cd18f9150 analyze_oucomes.py: ignore line-too-long error for skipped tests
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
b680fc4f0b all.sh: add a common configuration function for accel/reference components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
93941440c1 all.sh: keep PKCS5/12 enabled in the reference component
This commit also add proper "ignore" fields to the "analyze_outcomes.py"
script.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
29bcd01cf3 all.sh: move [accel/reference]_cipher_aead to crypto_full
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
79a02de79f cipher: check that ctx_alloc_func is not NULL before calling it
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
a6c0761c43 cipher_wrap: fix guards for GCM/CCM AES
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
e86677d0c3 pkparse: fix missing guards for pkcs5/12 functions
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
58d2b1aff2 all.sh: fix minor issues
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
7448cee8f0 analyze_outcomes.py: skip tests that depends on builtin features
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
d3bdccc063 test_suite_cipher: successfully quit test if no cipher is supported
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Valerio Setti
b6b301fa8d test: add component accelerating both ciphers and AEADs
This also adds a new task in analyze_outcomes.py for checking
the accelaration coverage against the reference element.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-25 12:03:36 +02:00
Dave Rodgman
d69d3cda34
Merge pull request #8298 from daverodgman/sha-armce-thumb2
Support SHA256 acceleration on Armv8 thumb2 and arm
2023-10-24 21:23:15 +00:00
Dave Rodgman
f842868dd9 Fix MBEDTLS_MAYBE_UNUSED for IAR
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-24 14:18:38 +01:00
Manuel Pégourié-Gonnard
a675ef8537
Merge pull request #8368 from valeriosetti/issue8315
Clarify driver handling of ALG_STREAM and ALG_ECB
2023-10-24 07:32:12 +00:00
Dave Rodgman
514590210b Merge remote-tracking branch 'origin/development' into sha-armce-thumb2
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-23 15:35:07 +01:00
Paul Elliott
6c68df4155 Convert interruptible test over to using TEST_CALLOC
Also fix potential leak in unlikely edge case.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-10-23 15:33:37 +01:00
Dave Rodgman
66d5512571 Remove dependency on asm/hwcap.h
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-23 15:12:32 +01:00
Dave Rodgman
bcb810252c
Merge pull request #8363 from daverodgman/iar-fixes-2
Stop IAR warning about goto skipping variable definition
2023-10-23 14:59:15 +01:00
Valerio Setti
0244fbbf28 all.sh: accelerate ALG_ECB_NO_PADDING in test_psa_crypto_config_accel_cipher()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-23 15:07:43 +02:00
Valerio Setti
221d8aa8e7 libtestdriver1: fix acceleration for ALG_STREAM_CIPHER/ALG_ECB_NO_PADDING
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-23 15:06:30 +02:00
Valerio Setti
91adb41a8c all.sh: remove fixes in test components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-23 15:05:59 +02:00
Valerio Setti
bd24d95c27 legacy_from_psa: fix support for PSA_ACCEL_ALG_[STREAM_CIPHER/ECB_NO_PADDING]
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-23 15:01:52 +02:00
Tom Cosgrove
235e361b6c
Merge pull request #8339 from lpy4105/issue/support-cpuid-for-win32
Support cpuid for win32
2023-10-23 10:43:39 +00:00
Janos Follath
54bd71b40f Update operation threading strategy
The library does not need to provide protection, leave it to the crypto
service.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-23 10:30:50 +01:00
Janos Follath
e604269a59 Threading Design: emphasise performance requirement
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-23 10:16:58 +01:00
Janos Follath
23f7e41633
Threading design: improve language
Co-authored-by: Paul Elliott <62069445+paul-elliott-arm@users.noreply.github.com>
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-23 10:11:18 +01:00
Manuel Pégourié-Gonnard
2bf0870e25
Merge pull request #7861 from mpg/cleanup-pk-parse
cleanup PK parse - part 1
2023-10-23 08:49:16 +00:00
Manuel Pégourié-Gonnard
85d1390777
Merge pull request #8346 from yanrayw/issue8314/accel_cipher_cmac
Driver status of CMAC: accelerate CMAC in accel_cipher
2023-10-23 08:41:17 +00:00
Jerry Yu
53a332d970 fix various issues
- rename file name from `early_data.txt` to `tls13_early_data.txt`
- fix typo issue
- remove redundant parameter

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-23 13:52:56 +08:00
Paul Elliott
078edc205d Add missing exit labels to MPS tests
Coverity flagged this due to the potential leaked memory allocations in
mbedtls_mps_reader_random_usage()

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-10-20 19:14:46 +01:00
Janos Follath
49d467c37d Threading design: update and clarify 3.6 plan
- Separation of attr and slot state is added
- Driver support is cut back

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 15:41:40 +01:00
Janos Follath
de0e3e352d Threading design: Update empty slot tracking
Using a dedicated field allows clean separatin between key attributes
and slot state. This allows us to use the same mechanics for attributes
and key content. Which in turn means lower code size and easier
maintenance.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 15:12:42 +01:00
Janos Follath
52586895f7 Clarify threading design document structure
Separate design analysis from plans and make the distinction clear
between what is implemented, what is planned to be implemented soon,
what is planned to be implemented in the future, and what is ideas that
are rejected.

(The distinction between the last two categories doesn't have to be
clear, we can't and shouldn't plan that far ahead.)

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 14:26:57 +01:00
Janos Follath
19192a5158 Clarify reentrancy requirements for drivers
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 13:16:48 +01:00
Manuel Pégourié-Gonnard
3af2eb2919
Merge pull request #8393 from mpg/fix-ssl-opt-psa-deps
Fix some dependencies in ssl-opt.sh
2023-10-19 12:41:48 +00:00
Manuel Pégourié-Gonnard
22334a202a Fix some dependencies in ssl-opt.sh
These are explicitly PSA tests, so use PSA_WANT.

Was missed by analyze_outcomes.py because those test cases were not
listed properly, which will be fixed by #8088.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-19 11:27:33 +02:00
Pengyu Lv
d2d3d6374e Reword the changelog entry
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 16:50:45 +08:00