Dave Rodgman
84eaefa43e
Use designated initializers for mbedtls_mpi
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-11 16:02:46 +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
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
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
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
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
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
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
fee70a5342
test_suite_ecp: Extended ecp_mul_inv
tests for optimised reduction.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-06-22 16:35:30 +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
David Horstmann
a5f7de1df2
Refactor injecting errors in the second round
...
Use a single function rather than 2 similar ones and pass the round that
is desired.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-22 15:32:57 +01:00
David Horstmann
25c907071f
Test extra inputs and outputs at the end of J-PAKE
...
Add tests for supplying inputs or requesting outputs when a J-PAKE
computation has already completed
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-22 15:22:35 +01:00
David Horstmann
a62d712cf8
Add testing for extra calls during a round
...
Test that extra calls to psa_pake_input() and psa_pake_output() during a
round return the correct error.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-22 15:22:35 +01:00
David Horstmann
e7f21e65b6
Change J-PAKE internal state machine
...
Keep track of the J-PAKE internal state in a more intuitive way.
Specifically, replace the current state with a struct of 5 fields:
* The round of J-PAKE we are currently in, FIRST or SECOND
* The 'mode' we are currently working in, INPUT or OUTPUT
* The number of inputs so far this round
* The number of outputs so far this round
* The PAKE step we are expecting, KEY_SHARE, ZK_PUBLIC or ZK_PROOF
This should improve the readability of the state-transformation code.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-22 15:22:35 +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
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
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
Valerio Setti
30fdc03819
pk: remove useless internal function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:24:05 +02:00
Valerio Setti
545a0d643f
test: replace occurencies of ECP_LIGHT with PK_HAVE_ECC_KEYS
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-19 19:24:05 +02:00
Demi Marie Obenour
16442cc929
x509parse tests: Replace TEST_ASSERT with TEST_EQUAL
...
The latter gives much more informative errors.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-06-19 11:10:27 -04: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
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
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
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
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
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
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
Gilles Peskine
f45a5a0ddd
Merge pull request #7700 from silabs-Kusumit/PBKDF2_output_bytes
...
PBKDF2: Output bytes
2023-06-16 10:08:02 +02:00
Paul Elliott
a2e48f751b
Split out mbedtls_ecp_mod_p448_raw()
...
Switch testing over to using the generic raw functions.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-06-15 17:16:38 +01:00
Dave Rodgman
2e7d57270e
Merge pull request #7624 from daverodgman/aes-perf
...
AES perf improvements
2023-06-15 12:10:06 +01:00
Tom Cosgrove
6edf8b8c7b
Merge pull request #7451 from yanrayw/7376_aes_128bit_only
...
Introduce config option of 128-bit key only in AES calculation
2023-06-15 10:35:32 +01:00
Gilles Peskine
f22983bd1c
Merge pull request #7411 from mprse/extract-key-ids-test
...
Improve tests for parsing x509 SubjectKeyId and AuthorityKeyId
2023-06-14 19:16:29 +02:00
Przemek Stekiel
b3eaf8c2ed
Use predefined serial numer in certificates
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-14 14:25:21 +02:00
Manuel Pégourié-Gonnard
14f65a47c8
Merge pull request #7714 from daverodgman/sha3-update
...
SHA-3 update
2023-06-12 15:13:30 +02:00
Gilles Peskine
e5e8ba654e
Merge pull request #7666 from mprse/ip_info
...
OPC UA: parsing IP's in SubjectAltNames & printing info
2023-06-08 15:23:21 +02:00
Dave Rodgman
33701acf55
Fix test dependencies
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-08 13:48:42 +01:00
Kusumit Ghoderao
b31059f072
Remove negative tests for input validation
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-08 16:42:37 +05:30
Dave Rodgman
a8af4f4da2
Fix test dependency
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 18:27:09 +01:00
Dave Rodgman
8b0deef299
Add HMAC DRBG SHA-3 tests
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 18:05:02 +01:00
Dave Rodgman
05d71ffe5b
Merge remote-tracking branch 'origin/development' into sha3-updated
2023-06-07 18:02:04 +01:00
Dave Rodgman
2468ad10d7
Add tests for invalid paramters
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 17:06:35 +01:00
Dave Rodgman
9c1128edaa
Add tests for xor over large blocks
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:38:26 +01:00
Andrzej Kurek
c40a1b552c
Remove references to x509_invasive.h
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-06-07 08:54:34 -04:00
Przemek Stekiel
0b683a9a57
Remove redundant test and add tests: keyid only (without issuer)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
401c8e3a97
Adapt test (use path instead of bytes) after rebase
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00