Gilles Peskine
844f65dc65
Explicitly test AES contexts with different alignments
...
Don't leave it up to chance.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-16 14:54:48 +01:00
Gilles Peskine
5fcdf49f0e
Move copy-context testing to an auxiliary function
...
This is in preparation for running it multiple times with different
alignments.
This commit also fixes the fact that we weren't calling mbedtls_aes_free()
on the context (we still aren't if the test fails). It's not an issue except
possibly in some ALT implementations.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-16 14:42:39 +01:00
Gilles Peskine
f99ec202d7
AES context copy test: have one for each key size
...
Don't use all-bytes zero as a string, it's harder to debug.
This commit uses the test vectors from FIPS 197 appendix C.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-16 14:27:40 +01:00
Gilles Peskine
d50cfddfd7
AES context copy test: clean up
...
Don't use hexcmp to compare binary data. Improve readability.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-16 14:25:58 +01:00
Manuel Pégourié-Gonnard
913d9bb921
Merge pull request #7162 from valeriosetti/issue7055
...
Legacy MBEDTLS_PK_PARSE_C and MBEDTLS_PK_WRITE_C dependencies in test_suite_psa_crypto
2023-03-08 17:07:19 +01:00
Manuel Pégourié-Gonnard
289e5baa83
Merge pull request #7082 from valeriosetti/issue6861
...
driver-only ECDSA: add ssl-opt.sh testing with testing parity
2023-03-08 16:45:38 +01:00
Valerio Setti
c0e7da55c5
test: removing remaning dependencies of PK_WRITE/PK_PARSE from test_suite_psa_crypto suites
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-08 11:03:09 +01:00
Valerio Setti
f9bc5b75f1
test: remove dependencies on PK_WRITE and PK_PARSE from test_suite_psa_crypto suites
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-08 11:03:09 +01:00
Valerio Setti
ccfad9ae0e
ssl-opt: remove remaining redundant dependencies
...
There were some dependencies that are now automatically satisfied by the
detect_required_features() function.
After this check there should be no redundant requirement for:
- requires_pk_alg "ECDSA"
- requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_ECDSA_CERT
- requires_any_configs_enabled $TLS1_2_KEY_EXCHANGES_WITH_CERT
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-08 10:25:05 +01:00
Valerio Setti
3b2c02821e
ssl-opt: return to previous debug level in test
...
This was a leftover from some debug activity that unfortunately ended up
in previous commits.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-08 10:22:29 +01:00
Gilles Peskine
a2fc399f57
Merge pull request #6829 from AndrzejKurek/unify-psa-errors
...
Unify PSA to Mbed TLS error translation
2023-03-07 19:55:44 +01:00
Gilles Peskine
30fc999f43
Merge pull request #7164 from oberon-microsystems/fix-test-exported-length-edwards
...
Fix expected export length for Edwards curves in test suite.
2023-03-07 19:53:48 +01:00
Valerio Setti
213c4eae3a
ssl-opt: enhance comment for get_tls_version() function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-07 19:29:57 +01:00
Janos Follath
fe780a3c4b
Merge pull request #7184 from gabor-mezei-arm/6349_Secp224r1_fast_reduction
...
Extract Secp224r1 fast reduction from the prototype
2023-03-07 10:57:58 +00:00
Manuel Pégourié-Gonnard
a5ffa93e43
Merge pull request #7142 from mpg/driver-only-ecdh-starter
...
Driver-only ECDH starter
2023-03-07 09:14:38 +01:00
Manuel Pégourié-Gonnard
86393db84d
Revert local experiment.
...
This was never meant to be committed here.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-03-06 16:19:05 +01:00
Valerio Setti
23e50b9042
ssl-opt: remove redundant ECDSA dependencies in TLS1.3 tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-06 14:48:39 +01:00
Manuel Pégourié-Gonnard
07d92620d4
Fix some message strings and comments in all.sh
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-03-06 13:38:55 +01:00
Manuel Pégourié-Gonnard
0d1f5be688
Add comment about shared config function
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-03-06 13:35:21 +01:00
Manuel Pégourié-Gonnard
228a30d16c
Merge pull request #7120 from mpg/md-light
...
Define "MD light" subset of MD
2023-03-06 11:02:19 +01:00
Dave Rodgman
4693fd9e9e
Merge pull request #7173 from daverodgman/zeroize-platform
...
Use platform-provided secure zeroization
2023-03-06 09:16:12 +00:00
Stephan Koch
6eb73113b1
Fix codestyle with uncrustify.
...
Signed-off-by: Stephan Koch <koch@oberon.ch>
2023-03-03 17:48:40 +01:00
Dave Rodgman
45cef61fa4
Merge branch 'development' into md-light
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-03 14:28:13 +00:00
Dave Rodgman
1f39a62ce6
Merge pull request #7151 from gilles-peskine-arm/psa-headers-alt
...
Allow alternative names for overridable PSA headers
2023-03-03 12:37:51 +00:00
Dave Rodgman
e11c1ceac9
Merge pull request #7200 from paul-elliott-arm/interruptible_sign_hash_fail_tests
...
Enable all keys for interruptible op fail tests
2023-03-03 11:51:57 +00:00
Andrzej Kurek
8a045ce5e6
Unify PSA to Mbed TLS error translation
...
Move all error translation utilities to psa_util.c.
Introduce macros and functions to avoid having
a local copy of the error translating function in
each place.
Identify overlapping errors and introduce a
generic function.
Provide a single macro for all error translations
(unless one file needs a couple of different ones).
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-03-03 05:23:44 -05:00
Dave Rodgman
05b80a4eee
Merge pull request #6201 from gilles-peskine-arm/tls13_only-renegotiation
...
Disable MBEDTLS_SSL_RENEGOTIATION in TLS-1.3-only builds
2023-03-03 09:56:51 +00:00
Dave Rodgman
e965c3c4bd
Merge pull request #7197 from daverodgman/armclang-sha-warning
...
Enable -Werror in all.sh for armclang
2023-03-03 09:01:41 +00:00
Valerio Setti
194e2bdb6a
fix typos
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-03-02 17:18:10 +01:00
Paul Elliott
ddbc6ed6cd
Enable all keys for interruptible op fail tests
...
Due to a misunderstanding about the purpose of the test, I had limited this to
ECC keys only, however this defeats the purpose of the test, and left gaps in
test coverage.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-02 16:03:43 +00:00
Dave Rodgman
0fddf829d5
Add more detailed comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-02 15:32:12 +00:00
Gilles Peskine
57897b8d6a
Merge pull request #6493 from AndrzejKurek/pymod
...
Use `config.py` as a module in `depends.py`
2023-03-02 15:38:47 +01:00
Dave Rodgman
1c232a8311
Enable -Werror for armclang
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-02 13:39:04 +00:00
Dave Rodgman
2f386c55ff
Disable MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT for armclang
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-02 13:38:33 +00:00
Gilles Peskine
136d25c416
Explicitly disable all DTLS options in tls13-only.h
...
This makes no difference when starting from the default configuration. It
allows tls13-only.h to be used with other base configurations such as `full`.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-01 19:49:58 +01:00
Gilles Peskine
7d3186d18a
Disable MBEDTLS_SSL_RENEGOTIATION in tls13-only configuration
...
There's no renegotiation in TLS 1.3, so this option should have no effect.
Insist on having it disabled, to avoid the risk of accidentally having
different behavior in TLS 1.3 if the option is enabled (as happened in
https://github.com/Mbed-TLS/mbedtls/issues/6200 ).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-01 19:47:23 +01:00
Dave Rodgman
f4385faa6f
Merge pull request #7188 from paul-elliott-arm/interruptible_sign_hash_complete_after_start_fail
...
Interruptible {sign|verify} hash - Call complete() after start() failure.
2023-03-01 17:18:08 +00:00
Paul Elliott
42585f678b
Merge pull request #7176 from paul-elliott-arm/interruptible_sign_hash_verify_test_improvements
...
Interruptible {sign|verify} hash verification test improvements
2023-03-01 15:00:45 +00:00
Paul Elliott
ebf2e38662
Merge pull request #7177 from paul-elliott-arm/interruptible_sign_hash_improve_num_ops_testing
...
Interruptible sign hash improve num ops testing
2023-03-01 14:59:44 +00:00
Paul Elliott
de7c31e082
Improve comment wording
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-01 14:43:52 +00:00
Gilles Peskine
1eae11565d
Merge pull request #6949 from bensze01/replace_pkcs7_fuzzer_tests
...
Replace fuzzer-generated PKCS #7 memory management tests
2023-03-01 10:46:22 +01:00
Paul Elliott
7c17308253
Add num_ops tests to sign and verify interruptible hash
...
This is the only test usable for non-deterministic ECDSA, thus needs this
code path testing as well.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-02-28 17:23:29 +00:00
Paul Elliott
8359c14c14
Add hash corruption test to interruptible verify test
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-02-28 17:23:29 +00:00
Paul Elliott
c1e0400bac
Add test to check not calling get_num_ops()
...
Make sure that not calling get_num_ops() inbetweeen calls to complete() does
not mean that ops get lost (Regression test for previous fix).
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-02-28 17:20:14 +00:00
Paul Elliott
9e8819f356
Move 'change max_ops' test into ops tests
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-02-28 17:20:14 +00:00
Paul Elliott
5770224ef3
Rename max ops tests to ops tests
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-02-28 17:20:14 +00:00
Gilles Peskine
7e677fa2c5
Merge pull request #6389 from gilles-peskine-arm/ecdsa-use-psa-without-pkwrite
...
Remove pkwrite dependency in pk using PSA for ECDSA
2023-02-28 18:17:16 +01:00
Gilles Peskine
b52b788e55
Merge pull request #6895 from yuhaoth/pr/add-aes-with-armv8-crypto-extension
...
Add AES with armv8 crypto extension
2023-02-28 18:16:37 +01:00
Paul Elliott
587e780812
Test calling complete() after {sign|verify}_hash_start fails
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-02-28 17:13:39 +00:00
Gilles Peskine
e4616830b3
Merge pull request #7137 from lpy4105/issue/1785/ssl-test-script-fail
...
compat.sh: Skip static ECDH cases if unsupported in openssl
2023-02-28 18:11:39 +01:00