mbedtls/library
Manuel Pégourié-Gonnard 79ae7eb4d1 Use deterministic ECDSA in PSA when we do in legacy
This fixes the two failing cases in test_suite_pk when ECP_RESTARTABLE
and USE_PSA_CRYPTO are both enabled. The two failing cases where

    ECDSA restartable sign/verify: ECDSA, max_ops=0 (disabled)
    ECDSA restartable sign/verify: ECKEY, max_ops=0 (disabled)

associated with test function pk_sign_verify_restart(). The failure was
caused by the interaction of several things that are each reasonable on
their own:

1. The test function relies on ECDSA restartable, which is reasonable as it
allows making sure that the generated signature is correct with a simple
memcmp().
2. The implementation of pk_sign_restartable() has a shortcut to
dispatch to the sign function (as opposed to sign_restartable) when
restart is disabled (max_ops == 0).
3. When USE_PSA is enabled, the sign function dispatches to PSA, which
so far always used ECDSA (non-deterministic) even when the non-PSA
version would use deterministic ECDSA.

This could be fixed by changing any of those. I chose (3) because I
think it makes sense that when PK dispatches to PSA instead of legacy
this should not change which version of ECDSA is selected.

OTOH, I think it makes sense to keep (2), because that means more
opportunities to dispatch to PSA.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-12-09 10:07:19 +01:00
..
.gitignore
aes.c
aesni.c
aesni.h
aria.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
asn1parse.c Deprecate mbedtls_asn1_free_named_data() 2022-11-07 15:42:44 -05:00
asn1write.c Merge pull request #6467 from davidhorstmann-arm/fix-unusual-macros-0 2022-10-25 19:55:29 +02:00
base64.c
bignum.c Use mbedtls_mpi_core_sub_int() in mbedtls_mpi_sub_abs() 2022-11-22 14:58:15 +00:00
bignum_core.c Merge pull request #6547 from yanesca/extract_mod_exp_from_prototype 2022-11-29 21:40:07 +01:00
bignum_core.h Merge pull request #6547 from yanesca/extract_mod_exp_from_prototype 2022-11-29 21:40:07 +01:00
bignum_mod.c Bignum Mod: improve documentation and style 2022-11-28 14:58:08 +00:00
bignum_mod.h Bignum Mod: improve documentation and style 2022-11-28 14:58:08 +00:00
bignum_mod_raw.c Bignum Mod Raw: pass endianness as a parameter 2022-11-25 17:55:00 +00:00
bignum_mod_raw.h Bignum Mod Raw: pass endianness as a parameter 2022-11-25 17:55:00 +00:00
bn_mul.h
camellia.c
ccm.c
chacha20.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
chachapoly.c
check_crypto_config.h
cipher.c Merge pull request #6381 from tom-cosgrove-arm/pr2164 2022-11-25 10:55:10 +00:00
cipher_wrap.c
cipher_wrap.h
cmac.c
CMakeLists.txt Move mps modules to the correct library 2022-11-26 14:18:45 +01:00
common.h Explain why p + n isn't good enough 2022-11-25 13:34:59 +01:00
constant_time.c Merge pull request #6289 from gabor-mezei-arm/6237_Add_conditional_assign_and_swap_for_bignum 2022-10-19 15:51:19 +02:00
constant_time_internal.h Don't test mbedtls_mpi_core_lt_ct with 0 limbs 2022-11-09 11:18:38 +01:00
constant_time_invasive.h
ctr_drbg.c
debug.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
des.c
dhm.c
ecdh.c
ecdsa.c
ecjpake.c
ecp.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
ecp_curves.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
ecp_internal_alt.h
ecp_invasive.h
entropy.c
entropy_poll.c
entropy_poll.h
gcm.c
hash_info.c
hash_info.h
hkdf.c
hmac_drbg.c
lmots.c
lmots.h
lms.c
Makefile Move mps modules to the correct library 2022-11-26 14:18:45 +01:00
md.c
md5.c
md_wrap.h
memory_buffer_alloc.c
mps_common.h
mps_error.h
mps_reader.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
mps_reader.h
mps_trace.c
mps_trace.h
net_sockets.c
nist_kw.c
oid.c
padlock.c
padlock.h
pem.c
pk.c
pk_wrap.c Use deterministic ECDSA in PSA when we do in legacy 2022-12-09 10:07:19 +01:00
pk_wrap.h
pkcs5.c
pkcs7.c Fix memory leak on error in pkcs7_get_signers_info_set 2022-11-27 22:02:10 +01:00
pkcs12.c
pkparse.c
pkwrite.c
pkwrite.h
platform.c
platform_util.c
poly1305.c Remove more now-redundant definitions of inline 2022-11-25 13:26:44 +01:00
psa_crypto.c Merge pull request #6426 from aditya-deshpande-arm/driver-wrapper-key-agreement 2022-12-01 11:40:52 +00:00
psa_crypto_aead.c Move declaration of mbedtls_cipher_info_from_psa into psa_crypto_cipher.h 2022-11-02 09:25:38 +00:00
psa_crypto_aead.h
psa_crypto_cipher.c Fix NULL+0 undefined behavior in ECB encryption and decryption 2022-11-23 14:16:52 +01:00
psa_crypto_cipher.h Improve documentation for psa_crypto_cipher.h 2022-11-02 09:29:50 +00:00
psa_crypto_client.c
psa_crypto_core.h Merge branch 'development' into driver-wrapper-key-agreement 2022-11-22 17:58:52 +00:00
psa_crypto_driver_wrappers.h
psa_crypto_ecp.c Minor formatting fixes to address code review comments 2022-11-29 16:53:29 +00:00
psa_crypto_ecp.h Fix formatting and code comments 2022-11-07 10:43:29 +00:00
psa_crypto_hash.c
psa_crypto_hash.h
psa_crypto_invasive.h
psa_crypto_its.h
psa_crypto_mac.c Move declaration of mbedtls_cipher_info_from_psa into psa_crypto_cipher.h 2022-11-02 09:25:38 +00:00
psa_crypto_mac.h
psa_crypto_pake.c psa_crypto_pake: initialize psa_status_t stack variables 2022-11-22 18:52:17 +01:00
psa_crypto_random_impl.h
psa_crypto_rsa.c
psa_crypto_rsa.h
psa_crypto_se.c
psa_crypto_se.h
psa_crypto_slot_management.c
psa_crypto_slot_management.h
psa_crypto_storage.c
psa_crypto_storage.h
psa_its_file.c
ripemd160.c
rsa.c
rsa_alt_helpers.c
rsa_alt_helpers.h
sha1.c
sha256.c Merge pull request #6467 from davidhorstmann-arm/fix-unusual-macros-0 2022-10-25 19:55:29 +02:00
sha512.c Merge pull request #6467 from davidhorstmann-arm/fix-unusual-macros-0 2022-10-25 19:55:29 +02:00
ssl_cache.c
ssl_ciphersuites.c
ssl_client.c fix various issues 2022-11-09 22:43:31 +08:00
ssl_client.h
ssl_cookie.c
ssl_debug_helpers.h Change ticket_flag base on review 2022-11-14 03:16:22 +00:00
ssl_misc.h fix comments and function name issues 2022-11-28 17:34:06 +08:00
ssl_msg.c Merge pull request #6264 from hannestschofenig/rfc9146_2 2022-11-29 09:25:14 +01:00
ssl_ticket.c
ssl_tls.c guards transform_earlydata 2022-11-28 17:34:06 +08:00
ssl_tls12_client.c Merge pull request #6264 from hannestschofenig/rfc9146_2 2022-11-29 09:25:14 +01:00
ssl_tls12_server.c Merge pull request #6264 from hannestschofenig/rfc9146_2 2022-11-29 09:25:14 +01:00
ssl_tls13_client.c tls13: Add definition of mbedtls_ssl_{write,read}_early_data 2022-11-23 14:29:37 +01:00
ssl_tls13_generic.c Fix various issues cause rebase to latest code 2022-11-15 10:33:53 +00:00
ssl_tls13_invasive.h
ssl_tls13_keys.c fix various format issues 2022-11-29 15:19:27 +08:00
ssl_tls13_keys.h fix comments and function name issues 2022-11-28 17:34:06 +08:00
ssl_tls13_server.c Rename new session ticket name for TLS 1.3 2022-11-19 20:12:35 +08:00
threading.c
timing.c
version.c
x509.c Shared code to free x509 structs 2022-10-28 12:51:35 -04:00
x509_create.c
x509_crl.c Shared code to free x509 structs 2022-10-28 12:51:35 -04:00
x509_crt.c Merge pull request #6265 from Kabbah/x509-info-hwmodulename-hex 2022-11-08 17:11:07 +01:00
x509_csr.c Shared code to free x509 structs 2022-10-28 12:51:35 -04:00
x509write_crt.c Merge pull request #6121 from daverodgman/pr277 2022-10-31 13:27:49 +00:00
x509write_csr.c