<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ecdh/ecdh.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2026-03-18T08:02:40+00:00</updated>
<entry>
<title>libcrypto: prefix EC_KEY methods with ec_key_</title>
<updated>2026-03-18T08:02:40+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-03-18T08:02:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e1991105df8fe12032795b7f34ed61fd9272e525'/>
<id>urn:sha1:e1991105df8fe12032795b7f34ed61fd9272e525</id>
<content type='text'>
We received reports that the too generic internal ecdsa_{sign,verify}()
symbol names clash in some static links. The naming here is annoying
because the EC_KEY_METHOD amalgamated the no longer existing ECDH and
ECDSA methods which themselves had poorly chosen method names, still
reflected in public API.

There are various messes here. The ECDSA verify methods are declared
in ec_local.h, whereas the ECDSA sign methods are in ecdsa_local.h
(which is itself pretty useless and really only about EC_KEY_METHOD).
I therefore merged the ECDSA method declarations into ec_local.h and
deleted ecdsa_local.h since I see no real benefit to the latter.
ecdsa.c needs ec_local.h anyway. Having the method declarations next
to EC_KEY_METHOD seems sensible. I left the order as it was, matching
ecdsa.c. The eckey_compute_pubkey() prototype should probably be moved
down.

With one exception I just added an ec_key_ prefix. This leads to a
a repetition of 'key' in ec_key_ecdh_compute_key() which I chose to
live with because it matches the public ECDH_compute_key() (mostly
used by SSH implementations). The exception is ec_key_generate_key()
where I expanded the gen() leading to another _key repetition but
this then matches EC_KEY_generate_key().

Thanks to Rosen Penev for reporting and sending an initial diff.
See also https://github.com/gsliepen/tinc/issues/478

ok jsing
</content>
</entry>
<entry>
<title>Use err_local.h rather than err.h in most places</title>
<updated>2025-05-10T05:54:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-05-10T05:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=41e8f99dd1625a9f0c80ce9d4383e95b18e85709'/>
<id>urn:sha1:41e8f99dd1625a9f0c80ce9d4383e95b18e85709</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Simplify ECDH_size() by using BN_num_bytes()</title>
<updated>2025-02-17T09:25:45+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-02-17T09:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c98102f13db7f51c727c6e8e242e1465307788ad'/>
<id>urn:sha1:c98102f13db7f51c727c6e8e242e1465307788ad</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Remove some unneeded includes from ecdh.c</title>
<updated>2023-07-28T09:31:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=86a42c7a4efeefbbee301583a417e1b99bbda38d'/>
<id>urn:sha1:86a42c7a4efeefbbee301583a417e1b99bbda38d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Pull up zeroing of out; drop unnecessary check</title>
<updated>2023-07-28T09:30:22+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:30:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3a8fc985d98583b96821febed38c55c12c23ab01'/>
<id>urn:sha1:3a8fc985d98583b96821febed38c55c12c23ab01</id>
<content type='text'>
Move the zeroing of the output buffer a few lines up and remove an
unnecessary check.

requested/ok jsing
</content>
</entry>
<entry>
<title>Rename buflen to buf_len, use calloc/freezero</title>
<updated>2023-07-28T09:29:24+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4d5b61b05eba83625a41168408b456851f77417a'/>
<id>urn:sha1:4d5b61b05eba83625a41168408b456851f77417a</id>
<content type='text'>
Some cosmetic tweaks in ecdh_compute_key(). Rename buflen to buf_len
to match out_len, use calloc() and freezero().

ok jsing
</content>
</entry>
<entry>
<title>Move KDF handling to ECDH_compute_key()</title>
<updated>2023-07-28T09:28:37+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c043ade63ba3d45eacfb953347c00f0988397d9a'/>
<id>urn:sha1:c043ade63ba3d45eacfb953347c00f0988397d9a</id>
<content type='text'>
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 &lt;= 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
</content>
</entry>
<entry>
<title>Fix two EC_POINT_is_on_curve() checks</title>
<updated>2023-07-24T17:08:53+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-24T17:08:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c2fc234286c75d942a62891333f85e824d615444'/>
<id>urn:sha1:c2fc234286c75d942a62891333f85e824d615444</id>
<content type='text'>
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(...) &lt;= 0).

ok miod
</content>
</entry>
<entry>
<title>Revert accidental addition of cofactor ECDH support</title>
<updated>2023-07-12T08:54:18+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-12T08:54:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=efa15ee1c4f122ae67998dd88bdd8ac06e697206'/>
<id>urn:sha1:efa15ee1c4f122ae67998dd88bdd8ac06e697206</id>
<content type='text'>
This snuck in with ech_key.c r1.33 because I committed from a dirty tree.
</content>
</entry>
<entry>
<title>Hide symbols in hkdf, evp, err, ecdsa, and ec</title>
<updated>2023-07-07T13:54:46+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-07T13:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f9fcde20a6214da85e802190ccd3a2bf5f891559'/>
<id>urn:sha1:f9fcde20a6214da85e802190ccd3a2bf5f891559</id>
<content type='text'>
(part 2 of commit)

ok jsing@
</content>
</entry>
</feed>
