openssl/crypto/ec
Billy Brumley b783beeadf [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present.

This PR allows EC_GROUP_set_generator to compute the cofactor for all curves of cryptographic interest. Steering scalar multiplication to more SCA-robust code.

This issue affects persisted private keys in explicit parameter form, where the (optional) cofactor field is zero or absent.

It also affects curves not built-in to the library, but constructed programatically with explicit parameters, then calling EC_GROUP_set_generator with a nonsensical value (NULL, zero).

The very old scalar multiplication code is known to be vulnerable to local uarch attacks, outside of the OpenSSL threat model. New results suggest the code path is also vulnerable to traditional wall clock timing attacks.

CVE-2019-1547

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9827)
2019-09-05 10:21:04 +01:00
..
asm make ecp_nistz256_point_add_vis3() local 2019-08-09 09:11:07 +01:00
curve448 New function EVP_MD_free() 2019-09-04 10:38:13 +02:00
build.info s390x assembly pack: accelerate scalar multiplication 2019-08-15 16:27:38 +02:00
curve25519.c Fixed linux_x86_icc compiler errors in EC code related to __uint128_t/__int128_t 2019-04-11 08:40:40 +10:00
ec2_oct.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec2_smpl.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ec_ameth.c Fix the default digest algorthm of SM2 2019-02-27 10:05:17 +08:00
ec_asn1.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec_check.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec_curve.c s390x assembly pack: accelerate scalar multiplication 2019-08-15 16:27:38 +02:00
ec_cvt.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec_err.c Regenerate mkerr files 2019-07-16 05:26:28 +02:00
ec_key.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec_kmeth.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec_lcl.h Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ec_lib.c [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it 2019-09-05 10:21:04 +01:00
ec_mult.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ec_oct.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ec_pmeth.c Support SM2 certificate signing 2019-06-28 18:58:19 +08:00
ec_print.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecdh_kdf.c Added X963KDF API 2019-05-16 11:43:41 +10:00
ecdh_ossl.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ecdsa_ossl.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecdsa_sign.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecdsa_vrf.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
eck_prn.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_mont.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecp_nist.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecp_nistp224.c Fix 9bf682f which broke nistp224_method 2019-08-16 12:58:14 +02:00
ecp_nistp256.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecp_nistp521.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecp_nistputil.c Fix various mistakes in ec_GFp_nistp_recode_scalar_bits comment. 2019-05-31 18:14:50 -04:00
ecp_nistz256_table.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_nistz256.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecp_oct.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00
ecp_s390x_nistp.c s390x assembly pack: accelerate ECDSA 2019-08-15 16:27:38 +02:00
ecp_smpl.c Enable curve-spefific ECDSA implementations via EC_METHOD 2019-08-15 16:27:38 +02:00
ecx_meth.c Make the EC code available from inside the FIPS provider 2019-08-06 11:19:07 +01:00