Commit graph

25757 commits

Author SHA1 Message Date
Dave Rodgman
1714a9b0eb Revert to old design for mbedtls_ct_memmove_left
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:48:33 +01:00
Dave Rodgman
04a334af55 Make const-time test not depend on internal knowledge of mbedtls_ct_condition_t
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:48:33 +01:00
Dave Rodgman
ad9e5b9abe Improve docs for mbedtls_ct_memcmp
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
9ee0e1f6fe Remove GCC redundant-decls workaround for mbedtls_ct_memcmp
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
0172de8b3d Fix docs grammar
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
741d423ef8 Clarify docs for mbedtls_ct_memcpy_if
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
93cec45af3 Improve docs for mbedtls_ct_compiler_opaque
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
32d726033b Improve comments in mbedtls_mpi_lt_mpi_ct
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
07f853713d Clarify comments in mbedtls_ct_memcpy_if
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:27:49 +01:00
Dave Rodgman
fb1b851797 Improve docs for mbedtls_mpi_core_cond_assign
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:27:05 +01:00
Dave Rodgman
2b174abd86 code style
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 18:29:41 +01:00
Dave Rodgman
2d28c46055 Fix asm Memsan workaround
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 18:24:22 +01:00
Dave Rodgman
983448ea62 fix check for no-longer-used macro
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 17:30:52 +01:00
Dave Rodgman
d684d7342b code style
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 16:39:38 +01:00
Dave Rodgman
08691679b5 Enable testing of asm under Memsan
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 16:39:38 +01:00
Dave Rodgman
fa5a4bbb02 Improve mbedtls_ct_memmove_left w.r.t. const-flow tests
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 16:13:52 +01:00
Dave Rodgman
8de3482507 Fix false-positive non-const-time errors in test
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 15:10:00 +01:00
Dave Rodgman
fba559822f Ensure constant values not known to compiler
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-14 13:44:22 +01:00
Dave Rodgman
a02b36886c Fix gcc warnings when -Wredundant-decls set
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-14 13:43:39 +01:00
Dave Rodgman
9fbb0cf08e Merge remote-tracking branch 'origin/development' into safer-ct5 2023-06-28 18:52:02 +01:00
Paul Elliott
92a55bf5ea
Merge pull request #7793 from minosgalanakis/ecp/6025_fast_reduction_dispatch
[Bignum] Fast reduction dispatch
2023-06-28 17:38:37 +01:00
Janos Follath
c439c678e3
Merge pull request #7719 from davidhorstmann-arm/second-jpake-state-machine-rework
Change J-PAKE internal state machine
2023-06-28 08:59:23 +01:00
Tom Cosgrove
db041cc82f
Merge pull request #7665 from AndrzejKurek/optimize-error-translation-code-size
Optimize error translation code size
2023-06-28 08:09:00 +01:00
Minos Galanakis
163d346355 test_suite_ecp: Changed to BITS_TO_LIMBS(224) * 2 in ecp_mod_p_generic_raw.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-27 21:34:47 +01:00
Minos Galanakis
dae4c038f8 ecp.py: Extended EcpP224K1Raw tests for 32/64 bit architectures.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-27 18:54:53 +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
Minos Galanakis
80c4ae893c bignum_common.py: Added bits_to_limbs method.
This patch introduces a rounding-error-resiliant method to
calculate bits_to_limbs, and is updating `SECP224R1` and
`SECP224K1` to use it.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-27 16:38:22 +01:00
Minos Galanakis
23394b17bc test_suite_ecp: Updated ecp_mod_p_generic_raw to use the BITS_TO_LIMBS macro.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-27 16:31:59 +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
Minos Galanakis
c4e4958326 ecp_curves: Adjusted expected_width inputs to use BITS_TO_LIMBS macro.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-27 14:07:07 +01:00
David Horstmann
246ec5a35e Replace unnecessary '>=' with '=='
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-27 10:33:06 +01:00
David Horstmann
5dbe17de36 Add PSA_JPAKE_FINISHED to EXPECTED_{IN,OUT}PUTS()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-27 10:30:28 +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
Minos Galanakis
93baf39095 test_suite_ecp.data: Added test cases for modulo-1 in coordinate representation.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-26 23:19:04 +01:00
Minos Galanakis
53a16b3fb5 bignum_mod_raw: Updated documentation for mpi_mod_raw_mul
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-26 20:06:36 +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
Minos Galanakis
8eb6104256 bignum_mod_raw: Fixed a documentation typo.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-26 10:03:19 +01: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
Minos Galanakis
e0c329b0cf test_suite_ecp.data: Limb aligned inputs
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-25 23:37:18 +01:00
Minos Galanakis
c7408a432e bignum_mod_raw: Adjusted OPT_RED limb size requirements for mod_raw_mul().
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-25 21:14:44 +01:00
Minos Galanakis
a984d77f3a ecp_curves: Added dataset for SECP224K1 Coordinate Modulus.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-25 21:14:44 +01:00
Minos Galanakis
25d998b3b9 ecp_curves: Fixed modp pointers on mbedtls_ecp_modulus_setup.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-25 21:08:58 +01: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
Minos Galanakis
7b1093240c bignum_mod_raw: Updated documentation for mbedtls_mpi_mod_raw_mul
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-22 16:52:20 +01:00