summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/ecdh
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05Replace OPENSSL_cleanse() with explicit_bzero().jsing1-1/+1
2019-09-05Provide prototype for ecdh_KDF_X9_63()jsing1-1/+7
2019-09-05Include correct header.jsing1-1/+1
2019-09-05style(9) and whitespace.jsing1-65/+72
2019-09-05Restore per-file license/copyright removed in OpenSSL commit 4f22f40507f.jsing1-5/+48
2019-09-05Remove ECDH_KDF_X9_62 wrapper.jsing1-12/+0
2019-09-05Provide ECDH KDF for X9.63 as needed for CMS ECC.jsing1-0/+81
From OpenSSL 1.1.1b. ok tb@ inoguchi@
2019-01-19Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb1-4/+18
This commit adds missing API for ECDH/ECDSA_verify. from markus
2018-09-02Elliptic curve arithmetic only makes sense between points that belong totb1-1/+5
the same curve. Some Wycheproof tests violate this assumption, making ECDH_compute_key() compute and return garbage. Check that pub_key lies on the curve of the private key so that the calculations make sense. Most paths that get here have this checked (in particular those from OpenSSH and libssl), but one might get here after using d2i_* or manual computation. discussed with & ok jsing; "good catch!" markus
2018-04-14make ENGINE_finish() succeed on NULL and simplify callers as intb1-8/+5
OpenSSL commit 7c96dbcdab9 by Rich Salz. This cleans up the caller side quite a bit and reduces the number of lines enclosed in #ifndef OPENSSL_NO_ENGINE. codesearch.debian.net shows that almost nothing checks the return value of ENGINE_finish(). While there, replace a few nearby 'if (!ptr)' with 'if (ptr == NULL)'. ok jsing, tested by & ok inoguchi
2017-05-02use freezero() instead of memset/explicit_bzero + free. Substantiallyderaadt1-4/+2
reduces conditional logic (-218, +82). MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c wasn'tt quite right. Two other tricky bits with ASN1_STRING_FLAG_NDEF and BN_FLG_STATIC_DATA where the condition cannot be collapsed completely. Passes regress. ok beck
2017-01-29Send the function codes from the error functions to the bit bucket,beck3-22/+17
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
2016-12-21Explicitly export a list of symbols from libcrypto.jsing1-7/+3
Move the "internal" BN functions from bn.h to bn_lcl.h and stop exporting the bn_* symbols. These are documented as only being intended for internal use, so why they were placed in a public header is beyond me... This hides 363 previously exported symbols, most of which exist in headers that are not installed and were never intended to be public. This also removes a few crusty old things that should have died long ago (like _ossl_old_des_read_pw). But don't worry... there are still 3451 symbols exported from the library. With input and testing from inoguchi@. ok beck@ inoguchi@
2015-09-18avoid void * pointer arithmeticbcook1-2/+2
ok miod@
2015-09-13Only check for key truncation if no KDF function is being used.jsing1-4/+4
ok beck@ miod@
2015-09-13Merge ech_ossl.c into ech_key.c - not much point having one file with ajsing2-215/+146
four line function and a tonne of license text. ok beck@
2015-09-13Provide ECDH_size().jsing3-4/+11
"jajaja" miod@
2015-09-13Check ECDH output buffer length and avoid truncation.jsing3-6/+16
Currently, if you call ECDH_compute_key() it will silently truncate the resulting key if the output buffer is less than the key size. Instead, detect this condition and return an error. If the buffer provided is larger than the key length, zero the remainder. ok beck@ miod@ "+ shivers"
2015-09-13Lob a style(9) grenade in here.jsing6-181/+176
2015-09-10Correct spelling of OPENSSL_cleanse.jsing1-2/+2
ok miod@
2015-02-09BN_CTX_get() can fail - consistently check its return value.jsing1-3/+5
There are currently cases where the return from each call is checked, the return from only the last call is checked and cases where it is not checked at all (including code in bn, ec and engine). Checking the last return value is valid as once the function fails it will continue to return NULL. However, in order to be consistent check each call with the same idiom. This makes it easy to verify. Note there are still a handful of cases that do not follow the idiom - these will be handled separately. ok beck@ doug@
2015-02-07Delete a lot of #if 0 code in libressl.doug2-23/+2
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
2014-07-12if (x) FOO_free(x) -> FOO_free(x).miod1-4/+5
Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
2014-07-11Only import cryptlib.h in the four source files that actually need it.jsing1-6/+5
Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
2014-07-10Explicitly include <openssl/opensslconf.h> in every file that referencesjsing3-6/+13
an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
2014-07-09remove unused, private version strings except SSL_version_strbcook1-3/+1
Also remove unused des_ver.h, which exports some of these strings, but is not installed. ok miod@ tedu@
2014-06-12tags as requested by miod and teduderaadt6-6/+6
2014-06-07malloc() result does not need a cast.deraadt1-1/+1
ok miod
2014-05-22if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefullymiod1-1/+1
eyeballed before applying. Contributed by Cyril Roelandt on tech@
2014-04-27Use C99 initializers for the various FOO_METHOD structs. More readable, andmiod1-8/+2
avoid unreadable/unmaintainable constructs like that: const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { EVP_PKEY_CMAC, EVP_PKEY_CMAC, 0, "CMAC", "OpenSSL CMAC method", 0,0,0,0, 0,0,0, cmac_size, 0, 0,0,0,0,0,0,0, cmac_key_free, 0, 0,0 }; ok matthew@ deraadt@
2014-04-17Change library to use intrinsic memory allocation functions instead ofbeck2-6/+6
OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
2014-04-15we don't use these files for buildingtedu1-76/+0
2014-04-15remove FIPS mode support. people who require FIPS can buy something thattedu1-19/+0
meets their needs, but dumping it in here only penalizes the rest of us. ok beck deraadt
2014-04-15Moved to regress/lib/libcrypto.miod1-374/+0
2014-04-14remove auto-generated dependencies from the old unused build system, soderaadt1-40/+0
that it is easier to find code pieces. They are getting in the way. ok miod
2014-04-13Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod1-11/+6
2014-04-13Import OpenSSL 1.0.1gmiod2-5/+9
2012-10-13import OpenSSL-1.0.1cdjm6-1/+41
2011-11-03import OpenSSL 1.0.0edjm1-2/+1
2010-10-01resolve conflicts, fix local changesdjm1-17/+16
2010-10-01import OpenSSL-1.0.0adjm2-3/+3
2009-01-09resolve conflictsdjm1-16/+17
2009-01-05update to openssl-0.9.8i; tested by several, especially krw@djm1-11/+21
2008-09-06import of OpenSSL 0.9.8hdjm8-0/+1337