Commit graph

24768 commits

Author SHA1 Message Date
Gilles Peskine
6c607e5a55 Remove declarations of the nonstandard function strcasecmp
It is no longer used.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-26 19:38:40 +02:00
Gilles Peskine
017f0b7369 Stop supporting non-canonical case in mpi_write_string test data
We're using the non-standard function strcasecmp() just so that the case
of digits beyond 9 can be different in the library and in the test data.
Use matching case in the test data, and use a standard function for the
comparison.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-26 19:38:40 +02:00
Tom Cosgrove
09d23786f6
Merge pull request #7429 from xkqian/bignumber_update_comments
Update links to references in bignum
2023-04-26 16:21:56 +01:00
Jerry Yu
db368dea88 fix clang test fail
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-26 16:55:37 +08: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
Jerry Yu
61c4cfa2a7 Add compiler version checks.
When `MBEDTLS_AESCE_C` enabled and the compiler
is not expected, we should raise error to user.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-26 13:06:01 +08:00
Jerry Yu
a1a039dba6 Improve minimum compiler versions document
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-26 10:21:42 +08: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
Przemek Stekiel
d14e04ea72 Use ASSERT_COMPARE for comapring buffers
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-25 14:31:28 +02: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
Przemek Stekiel
aede2ad554 Optimize code (pake role type, freeing buffers)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-25 14:30:34 +02:00
Przemek Stekiel
6e628a4e7b Add undfined role for ec j-pake
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-25 13:11:36 +02:00
Jerry Yu
f015a93f98 Add msvc version document
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-25 10:38:03 +08:00
Jerry Yu
8f0e3d4c22 fix wrong compiler checks
- Add msc version check
- remove HAVE_ASM due to conflict with check_config

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-25 10:24:53 +08: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
Valerio Setti
14bfdbf908 test: update guards also for pkwrite and pkparse
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:53:21 +02:00
Valerio Setti
8bb93bb44c test: fix max value in test_mx32
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
valerio
e50831c639 test: minor fix for non-initialized variable
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
valerio
95e57c3517 doc: update use-psa-crypto.md
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
valerio
32f2ac9a18 test: proper positioning of USE_PSA_INIT + added missing exit labels
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
valerio
cf35d774fe doc: update USE_PSA_CRYPTO description
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Valerio Setti
285dae83dd test: fix USE_PSA_INIT/DONE for SSL test suite
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Valerio Setti
569c171015 test: fix USE_PSA_INIT/DONE for x509 test suite
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Valerio Setti
b79f7db9b0 test: fix USE_PSA_INIT/DONE for PK test suite
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02: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
Przemek Stekiel
5346396c48 Fix code-style
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-24 09:01:41 +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
Przemek Stekiel
758aef60c5 Add guards for mbedtls_psa_crypto_free()
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-24 08:10:01 +02:00
Przemek Stekiel
774f9debf2 Init PSA in fuzz programs
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-24 08:07:20 +02:00
Przemek Stekiel
6cec5e9d9e Add changelog entry (PSA initialization in sample programs)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-24 08:03:30 +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
Manuel Pégourié-Gonnard
43fb9c83d8 Add link to review guideline fro contributors
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-04-21 11:19:44 +02: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
Jerry Yu
a7d454cec2 Remove unnecessary check
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-20 10:32:38 +08:00