Commit graph

24929 commits

Author SHA1 Message Date
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
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
Minos Galanakis
99453ad9f0 bignum_core.py: Simplified result calculation for BignumCoreShiftL
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-05-16 15:28:19 +01:00
Paul Elliott
55a701afec
Merge pull request #7564 from gabor-mezei-arm/7262_fix_ouput_width_in_ecc_mod_koblitz
[Bignum] Fix output width in ecp_mod_koblitz()
2023-05-16 15:24:31 +01:00
Gilles Peskine
7e37aa85a2
Merge pull request #5904 from gilles-peskine-arm/psa-doc-implementing-new-mechanism
Check list for implementing a new mechanism in PSA crypto
2023-05-16 14:04:15 +02:00
Gilles Peskine
de4cbc54d3 Fix copypasta
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-16 12:04:57 +02:00
Paul Elliott
926bcb04fe
Merge pull request #7532 from AndrzejKurek/remove-leading-zeroes-ip-parsing
Disallow leading zeroes when parsing IPv4 addresses
2023-05-15 13:59:10 +01:00
Paul Elliott
aba165b58c
Merge pull request #7586 from gilles-peskine-arm/gitignore-objects-at-root
Ignore *.o everywhere
2023-05-15 13:57:24 +01:00
Paul Elliott
7d8b371d4e
Merge pull request #7580 from adeaarm/cmake_options_warning_fix
Set LANGUAGES explicitly in CMakeLists.txt project()
2023-05-15 13:53:26 +01:00
Gabor Mezei
a274041190
Fix comment
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-15 14:50:17 +02:00
Gilles Peskine
8075f76708 Ignore *.o everywhere
We don't commit *.o files anywhere, not even as test data. So ignore them
everywhere.

This resolves *.o files not being ignored under 3rdparty/p256-m.

