summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* If a NULL or zero cofactor is passed to EC_GROUP_set_generator(),tb2019-09-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | try to compute it using Hasse's bound. This works as long as the cofactor is small enough. Port of Brumley's fix for CVE-2019-1547 in OpenSSL 1.1.1 (old license) tests & ok inoguchi input & ok jsing commit 30c22fa8b1d840036b8e203585738df62a03cec8 Author: Billy Brumley <bbrumley@gmail.com> Date: Thu Sep 5 21:25:37 2019 +0300 [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: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/9781)
* Add various macros and controls for EC_PKEY_CTX.jsing2019-09-061-5/+95
| | | | | | | | | These are needed for the upcoming EC CMS support (nothing else appears to use them). This largely syncs our ec_pmeth.c with OpenSSL 1.1.1b. With input from inoguchi@ and tb@. ok inoguchi@ tb@
* Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb2019-01-191-4/+4
| | | | | | | Pass const method to EC_KEY_METHOD_get_*() to get rid of an XXX. from markus
* Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb2019-01-191-1/+11
| | | | | | This commit adds missing API for ECDH/ECDSA_verify. from markus
* Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb2019-01-191-1/+30
| | | | | | | This commit adds init/free, support for signing, setting and getting the method, engine support as well as extra data. from markus
* Add a const qualifier to the 'key' argument of i2o_ECPublicKey() andtb2018-05-191-2/+2
| | | | | | | | | one to the last argument of each one of i2s_ASN1_OCTET_STRING(), s2i_ASN1_OCTET_STRING(), i2s_ASN1_INTEGER(), i2s_ASN1_ENUMERATED(), and i2s_ASN1_ENUMERATED_TABLE(). tested in a bulk build by sthen ok jsing
* Add assembler code for the nist 256-bit GFp curve, written initially bymiod2016-11-041-1/+7
| | | | | | | | | Intel. Obtained from BoringSSL, with some integration work borrowed from OpenSSL 1.0.2; assembler code for arm and sparc64 borrowed from OpenSSL 1.1.0. None of this code is enabled in libcrypto yet. ok beck@ jsing@
* Convert ECParameters_dup() from a macro that uses ASN1_dup_of() into anjsing2015-10-131-3/+2
| | | | | | actual function. This removes the last ASN1_dup_of usage from the tree. Feedback from doug@ and miod@
* Provide EC_curve_nid2nist() and EC_curve_nist2nid().jsing2015-06-201-1/+3
| | | | | | | | From OpenSSL. Rides libcrypto bump. ok miod@ (a while ago)
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* Everything sane has stdio, and FILE *. we don't need ifdefs for this.beck2014-05-291-4/+0
| | | | ok to firebomb from tedu@
* Cope with the removal of openssl/symhacks.hderaadt2014-04-131-1/+0
|
* Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod2014-04-131-10/+18
|
* resolve conflictsdjm2012-10-131-5/+64
|
* resolve conflicts, fix local changesdjm2010-10-011-120/+694
|
* resolve conflictsdjm2008-09-061-18/+301
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-2/+0
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-0/+245