Gabor Mezei
19c6f47dbc
Allocate the right amount of memory
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-26 15:22:11 +02:00
Gabor Mezei
fead53311b
Remove unused macro
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-26 15:20:01 +02:00
Gabor Mezei
03367fe42d
Ignore carry since it can not be generated
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-26 14:08:45 +02:00
Gabor Mezei
d2c0ba172c
Fix value in comment
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-26 14:08:44 +02:00
Gabor Mezei
7097447b84
Ensure input parameter size for Koblitz reduction
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-26 14:08:35 +02:00
Gabor Mezei
8183c5dcc3
Use core API in ecp_mod_koblitz()
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-26 14:03:29 +02:00
Janos Follath
91a618375a
Merge pull request #7427 from minosgalanakis/ecp/7258_ecp_mod_p256K1_add_test_cases
...
ECP: Add Unit Tests for secp256k1
2023-04-26 08:52:24 +01:00
Tom Cosgrove
10f40916eb
Merge pull request #7462 from daverodgman/clz_size_opt
...
clz size/perf optimisation
2023-04-26 07:06:30 +01:00
Dave Rodgman
4f30a6aa59
Remove undesirable test
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-25 18:07:29 +01:00
Dave Rodgman
2e863ecde9
Remove unnecessary if to save 16 bytes
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-25 17:40:49 +01:00
Paul Elliott
d3fbbe55f7
Merge pull request #7448 from gabor-mezei-arm/7261_roll_loop_in_ecp_mod_koblitz
...
Roll up the loop in ecp_mod_koblitz()
2023-04-25 15:27:21 +01:00
Minos Galanakis
4dfed0a186
test_suite_ecp: Refactored ecp_mod_p256k1
to alignt with ecp_mod_p192k1
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-25 13:30:59 +01:00
Minos Galanakis
9c2c81f996
ecp_curves: Renamed ecp_mod_p256k1
-> mbedtls_ecp_mod_p256k1
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-25 13:30:59 +01:00
Minos Galanakis
d6751dcd8b
ecp_curves: Added unit-tests for secp256k1
...
This patch introduces basic unit-testing for the `ecp_mod_p256k1()`.
The method is exposed through the ecp_invasive interface, and
the standard testing data is being provided by the python framework.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-25 13:30:59 +01:00
Gilles Peskine
ad450d5a92
Merge pull request #7463 from valeriosetti/issue7460-part2
...
Pass pk_context pointer to PK wrappers instead of void pointer
2023-04-24 17:41:39 +02:00
Janos Follath
53c6553deb
Merge pull request #7450 from xkqian/bignumber_ecp_update
...
Update gen_prvkey_mx paras to align with comments and c code
2023-04-24 13:44:39 +01:00
Dave Rodgman
0f16d560aa
Fix documentation
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-24 12:53:45 +01:00
Manuel Pégourié-Gonnard
feb941a77a
Merge pull request #7465 from valeriosetti/issue7460-part3
...
Check remaning dependencies on ECP in PK module
2023-04-24 13:06:09 +02:00
Manuel Pégourié-Gonnard
0281d7630b
Merge pull request #7449 from valeriosetti/issue7446
...
Clean up & improve PK write test functions
2023-04-24 13:05:16 +02:00
valerio
0b0486452c
improve syms.sh script for external dependencies analysis
...
It is now possible to analyze also modules and not only
x509 and tls libraries.
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 10:34:08 +02:00
Valerio Setti
bf974b9b1c
test_suite_pkwrite: replace memcpy with memmove
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 10:26:24 +02:00
Valerio Setti
547b3a4ab5
fix typos
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 10:24:37 +02:00
Valerio Setti
7bacaf859a
fix new line difference in Windows
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 08:53:00 +02:00
Gilles Peskine
935a987b2b
Merge pull request #7436 from AndrzejKurek/x509-verify-san-ip
...
x509 SAN IP parsing
2023-04-21 22:00:58 +02:00
Gabor Mezei
f921f4d228
Use loop for two passes in the reduction
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-21 14:09:06 +02:00
Dave Rodgman
bbf881053d
Document undefined case. Clarify test code.
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-21 12:54:40 +01:00
Paul Elliott
4bf08f86bb
Merge pull request #7425 from minosgalanakis/ecp/7257_ecp_mod_p224k1_add_test_cases
...
ECP: Add Unit Tests for secp224k1
2023-04-21 11:18:23 +01:00
Dave Rodgman
678e63007c
Remove test-case for all-zero
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-20 12:28:59 +01:00
Dave Rodgman
880a6b34c2
Further size optimisation
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-20 11:52:55 +01:00
valerio
38992cb833
pk: pass pk_context pointer to wrappers intead of void one
...
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-20 12:02:34 +02:00
Dave Rodgman
d54cb83584
Fix tests
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-19 18:46:17 +01:00
Dave Rodgman
fe8a8cd100
Size/perf optimisation for mbedtls_mpi_core_clz
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-19 17:59:12 +01:00
Andrzej Kurek
90117db5dc
Split a complex condition into separate ones
...
Make it more readable
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 10:43:35 -04:00
Minos Galanakis
357b9e1342
test_suite_ecp: Refactored ecp_mod_p224k1
to alignt with ecp_mod_p192k1
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-18 14:13:20 +01:00
Minos Galanakis
9d80879f90
ecp_curves: Introduced mbedtls_ecp_mod_p224k1()
...
This patch introduces a `MBEDTLS_STATIC_TESTABLE` helper
method which exposes `ecp_mod_p256k1()` to the test-framework
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-18 14:13:20 +01:00
Minos Galanakis
e5dab975c6
ecp_curves: Added unit-tests for secp224k1
...
This patch introduces basic unit-testing for the `ecp_mod_p224k1()`.
The method is exposed through the ecp_invasive interface, and
the standard testing data is being provided by the python framework.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-18 14:13:20 +01:00
Andrzej Kurek
af04f6307f
Add an IPv4 mapped IPv6 test
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 07:26:59 -04:00
Andrzej Kurek
8bc2cc92b5
Refactor IPv6 parsing
...
Make it more readable
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 07:26:27 -04:00
Janos Follath
3c3b94a31b
Merge pull request #7424 from gabor-mezei-arm/7256_unit_tests_for_p192k1
...
Add unit tests for ecp_mod_p192k1()
2023-04-18 12:19:40 +01:00
Valerio Setti
2280895784
test: properly check written PEM buffer len
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 12:59:06 +02:00
Valerio Setti
232a006a46
test: fix extension in DER test files
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 12:53:19 +02:00
Manuel Pégourié-Gonnard
1b59e76a8f
Merge pull request #7431 from valeriosetti/issue7404
...
driver-only: ECP.PSA starter
2023-04-18 11:56:16 +02:00
Andrzej Kurek
ea3e71fa37
Further refactor IPv4 parsing
...
Make it more readable
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 05:54:50 -04:00
Valerio Setti
15cac17da5
test: fix dependencies in DER and PEM tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 11:32:58 +02:00
Valerio Setti
c9cb5324b7
test: specify input file type through enum
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 11:20:36 +02:00
Valerio Setti
8b7d4323da
test: add Makefile target for the generated DER files
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 11:08:44 +02:00
Valerio Setti
3401b306ab
test: use proper macros for checks
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 10:42:53 +02:00
Xiaokang Qian
a089614cdf
Update gen_prvkey_mx paras to align with comments and c code
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-04-18 06:49:55 +00:00
Dave Rodgman
d455e90384
Merge pull request #7383 from yanesca/lts-lifetime-clarification
...
Clarify LTS lifetime
2023-04-17 18:18:30 +01:00
Valerio Setti
28567abf4f
test: add DER file format for pkwrite tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-17 18:43:55 +02:00