Gabor Mezei
caac83c517
Fix comment
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-16 17:41:26 +02:00
Gabor Mezei
03558b847e
Add _raw
function to P256K1
...
Modified the testing to use the generic fast reduction test function.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-16 17:30:03 +02:00
Gabor Mezei
e42bb6294e
Add _raw
function to P224K1
...
Modified the testing to use the generic fast reduction test function.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-16 17:30:03 +02:00
Gabor Mezei
dacfe56370
Add _raw
function to P192K1
...
Modified the testing to use the generic fast reduction test function.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-05-16 17:29:57 +02: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
Przemek Stekiel
0b11ee0888
Fix compilation errors(unused variables, guards)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-16 13:26:06 +02:00
Gilles Peskine
de4cbc54d3
Fix copypasta
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-16 12:04:57 +02:00
Przemek Stekiel
690ff698f7
mbedtls_x509_crt_free: release authorityCertIssuer sequence
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-16 11:08:30 +02:00
Przemek Stekiel
69482f9499
Add test to cover memory leak in authorityCertIssuer case
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-16 10:33:02 +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
Valerio Setti
f70b3e08b1
pk: fix: explicilty set const in casted value in mbedtls_pk_ec_ro
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-15 12:57:40 +02:00
Valerio Setti
3f00b84dd1
pk: fix build issues
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-15 12:57:06 +02:00
Valerio Setti
77a75685ed
pk: align library and tests code to the new internal functions
...
Note = programs are not aligned to this change because:
- the original mbedtls_pk_ec is not ufficially deprecated
- that function is used in tests when ECP_C is defined, so
the legacy version of that function is available in that
case
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-15 11:18:46 +02:00
Valerio Setti
229bf1031f
pk: make mbedtls_pk_ec internal when !ECP_C
...
mbedtls_pk_ec() is not an ideal function because:
- it provides direct access to the ecp_keypair structure wrapped
by the pk_context and
- this bypasses the PK module's control
However, since for backward compatibility, it cannot be deprecated
immediately, 2 alternative internal functions are proposed.
As a consequence:
- when ECP_C is defined, then the legacy mbedtls_pk_ec is available
- when only ECP_LIGHT is defined, but ECP_C is not, then only the
new internal functions will be available
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-15 11:13:55 +02:00
Fredrik Hesse
95bd5a5004
Minor adjustments after review.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-12 15:01:59 +01:00
Fredrik Hesse
0ec8a90d48
Replace references to Mbed Crypto with Mbed TLS through-out documentation and comments.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-12 15:00:45 +01:00
Fredrik Hesse
cc207bc379
Replace references to Mbed Crypto with Mbed TLS through-out documentation and comments.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-12 14:59:01 +01: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
Tom Cosgrove
6d62faca8e
Only include psa_pake_setup() and friends if some PAKE algorithms are required
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-05-12 12:36:24 +01: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
Przemek Stekiel
ea52e1a43f
Add changelog entry (FFDH driver dispatch)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 12:23:12 +02:00
Przemek Stekiel
c80e7506a0
Handle simple copy import/export before driver dispatch
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 12:06:00 +02:00
Przemek Stekiel
c4019fa74f
Fix peer vs our key missmatch in ffdh key agreement transparent driver
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 12:06:00 +02:00
Przemek Stekiel
a59255f04f
Adapt guards in ffdh driver
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 12:06:00 +02:00
Przemek Stekiel
c49163e786
Adapt test driver configuration for FFDH
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 12:06:00 +02:00
Przemek Stekiel
bfba51d672
Add FFDH support for transparent drivers(generate, export public key)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 12:05:53 +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
Przemek Stekiel
dccb20204a
Add test component for accelerated FFDH
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-11 11:31:51 +02: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
Mukesh Bharsakle
4823d5ff0e
Merge branch 'Mbed-TLS:development' into update-pkparse-tests-to-use-AES
2023-05-10 12:35:19 +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
Pengyu Lv
a57f677474
cert_audit: Fix DER files missed from parsing
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
ee870a6e83
cert_audit: Remove merge_auditdata
...
We maintain a dict with unique AudiData objects
(AuditData with unique underlying X.509 objects).
We don't need merge_auditdata anymore.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
e09d27e723
cert_audit: Use dictionary to store parsed AuditData
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
31e3d12be9
cert_audit: Output format improvement
...
We should print all the information for each objects
found every line. This makes it easy to analyze the
output.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
13f2ef4949
cert_audit: Calculate identifier for X.509 objects
...
The identifier is calculated SHA1 hex string from
the DER encoding of each X.509 objects. It's useful
for finding out the identical X.509 objects.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
fd72d9f556
cert_audit: Fix bug in check_cryptography_version
...
check_cryptography_version didn't provide helpful
message with Python < 3.6, because re.Match object
is not subscriptable.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
0b4832bbf5
cert_audit: Sort the outputs by not_valid_after date
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
fe13bd3d0e
cert_audit: Merge audit_data for identical X.509 objects
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00
Pengyu Lv
e245c0c734
cert_audit: Support parsing file with multiple PEMs
...
Previously, if a file had multiple PEM objects, only
the first one would be parsed. This commit add the
support so that we could parse all the PEM objects
in the file.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-05-10 09:41:33 +08:00