Dave Rodgman
ad4e76be57
More dependency fixes
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 19:23:14 +01:00
Dave Rodgman
34152a48d4
Fix unused variable
...
Fix when MBEDTLS_AES_SETKEY_ENC_ALT, MBEDTLS_AES_DECRYPT_ALT and
MBEDTLS_AES_ROM_TABLE set.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 19:23:09 +01:00
Dave Rodgman
15cd28a264
Fix unused variable if MBEDTLS_AES_SETKEY_ENC_ALT and MBEDTLS_AES_DECRYPT_ALT set
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 19:23:06 +01:00
Dave Rodgman
28a539a549
Fix unused fn when MBEDTLS_AES_SETKEY_DEC_ALT and MBEDTLS_AES_SETKEY_ENC_ALT set
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 19:23:01 +01:00
Dave Rodgman
8c753f99cb
Fix unused function when MBEDTLS_AES_SETKEY_ENC_ALT set
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 19:22:56 +01:00
Dave Rodgman
c66033f0d7
Merge pull request #7847 from daverodgman/aarch64-asm-docs
...
Aarch64 asm docs improvement
2023-06-27 17:58:12 +01:00
Dave Rodgman
28e2ca51a9
Docs improvement
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 15:25:38 +01:00
Dave Rodgman
9f4fd28eff
Merge pull request #7808 from daverodgman/fix-ct-compile-warning
...
Fix for arm64_32 (aka ILP32) on Clang
2023-06-27 15:23:14 +01:00
Manuel Pégourié-Gonnard
7f773b2138
Merge pull request #7841 from valeriosetti/issue7748
...
driver-only ECC: EPCf.X509 testing
2023-06-27 11:18:18 +02:00
Dave Rodgman
8c5fae2610
Add explanatory comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 09:43:55 +01:00
Dave Rodgman
9e868be13a
Fix clang warning from -Wasm-operand-widths
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-27 09:27:27 +01:00
Valerio Setti
603271ce3d
test: solve disparities in driver coverage analysis for no_ecp_at_all()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-26 16:02:47 +02:00
Valerio Setti
8c3404f3e0
x509: update ECP_LIGHT dependencies to PK_HAVE_ECC_KEYS
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-26 15:49:48 +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
Gilles Peskine
717a83164e
Merge pull request #7807 from gilles-peskine-arm/mbedtls_ssl_protocol_version_str-no_array
...
Fix very high stack usage in SSL debug code
2023-06-26 09:36:53 +02:00
Gilles Peskine
9d7b24fb26
Fix extra character in debug string
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-06-23 21:11:46 +02:00
Dave Rodgman
4e5c63d652
Improve documentation in bn_mul.h
...
Co-authored-by: Tom Cosgrove <tom.cosgrove@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-23 15:17:37 +01:00
Paul Elliott
3048c8c906
Merge pull request #7725 from minosgalanakis/ecp/7268_add_optimised_reduction_setup_3
...
[Bignum] Add optimised reduction setup
2023-06-22 16:30:39 +01:00
Manuel Pégourié-Gonnard
e25c43bd66
Merge pull request #7791 from valeriosetti/issue7406
...
driver-only ECC: TLS: avoid use of mbedtls_ecp_write_key() (with USE_PSA)
2023-06-22 11:13:44 +02:00
Minos Galanakis
2a03fd3b7b
bignum_mod: Added a typedef for OPT_RED function pointer.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-22 09:14:28 +01:00
Manuel Pégourié-Gonnard
2fb9d00f6d
Merge pull request #7682 from valeriosetti/issue7453
...
driver-only ECC: ECPf.PK testing
2023-06-22 09:45:57 +02:00
Valerio Setti
6835b4a6ed
tls: always zeroize buffer on exit
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-22 09:06:31 +02:00
Valerio Setti
3589a4c644
tls: keep buffer declaration in a single line
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-22 09:02:44 +02:00
Dave Rodgman
e6c9996d04
Work around updating pointers from ILP32
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 21:16:23 +01:00
Dave Rodgman
5b5dd011d1
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 16:36:47 +01:00
Dave Rodgman
b5b6939fc2
Remove redundant checks in constant_time.c
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 16:36:42 +01:00
Dave Rodgman
0400ae2f9b
Fix pointer constraint in bn_mul.h
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 16:31:52 +01:00
Dave Rodgman
c54f25e26c
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 13:39:30 +01:00
Dave Rodgman
140fa15a7f
Improve changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 12:36:52 +01:00
Dave Rodgman
63e89b46f8
Use UINTPTR_MAX not SIZE_MAX
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 11:58:54 +01:00
Dave Rodgman
85842b8edb
Be strict about pointer size in mbedtls_get_unaligned_volatile_uint32
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 11:22:09 +01:00
Dave Rodgman
517e891e55
Changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 11:16:42 +01:00
Bence Szépkúti
f2154a6e10
Merge pull request #7686 from DemiMarie/do-while
...
Add a do-while loop around macros.
2023-06-21 11:31:41 +02:00
Valerio Setti
4b3c02b626
test: remove duplicate PK_HAVE_ECC_KEYS dependency in pkparse suite
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-21 11:23:06 +02:00
Manuel Pégourié-Gonnard
edf059747a
Merge pull request #7691 from DemiMarie/test-equal
...
x509parse tests: Replace TEST_ASSERT with TEST_EQUAL
2023-06-21 11:02:21 +02:00
Dave Rodgman
b67db9140e
Separate ILP32 and normal-aarch64 code paths
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 09:15:27 +01:00
Dave Rodgman
04cb9ac59e
Fix for arm64_32 (aka ILP32) on Clang (attempt 2)
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-21 07:32:22 +01:00
Dave Rodgman
b19f584f2c
Fix for arm64_32 (aka ILP32) on Clang
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-20 23:01:43 +01:00
Gilles Peskine
a3a0025e18
Merge pull request #7806 from paul-elliott-arm/fix_32bit_builds
...
[Bignum] Fix 32 bit unreachable code build failure
2023-06-20 22:13:06 +02:00
Gilles Peskine
5faccf038b
Merge pull request #7805 from paul-elliott-arm/fix_retval
...
Pacify clang15 warnings about empty \retval
2023-06-20 22:12:51 +02:00
Paul Elliott
215ed131cf
Fix 32 bit unreachable code build failure
...
Given the size of ciL is set dependant on MBEDTLS_HAVE_INT32 /
MBEDTLS_HAVE_INT64, clang rightfully reports this as unreachable code in
32 bit builds. Fix this by using #define guards instead.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-06-20 17:55:15 +01:00
Paul Elliott
458b96b1a7
Merge pull request #7638 from AndrzejKurek/cert-apps-use-ips
...
Use better IP parsing in x509 apps
2023-06-20 17:21:04 +01:00
Gilles Peskine
fd235bc9df
Fix very high stack usage in SSL debug code
...
Use a switch instead of an array. The array was very hollow for some enum
types such as mbedtls_ssl_protocol_version (which formerly used small
values, but switched to using the protocol encoding as enum values in Mbed
TLS 3.2.0). Optimizing compilers know how to compile a switch into a lookup
table when the range warrants it.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-06-20 17:48:18 +02:00
Demi Marie Obenour
690b8c9ca7
Add a do-while loop around macros
...
This is good practice in C.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-06-20 11:48:04 -04:00
Paul Elliott
24f4b73ee5
Pacify clang15 warnings about empty /retval
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-06-20 15:51:46 +01: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
e1651360c0
pkwrite: fix wrong guard position for pk_get_opaque_ec_family()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:24:05 +02:00
Valerio Setti
a9aab1a85b
pk/psa: use PSA guard for mbedtls_ecc_group_to_psa() and mbedtls_ecc_group_of_psa()
...
This allows also to:
- removing the dependency on ECP_C for these functions and only rely
on PSA symbols
- removing extra header inclusing from crypto_extra.h
- return MBEDTLS_PK_USE_PSA_EC_DATA and MBEDTLS_PK_HAVE_ECC_KEYS to
their original position in pk.h
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:24:05 +02:00
Valerio Setti
bc2b1d3288
psa: move mbedtls_ecc_group_to_psa() from inline function to standard one
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:24:05 +02:00
Valerio Setti
f54ca35b8a
build_info: do not enable ECP_LIGHT when PSA_WANT_ALG_ECDSA
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:24:05 +02:00