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
Dave Rodgman
418843ed64
Improve changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 15:27:23 +01:00
Dave Rodgman
4ad81ccdae
Only force O2 when hw acceleration available
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 15:04:04 +01:00
Valerio Setti
fdf15ddfbe
build_info: auto enable PK_PARSE_EC_COMPRESSED when PK_PARSE_C && ECP_C
...
This helps backward compatibility since compressed points were
always supported in previous releases as long as PK_PARSE_C and
ECP_C were defined.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:47 +02: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
Gilles Peskine
44ff5a9208
Merge pull request #7774 from mpg/new-psa-want-key-pair
...
Update `PSA_WANT` spec for new `KEY_PAIR` scheme
2023-06-16 16:01:11 +02:00
Gilles Peskine
5760bf77c7
Merge pull request #7641 from valeriosetti/issue7614
...
Define PSA_WANT_KEY_TYPE_xxx_KEY_PAIR_yyy (step 1)
2023-06-16 16:00:17 +02:00
Dave Rodgman
b2814bd089
Only enable gcc -Os fix if we have AES hw support
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 14:50:33 +01:00
Dave Rodgman
73b0c0b051
Improve comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 14:48:14 +01:00
Przemek Stekiel
f595c5b69a
Use valid guard for filling group list with EC groups
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-16 15:45:37 +02:00
Dave Rodgman
bd1add94c0
Respect -Os for everything except XTS
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 13:50:14 +01:00
Minos Galanakis
de87461c23
ecp_curves: Updated the optimised reduction function pointer.
...
This patch modifies the `mbedtls_mpi_opt_red_struct` to use an
mpi_uint * pointer and size_t limps arguments.
The methods interacting with this pointer have been updated
accordingly:
- mbedtls_mpi_mod_optred_modulus_setup
- mbedtls_ecp_modulus_setup
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
5c238d80cd
bignum_mod: Updated documentation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
450abfd922
test_suite_ecp: Added MBEDTLS_ECP_NIST_OPTIM
define guards.
...
This patch updates `ecp_mod_p_generic_raw` and corresponding
curve test methods, that depend on the NIST optimisation
parameter to not run when it is not included.
The following curves are affected:
* SECP192R1
* SECP224R1
* SECP256R1
* SECP384R1
* SECP521R1
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
effff764e1
test_suite_ecp: Updated ecp_mod_p_generic_raw
for optimised reduction.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
65210952ec
ecp_curves: Updated mbedtls_ecp_modulus_setup
to use optimised reduction.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
1d3e332986
ecp_curves: Updated input argument for mbedtls_ecp_modulus_setup
.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
be1bf15f76
bignum_mod: Updated optred_modulus_setup
to use function input.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
c6e68ed85d
bignum_mod: Added mbedtls_mpi_opt_red_struct
structure.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
0f718c9ed0
bignum_mod: Fixed code-style
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
f055ad61dc
bignum_mod: Added static standard_modulus_setup()
.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
88e16dfa2a
bignum_mod: Refactored mbedtls_mpi_mod_modulus_setup()
...
This patch removes the `int_rep` input parameter for modular
setup, aiming to align it with the optred variant.
Test and test-suite helper functions have been updated
accordingly.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
67ebaaf8a0
test_suite_bignum: Removed test_read_modulus()
.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Minos Galanakis
bbe9db4b29
binum_mod: Added mbedtls_mpi_mod_optred_modulus_setup()
.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-16 13:48:47 +01:00
Paul Elliott
680233dc3f
Merge pull request #7680 from paul-elliott-arm/raw_ecp_mod_p448
...
[Bignum] Split out raw ECP mod p448
2023-06-16 13:46:25 +01:00
Dave Rodgman
e07c670e47
Allow all.sh to override intrinsics vs asm selection
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 13:21:28 +01: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
b46217d5c1
tls: never destroy a priavte key that is not owned/created by TLS module
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 13:18:52 +02: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
4520a8f312
config_psa: only KEY_PAIR_USE includes PUBLIC_KEY
...
While the other (IMPORT, EXPORT, GENERATE, DERIVE) only include
the USE one.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
aac957b493
config_psa: always enable PUBLIC_KEY when any KEY_PAIR is enabled
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
ecbc9c77ea
test_driver_extension: manage public and private keys the same way
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
f4d7ede72c
config_psa: fix logic for updating legacy symbols
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
38a3e8d10c
config_psa: ECP_C do not enable ECC_KEY_PAIR_DERIVE
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
92214c7af3
crypto_config_test_driver_extension: remove leftover comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
b0d9aaee1c
psa: move PSA_WANT checks to check_crypto_config
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
c51cba92a3
config_psa: avoid repetitions when including MBEDTLS symbols
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00
Valerio Setti
01951f01ad
changelog: added entries for explaining changes of this PR
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 12:26:26 +02:00