9408b70513
check_config.h: revert HKDF requirements
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-09-13 18:08:54 +02:00
a06787a629
build_info.h: include config_psa.h also when MBEDTLS_PSA_CRYPTO_C
...
This is done to have PSA_WANT_xxx symbols available in check_config.h when MBEDTLS_PSA_CRYPTO_C.
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-09-13 18:08:54 +02:00
cf9d972a9a
Fix config for MBEDTLS_SSL_PROTO_TLS1_3
...
Remove MBEDTLS_HKDF_C as it is not needed since #5838
Reasoning: we need SHA-256 or SHA-384 via PSA because they're used by HKDF which is now always done via PSA. If in addition to that USE_PSA is enabled, then everything is done via PSA so that's enough. Otherwise, we need the software implementation of SHA-256 or SHA-384, plus MD_C because we're using a VIA_MD_OR_PSA_BASED_ON_USE_PSA as discussed above.
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-09-13 18:08:54 +02:00
a9a8816107
ssl.h: adapt guards for MBEDTLS_SSL_TLS1_3_TICKET_RESUMPTION_KEY_LEN
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-09-13 18:08:54 +02:00
6cf85a4bb0
update document abourt maximum ticket_age_tolerance
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2022-09-13 14:28:15 +08:00
fb3093a9cb
Use PSA_PAKE_ROLE_NONE in PSA_PAKE_OPERATION_INIT macro instead of 0
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-09-08 14:59:32 +02:00
7cd4eacbd4
Fix typo in mbedtls_ecjpake_write_shared_key() comment
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-09-08 14:57:55 +02:00
ecb221b1ff
Move operation buffer in operation struct and remove dynamic allocation
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-09-08 11:21:07 +02:00
fd6cca4448
CID update to RFC 9146
...
The DTLS 1.2 CID specification has been published as RFC 9146. This PR updates the implementation to match the RFC content.
Signed-off-by: Hannes Tschofenig <hannes.tschofenig@arm.com >
2022-09-07 17:15:05 +02:00
f000471c66
Add missing MD dependency for pkcs5_pbkdf2_hmac
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-09-02 04:07:15 -04:00
345a92b321
Adjust PKCS5 dependencies in check_config
...
It's possible to build PKCS5 with PSA instead of MD
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-09-02 04:03:25 -04:00
65bf73ed6a
Enable HMAC in config_psa.h regardless of MD availability
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-09-02 04:03:25 -04:00
890e78ae66
Deprecate mbedtls_pkcs5_pbkdf2_hmac
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-09-02 04:03:25 -04:00
dd36c76f09
Provide a version of pkcs5_pbkdf2_hmac without MD usage
...
Use the new implementation locally
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-09-02 04:03:25 -04:00
97fc247d6a
Merge pull request #6232 from AndrzejKurek/pkcs12-no-md
...
Remove MD dependency from pkcs12 module
2022-09-02 09:43:13 +02:00
5d881c36ea
pkcs7: Change copyright
...
Signed-off-by: Nick Child <nick.child@ibm.com >
2022-09-01 19:45:41 -05:00
390e61a47a
pkcs7.h: Make pkcs7 fields private
...
All fields in the mbedtls_pkcs7 struct have been made private with MBEDTLS_PRIVATE.
Signed-off-by: Nick Child <nick.child@ibm.com >
2022-09-01 19:45:41 -05:00
673a226698
pkcs7: add support for signed data
...
OpenSSL provides APIs to generate only the signted data
format PKCS7 i.e. without content type OID. This patch
adds support to parse the data correctly even if formatted
only as signed data
Signed-off-by: Nayna Jain <nayna@linux.ibm.com >
2022-09-01 19:45:41 -05:00
c9deb184b0
mbedtls: add support for pkcs7
...
PKCS7 signing format is used by OpenPOWER Key Management, which is
using mbedtls as its crypto library.
This patch adds the limited support of pkcs7 parser and verification
to the mbedtls. The limitations are:
* Only signed data is supported.
* CRLs are not currently handled.
* Single signer is supported.
Signed-off-by: Daniel Axtens <dja@axtens.net >
Signed-off-by: Eric Richter <erichte@linux.ibm.com >
Signed-off-by: Nayna Jain <nayna@linux.ibm.com >
2022-09-01 19:45:33 -05:00
7bd12c5d5e
Remove MD dependency from pkcs12 module
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-09-01 08:57:41 -04:00
89eb95a221
Add ticket age tolerance config option
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2022-08-31 23:24:25 +08:00
b764fb60aa
Remove MBEDTLS_MD_C dep in config_psa.h when ECJPAJE is wanted
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
12663092bc
Introduce mbedtls_ecjpake_write_shared_key() to export the EC J-PAKE shared key material before the KDF()
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
ed40782628
Fix SECP256R1 enable when PSA_WANT_ALG_JPAKE is defined
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
a557cb8c8b
Fixing XXX_ALG_ECJPAKE to XXX_ALG_JPAKE to match specification
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
7616ad28e3
Fix guard of ecjpake.h include in crypto_extra.h
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
63212ddf2f
Fix formatting of PSA_PAKE_OPERATION_INIT macro
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
7aaa34a1ba
Fix formatting of PSA_PAKE_OUTPUT_SIZE & PSA_PAKE_INPUT_SIZE macros
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
637d0a0290
Enable buildin PSA PAKE implementation when ECJPAKE_C is selected
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
35269d93da
Fill psa_pake_operation and INPUT/OUTPUT min/max sizes for PSA PAKE builtin implementation
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-31 10:49:18 +02:00
bf22a2500b
Merge pull request #6208 from AndrzejKurek/tls-tests-no-md-structured
...
Remove the dependency on MD from TLS 1.2 tests
2022-08-30 12:34:37 +02:00
8e5bdfbbcf
Improve programs/cert_write with a way to set extended key usages
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2022-08-30 10:08:43 +01:00
0edfa9dd26
Merge pull request #6207 from daverodgman/ticket_time
...
Fix type used for capturing TLS ticket generation time
2022-08-30 10:03:06 +01:00
cccb044804
Style & formatting fixes
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-08-23 05:26:02 -04:00
645ff5b8ff
Merge pull request #6095 from gabor-mezei-arm/6016_add_new_modulus_and_residue_structures
...
Add the new modulus and the residue structures with low level I/O operations
2022-08-23 09:02:43 +01:00
e02da81086
Update TLS1.2 dependencies description in mbedtls_config.h
...
It is possible to use it without MBEDTLS_SHAXXX defines and USE_PSA_CRYPTO
instead.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-08-22 17:46:50 -04:00
7e16ce3a72
Clarify TLS 1.2 dependencies with and without PSA crypto
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-08-22 17:46:50 -04:00
0ce93933e8
Merge pull request #6219 from KloolK/development
...
Fix minor typos
2022-08-22 21:47:21 +01:00
e5018c97f9
Merge pull request #6195 from superna9999/6149-driver-only-hashes-ec-j-pake
...
Driver-only hashes: EC J-PAKE
2022-08-22 17:28:15 +02:00
20ebaac85e
Merge pull request #6211 from tom-cosgrove-arm/explicit-warning-re-ct-conditions-not-0-or-1
...
Be explicit about constant time bignum functions that must take a 0 or 1 condition value
2022-08-22 17:24:04 +02:00
9ff6f8cdbd
Fix minor typos
...
Signed-off-by: Jan Bruckner <jan@janbruckner.de >
2022-08-22 16:05:58 +02:00
34ff6a7a31
Correct documentation for mbedtls_ecdsa_verify
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2022-08-19 11:17:36 +01:00
ecaba1c9b2
Make use of PSA crypto hash if MBEDTLS_MD_C isn't defined
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-19 11:49:22 +02:00
0d76341eac
Remove md_info by md_type in ecjpake context, use mbedtls_hash_info_get_size() to get hash length
...
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
2022-08-19 11:49:22 +02:00
10836a04a9
config: Fix requirements for MBEDTLS_X509_USE_C and MBEDTLS_X509_CREATE_C
...
Restore MBEDTLS_PK_PARSE_C as it was removed by mistake.
Fix module name in added warnings.
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-08-19 10:15:56 +02:00
12e69cb806
oid.h: remove MBEDTLS_MD_C guard
...
*** Comparing before-default -> after-default ***
x509parse: total 723; skipped 26 -> 26
x509write: total 41; skipped 8 -> 8
pem: total 13; skipped 0 -> 0
oid: total 28; skipped 0 -> 0
*** Comparing before-full -> after-full ***
x509parse: total 723; skipped 25 -> 25
x509write: total 41; skipped 0 -> 0
pem: total 13; skipped 0 -> 0
oid: total 28; skipped 0 -> 0
*** Comparing reference -> drivers ***
x509parse: total 723; skipped 89 -> 89
x509write: total 41; skipped 3 -> 3
pem: total 13; skipped 0 -> 0
oid: total 28; skipped 0 -> 0
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-08-19 10:15:56 +02:00
55c17430be
oid.h: remove redundant MBEDTLS_MD_C dependency
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-08-19 10:15:56 +02:00
278b6674bd
check_config.h: Adjust x509 dependencies (MBEDTLS_MD_C or MBEDTLS_USE_PSA_CRYPTO)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-08-19 10:15:56 +02:00
fd18366965
Adjust declared dependencies in library/x509*
...
*** Comparing before-default -> after-default ***
x509parse: total 723; skipped 26 -> 26
x509write: total 41; skipped 8 -> 8
*** Comparing before-full -> after-full ***
x509parse: total 723; skipped 25 -> 25
x509write: total 41; skipped 0 -> 0
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-08-19 10:15:56 +02:00
583816caaf
Be explicit about constant time bignum functions that must take a 0 or 1 condition value
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2022-08-18 14:09:18 +01:00