Commit graph

25016 commits

Author SHA1 Message Date
Dave Rodgman
1416cba81f Gate all arm asm on Armv6 or better architecture
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 18:07:48 +01:00
Dave Rodgman
0ffc6f48fa First draft at fixing the choice of asm
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 17:19:10 +01:00
Dave Rodgman
a1f51c213c Fix Changelog formatting
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 13:02:18 +01:00
Dave Rodgman
99318e6138 Add build test for armclang / Cortex-M0 / -Os
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 12:27:42 +01:00
Dave Rodgman
a55e12c525 Add Changelog
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 12:15:26 +01:00
Dave Rodgman
4489c8dcef Disable bignum assembly for certain Arm M-class CPUs
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-24 12:06:48 +01:00
Dave Rodgman
2b22834357
Merge pull request #7644 from tom-daubney-arm/alignment_h_refactoring
Refactor reading of multi-byte values using functions in alignment.h
2023-05-24 08:32:52 +01:00
Thomas Daubney
f9f0ba8211 Use functions in alignment.h to get value
Refactor code using get functions from alignment.h to
read values.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-05-24 06:24:16 +01:00
Dave Rodgman
b2e551d347
Merge pull request #6943 from ucko/2023b-platform 2023-05-23 18:37:54 +01:00
Manuel Pégourié-Gonnard
9dc9204b77
Merge pull request #7554 from valeriosetti/issue7073-reshape
Avoid parse/unparse public ECC keys in PK with USE_PSA when !ECP_C
2023-05-23 15:08:45 +02:00
Manuel Pégourié-Gonnard
d7d1039755
Merge pull request #7634 from AndrzejKurek/fix-bad-keyfile-prereqs
Fix wrong makefile target
2023-05-23 09:27:29 +02:00
Valerio Setti
016264b6cb pk: fix a return value and a typo in comment
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-22 18:40:35 +02:00
Valerio Setti
a7cb845705 pk: add checks for the returned ECC family
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-22 18:39:43 +02:00
Gilles Peskine
50729eac74
Merge pull request #7611 from yanrayw/7609_tweak_build_info_include_order
build_info.h: fix mutual implications with config_psa.h temporarily
2023-05-22 17:49:55 +02:00
Paul Elliott
26070670d6
Merge pull request #7565 from gabor-mezei-arm/7263_split_out_Koblitz_raw_functions
[Bignum] Split out _raw Koblitz reduction functions
2023-05-22 16:03:17 +01:00
Andrzej Kurek
00d55988d9 Fix wrong makefile target
Missing tab and a prerequisite that's not a file
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-22 09:37:55 -04:00
Yanray Wang
37db332658 build_info.h: rewrite comment
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-05-22 16:50:39 +08:00
Dave Rodgman
7f97675b64
Merge pull request #5237 from davidhorstmann-arm/demo-out-of-tree 2023-05-19 21:27:24 +01:00
Aaron M. Ucko
5e4a01bff5 mbedtls/platform.h: Avoid potential macro redefinition warnings.
Some identifiers (e.g. mbedtls_free) can name either functions or
macros depending on configuration settings.  For those that turn out
to name macros, first clear out any existing macro definitions to
accommodate possible unconditional bulk symbol renaming.  (There
remains no standard provision for such renaming, but it's nevertheless
straightforward enough to do as desired, particularly with this change
in place.)

Signed-off-by: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
2023-05-19 10:50:06 -04:00
Valerio Setti
f57007dd1e pk: fixing and improving comments
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-19 13:54:39 +02:00
Dave Rodgman
a23565fd0c
Merge pull request #7621 from daverodgman/sizemax
Remove DIY SIZE_MAX definitions
2023-05-19 11:17:38 +01:00
Dave Rodgman
68ef1d6ee6 Remove DIY SIZE_MAX definitions
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-18 20:49:03 +01:00
Janos Follath
399fa48e95
Merge pull request #7479 from xkqian/bignumber_test_mul_inv_named_moduli
[Bignum] Bignumber test mul inv named moduli
2023-05-18 11:55:01 +01:00
Paul Elliott
9a11f8a122
Merge pull request #7573 from tom-cosgrove-arm/add-psa_want_alg_some_pake
Only include psa_pake_setup() and friends if some PAKE algorithms are required
2023-05-18 09:59:52 +01:00
Paul Elliott
aa266f29e6
Merge pull request #7602 from mprse/AuthorityKeyId_leak_fix
Fix for memory leak while parsing AuthorityKeyId ext
2023-05-18 09:57:56 +01:00
Xiaokang Qian
c8f677d33e Both compare the least significant limb 1 and the left limbs 0
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-18 03:41:31 +00:00
Xiaokang Qian
c1f5e54d2d Remove useless parameter iret for ecp mul_inv cases
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-18 02:02:48 +00:00
Dave Rodgman
e4cbab6945
Merge pull request #7607 from daverodgman/pr6511 2023-05-17 19:11:56 +01:00
Paul Elliott
8203f2d89f
Merge pull request #7535 from minosgalanakis/ecp/7264_enable_core_shift_l
[Bignum] Adjust mbedtls_mpi_core_shift_l to use the core function
2023-05-17 18:45:44 +01:00
Valerio Setti
c1541cb3c7 pk: minor fixes (guards and a wrong assignment)
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 19:23:02 +02:00
Gabor Mezei
d56e6e008b
Add input parameter length check for the Koblitz reduction
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-17 17:51:19 +02:00
Gabor Mezei
fa3f74145b
Add documentation
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-17 17:35:47 +02:00
Valerio Setti
483738ed67 tests: fixes for using the new public key raw format
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:38:39 +02:00
Valerio Setti
92c3f36866 test_suite_debug: fix USE_PSA_INIT/DONE guards in a test
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:38:34 +02:00
Valerio Setti
d7ca39511f tls12: use the the raw format for the public key when USE_PSA is enabled
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:36:18 +02:00
Valerio Setti
7ca7b90bc7 debug: add support for printing the new EC raw format
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:35:46 +02:00
Valerio Setti
a1b8af6869 pkwrap: update ECDSA verify and EC pair check to use the new public key
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:34:57 +02:00
Valerio Setti
4064dbbdb2 pk: update pkparse and pkwrite to use the new public key storing solution
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:33:07 +02:00
Valerio Setti
722f8f7472 pk: adding a new field to store the public key in raw format
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 15:31:21 +02:00
Valerio Setti
4ac9d44d83 pk: fix typos in description of mbedtls_pk_ec_[ro/rw]
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-17 12:32:13 +02:00
Manuel Pégourié-Gonnard
b1c0afe484
Merge pull request #7595 from valeriosetti/deprecate_pk_ec
Set mbedtls_pk_ec() as internal function when ECP_C is not defined
2023-05-17 12:27:03 +02:00
Yanray Wang
419a55e929 build_info.h: rewrite comment for inclusion of config_psa.h
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-05-17 18:22:34 +08:00
Xiaokang Qian
11dd5c0b36 Compare final result with ASSERT_COMPARE
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
c81272461e Check all of the limbs of result
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
1ae7ca435b Re-order the variable orders and rename them
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
78b93b1902 Refine error check for mbedtls_ecp_modulus_setup
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
afdea64b50 Remove the useless modulus validaty
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
631f63d29d Remove modulus double free
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
d3e86a170a Add back 255 bit test data for SECP224K1 test cases
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
5b6bedfaf3 Add comments to the data file for the cureve secp224k1
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00