79ae7eb4d1
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> |
||
---|---|---|
.. | ||
.gitignore | ||
aes.c | ||
aesni.c | ||
aesni.h | ||
aria.c | ||
asn1parse.c | ||
asn1write.c | ||
base64.c | ||
bignum.c | ||
bignum_core.c | ||
bignum_core.h | ||
bignum_mod.c | ||
bignum_mod.h | ||
bignum_mod_raw.c | ||
bignum_mod_raw.h | ||
bn_mul.h | ||
camellia.c | ||
ccm.c | ||
chacha20.c | ||
chachapoly.c | ||
check_crypto_config.h | ||
cipher.c | ||
cipher_wrap.c | ||
cipher_wrap.h | ||
cmac.c | ||
CMakeLists.txt | ||
common.h | ||
constant_time.c | ||
constant_time_internal.h | ||
constant_time_invasive.h | ||
ctr_drbg.c | ||
debug.c | ||
des.c | ||
dhm.c | ||
ecdh.c | ||
ecdsa.c | ||
ecjpake.c | ||
ecp.c | ||
ecp_curves.c | ||
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 | ||
md.c | ||
md5.c | ||
md_wrap.h | ||
memory_buffer_alloc.c | ||
mps_common.h | ||
mps_error.h | ||
mps_reader.c | ||
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 | ||
pk_wrap.h | ||
pkcs5.c | ||
pkcs7.c | ||
pkcs12.c | ||
pkparse.c | ||
pkwrite.c | ||
pkwrite.h | ||
platform.c | ||
platform_util.c | ||
poly1305.c | ||
psa_crypto.c | ||
psa_crypto_aead.c | ||
psa_crypto_aead.h | ||
psa_crypto_cipher.c | ||
psa_crypto_cipher.h | ||
psa_crypto_client.c | ||
psa_crypto_core.h | ||
psa_crypto_driver_wrappers.h | ||
psa_crypto_ecp.c | ||
psa_crypto_ecp.h | ||
psa_crypto_hash.c | ||
psa_crypto_hash.h | ||
psa_crypto_invasive.h | ||
psa_crypto_its.h | ||
psa_crypto_mac.c | ||
psa_crypto_mac.h | ||
psa_crypto_pake.c | ||
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 | ||
sha512.c | ||
ssl_cache.c | ||
ssl_ciphersuites.c | ||
ssl_client.c | ||
ssl_client.h | ||
ssl_cookie.c | ||
ssl_debug_helpers.h | ||
ssl_misc.h | ||
ssl_msg.c | ||
ssl_ticket.c | ||
ssl_tls.c | ||
ssl_tls12_client.c | ||
ssl_tls12_server.c | ||
ssl_tls13_client.c | ||
ssl_tls13_generic.c | ||
ssl_tls13_invasive.h | ||
ssl_tls13_keys.c | ||
ssl_tls13_keys.h | ||
ssl_tls13_server.c | ||
threading.c | ||
timing.c | ||
version.c | ||
x509.c | ||
x509_create.c | ||
x509_crl.c | ||
x509_crt.c | ||
x509_csr.c | ||
x509write_crt.c | ||
x509write_csr.c |