<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ecdsa, branch libressl-v3.9.1</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.9.1</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.9.1'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2023-08-08T13:09:28+00:00</updated>
<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>
<entry>
<title>Remove ecs_err.c</title>
<updated>2023-07-28T09:01:25+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T09:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=92f3766713986fcccdc079df784442dcfde4921c'/>
<id>urn:sha1:92f3766713986fcccdc079df784442dcfde4921c</id>
<content type='text'>
These error codes have been unused for a while, so the public API loading
them is pointless.

ok jsing
</content>
</entry>
<entry>
<title>Place public ECDSA API next to the internal methods</title>
<updated>2023-07-28T08:57:46+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T08:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e9620d02140d013d9a99c424c98a0b4840e3d18f'/>
<id>urn:sha1:e9620d02140d013d9a99c424c98a0b4840e3d18f</id>
<content type='text'>
It is hard to remember that ECDSA_do_{sign,verify}() call ecdsa_sign_sig().
Especially since the distinction to ECDSA_{sign,verify}() isn't clear from
the names. To add to the confusion, the public API is ordered differently
than the methods they call. So in this case it seems tidier to place the
public API next to the methods.

ok jsing
</content>
</entry>
<entry>
<title>Remove ECDSA_{do_,}sign_ex()</title>
<updated>2023-07-28T08:54:41+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T08:54:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=58ea26950cdeca103bbfe2c2a755c526ca370145'/>
<id>urn:sha1:58ea26950cdeca103bbfe2c2a755c526ca370145</id>
<content type='text'>
There is no reason to keep these. It is cleaner to keep ECDSA_sign_setup()
but remove the logic for passed-in kinv and r.

Refuse to cooperate as far as possible. Someone could still implement
their own versions of ECDSA_{do_,}_sign_ex() and ECDSA_sign_setup() by
leveraging EC_KEY_METHOD_get_sign() and building their own wrappers.
We can't make such an implementation of ECDSA_sign_setup() fail, but we
make the actual signing fail since we no longer "do the right thing".

ok jsing
</content>
</entry>
<entry>
<title>Make extended ECDSA signing routines internal</title>
<updated>2023-07-28T08:49:43+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T08:49:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a60bb43ba730ae6d2d64a6568ee5fddecaf151e3'/>
<id>urn:sha1:a60bb43ba730ae6d2d64a6568ee5fddecaf151e3</id>
<content type='text'>
ECDSA_sign_setup() permits precomputing the values of the inverse of the
random k and the corresponding r. These can then be fed into the signing
routines ECDSA_{do_,}sign_ex() multiple times if needed. This is not a
great idea and the interface adds a lot of unwanted complexity.

Not to mention that nothing ever used this correctly - if s works out to
0, a special error code is thrown requesting that the caller provide new
kinv and r values. Unsurprisingly, nobody ever checked for that special
error code.

ok jsing

This commit marks the start of a libcrypto major bump. Do not build the
tree until I bumped the shlib_version and synced file sets (in about 35
commits).
</content>
</entry>
</feed>
