Commit graph

11100 commits

Author SHA1 Message Date
Gilles Peskine
5c3d6e277c
Merge pull request #7575 from AndrzejKurek/URI-SAN-verification
Add partial support for URI SubjectAltNames verification
2023-06-05 16:46:47 +02:00
Gilles Peskine
b21f32eba6
Merge pull request #6257 from Laserdance100/development
Change macros in mps_common.h
2023-06-05 15:51:59 +02:00
Gilles Peskine
b47fb4cdd8
Merge pull request #7676 from valeriosetti/issue7485
PK: add support for check_pair() with "opaque" EC keys
2023-06-05 15:51:03 +02:00
Gilles Peskine
763c19afcb
Merge pull request #7639 from Taowyoo/yx/fix-time-tls13-client-server
Fix: correct calling to time function in tls13 client&server
2023-06-05 15:50:32 +02:00
Gilles Peskine
975d9c0faf
Merge pull request #7530 from AndrzejKurek/misc-subjectaltname-fixes
Miscellaneous fixes for SubjectAltName code / docs
2023-06-05 15:38:53 +02:00
Gilles Peskine
84b547b5ee
Merge pull request #7400 from AndrzejKurek/cert-write-sans
Add a possibility to generate certificates with a Subject Alternative Name
2023-06-05 15:38:38 +02:00
Valerio Setti
ede0c4676e pk_internal: minor rearrangement in mbedtls_pk_get_group_id()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-05 11:08:28 +02:00
valerio
8cbef4d55e pk: allow key pair checking for opaque keys
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-05 11:05:40 +02:00
valerio
eab9a85f4c pk_wrap: add support for key pair check for EC opaque keys
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-05 11:05:40 +02:00
Manuel Pégourié-Gonnard
f37b94b5bf
Merge pull request #7533 from valeriosetti/issue7484
PK: add support for private key writing with "opaque" EC keys
2023-06-05 10:53:53 +02:00
Dave Rodgman
e0bd2c2375
Merge branch 'development' into development
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-04 14:57:19 -04:00
Andrzej Kurek
e773978e68 Remove unnecessary addition to buffer size estimation
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-06-02 09:42:44 -04:00
Tom Cosgrove
9dc219ff9b
Merge pull request #7668 from tom-daubney-arm/code_size_md_light
Remove certain null pointer checks when only MD_LIGHT enabled
2023-06-02 13:09:00 +01:00
Andrzej Kurek
7c86974d6d Fix overflow checks in x509write_crt
Previous ones could still overflow.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-06-02 05:02:41 -04:00
Andrzej Kurek
154a605ae8 Change the name of the temporary san variable
Explain why it is used.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-06-01 18:20:26 +01:00
Paul Elliott
805a0a2d06
Merge pull request #7591 from minosgalanakis/ecp/6028_xtract_fast_reduction_curve25519
[Bignum] Implement fast reduction curve25519
2023-06-01 17:43:35 +01:00
Thomas Daubney
73cfde8f85 Remove certain null pointer checks when only MD_LIGHT enabled
When MD_LIGHT is enabled but MD_C is not then certain null
pointer checks can be removed on functions that take an
mbedtls_md_context_t * as a parameter, since MD_LIGHT does
not support these null pointers.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-06-01 13:05:28 +01:00
valerio
f9139e55ce pk: minor code fixes
- removing duplicated code
- uninitialized variable usage

Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
valerio
c6e6fb320f pk: fix guard position
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
valerio
e279e50a76 pk: optimized/reshape code for writing private key PEM
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
valerio
c0bac57ac9 pk: optimized/reshape code for writing private key DER
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
valerio
52b675ffc3 pk: extend pk_write_ec_private to support opaque keys
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
valerio
ba1fd32eda pk: optimize/reshape public key writing
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:41 +02:00
valerio
9ea26173d6 pk: uniformmize public key writing functions
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:40 +02:00
valerio
b727314133 pk: add internal helpers for opaque keys
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:40 +02:00
valerio
a87601dc11 pk_internal: add support for opaque keys for getting EC curve ID
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-06-01 11:06:40 +02:00
Manuel Pégourié-Gonnard
0b68784053
Merge pull request #7577 from mprse/ffdh_drivers
FFDH 3b: add driver testing (no TLS 1.3)
2023-06-01 10:26:08 +02:00
Manuel Pégourié-Gonnard
7b1136836c
Merge pull request #7438 from valeriosetti/issue7074
Avoid parse/unparse private ECC keys in PK with USE_PSA when !ECP_C
2023-06-01 10:06:45 +02:00
Gilles Peskine
a1b416670e
Merge pull request #7547 from silabs-Kusumit/PBKDF2_input_validation
PBKDF2: Input Validation
2023-06-01 10:05:34 +02:00
Przemek Stekiel
28111dbf06 Adapt guards for psa_is_dh_key_size_valid
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-31 09:30:58 +02:00
Przemek Stekiel
33c91eb5d3 Add driver support for DH import key and export public key
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-30 15:19:14 +02:00
Przemek Stekiel
055ffed563 Revert "Handle simple copy import/export before driver dispatch"
This reverts commit c80e7506a0.

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-05-30 15:19:02 +02:00
Paul Elliott
981d8b6fc7
Merge pull request #7566 from paul-elliott-arm/core_ecp_mod_p448
[Bignum] Convert ecp_mod_p448 over to using core functions
2023-05-25 17:11:57 +01:00
Valerio Setti
449803abff pkwrite: remove unnecessary code duplication
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-25 09:37:05 +02:00
Gilles Peskine
835be986e0
Merge pull request #7631 from tom-daubney-arm/remove_surplus_loop_condition_issue_7529
Remove extraneous check in for loop condition
2023-05-24 20:24:28 +02:00
Kusumit Ghoderao
91f99f52c4 Change output length parameter in pbkdf2_hmac_set_password
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 22:21:48 +05:30
Kusumit Ghoderao
d7a3f8065f Restructure set salt function
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 22:19:47 +05:30
Paul Elliott
7050662a48 Correct comment header block
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-05-24 17:31:57 +01:00
Minos Galanakis
e72bf2da3d ecp_curves: Adjusted the expected limb size for ecp_mod_p255().
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-05-24 15:13:42 +01:00
Valerio Setti
a541e0108b pkparse: avoid creating extra copy of the private key
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-24 16:02:36 +02:00
Valerio Setti
d0405093d9 tls: use pk_get_group_id() instead of directly accessing PK's structure
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-24 16:02:32 +02:00
Valerio Setti
1194ffa82f pk: minor code fixes/enhancements
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-24 14:00:26 +02:00
Valerio Setti
51aa52eba4 pk: fix key properties when importing private key
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-24 14:00:09 +02:00
Kusumit Ghoderao
aac9a581f8 Fix code style and initialize status
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 14:19:17 +05:30
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
Kusumit Ghoderao
bd6cefb3da Add HMAC specific function for setting password
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 12:36:34 +05:30
Kusumit Ghoderao
b538bb7a02 Restructure pbkdf2_set_salt function
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 12:32:14 +05:30
Kusumit Ghoderao
e66a8ad8d6 Define PSA_VENDOR_PBKDF2_MAX_ITERATIONS
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 12:30:43 +05:30
Kusumit Ghoderao
52fe517a77 Change pbkdf2 password to array
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-05-24 12:28:46 +05:30
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