Ronald Cron
41bc42ac1b
ssl-opt.sh: Fix some symmetric crypto dependencies
...
Fix some dependencies on symmetric crypto that
were not correct in case of driver but not
builtin support. Revealed by "Analyze driver
test_psa_crypto_config_accel_cipher_aead vs reference
test_psa_crypto_config_reference_cipher_aead" in
analyze_outcomes.py.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-11-28 15:59:40 +01:00
Ronald Cron
5b73de8ddb
ssl-opt.sh: Add a check of the list of supported ciphersuites
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-11-28 15:59:03 +01:00
Dave Rodgman
410ad44725
Disable hw AES on Arm for IAR
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-28 13:42:17 +00:00
Tom Cosgrove
9e1d2e5727
Merge pull request #8029 from gilles-peskine-arm/fix-MBEDTLS_HAS_MD5_VIA_LOWLEVEL_OR_PSA
...
Update old dependency to MBEDTLS_MD_CAN
2023-11-28 13:12:10 +00:00
Valerio Setti
919e3fa729
check_config: fix guards for PSA builtin implementation of cipher/AEAD
...
While the PSA builtin implementation of cipher still depends on
CIPHER_C, the same is no more true for AEADs. When CIPHER_C is not
defined, BLOCK_CIPHER_C is used instead, thus making it possible
to support AEADs without CIPHER_C.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-28 11:45:38 +01:00
Valerio Setti
b1cf8aeda4
adjust_psa_from_legacy: add required CIPHER_C dependencies
...
Some PSA_WANT symbols do not have a 1:1 matching with legacy ones.
For example, previous to this commit:
- CCM_C enabled both PSA_WANT_ALG_CCM and PSA_WANT_ALG_CCM_STAR_NO_TAG
even thought the two are not equivalent (authenticated VS
non-authenticated).
- there was no legacy equivalent for ECB_NO_PADDING
What it is common to both PSA_WANT_ALG_CCM_STAR_NO_TAG and
PSA_WANT_ALG_ECB_NO_PADDING is the fact that the builtin implementation
depends on CIPHER_C. Therefore this commits adds this guards to
select whether or not to enable the above mentioned PSA_WANT symbols.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-28 11:45:38 +01:00
Valerio Setti
6632a12fa3
all.sh: re-enable CCM/GCM in test_full_no_cipher_with_crypto[_config]()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-11-28 11:45:38 +01:00
Dave Rodgman
4edcf693e7
Use latest TF-M config with bare-minimum changes
...
Move all changes local to Mbed TLS into config-tfm.h (except for commenting
out a couple of #include's).
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-28 10:15:52 +00:00
Dave Rodgman
a326eb990d
We no longer need to undef ALT defines
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-28 10:15:52 +00:00
Dave Rodgman
be5489ae98
Simplify test for building P256-M
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-28 10:15:37 +00:00
Dave Rodgman
897bb77c0c
Update tf-m tests in all.sh for P256-M
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-28 10:15:11 +00:00
Pengyu Lv
451ec8a4bc
Add comment to read_outcome_file in analyze_outcomes.py
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 17:59:05 +08:00
Pengyu Lv
c2e8f3a080
Add type annotations to analyze_outcomes.py
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 17:22:04 +08:00
Manuel Pégourié-Gonnard
11c3fd1f73
Merge pull request #8568 from yanrayw/issue/8356/block_cipher_no_decrypt_cleanup
...
Driver-only: G1: clean up for BLOCK_CIPHER_NO_DECRYPT
2023-11-28 08:49:48 +00:00
Manuel Pégourié-Gonnard
294f5d7ea9
Merge pull request #8540 from valeriosetti/issue8060
...
[G2] Make CCM and GCM work with the new block_cipher module
2023-11-28 08:18:45 +00:00
Pengyu Lv
20e3ca391e
Run tests for ref_vs_driver outside task function
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 15:30:03 +08:00
Jerry Yu
da3c206ebd
fix build warning with arm64 gcc 5.4
...
GCC 5.4 reports below warning on Arm64
```
warning: 'vst1q_u8' is static but used in inline function 'mbedtls_xor' which is not static
```
This inline function miss `static`, others have the keyword
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-11-28 14:28:03 +08:00
Pengyu Lv
18908ec276
Define named tuple for component outcomes
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 13:04:11 +08:00
Pengyu Lv
28ae4648a6
Use mutable set all the time
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 11:35:19 +08:00
Pengyu Lv
59b9efc6dd
Check if driver_component is missing
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 11:15:00 +08:00
Pengyu Lv
f28cf594b1
Break the loop when case hits
...
We don't care about the number of hits of the test cases,
so break the iteration when the case hits.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 10:56:29 +08:00
Pengyu Lv
dd1d6a7cca
Improve readability of the script
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 10:52:25 +08:00
Pengyu Lv
a1ddcfaef8
Extend the pattern of pkparse test on encrypted keys
...
These test cases are ignored when analyzing outcomes on
analyze_driver_vs_reference_cipher_aead task.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-11-28 09:46:01 +08:00
Pengyu Lv
6c927c0795
Merge branch 'development' into review/gilles/update-old-dep-MD_CAN
2023-11-28 09:31:44 +08:00
Gilles Peskine
150002c9f9
Skip calloc overallocation test case
...
This test case is incompatible with sanitizers (e.g. ASan), and thus
skipped. If the driver component uses a sanitizer but the reference
component doesn't, we have a PASS vs SKIP mismatch. Since this test case is
unrelated to drivers, we don't mind ignoring it.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-27 18:24:45 +01:00
Tom Cosgrove
12d8b8eaba
Merge pull request #8539 from tom-daubney-arm/add_test_script_psa_hash
...
Add Demo Script for PSA Hash Program
2023-11-27 12:13:18 +00:00
Dave Rodgman
4e9d5aa2ba
Merge pull request #8515 from mschulz-at-hilscher/fixes/pragma-error-gcc452
...
Fix compiler error on gcc 4.5.2.
2023-11-27 11:28:30 +00:00
Dave Rodgman
9fbac381e6
Merge pull request #8326 from daverodgman/aesce-thumb2
...
Support hw-accelerated AES on Thumb and Arm
2023-11-27 09:58:58 +00:00
Yanray Wang
6f6090d19b
tf-m config: update and enable BLOCK_CIPHER_NO_DECRYPT
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-27 15:55:04 +08:00
Yanray Wang
16b00f9522
mbedtls_config: improve documentation for BLOCK_CIPHER_NO_DECRYPT
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-27 15:52:28 +08:00
Paul Elliott
392ed3fe7f
Add better documentation for mbedtls_test_mutex_mutex
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-24 15:48:28 +00:00
Dave Rodgman
c94f8f1163
Merge pull request #8551 from daverodgman/sign-conversion-part1
...
Sign conversion part 1
2023-11-24 15:12:00 +00:00
Thomas Daubney
e8f3789312
Revert change that removed in_tf_psa_crypto_repo variable
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 11:41:23 +00:00
Dave Rodgman
a3b80386d9
Merge remote-tracking branch 'origin/development' into sign-conversion-part1
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-24 11:27:18 +00:00
Thomas Daubney
6130a619f8
Remove unused variable
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 10:58:07 +00:00
Thomas Daubney
fc60e9b7bf
Make function calls consistent
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 10:56:04 +00:00
Thomas Daubney
cdbf2fd644
Add documentation for new public functions
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 10:54:56 +00:00
Thomas Daubney
beec452e3c
Use os.path.join in crypto_core_directory
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 10:48:44 +00:00
Janos Follath
905409abe2
Merge pull request #8500 from Ryan-Everett-arm/8409-make-empty-key-slots-explicit
...
Make empty key slots explicit
2023-11-24 08:52:01 +00:00
Oldes Huhuman
1b58ecbfb0
Fixed compilation for Haiku OS
...
Related to: https://github.com/Mbed-TLS/mbedtls/issues/8562
Signed-off-by: Oldes Huhuman <oldes.huhuman@gmail.com>
2023-11-23 22:46:20 +01:00
Paul Elliott
8c6d332c44
Fix comment typos
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-23 18:53:13 +00:00
Paul Elliott
f25d831123
Ensure mutex test mutex gets free'd
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-23 18:49:43 +00:00
Dave Rodgman
8cd4bc4ac2
Merge pull request #8124 from yanrayw/support_cipher_encrypt_only
...
Support the negative option MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
2023-11-23 17:43:00 +00:00
Dave Rodgman
e49047520f
Merge pull request #8556 from minosgalanakis/bugfix/fix_trailing_whitespace
...
prepare_release: sed querry change to strip whitespace
2023-11-23 17:04:18 +00:00
Ryan Everett
2a0d4e2995
Revert "Refactor psa_load_persistent_key_into_slot
to remove bad goto
"
...
This reverts commit d69f4017fb
.
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-11-23 16:34:35 +00:00
Dave Rodgman
c44042ddbc
Merge pull request #7905 from lpy4105/issue/misc-improvement
...
misc improvements
2023-11-23 16:20:58 +00:00
Ryan Everett
d69f4017fb
Refactor psa_load_persistent_key_into_slot
to remove bad goto
...
Merges the two calls to `psa_copy_key_material_into_slot.
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-11-23 16:20:45 +00:00
Ronald Cron
34915fac3a
ssl-opt.sh: Fix getting the list of supported ciphersuites.
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-11-23 17:20:19 +01:00
Yanray Wang
18040ede3f
all.sh: export LC_COLLATE=C for sorting in ASCII order
...
By default, 'sort' sorts characters with system default locale,
which causes unexpected sorting order. To sort characters in ASCII
from computer perspective, export LC_COLLATE=C to specify character
collation for regular expressions and sorting with C locale.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-23 21:30:00 +08:00
Paul Elliott
2e3f6902ed
Merge pull request #8549 from gilles-peskine-arm/metatest-gcc-12
...
Fix metatest.c with gcc-12 -Wuse-after-free
2023-11-23 11:09:41 +00:00