Valerio Setti
9a4273099c
all.sh: fix comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-17 11:40:42 +02:00
Valerio Setti
40314fcc75
analyze_outcomes: fix newlines
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-17 11:34:31 +02:00
Valerio Setti
f075e47bc1
analyze_outcomes: reset name of TestLog to Results
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-17 11:33:21 +02:00
Valerio Setti
3f33989762
analyze_outcomes: use a single TestLog instance and do not delay output
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-17 11:32:23 +02:00
Valerio Setti
fb2750e98e
analyze_outcomes: exit immediately in case of invalid task
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-17 10:57:53 +02:00
Valerio Setti
5329ff06b9
analyze_outcomes: print task list directly to stdout
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-17 09:44:36 +02:00
Yanray Wang
4b6595aa83
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-10-17 11:13:00 +08:00
Dave Rodgman
41bc798d7c
Tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-16 14:04:21 +01:00
Dave Rodgman
f3803a1f71
Cleanup validation interface
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-16 13:47:15 +01:00
Valerio Setti
b0c618e147
analyze_outcomes: minor improvements
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-16 14:19:49 +02:00
Dave Rodgman
f2ea08ae50
Improve test for clang presence
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-16 11:37:28 +01:00
Yanray Wang
aa01ee303a
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-10-16 17:38:32 +08:00
Dave Rodgman
d35b188a5c
Make component_build_aes_aesce_armcc silent
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-16 10:25:30 +01:00
Pengyu Lv
132261345d
all.sh: revert changes in test_m32*
...
AESNI for x86 (32-bit) have been tested in
a seperate component, we don't need to test
twice.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-16 14:03:29 +08:00
Dave Rodgman
37801d714b
Invert no_hwcap variable
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13 16:06:55 +01:00
Dave Rodgman
cc88ccdda1
Include existing Makefile
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13 12:25:23 +01:00
Dave Rodgman
768bc143ad
Fix hwcap test for CI
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13 10:15:55 +01:00
Dave Rodgman
ab0cff5b4e
Require asm/hwcap.h for testing
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13 09:32:04 +01:00
Dave Rodgman
4b779bef9e
Merge branch 'development' into more-aes-checks
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-12 16:17:10 +01:00
Valerio Setti
aaef0bc172
analyze_outcomes: improve logging system
...
- the script now only terminates in case of hard faults
- each task is assigned a log
- this log tracks messages, warning and errors
- when task completes, errors and warnings are listed and
messages are appended to the main log
- on exit the main log is printed and the proper return value
is returned
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-12 09:16:40 +02:00
Dave Rodgman
f4b415c369
Test instructions built/not built
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 16:11:42 +01:00
Dave Rodgman
c20d899266
Adjust messages in all.sh
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 15:01:35 +01:00
Dave Rodgman
b0d9830373
Merge branch 'development' into sha-armce-thumb2
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 13:53:41 +01:00
Valerio Setti
a797ce3ed2
test: use full config in test_psa_crypto_config_accel_cipher
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-11 13:10:34 +02:00
Valerio Setti
e7bac17b5d
test: keep SSL_TICKET_C and SSL_CONTEXT_SERIALIZATION enabled
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-11 13:10:34 +02:00
Valerio Setti
3f02bb7a96
test: use full config in accelerated AEAD test
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-11 13:10:34 +02:00
Dave Rodgman
d680d4fbf9
SHA256 renaming - fix some missed things
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 11:05:22 +01:00
Dave Rodgman
be7915aa6c
Revert renaming of SHA512 options
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 10:59:05 +01:00
Ronald Cron
a89d2ba132
Merge pull request #8327 from ronald-cron-arm/adapt-psa-crypto-repo-name
...
Adapt to new PSA Crypto repo name
2023-10-11 06:45:30 +00:00
Pengyu Lv
64cca2f3ea
all.sh: Re-enable MBEDTLS_AESNI_C in some components
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-11 12:05:58 +08:00
Dave Rodgman
5b89c55bb8
Rename MBEDTLS_SHAxxx_USE_ARMV8_yyy to MBEDTLS_SHAxxx_USE_ARMV8_A_yyy
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-10 15:14:57 +01:00
Dave Rodgman
94a634db96
Rename A64 config options
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-10 12:59:29 +01:00
Valerio Setti
dfd7ca6344
analyze_outcomes: rename some variables for better readability
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-10-09 16:53:02 +02:00
Ronald Cron
fea6606f98
Merge pull request #8296 from ronald-cron-arm/remove-redundant-test-component
...
Remove redundant test component
2023-10-09 10:29:20 +00:00
Ronald Cron
070e8652d5
Adapt to new PSA Crypto repo name
...
Patterns I looked for:
grep -i "psa-crypto"
grep -i "psa.*crypto.*repo"
grep -i "psa.*crypto.*root"
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-10-09 10:26:18 +02:00
Thomas Daubney
540324cd21
Correct styling of Mbed TLS in documentation
...
Several bits of documentation were incorrectly styling Mbed TLS
as MbedTLS.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-06 17:07:24 +01:00
Dave Rodgman
cd65400c48
Add tests for runtime detection
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-05 09:40:07 +01:00
Dave Rodgman
9ed1853093
require clang 4 for testing
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-05 00:06:47 +01:00
Dave Rodgman
d9e8083d26
Add tests for SHA256 on ARMCE for thumb, arm and aarch64
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-04 17:17:46 +01:00
Dave Rodgman
a7127eb67c
tidy up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-04 13:38:41 +01:00
Dave Rodgman
7a8a2490e5
Tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-04 13:14:20 +01:00
Dave Rodgman
b1107aeee1
Tidy up bash syntax
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-04 12:30:23 +01:00
Dave Rodgman
54ada8bae8
Improve docs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-04 11:55:25 +01:00
Dave Rodgman
28e38d8e12
Use lower-case for local variables
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-04 11:50:30 +01:00
Gilles Peskine
35b49c4d7d
Ignore tests of built-in interfaces for driver-only testing parity
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-04 12:28:41 +02:00
Dave Rodgman
3cde6a2be2
Improve naming
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-03 16:02:56 +01:00
Dave Rodgman
4243610c15
Use make to generate the test command
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-03 15:47:05 +01:00
Minos Galanakis
3974b17631
check-generated-files: Added psa_crypto_driver_wrappers_no_static.c file
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-03 11:47:03 +01:00
Ronald Cron
466286a14a
Remove redundant test component
...
In the full configuration MBEDTLS_TEST_HOOKS is
enabled thus the configurations in
test_full_cmake_gcc_asan_new_bignum and
test_full_cmake_gcc_asan_new_bignum_test_hooks
are the same. Keep the component that runs more
tests.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-10-03 12:44:15 +02:00
Dave Rodgman
43a5ce8c7f
rename function
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-02 17:09:37 +01:00
Dave Rodgman
920343aaf7
Separate out a resuable option cross-product test function
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-01 19:06:09 +01:00
Dave Rodgman
184c0af06e
Remove not-needed edge-case
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-01 13:43:02 +01:00
Dave Rodgman
8a64fb82a8
Simplify makefile generation; don't use -j
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-01 13:31:31 +01:00
Dave Rodgman
86cc70871c
fix make issue
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-29 22:32:04 +01:00
Dave Rodgman
aea01c9455
Use make to parellise tests
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-29 18:54:49 +01:00
Dave Rodgman
9728562192
Improve test speed
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-29 18:27:04 +01:00
Dave Rodgman
573dfc167a
Add testing for MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-29 16:27:29 +01:00
Dave Rodgman
745af9f47b
Extend testing of aes.o options
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-29 16:22:23 +01:00
Dave Rodgman
b51f3da354
Merge pull request #8264 from mpg/follow-up-8075
...
Follow up to 8075
2023-09-28 17:32:12 +00:00
Gilles Peskine
42f8d5f0c9
Merge pull request #8261 from Mbed-TLS/fix-cmake-header-include
...
Add CMake include path for generated header
2023-09-28 15:16:15 +00:00
Manuel Pégourié-Gonnard
3b2357cdca
Remove components that partially accelerate ECC keys
...
These are build-only components so this was never supported for sure.
Let's stick to what's really tested for now, and expand later (with
proper testing!) if there's demand for more flexibility.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 16:56:12 +02:00
David Horstmann
f868d6f4e8
Remove spurious comments
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-28 14:01:25 +01:00
David Horstmann
6c979856c3
Remove generated files in all cmake_as_x tests
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-28 11:30:43 +01:00
David Horstmann
862abe2d0f
Fix lowercase comment start
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-28 11:28:20 +01:00
Manuel Pégourié-Gonnard
c0c9b23b23
Test only what's support with partial curves accel
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 10:19:19 +02:00
Manuel Pégourié-Gonnard
faea919365
Fix typo: weiErstrass
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 10:19:16 +02:00
Manuel Pégourié-Gonnard
6be64f7d5b
Use lowercase for local variables
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 10:19:16 +02:00
Manuel Pégourié-Gonnard
5aab46b91e
Remove now-redundant tests
...
These were temporaries to avoid unwanted use of low-level modules. Now
that we have test components with those modules fully disabled (replaced
with drivers), we no longer need these tests - which were out of date
too.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 08:53:05 +02:00
Manuel Pégourié-Gonnard
eda7086bdd
Auto-enable ACCEL macros for p256-m driver
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 08:53:05 +02:00
Manuel Pégourié-Gonnard
f07ce3b8ff
Don't extend support for deprecated functions
...
Restore guards from the previous release, instead of the new, more
permissive guards.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 08:51:51 +02:00
Gilles Peskine
7f288566c3
Merge pull request #8260 from gilles-peskine-arm/crypto_spe-include-fix
...
Fix include path to psa/crypto_spe.h
2023-09-27 18:10:16 +00:00
David Horstmann
9f48fff467
Ensure tests will fail if CMake generation fails
...
Remove the in-source-tree generated files before running CMake.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-27 16:35:15 +01:00
Dave Rodgman
0fc86b2ddf
Merge pull request #8075 from valeriosetti/issue8016
...
driver-only ECC: curve acceleration macros
2023-09-27 14:39:02 +00:00
Gilles Peskine
c1bedfe184
Put crypto_spe.h on the include search path where needed
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-27 16:23:41 +02:00
Manuel Pégourié-Gonnard
f7dc6cfef1
Document limitation on "mixed" builds
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-27 10:34:52 +02:00
Yanray Wang
89c88bb44b
analyze_outcomes: fix incorrect use of Results.log()
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-27 10:35:09 +08:00
Manuel Pégourié-Gonnard
5c21036d19
Add build with only some ECC key types accelerated
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-26 12:03:10 +02:00
Manuel Pégourié-Gonnard
561bce6b16
Add build with some curves accelerated but not all
...
I chose to divide along the lines of Weierstrass vs other curve shapes
(currently just Montgomery), mainly because it's the first thing that
came to mind.
It happened to reveal an issue in the logic for when (deterministic)
ECDSA and ECJPAKE are built-in, which this commit is also fixing.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-26 11:36:13 +02:00
Yanray Wang
5c0c858026
analyze_outcomes: ignore asn1parse and asn1write in result analysis
...
By default, we disable ASN1_[PARSE/WRITE]_C in common_tfm_config.
In fact, this is what happens for accelerated p256m driver, which
means all asn1[parse/write] tests are skipped in driver_accel test.
However, those two macros are automatically enabled for built-in
ECDSA via PSA, which means all asn1[parse/write] tests are passed
in tfm_config test.
This commit simply ignores the whole asn1[parse/write] test suite
when analyzing between driver and reference.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:16:00 +08:00
Yanray Wang
0e319ae577
analyze_outcomes: escape {} in string format for test description
...
{} are valid characters in test description, but they're not escaped
properly in python string format(). To resolve the bug of KeyError
when it tries to log test description which contains {}, we replace
{XXX} format with {{XXX}} in order to escape {} in python string
format() properly.
In addition, the calls to Results.log() are also handled to avoid
similar potential problems.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:16:00 +08:00
Yanray Wang
73bb231878
all.sh: remove not needed #define in common_tfm_config
...
Since we have removed PK_C, PK_[WRITE/PARSE]_C, there is no need to
define PK related configurations again. Therefore we removed them
in common_tfm_config to make a simpler.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:15:52 +08:00
Yanray Wang
4eaf5adda9
all.sh: remove define MD_C in common_tfm_config
...
We have set MBEDTLS_MD_C in tfm_mbedcrypto_config_profile_medium.h
so there is no need to enable it again.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:15:52 +08:00
Yanray Wang
382966d1a7
all.sh: fix a comment in common_tfm_config
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:15:52 +08:00
Yanray Wang
7050504bdc
all.sh: simplify common_tfm_config
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:15:52 +08:00
Gilles Peskine
5baf66755c
Keep the list in alphabetical order
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-26 17:15:52 +08:00
Gilles Peskine
eaa1c5619a
Update location of TFM config files
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-26 17:15:52 +08:00
Yanray Wang
0c98f9f842
test-ref-configs: test config-tfm.h
...
Tweak some configurations based on TF-M config in order to get a
successful build and test.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-26 17:15:52 +08:00
Xiaokang Qian
fe9666b8c0
Change the extension type of the file psa_crypto_driver_wrapper
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Manuel Pégourié-Gonnard
3c4f344e9a
Declare P-256 as accelerated in p256-m test
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-25 17:39:41 +02:00
Manuel Pégourié-Gonnard
85ff5e6b88
Fix another rebasing mistake
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-25 17:39:41 +02:00
Manuel Pégourié-Gonnard
0d54a2e496
Fix rebasing mistake
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-25 17:39:41 +02:00
Manuel Pégourié-Gonnard
5a7523e42d
Declare curves as accelerated in all.sh when needed
...
Before this PR, the tests passed without this, but they shouldn't have.
Accelerators need to declare what curves they support, and if no curve
is declared as accelerated, the built-in implementations of algs and key
types need to be enabled.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-25 17:39:41 +02:00
Manuel Pégourié-Gonnard
a6aecd0e3b
Remove components that are no longer needed
...
Those components were introduced in #7103 , resolving #6622 : Some PSA
ECC size macros are too small when the largest accelerated curve is
larger than the largest built-in curve.
At that point, it was not possible yet to omit all built-in curves,
so we made these components that had only one (small) curve built-in and
all the others accelerated.
Now that it's possible to disable all ECC built-ins, and we have tests
doing that, we don't need that kind of fiddling any more.
Note: these component disabled RSA in order to make sure max key size
macros were not taken from RSA. We have test components with all of ECC
accelerated and RSA disabled
(component_test_psa_crypto_config_accel_ecc_no_bignum and
component_test_psa_crypto_config_accel_ecc_ffdh_no_bignum), making the
"all curves except one" components really redundant.
Note: removing them was one of the items in #7757 .
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-25 17:39:41 +02:00
Valerio Setti
4ca250b873
test: fix comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:41 +02:00
Valerio Setti
0a342c9512
test: fix comments and functions' naming
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:41 +02:00
Valerio Setti
482a0b957f
test: fix remaining disparities and remove debug leftovers
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:41 +02:00
Valerio Setti
872462dfa9
test: fix test accelerating all curves keeping only 1 builtin
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:41 +02:00
Valerio Setti
b2fd673ec8
test: fix test which are using accelerated ECC/DH keys
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Manuel Pégourié-Gonnard
e47c53eeab
Fix SHA-3 in accel tests that need it
...
Components that accelerate an algorithm that uses hashing internally
(such as deterministic ECDSA and RSA-PSS) need the hash algorithms
available in libtestdriver1.
Previously, the omission of SHA-3 in
tests/include/test/drivers/crypto_config_test_driver_extension.h meant
it was enabled in libtestdriver1 when not requesting its acceleration,
and disabled when requesting it. Adding it in a previous commit fixed
the components that asked it accelerated, but broke the component that
didn't ask for it but still needed it.
Fix those components by explicitly requesting SHA-3 as we already do for
the other hash algorithms that are require for the same reason.
Note: this broke test_suite_psa_crypto_storage_format.v0 which is
apparently the only place exercising signatures with SHA-3.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-24 09:48:47 +02:00
Manuel Pégourié-Gonnard
cc21ad441a
Add SHA-3 support to libtestdriver1
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-24 09:48:45 +02:00
Gilles Peskine
29d0bfba0d
Rename option where concatenated with -D
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-20 23:11:33 +02:00
Manuel Pégourié-Gonnard
5edb942708
Merge pull request #8041 from mpg/tfm-p256m
...
Test TF-M config with p256-m driver
2023-09-20 16:09:56 +00:00
Paul Elliott
5382ba6987
Merge pull request #8230 from gilles-peskine-arm/test_tls1_2_ecjpake_compatibility-avoid-build-race
...
Work around a race condition in parallel builds
2023-09-20 15:53:04 +00:00
Gilles Peskine
edc8456e01
Work around a race condition in parallel builds
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-20 15:03:18 +02:00
Gilles Peskine
eda1b1f744
Merge pull request #7921 from valeriosetti/issue7613
...
TLS: Clean up ECDSA dependencies
2023-09-20 12:47:55 +00:00
Gilles Peskine
67c86e626b
Merge pull request #7961 from gilles-peskine-arm/psa_crypto_config-in-full
...
Enable MBEDTLS_PSA_CRYPTO_CONFIG in the full config
2023-09-18 08:13:12 +00:00
Manuel Pégourié-Gonnard
f7298cd397
Fix some issues in comments
...
Ranging from typos to outdated comment contradicting the code.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-18 09:55:24 +02:00
Manuel Pégourié-Gonnard
b95e92cd41
Merge pull request #8076 from valeriosetti/issue8005
...
Test with ECC and FFDH accelerated and no bignum
2023-09-14 09:12:35 +00:00
Gilles Peskine
e820c0abc8
Update spelling "mbed TLS" to "Mbed TLS"
...
The official spelling of the trade mark changed from all-lowercase "mbed"
to normal proper noun capitalization "Mbed" a few years ago. We've been
using the new spelling in new text but still have the old spelling in a
lot of text. This commit updates most occurrences of "mbed TLS":
```
sed -i -e 's/mbed TLS/Mbed TLS/g' $(git ls-files ':!ChangeLog' ':!tests/data_files/**' ':!tests/suites/*.data' ':!programs/x509/*' ':!configs/tfm*')
```
Justification for the omissions:
* `ChangeLog`: historical text.
* `test/data_files/**`, `tests/suites/*.data`, `programs/x509/*`: many
occurrences are significant names in certificates and such. Changing
the spelling would invalidate many signatures and tests.
* `configs/tfm*`: this is an imported file. We'll follow the upstream
updates.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-12 19:18:17 +02:00
Manuel Pégourié-Gonnard
e9d97976b2
Update list of ignored tests
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:17 +02:00
Manuel Pégourié-Gonnard
96839e7450
Move common things to common function
...
These should be shared between ref and accel, for meaningful coverage
comparison.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:17 +02:00
Manuel Pégourié-Gonnard
25b45db3d8
Disable ECP_C in component with p256-m driver
...
Builds, but 20 test cases failing in test_suite_psa_crypto, to be
addressed in future commits.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:16 +02:00
Yanray Wang
bc7716cddc
all.sh: run make clean before make lib in armc6_build_test
...
We should run make clean before we build libraries in armc6_build_test.
On the one hand, this makes sure we do have a clean build directory
initially. On the other hand, we can do extra actions after building
the library with armc6_build_test.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-11 10:11:09 +08:00
Yanray Wang
ef1b04db94
all.sh: make sure CIPHER_ENCRYPT_ONLY is enabled in tests
...
grep corresponding mbedtls_xxx_setkey_dec and mbedtls_xxx_decrypt
symbols in cipher_only tests to make sure CIPHER_ENCRYPT_ONLY is
enabled as expected.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-11 10:11:09 +08:00
Yanray Wang
3caaf0c61e
Enable CIPHER_ENCRYPT_ONLY when DES is disabled
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-11 10:10:44 +08:00
Yanray Wang
c5944d4a3c
all.sh: fix a typo
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-07 18:00:35 +08:00
Yanray Wang
9b811658a8
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-09-07 16:18:00 +08:00
Valerio Setti
5dfaca4af5
all.sh: fix comments
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-05 08:48:51 +02:00
Tom Cosgrove
b2fafa5a49
config-wrapper-zeroize-memset.h should be user-config-zeroize-memset.h and not include mbedtls_config.h
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-09-02 19:22:45 +01:00
Tom Cosgrove
7eced7d1d2
Move zeroize-as-memset into a config file under tests/
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-09-02 19:22:45 +01:00
Tom Cosgrove
daddf11a30
Add a build to all.sh to check mbedtls_platform_zeroize() calls
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-09-02 19:22:45 +01:00
Yanray Wang
782190417c
all.sh: ciper_encrypt_only: cover VIA PADLOCK
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-01 17:46:52 +08:00
Yanray Wang
bf66ef9085
all.sh: ciper_encrypt_only: cover baremetal build for AESCE
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-01 17:46:24 +08:00
Yanray Wang
207c991d56
all.sh: ciper_encrypt_only: cover AESNI and C Implementation
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-01 17:43:42 +08:00
Yanray Wang
a8ac23a758
all.sh: add test case for CIPHER_ENCRYPT_ONLY
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-09-01 16:40:11 +08:00
Paul Elliott
6147511bc0
Merge pull request #7955 from davidhorstmann-arm/psa-crypto-script-changes
...
Miscellaneous changes to scripts for PSA-Crypto enablement
2023-08-31 18:19:52 +00:00
Gilles Peskine
7b2b76a2d4
Merge pull request #7165 from yanrayw/7094-collect-compatsh-test-cases
...
check_test_cases.py: support to collect test cases for compat.sh
2023-08-31 07:30:20 +00:00
Gilles Peskine
03e9dea30b
Merge remote-tracking branch 'development' into psa_crypto_config-in-full
...
Conflicts:
* `include/psa/crypto_sizes.h`: the addition of the `u` suffix in this branch
conflicts with the rework of the calculation of `PSA_HASH_MAX_SIZE` and
`PSA_HMAC_MAX_HASH_BLOCK_SIZE` in `development`. Use the new definitions
from `development`, and add the `u` suffix to the relevant constants.
2023-08-30 18:32:57 +02:00
Yanray Wang
63f0abe226
check_test_cases: add a comment to explain idx in walk_compat_sh
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-08-30 18:31:37 +08:00
David Horstmann
8f3ec8ec9d
Use '--target' instead of shortened '-t'
...
This enables compatibility with older versions of CMake that do not have
the abbreviated switch.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-30 09:46:20 +01:00
Yanray Wang
ab717b5287
Merge remote-tracking branch 'origin/development' into 7094-collect-compatsh-test-cases
2023-08-30 10:38:28 +08:00
David Horstmann
3ed1871920
Disable pylint error for non-uppercase names
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 18:20:19 +01:00
David Horstmann
9cc6b2f446
Add missing import in test_psa_compliance.py
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 17:36:35 +01:00
David Horstmann
fd9264e65b
Fix pylint errors
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 16:21:15 +01:00
David Horstmann
41c316d3b2
Move -B switch into a single argument
...
This will prevent CMake from mistaking the build directory for the
source directory
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:57:23 +01:00
David Horstmann
b48822c816
Appease pylint by renaming variables
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:12:53 +01:00
David Horstmann
beaee2604f
Test PSA compliance: Build only the crypto target
...
Use CMake's -t option to build only the crypto target. Parameterize the
crypto target to have the right name depending on whether this is Mbed
TLS or PSA Crypto.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:01:52 +01:00
David Horstmann
c69074dcf6
Tidy up reference to Mbed TLS in help message
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 13:46:11 +01:00
David Horstmann
2ba89bece6
Disable pylint error in CMake command
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:37:29 +01:00
David Horstmann
3b8984af5c
Remove or qualify references to Mbed TLS
...
Either remove exclusive references to Mbed TLS or accompany them with
references to "PSA Crypto".
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:32:26 +01:00
David Horstmann
f757069269
Rename 'mbedtls_dir' -> 'root_dir'
...
This makes it more repo-agnostic
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:27:13 +01:00
David Horstmann
98af198a30
Correctly detect presence of the built library
...
Use the repo-specific test not just the Mbed TLS specific one.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:25:54 +01:00
David Horstmann
58cf7c6c38
Use repo detection functions at start of all.sh
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:15:05 +01:00
David Horstmann
d02b5f8f56
Separate directory discernment into 2 functions
...
Have separate in_mbedtls_repo() and in_psa_crypto_repo() functions
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 09:55:56 +01:00
Dave Rodgman
d395590597
Merge pull request #7579 from daverodgman/safer-ct-asm
...
Arm assembly implementation of constant time primitives
2023-08-28 08:26:29 +00:00
Gilles Peskine
7be571ac85
Remove GNUTLS_LEGACY and OPENSSL_LEGACY
...
They aren't used anywhere.
Keep the command line options of all.sh to avoid breaking any wrapper
scripts that people might have.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-27 21:51:54 +02:00
Gilles Peskine
e29203be88
Stop using "legacy" OpenSSL and GnuTLS
...
None of the tests actually need GNUTLS_LEGACY (3.3.8): GNUTLS (3.4.10)
works.
None of the tests actually need OPENSSL_LEGACY (1.0.1j): OPENSSL (1.0.2g)
works.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-27 21:43:00 +02:00
Gilles Peskine
8ca2041145
Merge pull request #8074 from tgonzalezorlandoarm/tg/allowlist
...
Implement allowlist of test cases that are legitimately not executed
2023-08-24 18:03:20 +00:00
David Horstmann
0ac57ca6c6
Rename is_psa_crypto -> in_psa_crypto_repo
...
(For consistency with all.sh)
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
7f93d22ad9
Rename psa_crypto_lib_filename to just crypto_lib_filename
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
4dcddcfae2
Parameterize out of source build directory
...
Use CMake to build the library out-of-source (rather than make)
in tests/scripts/test_psa_compliance.py and add a script argument for
the out-of-source build directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
76a7738537
Invert logic for repo detection in all.sh
...
Instead of:
! in_psa_crypto_repo()
use
in_mbedtls_repo()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
e31014a681
Tweak test_psa_compliance pylint annotations
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
1d09184291
Modify test_psa_compliance.py for psa-crypto repo
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
9a6c45b436
Make all.sh PSA-crypto-friendly
...
Introduce changes needed to run all.sh in the psa-crypto repo. Where
behaviour must differ, detect that we are in the psa-crypto repo by
checking for the 'core' directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:11 +01:00
Tomás González
d43cab3f5c
Correct analyze_outcomes identation
...
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-24 09:12:40 +01:00
Gilles Peskine
e65bba4dd2
Merge pull request #7803 from gilles-peskine-arm/psa-low-hash-mac-size
...
Start testing the PSA built-in drivers: hashes
2023-08-22 11:19:41 +00:00
Tomás González
a0631446b5
Correct analyze_outcomes.py identation
...
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 12:18:04 +01:00
Tomás González
5022311c9d
Tidy up allow list definition
...
* Don't break string literals in the allow list definition
* Comment each test that belongs to the allow list is there.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 09:54:28 +01:00
Tomás González
7ebb18fbd6
Make non-executed tests that are not in the allow list an error
...
* Turn the warnings produced when finding non-executed tests that
are not in the allow list into errors.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 09:47:49 +01:00
Gilles Peskine
c9187c5866
New test suite for the low-level hash interface
...
Some basic test coverage for now:
* Nominal operation.
* Larger output buffer.
* Clone an operation and use it after the original operation stops.
Generate test data automatically. For the time being, only do that for
hashes that Python supports natively. Supporting all algorithms is future
work.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 09:59:42 +02:00
Gilles Peskine
fdb722384b
Move PSA information and dependency automation into their own module
...
This will let us use these features from other modules (yet to be created).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-21 18:32:11 +02:00
Gilles Peskine
796bc2b8f9
Merge pull request #7486 from AndrzejKurek/calloc-also-zeroizes
...
Document mbedtls_calloc zeroization
2023-08-21 15:47:21 +00:00
Dave Rodgman
1fdc884ed8
Merge pull request #7384 from yuhaoth/pr/add-aes-accelerator-only-mode
...
AES: Add accelerator only mode
2023-08-18 20:55:44 +00:00
Bence Szépkúti
505dffd5e3
Merge pull request #7937 from yanrayw/code_size_compare_improvement
...
code_size_compare.py: preparation work to show code size changes in PR comment
2023-08-17 20:59:11 +00:00
Gilles Peskine
73936868b8
Merge remote-tracking branch 'development' into psa_crypto_config-in-full
...
Conflicts:
* tests/scripts/all.sh: component_test_crypto_full_no_cipher was removed
in the development branch.
2023-08-17 19:46:34 +02:00
Jerry Yu
f258d17acd
remove aesni + padlock - plain c tests
...
This test is not valid for padlock depends
on plain c
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-17 12:39:00 +08:00
Jerry Yu
bdd96b9adf
disable aesni for componets without cpu modifiers
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-16 17:34:27 +08:00
Jerry Yu
506759f5ce
fix build fail for via padlock test
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-16 17:11:22 +08:00
Jerry Yu
b6d39c2f8c
Add aesni test for i386
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-16 16:14:02 +08:00
Valerio Setti
307810babb
analyze_outcomes: add case for "ECC+FFDH w/o BN"
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-16 08:01:17 +02:00
Valerio Setti
4e2f244ab4
test: add accelerated and reference test for ECC+FFDH without BN
...
Since most of the code in "ECC+FFDH without BN" scenario was shared
with the "ECC without BN" one, I tried to reuse part of the code in
order to avoid duplications.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-16 08:01:12 +02:00
Tomás González
358c6c644a
Add EdDSA and XTS to the allow list
...
As specified in
https://github.com/Mbed-TLS/mbedtls/issues/5390#issuecomment-1669585707
EdDSA and XTS tests are legitimately never executed, so add them to
the allow list.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-14 15:46:25 +01:00
Tomás González
b401e113ff
Add a flag for requiring full coverage in coverage tests
...
Introduce the --require-full-coverage in analyze_outcomes.py so that
when analyze_outcomes.py --require-full-coverage is called, those
tests that are not executed and are not in the allowed list issue an
error instead of a warning.
Note that it is useful to run analyze_outcomes.py on incomplete test
results, so this error mode needs to remain optional in the long
term.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-14 15:46:12 +01:00
Tomás González
07bdcc2b0d
Add allow list for non-executed test cases
...
The allow list explicits which test cases are allowed to not be
executed when testing. This may be, for example, because a feature
is yet to be developed but the test for that feature is already in
our code base.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-14 15:46:12 +01:00
Dave Rodgman
963513dba5
Merge pull request #8008 from valeriosetti/issue7756
...
driver-only ECC: BN.TLS testing
2023-08-11 13:51:36 +00:00
Dave Rodgman
246210e3c4
Test CT asm under valgrind
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11 08:47:38 +01:00
Tom Cosgrove
5e678fd4d2
Merge pull request #8050 from gilles-peskine-arm/all.sh-remove-crypto_full_no_cipher
...
Remove redundant test component component_test_crypto_full_no_cipher
2023-08-11 07:28:10 +00:00
Valerio Setti
132240f01a
test: use ASAN flags for testing the accelerated TFM configuration
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 08:33:27 +02:00
Valerio Setti
f01d648677
analyze_outcome: add new check for parity for TFM configuration
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 08:33:27 +02:00
Valerio Setti
ac6d35f793
test: update components' descriptions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 08:33:27 +02:00
Valerio Setti
52ba0e3718
test: improve accelerated TFM configuration test and add reference
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 08:33:27 +02:00
Valerio Setti
c5c4bd225e
test: add component testing TFM configuration and P256M driver
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 08:33:27 +02:00
Valerio Setti
e0be95e81d
analyze_outcomes: skip tests that depend on BIGNUM_C
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:35:23 +02:00
Valerio Setti
18535c352d
test: enable TLS, key exchances and ssl-opt teting in ecc_no_bignum()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:33:52 +02:00
Valerio Setti
29c1b4d04a
test: enable X509 testing in ecc_no_bignum component
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 14:50:03 +02:00
Gilles Peskine
f5a29a5b83
Remove redundant test component
...
component_test_crypto_full_no_cipher doesn't bring any extra value given the
existence of component_test_full_no_cipher.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-10 12:07:49 +02:00
Valerio Setti
2e0275d2a1
test: use unset-all option in config.py to optimize test code
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
a8c655edb0
test: remove redundant code setting MBEDTLS_PSA_CRYPTO_CONFIG
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
fe7d96cff7
test: minor optimizations to ecc_no_bignum components
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
9b3dbcc2e3
analyze_outcomes: skip tests that unavoidably depend on bignum
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
660bbf2470
test: disable BIGNUM support on the test ecc_no_bignum component
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
06aebe4995
test: disable FFDH support on the test ecc_no_bignum component
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
7dccb66d49
test: disable RSA support on the test ecc_no_bignum component
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
abd00d0be8
test: adding new components for testing and driver coverage analysis without BN
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Gilles Peskine
b7d577e46b
Fix copypasta
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-09 19:48:58 +02:00
Gilles Peskine
9b8dead74a
Minor readability improvement
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-09 19:48:42 +02:00
Jerry Yu
76a51b99b6
replace strings command with grep
...
`strings | grep` will fail some time.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-09 15:56:26 +08:00
Jerry Yu
a7de78d050
improve test
...
- `grep '^flags' /proc/cpuino` does not work in my local machine inside script.
- `make test programs/sleftest ` causes `strings | grep ` fail.
For timebeing, I did not figure out the root cause.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-08 14:28:15 +08:00
Jerry Yu
7802f65a28
Add negative test for aesni only
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-07 10:38:50 +08:00
Jerry Yu
c935aa617b
Add via padlock build test
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-04 16:29:05 +08:00
Jerry Yu
193cbc03fe
Add aesce build test
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-04 09:38:37 +08:00
Dave Rodgman
6f80ac4979
Merge pull request #7864 from waleed-elmelegy-arm/enforce-min-RSA-key-size
...
Enforce minimum key size when generating RSA key size
2023-08-03 12:57:52 +00:00
Jerry Yu
8a599c03fa
Add aesni only test
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 17:01:02 +08:00
Jerry Yu
17a9d2e412
Add MBEDTLS_AES_USE_HADWARE_ONLY for test_aesni
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:14:18 +08:00
Jerry Yu
1221a31cc4
Run aes tests only for test_aesni
...
That can reduce time of selftest
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:09:07 +08:00
Jerry Yu
69dd441eb5
Remove test_aes_*
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:00:20 +08:00
Gilles Peskine
267bee9be8
Merge pull request #7903 from valeriosetti/issue7773
...
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/DH
2023-08-02 10:16:44 +00:00
Jerry Yu
d76ded046c
fix various issues
...
- unnecessary command
- extra blank and empty line
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
3660623e59
Rename plain c option and update comments
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
3fcf2b5053
Rename HAS_NO_PLAIN_C to DONT_USE_SOFTWARE_CRYPTO
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:00 +08:00
Jerry Yu
315fd30201
Rename plain c disable option
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
d767cc4106
Add accelerator only tests.
...
The cases with runtime detection have been
covered by `full` configuration
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:58 +08:00
Valerio Setti
5a57e2abab
test: add new components for testing without ECDHE-ECDSA and TLS13
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-02 11:30:50 +02:00
Bence Szépkúti
9661f8ab0d
Merge pull request #7968 from gowthamsk-arm/use_earliest_latest_compilers
...
Use earliest latest compilers
2023-08-02 05:58:02 +00:00
Gowtham Suresh Kumar
9da40b8927
Update default variable values for compilers
...
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-31 23:11:18 +01:00
Janos Follath
2f04582d37
Move MBEDTLS_ECP_WITH_MPI_UINT to mbedtls_config.h
...
There is a precedent for having bigger and less mature options in
mbedtls_config.h (MBEDTLS_USE_PSA_CRYPTO) for an extended period.
Having this option in mbedtls_config.h is simpler and more robust.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:57:16 +01:00
Janos Follath
f3135af159
Use config.py in all new bignum tests
...
This previous test is correct, as it is using make. Switch to using
config.py for robustness and consistency.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:07:57 +01:00
Janos Follath
82823b2fe8
Fix new bignum tests
...
These tests weren't working, because they use CMake and can't pass
options with CFLAGS directly. This could be mitigated by adding a CMake
option, but using config.py is less invasive and it is what we normally
use for setting build options anyway.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:01:47 +01:00
Gowtham Suresh Kumar
6f1977bf20
Use variables for selecting compilers
...
The latest and earliest clang/GCC compilers are now used through
variables instead of symlinks and also the all.sh script is updated
to support options for overriding the default values.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 17:04:47 +01:00
Gowtham Suresh Kumar
1e829a403f
Use compgen to gather components in all.sh
...
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 16:41:21 +01:00
Gowtham Suresh Kumar
8d45ec8b97
Remove test_clang_opt check
...
The component functions in all.sh will be listed using
compgen instead of sed so this check is not needed.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 16:36:25 +01:00
Waleed Elmelegy
d7bdbbeb0a
Improve naming of mimimum RSA key size generation configurations
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-07-27 14:50:09 +00:00
Janos Follath
e0fa7ec4db
Merge pull request #7988 from gabor-mezei-arm/7598_add_32bit_test_component
...
Add 32bit test component for ecp with new bignum interface
2023-07-27 13:00:04 +00:00
Waleed Elmelegy
3d158f0c28
Adapt tests to work on all possible minimum RSA key sizes
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-07-27 11:03:35 +00:00
Valerio Setti
3a96227706
generate_psa_tests: remove checks for DH's LEGACY symbols
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-27 11:01:33 +02:00
Valerio Setti
27602c32a2
test: accelerate all KEY_PAIR symbols in accel FFDH component
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-27 09:15:34 +02:00
Gilles Peskine
1997f3022f
PSA_CRYPTO_DRIVER_TEST_ALL is incompatible with MBEDTLS_PSA_CRYPTO_CONFIG
...
Explain how PSA_CRYPTO_DRIVER_TEST_ALL works and why we have it. Note that
it is incompatible with MBEDTLS_PSA_CRYPTO_CONFIG. As a consequence, disable
that option in component_test_psa_crypto_drivers.
MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS is in the full config, so there's no need to
add it explicitly.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-26 22:34:13 +02:00
Gowtham Suresh Kumar
186731b22a
Fix warnings from clang-16
...
Running clang-16 on mbedtls reports warnings of type "-Wstrict-prototypes".
This patch fixes these warnings by adding void to functions with no
arguments. The generate_test_code.py is modified to insert void into test
functions with no arguments in *.function files.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-26 17:11:51 +01:00
Gowtham Suresh Kumar
a12baf8c5f
Update test scripts to use latest/earliest compilers
...
The Ubuntu 16.04 and 22.04 docker images have been updated with
earliest and latest versions of gcc and clang respectively.
This patch adds the necessary component and support functions
required for the CI to run these compilers.
For FreeBSD we invoke the function by name so a condition is added
to disable the existing test_clang_opt function for linux.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-26 16:51:45 +01:00
Gabor Mezei
e256cc1552
Add 32bit test component for ecp with new bignum interface
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-07-26 17:35:44 +02:00
Manuel Pégourié-Gonnard
c154a043bb
Fix dependencies for DH (and RSA) key pairs
...
- RSA was missing the MBEDTLS_ prefix.
- DH needs the same temporary fix (prefix + suffix) for now.
- hack_dependencies_not_implemented() needs to ignore MBEDTLS_PSA_WANT
dependencies.
While at it, make the code currently used for ECC more generic, so that
it's ready to be used for RSA and DH in the near future.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-26 09:34:30 +02:00
Manuel Pégourié-Gonnard
afe4b79114
Enable DH in generate_psa_tests.py
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-26 09:32:42 +02:00
Gilles Peskine
f1517e690a
PermissionIssueTracker is obsoleted by ShebangIssueTracker
...
ShebangIssueTracker implements the rule that scripts must be executable if
and only if they have a shebang line. By removing PermissionIssueTracker, we
now allow files with any extension to be executable (provided they have a
shebang line), and allow *.sh and *.pl to be non-executable modules if they
don't have a shebang line (as was already the case for *.py).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 20:59:14 +02:00
Gilles Peskine
63c3534981
Pacify Pylint
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
2f8c545d3d
Make --quiet a little less quiet
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
1b01559fea
Error out if run from the wrong directory
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
9fdc657cbf
Add --quiet option to suppress demos' output
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
198d87ad52
Minor readability improvements
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:14 +02:00
Gilles Peskine
82b2727e51
Run demo scripts in some builds
...
Run the sample program demo scripts in builds with a configuration
that is at least as complete as the default configuration.
Do not run sample programs in all configurations since they are
expected to fail if a required feature is missing.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:09 +02:00
Gilles Peskine
2fcf04f468
Run demo scripts and check that they work
...
run_demos.py is the frontend to a framework for smoke-testing the
sample programs. It runs scripts called programs/*/*_demo.sh
("demo scripts") and check that they succeed. A typical demo script
runs one sample program or a combination of sample programs to
demonstrate their usage.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:31:43 +02:00
Paul Elliott
f1c032adba
Merge pull request #7902 from valeriosetti/issue7772
...
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/RSA
2023-07-25 17:13:43 +01:00
Yanray Wang
21127f7095
code_size_compare: add logging module and tweak prompt message
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-07-24 18:07:12 +08:00
Gilles Peskine
eb41e0d6c8
Correct some msg messages in full config
...
When MBEDTLS_USE_PSA_CRYPTO is disabled on a base of full, mention it.
Now that full implies MBEDTLS_PSA_CRYPTO_CONFIG, don't mention it, and don't
set it explicitly.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:50:49 +02:00
Gilles Peskine
14302ed1c0
Simplify msg messages in full config
...
Don't reiterate that this includes MBEDTLS_USE_PSA_CRYPTO and, now,
MBEDTLS_PSA_CRYPTO_CONFIG.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:50:49 +02:00
Gilles Peskine
884b462044
When subtracting classic symbols from full, turn off PSA_CRYPTO_CONFIG
...
Otherwise unwanted algorithms creep back from the default-on PSA_WANT
symbols.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:50:49 +02:00
Gilles Peskine
cf4fe58fd0
Make malloc-0-null a user config file
...
Having a wrapper made it harder to use: incompatible with setting
MBEDTLS_CONFIG_FILE, harder to combine with other settings. It was also
surprising since it was the only test config that was structured in that
way.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:50:49 +02:00
Gilles Peskine
36dea1501b
Fix inconsistencies in no-chachapoly test
...
The original goal (https://github.com/Mbed-TLS/mbedtls/pull/5072 ) was to run
a test with ChaChaPoly disabled in PSA. It was actually implemented with GCM
also partially disabled (legacy GCM enabled but PSA GCM disabled), which
distracted from the objective. It's actually useful to test both with and
without GCM, so test both. Don't test inconsistencies between legacy and PSA
support because that's not a common case and not one we have particular
reasons to test.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:50:49 +02:00
Gilles Peskine
8dbdf2f7ea
Fix typo in function name
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:45:12 +02:00
Gilles Peskine
af3a5a263e
Remove comments that duplicate the 'msg' call just below
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:45:12 +02:00
Gilles Peskine
e92ff1128b
Remove duplicated component
...
There were two copies of component_test_psa_crypto_config_accel_pake,
identical except for two typos. Keep the copy without the typos.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:45:12 +02:00
Gilles Peskine
5647d06be8
Merge pull request #7518 from gilles-peskine-arm/psa_inject_entropy-file-stability
...
Fix and test MBEDTLS_PSA_INJECT_ENTROPY
2023-07-21 17:37:15 +02:00
Ronald Cron
87f62850f3
Merge pull request #7893 from ronald-cron-arm/misc-from-psa-crypto
...
Miscellaneous fixes resulting from the work on PSA-Crypto
2023-07-21 10:54:41 +02:00
Manuel Pégourié-Gonnard
c844c1a771
Merge pull request #7546 from mpg/align-psa-md-identifiers
...
Align psa md identifiers
2023-07-20 11:34:28 +02:00
Ronald Cron
7612d8c049
all.sh: Use consistently CONFIG_TEST_DRIVER_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:20:55 +02:00
Ronald Cron
6b49b55d6d
all.sh: Use consistently CRYPTO_CONFIG_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:02:59 +02:00
Ronald Cron
7a93ac5308
all.sh: Use consistently CONFIG_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:02:32 +02:00
Manuel Pégourié-Gonnard
828b3acd6b
Merge pull request #7848 from valeriosetti/issue7749
...
driver-only ECC: EPCf.TLS testing
2023-07-18 10:33:21 +02:00
Ronald Cron
e501d0e71e
Add change log and non-regression test
...
Add change log and non-regression test
for CCM* with no tag not supported in
CCM only configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-17 11:53:20 +02:00
Gilles Peskine
b366fe955d
Merge pull request #7478 from yuhaoth/pr/add-script-for-generating-cert-macros
...
Add script for generating cert macros
2023-07-17 11:13:07 +02:00
Paul Elliott
3c22366695
Merge pull request #7863 from valeriosetti/issue7790
...
PK: parse: fix disparity with private Montgomery keys
2023-07-11 18:02:12 +01:00
Paul Elliott
88f34e3348
Merge pull request #7703 from gabor-mezei-arm/7598_clone_the_eco_module
...
[Bignum] Clone the ECP module
2023-07-11 15:00:01 +01:00
Valerio Setti
42796e25cf
generate_psa_tests: fix automatically generated tests for RSA
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-11 14:06:00 +02:00
Valerio Setti
5f54020d1a
analyze_outcomes: do not skip test about wrong Montgomery private key
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-11 11:28:22 +02:00
Manuel Pégourié-Gonnard
f614bde912
Merge pull request #7656 from mprse/ffdh_tls13_v2_drivers
...
FFDH 4: driver-only parity testing - with TLS 1.3
2023-07-10 13:08:47 +02:00
Valerio Setti
0085c2e486
test: fix message's text
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-10 09:10:20 +02:00
Valerio Setti
16b70f2b1a
test: enabled ssl-opt testing in no_ecp_at_all components
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-10 09:10:20 +02:00
Valerio Setti
887f823deb
test: re-enable TLS and key exchanges in no_ecp_at_all component
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-10 09:10:20 +02:00
Paul Elliott
2dfe7993af
Merge pull request #6914 from davidhorstmann-arm/cmake-pass-through-config-defines
...
Pass `MBEDTLS_CONFIG_FILE` defines through cmake
2023-07-07 17:01:57 +01:00
Manuel Pégourié-Gonnard
461d59b2f8
Merge pull request #7858 from mprse/ffdh_tls13_v2_f
...
Make use of FFDH keys in TLS 1.3 - follow-up
2023-07-07 16:19:35 +02:00
Manuel Pégourié-Gonnard
9967f11066
Merge pull request #7810 from valeriosetti/issue7771
...
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/ECC
2023-07-07 10:22:47 +02:00
Przemek Stekiel
615cbcdbdf
Provide additional comments for claryfication
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-06 12:16:39 +02:00
Jerry Yu
99a82dd043
fix python lint fails
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-07-06 10:13:46 +08:00
Jerry Yu
5811869311
Add test_certs.h generate script
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-07-06 10:13:46 +08:00
Gabor Mezei
6db604711d
Add a new test component to test the new bignum interface with TEST_HOOKS
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-07-05 16:54:20 +02:00
David Horstmann
969c145f34
Use CONFIG_H variable rather than config file name
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-07-05 14:12:13 +01:00
David Horstmann
20550e3d59
all.sh component to test cmake custom config file
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-07-05 14:12:13 +01:00
Andrzej Kurek
026235c4ec
Disable msan errors on null allocation in all.sh
...
Such error was raised in platform tests,
and it's a valid test case.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-07-05 08:32:43 -04:00
Przemek Stekiel
565353ef71
Cleanup the code
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-05 11:07:07 +02:00
Przemek Stekiel
45255e4c71
Adapt names (curves -> groups)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-05 09:26:26 +02:00
Przemek Stekiel
84f4ff1dd3
Minor adaptations after ffdh was enabled for tls1.3
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-05 09:12:08 +02:00
Przemek Stekiel
85b644262d
Add ffdh accel vs reference check to analyze_outcomes.py
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-04 12:35:54 +02:00
Przemek Stekiel
01c248c00b
Enable TLS1.3 in FFDH alg build with drivers and add reference config(without drivers)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-07-04 12:35:54 +02:00
Dave Rodgman
9cf17dad9d
Merge pull request #7851 from daverodgman/fix-unused-aes
...
Fix AES dependencies - build TF-M config cleanly
2023-07-03 16:49:00 +01:00
Manuel Pégourié-Gonnard
56b159a12a
Merge pull request #7627 from mprse/ffdh_tls13_v2
...
Make use of FFDH keys in TLS 1.3 v.2
2023-07-03 10:12:33 +02:00
Dave Rodgman
a2c1a387e4
Merge pull request #7630 from daverodgman/prefer-intrinsics
...
Prefer intrinsics over asm for AES-NI
2023-06-30 11:39:38 +01:00
Gabor Mezei
9b6b5a06d5
Enable testing the cloned ecp module
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-06-30 11:39:20 +02:00
Valerio Setti
eabfef3d1b
generate_psa_tests: fix docstring for tweak_key_pair_dependency function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 11:09:43 +02:00
Valerio Setti
0c42c435f1
generate_psa_tests: optimize code for key pair dependencies generation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
c0d2f8417a
test: replace all KEY_TYPE_ECC_KEY_PAIR with proper symbols
...
Note: the DERIVE option is intentionally skipped from the acceleration
list because this feature is still not supported.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
27c501a10c
lib/test: replace BASIC_IMPORT_EXPORT internal symbol with BASIC,IMPORT,EXPORT
...
Also the python script for automatic test generation is fixed accordingly
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
072bded588
test: use proper key pair symbols in accelerated list for EC curve test
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
7bbd98fad0
generate_psa_tests: minor fixes
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
24c64e8b34
generate_psa_tests: improve script to handle all generated files
...
For now RSA key pairs' dependencies are kept to LEGACY, but this
is going to be updated in #7772 .
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
656f5ff23e
generate_psa_tests: remove GENPRIME from dependencies of RSA key pair
...
This is automatically included by the new RSA_KEY_PAIR_GENERATE
symbol.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
76882fc632
generate_psa_tests: improve code for key pairs dependency generation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
5d58a55e06
generate_psa_tests: fix comments
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:22 +02:00
Valerio Setti
f6587be09a
test: remove useless accelerator intialization + minor restyling
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:21 +02:00
Valerio Setti
a983655526
test: use better naming for new components
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:21 +02:00
Valerio Setti
5ca80e7de0
test: properly handle new KEY_PAIR_yyy symbols in PSA generated test
...
This includes:
- removal of temporary patches recently introdued in PR 7641
- proper replacing of legacy KEY_PAIR symbols with either
KEY_PAIR_IMPORT or KEY_PAIR_GENERATE depending on the test
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:16:21 +02:00
Valerio Setti
249b18a286
test: add new component to test with all KEY_PAIRs enabled but one
...
- this component should work also for RSA and DH keys, not only for
EC
- of course the acceleated counterpart is hanlded properly
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-30 10:12:19 +02:00
Dave Rodgman
1a4936ab86
Remove options not known to older gcc
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 14:07:50 +01:00
Dave Rodgman
88651c45e4
Change build target as Cortex-A32 not supported on CI
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 12:35:51 +01:00
Dave Rodgman
0f0f769cd0
Nicer formatting
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 12:10:45 +01:00
Dave Rodgman
fb374e6cff
Split armcc tests to separate component
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 12:00:21 +01:00
Dave Rodgman
cd04020dac
Add comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 11:59:47 +01:00
Dave Rodgman
6001fb241d
Test combinations of macros for aes.o
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-29 09:30:28 +01:00
Dave Rodgman
904c58967c
Revert "Extend TF-M build test to test all shipped configs"
...
This reverts commit 443018537e
.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-28 18:07:22 +01:00
Dave Rodgman
443018537e
Extend TF-M build test to test all shipped configs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-28 16:28:37 +01:00
Przemek Stekiel
3484db4ce7
Change ffdh testing strategy
...
- Full tests generated by script only for ffdhe2048 group
- Single G->m and m->G exchange test for each other group
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-28 13:31:38 +02:00
Dave Rodgman
c164c07cfe
Add TF-M build test to all.sh
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-28 09:57:16 +01:00
Andrzej Kurek
04bfe5797b
Disable asan errors on null allocation in all.sh
...
Such error was raised in platform tests,
and it's a valid test case.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-06-27 10:02:09 -04:00
Przemek Stekiel
c31a798f45
Replace MBEDTLS_ECDH_C dependency in ssl-opt tests
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-27 10:58:50 +02:00
Przemek Stekiel
8bfe897ab0
Add ssl-opt functions to check openssl with ffdh support and openssl ephemeral key exchange
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-26 16:33:00 +02:00
Valerio Setti
aafe90033c
test: enable X509 testing in no_ecp_at_all() components
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-26 15:23:44 +02:00
Przemek Stekiel
6d00c67d89
Allow second run for ffdhe8192 ssl-opt tests
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-25 21:14:39 +02:00
Valerio Setti
5bd2523178
test: ignore compressed points' tests when checking coverage without ECP at all
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-20 09:06:12 +02:00
Valerio Setti
1814bb785f
test: re-enable PK and RSA in component without ECP/ECP_LIGHT
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:23:53 +02:00
Dave Rodgman
3d9af4734f
Fix tests?
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 12:10:11 +01:00
Dave Rodgman
6a08b68c90
Simplify aesni support test
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 11:52:22 +01:00
Dave Rodgman
f8986e3147
Clarify support_test_aesni
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 10:55:59 +01:00
Dave Rodgman
b959027010
Improve logic for checking for presence of AESNI code
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 10:28:45 +01:00
Dave Rodgman
20cc563462
Improve logic for checking for presence of AESNI code
...
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-19 10:27:31 +01:00
Valerio Setti
a8dc7fd1a2
test: remove leftover paragraph in test_psa_crypto_config_accel_ecc_ecp_light_only
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 10:21:01 +02:00
Dave Rodgman
f18a7e1f86
Fix typo
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 22:41:18 +01:00
Dave Rodgman
f87e5268ec
Fix test error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 22:03:44 +01:00
Dave Rodgman
48d8e83472
fix CI failure
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 21:05:05 +01:00
Dave Rodgman
336a4530c5
Fix typo
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 20:22:04 +01:00
Dave Rodgman
086e137dc4
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 20:21:39 +01:00
Dave Rodgman
96a9e6a9dd
Address test review comments
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 20:18:36 +01:00
Dave Rodgman
fa1d05ccfd
Remove not-needed compiler flags
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 19:52:49 +01:00
Dave Rodgman
e1dd6e9e8f
Merge remote-tracking branch 'origin/development' into prefer-intrinsics
2023-06-16 17:46:16 +01:00
Dave Rodgman
be60fcca78
Add test for plain C path
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 17:04:52 +01:00
Dave Rodgman
c2b7264b83
Simplify aesni test
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 16:24:42 +01:00
Valerio Setti
15e7044627
test: update depends.py with new dependencies
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:47 +02:00
Valerio Setti
22d0a79bc6
test: fix bug for test without bugnum
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
4922ba132a
build_info: complete list of symbols that auto-enable ECP_LIGHT
...
The comment is also updated accordingly.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
addeee4531
mbedtls_config: add new MBEDTLS_PK_PARSE_EC_COMPRESSED symbol
...
This includes also:
- auto enabling ECP_LIGHT when MBEDTLS_PK_PARSE_EC_COMPRESSED is
defined
- replacing ECP_LIGHT guards with PK_PARSE_EC_COMPRESSED in pkparse
- disabling PK_PARSE_EC_COMPRESSED in tests with accelarated EC curves
(it get disabled also in the reference components because we want
to achieve test parity)
- remove skipped checks in analyze_outcomes.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
aecd32c90a
pk: let PK_PARSE_EC_EXTENDED auto-enable ECP_LIGHT
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
434836801f
test: remove leftover from past PR development
...
ECP_LIGHT was never set as public symbol so it should not be
enabled/disabled using the config.py script.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Valerio Setti
4d25a8d48a
test: renaming component testing accelerated EC
...
References in analyze_outcomes.py are updated accordingly.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:46 +02:00
Dave Rodgman
838dc46a7b
Test asm and intrinsics from all.sh
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 13:19:05 +01:00
Valerio Setti
01cc88a46b
config_psa: replace USE symbols with BASIC one for all KEY_PAIRs
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:27:02 +02:00
Valerio Setti
4590bc2933
test: run all the test suite in the temporary component and grep outcome file
...
The file is temporary generate if none is specified on the command line.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
a1a0b1b348
test: add a temporary test for checking conversion for new symbols
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
323ad1c416
psa: fixing psa_crypto_generate_key.generated
...
This is a temporary fix for not excluding tests which depend on
MBEDTLS_PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_LEGACY. This fix
can be reverted as soon as those _LEGACY symbols will be removed
from the code.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
64f790f662
test: fix python script for PSA test generation
...
This is a temporary fix for replacing
PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR
with the temporary symbols
MBEDTLS_PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_LEGACY.
Once new PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_yyy will be used
both in library's code and tests, then this fix will be removed.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
ff7f861761
tests: replace deprecated symbols with temporary _LEGACY ones
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Manuel Pégourié-Gonnard
24f467668e
Merge pull request #7672 from mpg/libtestdriver1-helpers
...
Libtestdriver1 helpers
2023-06-16 11:43:40 +02:00
Przemek Stekiel
1f5c2ba495
Add missing ECDH dependencies in ssl-opt tests
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-15 17:07:16 +02:00