<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ecdsa, branch master</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=master</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=master'/>
<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>Move ECDSA_SIG_st definition to its only consumer, ecdsa.c</title>
<updated>2026-03-16T22:19:32+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-03-16T22:19:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ec0894d4cccd2b2d88759796071c3ed1afd3a475'/>
<id>urn:sha1:ec0894d4cccd2b2d88759796071c3ed1afd3a475</id>
<content type='text'>
</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>And here go {,EC}DSA_SIG_it</title>
<updated>2024-04-15T15:49:37+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-04-15T15:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3c5f500379f0c27b65b2a2e1beef801967ef2838'/>
<id>urn:sha1:3c5f500379f0c27b65b2a2e1beef801967ef2838</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Remove ECDSA nonce padding kludge</title>
<updated>2023-08-08T13:09:28+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-08-08T13:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=409280fb4ae64371e28c3111dba6a52b1f295a56'/>
<id>urn:sha1:409280fb4ae64371e28c3111dba6a52b1f295a56</id>
<content type='text'>
This was a workaround due to the historically non-constant time scalar
multiplication in the EC code. Since Brumley and Tuveri implemented the
Montgomery ladder, this is no longer useful and should have been removed
a long time ago, as it now does more harm than good.

Keep the preallocations as they still help hiding some timing info.

ok jsing
</content>
</entry>
<entry>
<title>Make the bn_rand_interval() API a bit more ergonomic</title>
<updated>2023-08-03T18:53:56+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-08-03T18:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=44ff07e01874ea8be0c72bf9d20cb7f13b76cca8'/>
<id>urn:sha1:44ff07e01874ea8be0c72bf9d20cb7f13b76cca8</id>
<content type='text'>
Provide bn_rand_in_range() which is a slightly tweaked version of what was
previously called bn_rand_range().

The way bn_rand_range() is called in libcrypto, the lower bound is always
expressible as a word. In fact, most of the time it is 1, the DH code uses
a 2, the MR tests in BPSW use 3 and an exceptinally high number appears in
the Tonelli-Shanks implementation where we use 32. Converting these lower
bounds to BIGNUMs on the call site is annoying so let bn_rand_interval()
do that internally and route that through bn_rand_in_range(). This way we
can avoid using BN_sub_word().

Adjust the bn_isqrt() test to use bn_rand_in_range() since that's the
only caller that uses actual BIGNUMs as lower bounds.

ok jsing
</content>
</entry>
<entry>
<title>Stop including ecdsa.h and ecdh.h internally</title>
<updated>2023-07-28T15:50:33+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T15:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=dee6ca6302cdbd5982c40288832f1fbe51d045d5'/>
<id>urn:sha1:dee6ca6302cdbd5982c40288832f1fbe51d045d5</id>
<content type='text'>
These headers are now reduced to #include &lt;openssl/ec.h&gt; and are provided
for compatiblity only. There's no point in using them. At the same time
garbage collect the last uses of OPENSSL_NO_{ECDSA,ECDH} in our tree.

ok jsing
</content>
</entry>
<entry>
<title>Remove some unneeded includes from ecdsa.h</title>
<updated>2023-07-28T09:18:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f82b526c76ed6b20c6a9efccc58da9c265c1ba89'/>
<id>urn:sha1:f82b526c76ed6b20c6a9efccc58da9c265c1ba89</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge ecdsa.h into ec.h</title>
<updated>2023-07-28T09:16:17+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bf7ee0210d0d1420ed787a79eda0c974f8d15f17'/>
<id>urn:sha1:bf7ee0210d0d1420ed787a79eda0c974f8d15f17</id>
<content type='text'>
Move the remaining ECDSA API into ec.h to match OpenSSL 1.1's interface
better.  In particular, the EC_KEY sign and verify method accessors are
moved to the right header. Whether the rest of the ECDSA stuff belongs
there is debatable, but that was upstream's choice.

ok jsing
</content>
</entry>
<entry>
<title>Remove ECDSA_METHOD</title>
<updated>2023-07-28T09:08:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8a9904a7f31aeb68336f4a9f6ba9e8ab8ecc7f11'/>
<id>urn:sha1:8a9904a7f31aeb68336f4a9f6ba9e8ab8ecc7f11</id>
<content type='text'>
After smtpd (in base) and libtls finally switched from ECDSA_METHOD to
EC_KEY_METHOD, much of the ECDSA_METHOD code was neutered. Remove the
remaining public API as well as numerous tentacles into ENGINE.

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