Also remove a redundant ignore of *.exe in a subdirectory.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-12 13:58:05 +02:00
Gabor Mezei
23b10109bb
Add test cases to test overflow in the Kobltz reduction
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-12 12:34:12 +02:00
Gabor Mezei
b6653f3e27
Update comments
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-12 12:34:12 +02:00
Gabor Mezei
dcaf99ebb8
Add another round in the Koblitz reduction
The addition can result in an overflow so another round is needed
in the reduction.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-12 12:34:05 +02:00
Antonio de Angelis
1a0feb394c Set LANGUAGES explicitly in CMakeLists.txt project()
When Mbed TLS is built as a TF-M subproject with a recent
enough version of cmake (i.e. 3.22), GNUInstallDirs complains
about LANGUAGES not being set in project when the short
signature is used. So make sure to use the normal signature,
i.e. set the LANGUAGES option explicitly

Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
2023-05-11 18:39:20 +02:00
Bence Szépkúti
e06d863267
Merge pull request #7538 from bensze01/in-tree-redirects
Add in-tree configuration file for Readthedocs redirects
2023-05-11 15:07:06 +02:00
Minos Galanakis
013167ed7f bignum_common.py: Addressed minor typos
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-05-11 10:54:44 +01:00
Bence Szépkúti
71f41deebc Work around Readthedocs command parsing bug
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2023-05-11 10:41:03 +02:00
Paul Elliott
481a6a8edb
Merge pull request #7482 from gabor-mezei-arm/6029_use_core_api_in_ecp_mod_koblitz
[Bignum] Use core API in ecp_mod_koblitz()
2023-05-10 17:24:46 +01:00
Manuel Pégourié-Gonnard
1d046fa0dd
Merge pull request #6010 from mprse/ffdh_import_export
FFDH 1, 2A, 2B: FFDH add support for import/export key, key agreement, key generation + tests
2023-05-10 11:40:54 +02:00
Bence Szépkúti
09f8df86ac Reword the API token explanation in redirects.yaml
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2023-05-09 21:07:30 +02:00
Bence Szépkúti
6a89a04ffe Use if statement for post_build control flow
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2023-05-09 20:11:51 +02:00
Gilles Peskine
8d42cfddd6
Merge pull request #7539 from gilles-peskine-arm/mbedtls_error_pair_t-smaller
Halve size of mbedtls_error_pair_t
2023-05-09 15:55:51 +02:00
Bence Szépkúti
ddfd0a27df
Merge pull request #7399 from lpy4105/issue/7014/certificate-audit-script
cert_audit: Add test certificate date audit script
2023-05-09 13:10:01 +02:00
Pengyu Lv
eb2c39ed2b Install cryptography only on linux platform
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-09 02:15:58 +00:00
Gilles Peskine
97edeb4fb8
Merge pull request #6866 from mprse/extract-key-ids
Extracting SubjectKeyId and AuthorityKeyId in case of x509 V3 extensions v.2
2023-05-08 20:38:29 +02:00
Przemek Stekiel
61aed064c5 Code optimization
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-08 11:15:59 +02:00
Przemek Stekiel
67d3f52617 Use int instead uint in test function arguments
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-08 11:15:59 +02:00
Przemek Stekiel
ed9fb78739 Fix parsing of KeyIdentifier (tag length error case) + test
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-08 11:15:54 +02:00
Gilles Peskine
aaa26f25be
Merge pull request #7552 from davidhorstmann-arm/remove-doxygen-mainpage-content
Remove API docs mainpage content
2023-05-07 20:35:41 +02:00
Gilles Peskine
fca2d2b78c
Merge pull request #7555 from yuhaoth/pr/remove-delay-milliseconds-test
Remove delay milliseconds test to workaround randome platform-suite fail.
2023-05-07 20:34:44 +02:00
Gilles Peskine
4837e9d1c0 Correct comment about mbedtls error codes
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-07 20:27:13 +02:00
Jerry Yu
8beb25041e fix wrong target detection
For mingw with `-std=c99`, WIN32 is not defined.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-06 13:45:12 +08:00
Tom Cosgrove
ef468ea2ba
Merge pull request #6740 from xkqian/tls13_fix_unkown_pk_type
Remove useless debug log of pk type from test cases
2023-05-05 16:14:59 +01:00
Gabor Mezei
9bf1aaf385
Fix input parameter alignment in P256K1 test cases
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-05 16:32:28 +02:00
Gabor Mezei
908f40014c
Determine special cases in-place in the common Koblitz function
Remove parameter used by the special cases and check for special cases in-place.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-05 16:31:19 +02:00
Tom Cosgrove
501fb3abf3
Merge pull request #5894 from Xeenych/patch-1
Reduce RAM - move some variables to .rodata
2023-05-05 14:54:32 +01:00
Manuel Pégourié-Gonnard
58d8c23785
Merge pull request #7514 from valeriosetti/issue7513
PK: move the opaque context to a new member of the mbedtls_pk_context structure
2023-05-05 15:40:32 +02:00
Dave Rodgman
417c4c8b2c
Merge pull request #5770 from mstorsjo/win32-fallback-timer
Use QueryPerformanceCounter as fallback timer on non-x86 mingw
2023-05-05 14:31:41 +01:00
Przemek Stekiel
837d2d1c5e mbedtls_psa_export_ffdh_public_key: return fixed key size
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-05 12:33:46 +02:00
Valerio Setti
92da2a79aa pk: improve description for the next opaque ID field
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-05 12:31:23 +02:00
Valerio Setti
fc90decb74 pkwrite: removing unused/duplicated variables
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-05 12:30:40 +02:00
Jerry Yu
484a9e138f Remove delay milliseconds test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-05-05 17:03:29 +08:00
Valerio Setti
4f387ef277 pk: use better naming for the new key ID field
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-05 10:59:32 +02:00
Valerio Setti
048cd44f77 pk: fix library code for using the new opaque key solution
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-05 10:59:32 +02:00
Valerio Setti
e00954d0ed pk: store opaque key ID directly in the pk_context structure
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-05 10:57:26 +02:00
Przemek Stekiel
134cc2e7a8 Fix code style
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-05 10:13:47 +02:00
Manuel Pégourié-Gonnard
71f88ecc52
Merge pull request #6838 from jethrogb/jb/pkix-curdle
Read and write RFC8410 keys
2023-05-05 10:02:21 +02:00