summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Simplify ECDH_size() by using BN_num_bytes()tb2025-02-171-3/+3
| | | | ok jsing
* Remove some unneeded includes from ecdh.ctb2023-07-281-4/+1
|
* Pull up zeroing of out; drop unnecessary checktb2023-07-281-4/+3
| | | | | | | Move the zeroing of the output buffer a few lines up and remove an unnecessary check. requested/ok jsing
* Rename buflen to buf_len, use calloc/freezerotb2023-07-281-7/+8
| | | | | | | Some cosmetic tweaks in ecdh_compute_key(). Rename buflen to buf_len to match out_len, use calloc() and freezero(). ok jsing
* Move KDF handling to ECDH_compute_key()tb2023-07-281-31/+55
| | | | | | | | | | In OpenSSL e2285d87, the KDF handling was moved from the compute_key() method into the public API. A consequence of this change is that the ECDH_compute_key() API no longer returns -1 for some errors. Existing checks for <= 0 are safe as are those checking for the exact length as return value, which is all what the ecosystem seems to be doing. ok jsing
* Merge ecdh.h into ec.htb2023-07-281-91/+3
| | | | | | | The remaining two ECDH interfaces are relocated into ec.h. ecdh.h remains. It does nothing but include ec.h. ok jsing
* Excise ECDH_METHODtb2023-07-282-159/+1
| | | | | | | | Unlike ECDSA_METHOD, this has been unused forever but kind of needed to stay for symmetry with ECDSA_METHOD. Now we can finally take it behind the barn and remove its tendrils into ENGINE. ok jsing
* Remove ECDH errorstb2023-07-282-112/+1
| | | | | | | Much like the ECDSA errors, the ECDH errors have been unused for a while. Garbage collect them. ok jsing
* Fix two EC_POINT_is_on_curve() checkstb2023-07-241-2/+2
| | | | | | | This API can fail for various reasons, in which case it returns -1, so you need to check if (EC_POINT_is_on_curve_checks(...) <= 0). ok miod
* Revert accidental addition of cofactor ECDH supporttb2023-07-121-16/+2
| | | | This snuck in with ech_key.c r1.33 because I committed from a dirty tree.
* Hide symbols in hkdf, evp, err, ecdsa, and ecbeck2023-07-073-3/+13
| | | | | | (part 2 of commit) ok jsing@
* Mop up last uses of ECDHerror() and ECDSAerror()tb2023-07-051-6/+6
| | | | ok jsing
* ECDHerror() and ECDSAerror will go awaytb2023-07-051-8/+8
| | | | | | Move some trivial ones to ECerror(). discussed with jsing
* Merge ECDH code that will stay into ecdh.ctb2023-07-052-122/+63
|
* Drop useless ossl_ prefixestb2023-07-052-10/+23
| | | | discussed with jsing
* Unconditionally zero the ECDH keytb2023-07-021-6/+3
| | | | | | | While memset() is quite expensive, we can afford zeroing a few extra bytes to make this code more readable. ok beck jsing
* Move the EC_POINT a bit down and a * to the right placetb2023-07-021-3/+3
|
* ech_key.c: Fix includestb2023-07-021-3/+4
| | | | | We need stdint.h for uintptr_t, stdlib.h for malloc, ec.h for various things, but there's no need for objects. or sha.h.
* Reverse polarity to avoid an overlong linetb2023-07-011-5/+6
|
* Reword comment to fit on a single linetb2023-07-011-5/+2
|
* tmp is a silly name for a point on an elliptic curvetb2023-07-011-6/+6
|
* Garbage collect the now unused lentb2023-07-011-5/+3
|
* Test and assign for EC_KEY_get0_private_key()tb2023-07-011-3/+2
|
* Add a missing NULL check for grouptb2023-07-011-2/+3
| | | | ok jsing
* Reference commit needed in the next major bumptb2023-07-011-2/+2
|
* Simplify handling of rettb2023-07-011-6/+6
| | | | ok jsing
* Use BN_bn2binpad() instead of handrolling ittb2023-07-011-5/+3
| | | | | | | | | | As ugly as the BN_bn2binpad() internals are, what it does is quite handy with all sorts of EC stuff. So use it here too and eliminate some ugly manual pointer zeroing and offsets. Also switch len and buflen from size_t to int to remove an iffy cast: both are set by functions that return a non-negative int. ok jsing
* Remove unused y from ECDH key computationtb2023-07-011-5/+5
| | | | ok jsing
* Add missing RCS markertb2023-06-251-0/+1
|
* Remove unneeded bn_local.h and drop a NULL checktb2023-06-251-5/+3
|
* Remove ech_local.htb2023-06-251-65/+0
|
* Stop including ech_local.htb2023-06-252-3/+4
|
* Move ecdh_KDF_X9_63() to ec_local.htb2023-06-251-7/+1
| | | | | In anticipation of merging ecdh/ and ecdsa/ into ec/, move the last remaining thing in ech_local.h where it will soon belong.
* Move ECDH_size() to ech_key.ctb2023-06-252-8/+8
| | | | | This way the public ECDH API that will remain in libcrypto is in one file and the public ECDH API that will go is in the other one.
* Move the ecdh_method struct declaration to ech_lib.ctb2023-06-252-11/+10
| | | | No other file uses this anymore
* Move ECDH_OpenSSL() ECDSA_OpenSSL() to *_lib.ctb2023-06-252-13/+13
| | | | | | Now that they no longer use static methods, they can move where they belong. Also make the static method const, as it should have been all along.
* Remove {ecdh,ecdsa}_check() and {ECDH,ECDSA}_DATAtb2023-06-252-109/+2
| | | | | | | This is now unused code. Removing it will free us up to remove some other ugliness in the ec directory. ok jsing
* Remove method wrappers that use {ecdh,ecdsa}_check()tb2023-06-251-21/+4
| | | | | | | | Now that it is no longer possible to set a custom {ECDH,ECDSA}_METHOD, EC_KEY_METHOD can just call the relevant method directly without the need for this extra contortion. ok jsing
* Make ECDH and ECDSA ex_data handlers always failtb2023-06-251-13/+4
| | | | | | | | They will be removed in the next major bump. No port uses them. They use code that is in the way of upcoming surgery. Only libtls and smtpd used to use the ECDSA version. ok jsing
* Make {ECDH,ECDSA}_set_method() always failtb2023-06-251-14/+2
| | | | | | | | They will be removed in the next major bump. No port uses them. They use code that is in the way of upcoming surgery. Only libtls used the ECDSA version, but thankfully op cleaned that up. ok jsing
* ech_local.h: remove unused ECDH_FLAG_FIPS_METHODtb2023-06-251-9/+1
|
* Move EC_KEY_{insert,set}_key_method_data() to internal-onlytb2023-04-251-2/+4
|
* Move some includes out of OPENSSL_NO_DEPRECATEDtb2023-04-181-3/+1
| | | | | | | | | | | | | Some headers were included conditionally on OPENSSL_NO_DEPRECATED in hopes that eventually the mess of everything includes everything will magically resolve itself. Of course everyone would end up building openssl with OPENSSL_NO_DEPRECATED over time... Right. Surprisingly, the ecosystem has come to rely on these implicit inclusions, so about two dozen ports would fail to build because of this. Patching this would be easy but really not worth the effort. ok jsing
* Make header guards of internal headers consistenttb2022-11-261-4/+4
| | | | | Not all of them, only those that didn't leak into a public header... Yes.
* Make internal header file names consistenttb2022-11-264-8/+8
| | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
* Remove mkerr.pl remnants from LibreSSLkn2022-07-122-12/+2
| | | | | | | This script is not used at all and files are edited by hand instead. Thus remove misleading comments incl. the obsolete script/config. Feedback OK jsing tb
* Replace obj_mac.h with object.htb2022-06-301-2/+2
| | | | Pointed out by and ok jsing
* Add #include "bn_lcl.h" to the files that will soon need it.tb2021-12-041-1/+2
| | | | ok inoguchi jsing
* Simplify code after adding EC_POINT_{s,g}et_affine_coordinates()tb2021-04-201-15/+4
| | | | ok jsing
* Prepare to provide EC_POINT_{g,s}et_affine_coordinatestb2021-04-201-5/+3
| | | | | | Similar to part of OpenSSL commit 8e3cced75fb5fee5da59ebef9605d403a999391b ok jsing