summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ec
AgeCommit message (Collapse)Author
2016-11-04Add assembler code for the nist 256-bit GFp curve, written initially byMiod Vallat
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@
2016-10-19unifdef OPENSSL_NO_CMSJoel Sing
2016-09-03remove unused variableBob Beck
2016-08-31Fix some very unnecessary convoultion.Bob Beck
ok krw@
2016-03-20" the the " -> " the ", or in a couple of cases replace the superfluousKenneth R Westerback
"the" with the obviously intended word. Started with a "the the" spotted by Mihal Mazurek.
2016-03-12Add error handling to the remaining calls to bn_wexpand().Brent Cook
Noticed by pascal-cuoq from Github: https://github.com/libressl-portable/openbsd/issues/56 ok beck@
2016-03-10http -> https for a few more IETF URLs in comments or man pagesMichael McConville
2015-10-16Remove pointless externs - the structs are declared in the same files aJoel Sing
few lines above.
2015-10-16Expand DECLARE_ASN1_ALLOC_FUNCTIONS and DECLARE_ASN1_FUNCTIONS_constJoel Sing
macros. The only change in the generated assembly is due to line numbering.
2015-10-16Remove pointless uses of DECLARE_ASN1_ENCODE_FUNCTIONS_const.Joel Sing
DECLARE_ASN1_FUNCTIONS_const already includes this macro so using both means we end up with duplicate function prototypes and externs.
2015-10-13Convert ECParameters_dup() from a macro that uses ASN1_dup_of() into anJoel Sing
actual function. This removes the last ASN1_dup_of usage from the tree. Feedback from doug@ and miod@
2015-09-29Replace remaining M_ASN1_BIT_STRING_(new|free) macros with calls toJoel Sing
ASN1_BIT_STRING_(new|free). ok beck@ doug@
2015-09-10Correct spelling of OPENSSL_cleanse.Joel Sing
ok miod@
2015-09-10Replace remaining M_ASN1_STRING_* macros with calls to ASN1_STRING_*.Joel Sing
This is not the same as the macro expansion, however the ASN1_STRING_* functions do match the macro expansions. ok doug@ miod@
2015-07-29Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generatedJoel Sing
assembly. ok bcook@
2015-07-25Expand ASN.1 template macros - the generated assembly only differs byJoel Sing
changes to line numbers.
2015-06-20Handle NIST curve names.Joel Sing
From OpenSSL. ok miod@ (a while ago)
2015-06-20Have ECPKParameters_print() include the NIST curve name, if known.Joel Sing
From OpenSSL. ok miod@ (a while ago).
2015-06-20Provide EC_curve_nid2nist() and EC_curve_nist2nid().Joel Sing
From OpenSSL. Rides libcrypto bump. ok miod@ (a while ago)
2015-05-20No need to check the return value of memcpy() if you actually checked thisMiod Vallat
pointer for NULL the line above; ok doug@
2015-04-29Add missing BN_CTX_end() calls.Doug Hogan
After calling BN_CTX_start(), there must be a BN_CTX_end() before returning. There were missing BN_CTX_end() calls in error paths. One diff chunk was simply removing redundant code related to this. ok deraadt@
2015-03-20Fix a memory leak in an error path.Doug Hogan
From OpenSSL commit 5e5d53d341fd9a9b9cc0a58eb3690832ca7a511f. ok guenther@, logan@
2015-03-19Fix several crash causing defects from OpenSSL.Ted Unangst
These include: CVE-2015-0209 - Use After Free following d2i_ECPrivatekey error CVE-2015-0286 - Segmentation fault in ASN1_TYPE_cmp CVE-2015-0287 - ASN.1 structure reuse memory corruption CVE-2015-0289 - PKCS7 NULL pointer dereferences Several other issues did not apply or were already fixed. Refer to https://www.openssl.org/news/secadv_20150319.txt joint work with beck, doug, guenther, jsing, miod
2015-02-15In ec_wNAF_mul(), move the declaration of tmp_wNAF higher in scope, so thatMiod Vallat
all the function's exit paths can make sure it gets freed. Coverity CID 78861 tweaks & ok doug@ jsing@
2015-02-13fix leaking of bn, coverity issue 105351Bob Beck
ok doug@
2015-02-11Guenther has plans for OPENSSL_NO_CMS, so revert this for the moment.Bob Beck
2015-02-11get rid of OPENSSL_NO_CMS code we do not use.Bob Beck
ok miod@
2015-02-10Expand the IMPLEMENT_ASN1_ALLOC_FUNCTIONS macro so that the code is visibleJoel Sing
and functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-10Expand the IMPLEMENT_ASN1_FUNCTIONS_{const,fname,name} macros so that theJoel Sing
code is visible and functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-09BN_CTX_get() can fail - consistently check its return value.Joel Sing
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-09Remove unused GOST test that prevents clang from building libcrypto.Doug Hogan
clang warns that it is unused and we have -Werror enabled. This test isn't hooked up to anything yet. We can add it back with a future GOST update. clang 3.5 can now build libssl and libcrypto as long as you use CFLAGS=-Wno-pointer-sign. "seems reasonable" bcook@, miod@
2015-02-08Use `> 0' instead of `!= 0' as a successful condition forMiod Vallat
EC_POINT_is_at_infinity() and EC_POINT_is_on_curve(), for they may return -1 should an error arise. ok doug@ jsing@
2015-02-07Delete a lot of #if 0 code in libressl.Doug Hogan
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-12-03handle the (impossible) situation of a size_t - 1 buffer fromTheo de Raadt
EC_POINT_point2oct so that later allocation does not overflow with miod
2014-12-03Spotted another opportunity to use reallocarray().Theo de Raadt
ok miod
2014-11-12Fix GOST TC26-B curve description.Miod Vallat
2014-11-11Don't free garbage in ec_wNAF_mul() if wNAF could be allocated butPhilip Guenther
other allocations in the same block couldn't. problem pointed out by David Ramos on the openssl-dev list ok miod@ doug@
2014-11-09GOST crypto algorithms (well, most of them), ported from the removed GOSTMiod Vallat
engine to regular EVP citizens, contributed by Dmitry Eremin-Solenikov; libcrypto bits only for now. This is a verbatim import of Dmitry's work, and does not compile in this state; the forthcoming commits will address these issues. None of the GOST code is enabled in libcrypto yet, for it still gets compiled with OPENSSL_NO_GOST defined. However, the public header gost.h will be installed.
2014-10-07EC_KEY_set_group() does an EC_GROUP_dup() of its argument, so we don'tMiod Vallat
need to do it in ec_copy_parameters() prior to invoking EC_KEY_set_group(). ok doug@ jsing@
2014-07-13Fix memory leak.Loganaden Velvindron
OK from beck@ and miod@
2014-07-12if (x) FOO_free(x) -> FOO_free(x).Miod Vallat
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.Joel Sing
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 referencesJoel Sing
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-10Stop including standard headers via cryptlib.h - pull in the headers thatJoel Sing
are needed in the source files that actually require them. ok beck@ miod@
2014-07-09remove unused, private version strings except SSL_version_strBrent Cook
Also remove unused des_ver.h, which exports some of these strings, but is not installed. ok miod@ tedu@
2014-07-01Avoid a NULL deref in i2d_ECPrivateKey() when an EC_KEY lacks the public keyMiod Vallat
member (which is perfectly acceptable). From BoringSSL (Adam Langley), commit f71a27920a903c9c36bcb31e68781b17674d3fd2
2014-06-12tags as requested by miod and teduTheo de Raadt
2014-06-07malloc() result does not need a cast.Theo de Raadt
ok miod
2014-05-31copy a comment placed in other files; req from miodTheo de Raadt
2014-05-30more: no need for null check before freeTheo de Raadt
ok tedu guenther