<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ec/ec_err.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>2024-06-24T06:43:23+00:00</updated>
<entry>
<title>libcrypto: constify most error string tables</title>
<updated>2024-06-24T06:43:23+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-06-24T06:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c9802a5afe29675d69b605ce906d34fd89c024ac'/>
<id>urn:sha1:c9802a5afe29675d69b605ce906d34fd89c024ac</id>
<content type='text'>
These constitute the bulk of the remaining global mutable state in
libcrypto. This commit moves most of them into data.rel.ro, leaving
out ERR_str_{functs,libraries,reasons} (which require a slightly
different approach) and SYS_str_reasons which is populated on startup.

The main observation is that if ERR_load_strings() is called with a 0 lib
argument, the ERR_STRING_DATA argument is not actually modified. We could
use this fact to cast away const on the caller side and be done with it.
We can make this cleaner by adding a helper ERR_load_const_strings() which
explicitly avoids the assignment to str-&gt;error overriding the error code
already set in the table.

In order for this to work, we need to sprinkle some const in err/err.c.
CMS called ERR_load_strings() with non-0 lib argument, but this didn't
actually modify the error data since it ored in the value already stored
in the table.

Annoyingly, we need to cast const away once, namely in the call to
lh_insert() in int_err_set_item(). Fixing this would require changing
the public API and is going to be tricky since it requires that the
LHASH_DOALL_FN_* types adjust.

ok jsing
</content>
</entry>
<entry>
<title>unwrap a line</title>
<updated>2024-05-19T08:26:03+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-05-19T08:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f51e988bc5f3fd7eeb52fc95bc051ce1d44323a0'/>
<id>urn:sha1:f51e988bc5f3fd7eeb52fc95bc051ce1d44323a0</id>
<content type='text'>
</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>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>
<entry>
<title>Mop up last uses of ECDHerror() and ECDSAerror()</title>
<updated>2023-07-05T17:10:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-05T17:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=89d66d14133ec6290072fa2c672a92821b4dc097'/>
<id>urn:sha1:89d66d14133ec6290072fa2c672a92821b4dc097</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>whitespace</title>
<updated>2022-11-19T07:00:57+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-19T07:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=774b42972f9ef83cae75814eb194cd294d994a11'/>
<id>urn:sha1:774b42972f9ef83cae75814eb194cd294d994a11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement EVP interfaces for Ed25519 and X25519.</title>
<updated>2022-11-10T16:37:52+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-11-10T16:37:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a5e7fda60ab706b03226bda16120458c7adc3b34'/>
<id>urn:sha1:a5e7fda60ab706b03226bda16120458c7adc3b34</id>
<content type='text'>
ok beck@ tb@
</content>
</entry>
<entry>
<title>Remove mkerr.pl remnants from LibreSSL</title>
<updated>2022-07-12T14:42:50+00:00</updated>
<author>
<name>kn</name>
<email></email>
</author>
<published>2022-07-12T14:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=89e42d5857196a8071fbafb5565388d0e20ec32b'/>
<id>urn:sha1:89e42d5857196a8071fbafb5565388d0e20ec32b</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>If a NULL or zero cofactor is passed to EC_GROUP_set_generator(),</title>
<updated>2019-09-29T10:09:09+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2019-09-29T10:09:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5d19ba5fbb605cdab0233383db708bad870da750'/>
<id>urn:sha1:5d19ba5fbb605cdab0233383db708bad870da750</id>
<content type='text'>
try to compute it using Hasse's bound.  This works as long as the
cofactor is small enough.

Port of Brumley's fix for CVE-2019-1547 in OpenSSL 1.1.1 (old license)

tests &amp; ok inoguchi
input &amp; ok jsing

commit 30c22fa8b1d840036b8e203585738df62a03cec8
Author: Billy Brumley &lt;bbrumley@gmail.com&gt;
Date:   Thu Sep 5 21:25:37 2019 +0300

    [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it

    The cofactor argument to EC_GROUP_set_generator is optional, and SCA
    mitigations for ECC currently use it. So the library currently falls
    back to very old SCA-vulnerable code if the cofactor is not present.

    This PR allows EC_GROUP_set_generator to compute the cofactor for all
    curves of cryptographic interest. Steering scalar multiplication to more
    SCA-robust code.

    This issue affects persisted private keys in explicit parameter form,
    where the (optional) cofactor field is zero or absent.

    It also affects curves not built-in to the library, but constructed
    programatically with explicit parameters, then calling
    EC_GROUP_set_generator with a nonsensical value (NULL, zero).

    The very old scalar multiplication code is known to be vulnerable to
    local uarch attacks, outside of the OpenSSL threat model. New results
    suggest the code path is also vulnerable to traditional wall clock
    timing attacks.

    CVE-2019-1547

    Reviewed-by: Matt Caswell &lt;matt@openssl.org&gt;
    Reviewed-by: Tomas Mraz &lt;tmraz@fedoraproject.org&gt;
    Reviewed-by: Nicola Tuveri &lt;nic.tuv@gmail.com&gt;
    (Merged from https://github.com/openssl/openssl/pull/9781)
</content>
</entry>
<entry>
<title>Add various macros and controls for EC_PKEY_CTX.</title>
<updated>2019-09-06T17:59:25+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2019-09-06T17:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=428d94e41ffb941e459939409f837aa7a3ab188c'/>
<id>urn:sha1:428d94e41ffb941e459939409f837aa7a3ab188c</id>
<content type='text'>
These are needed for the upcoming EC CMS support (nothing else appears
to use them). This largely syncs our ec_pmeth.c with OpenSSL 1.1.1b.

With input from inoguchi@ and tb@.

ok inoguchi@ tb@
</content>
</entry>
</feed>
