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
Andrzej Kurek
67fdb3307d
Add a possibility to write subject alt names in a certificate
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-17 11:45:36 -04:00
Andrzej Kurek
ccdd975286
Add a certificate exercising all supported SAN types
...
This will be used for comparison in unit tests.
Add a possibility to write certificates with SAN
in cert_write.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-17 11:45:36 -04:00
Andrzej Kurek
1a75269589
Move mbedtls_x509_san_list to x509.h
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-17 11:45:36 -04: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
Paul Elliott
c05f51ded9
Convert comments over to X rather than N
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-17 14:29:44 +01: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
Xiaokang Qian
424da8aa36
Revert to 224bit random data no need leading bit "1"
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
b7f9950234
Increase bit size to 225 for SECP224K1 test cases
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
86cb08ba27
Add comments about how the mod_inv data is generated
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
d244c83dfe
Update ecp mul_inv test cases
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
e4dc798b59
Change coding styles of white space
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
8ca64374b1
Tidy up ecp mul_inv_test code
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
3d0c2be8c2
Add ecp test cases for mont mul and inv after named moduli setup
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Xiaokang Qian
5e25f80d8a
Add ecp test function for mont mul and inv
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-05-17 10:02:52 +00:00
Przemek Stekiel
da97ad9f14
Use valid MD5 dependency for test
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-17 09:26:42 +02:00
Yanray Wang
6397673cb8
build_info.h: change location of including config_psa.h
...
In build_info.h, some macros are defined based on PSA_WANT_XXX symbol.
This commit tweaks the location of including config_psa.h
so that macros in build_info.h could imply config options correctly.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-05-17 13:57:22 +08:00
Gilles Peskine
ff7a346201
Merge pull request #7416 from bharsaklemukesh975/update-pkparse-tests-to-use-AES
...
Updating test-ca.key to use AES instead of DES
2023-05-16 19:15:16 +02:00
Gilles Peskine
63df4ec3ca
Merge pull request #7589 from daverodgman/pr4990
...
Replace references to Mbed Crypto (rebase)
2023-05-16 19:14:51 +02:00
Paul Elliott
6b1f7f101f
Use const where appropriate
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-16 17:51:48 +01:00
Paul Elliott
235c1947fb
Group memory allocations earlier
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-16 17:51:48 +01:00
Paul Elliott
34b08e5005
Convert over to using X, X_limbs
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-16 17:51:48 +01:00
Paul Elliott
4fa8334bae
Convert curve 448 to use ecp core functions
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-16 17:51:48 +01:00
Minos Galanakis
2056d09893
bignum: Updated documentation for mbedtls_mpi_shift_l()
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-05-16 17:16:26 +01:00
Minos Galanakis
0144b35f7d
bignum: Updated mbedtls_mpi_shift_l
to use the core method.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-05-16 17:16:26 +01:00
Paul Elliott
f0806bee66
Merge pull request #7489 from minosgalanakis/ecp/7246_xtrack_core_shift_l
...
[Bignum]: Introduce left shift from prototype
2023-05-16 17:13:19 +01:00
Dave Rodgman
8508e50d3d
Make use of MBEDTLS_STATIC_ASSERT
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:43:48 +01:00
Dave Rodgman
ed59ea76a6
Document minimum size for DEBUG_BUF_SIZE
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:42:40 +01:00
valord577
5bfcd1c63b
simplify code
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:42:40 +01:00
valord577
176e92711c
code style
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:42:40 +01:00
valord577
536893c22f
make code readable and change var name
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:42:40 +01:00
valord577
24da0cd0f9
send debug msg if contains '\n'
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:42:40 +01:00