<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ec/ec_lib.c, branch OPENBSD_6_8_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_6_8_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_6_8_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2019-09-29T10:09:09+00:00</updated>
<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>unrevert the use of bn_rand_interval().</title>
<updated>2018-11-06T07:02:33+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-11-06T07:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b1f2fa8da88f8be2fe7d6d9d2b8308537fcfb408'/>
<id>urn:sha1:b1f2fa8da88f8be2fe7d6d9d2b8308537fcfb408</id>
<content type='text'>
ok beck jsing
</content>
</entry>
<entry>
<title>Implement coordinate blinding for EC_POINT.</title>
<updated>2018-11-05T20:18:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-11-05T20:18:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ea31526c33ba6c4d95aeecabfffcba9455d6b4de'/>
<id>urn:sha1:ea31526c33ba6c4d95aeecabfffcba9455d6b4de</id>
<content type='text'>
Based on OpenSSL commit 875ba8b21ecc65ad9a6bdc66971e50
by Billy Brumley, Sohaib ul Hassan and Nicola Tuveri.

ok beck jsing

commit 875ba8b21ecc65ad9a6bdc66971e50461660fcbb
Author: Sohaib ul Hassan &lt;soh.19.hassan@gmail.com&gt;
Date:   Sat Jun 16 17:07:40 2018 +0300

    Implement coordinate blinding for EC_POINT

    This commit implements coordinate blinding, i.e., it randomizes the
    representative of an elliptic curve point in its equivalence class, for
    prime curves implemented through EC_GFp_simple_method,
    EC_GFp_mont_method, and EC_GFp_nist_method.

    This commit is derived from the patch
    https://marc.info/?l=openssl-dev&amp;m=131194808413635 by Billy Brumley.

    Coordinate blinding is a generally useful side-channel countermeasure
    and is (mostly) free. The function itself takes a few field
    multiplicationss, but is usually only necessary at the beginning of a
    scalar multiplication (as implemented in the patch). When used this way,
    it makes the values that variables take (i.e., field elements in an
    algorithm state) unpredictable.

    For instance, this mitigates chosen EC point side-channel attacks for
    settings such as ECDH and EC private key decryption, for the
    aforementioned curves.

    For EC_METHODs using different coordinate representations this commit
    does nothing, but the corresponding coordinate blinding function can be
    easily added in the future to extend these changes to such curves.

    Co-authored-by: Nicola Tuveri &lt;nic.tuv@gmail.com&gt;
    Co-authored-by: Billy Brumley &lt;bbrumley@gmail.com&gt;

    Reviewed-by: Tim Hudson &lt;tjh@openssl.org&gt;
    Reviewed-by: Nicola Tuveri &lt;nic.tuv@gmail.com&gt;
    Reviewed-by: Andy Polyakov &lt;appro@openssl.org&gt;
    (Merged from https://github.com/openssl/openssl/pull/6526)
</content>
</entry>
<entry>
<title>Recommit Billy Brumley's ECC constant time patch with a fix for sparc64</title>
<updated>2018-07-16T17:32:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-16T17:32:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6660b13e9adcfa5e38779a7026a3a21bcb065c2d'/>
<id>urn:sha1:6660b13e9adcfa5e38779a7026a3a21bcb065c2d</id>
<content type='text'>
from Nicola Tuveri (who spotted the omission of ecp_nist.c from the PR).

discussed with jsing
tested by jsg
</content>
</entry>
<entry>
<title>recommit label indentation part of the backout; clearly unrelated to the</title>
<updated>2018-07-15T16:27:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-15T16:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e2da96a71555180892d2e924d66c06a17b7a86e5'/>
<id>urn:sha1:e2da96a71555180892d2e924d66c06a17b7a86e5</id>
<content type='text'>
breakage.
</content>
</entry>
<entry>
<title>back out ecc constant time changes</title>
<updated>2018-07-15T05:38:48+00:00</updated>
<author>
<name>jsg</name>
<email></email>
</author>
<published>2018-07-15T05:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ccbfd1fe05749d4f08db7f45fe5db1fac8d14d6b'/>
<id>urn:sha1:ccbfd1fe05749d4f08db7f45fe5db1fac8d14d6b</id>
<content type='text'>
after the constant time commits various regress tests started failing
on sparc64 ssh t9, libcrypto ec ecdh ecdsa and trying to ssh out
resulted in 'invalid elliptic curve value'

ok tb@
</content>
</entry>
<entry>
<title>Indent labels by a space so they don't obliterate function names in diffs.</title>
<updated>2018-07-10T22:06:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-10T22:06:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a7fe13b565d141da544ee36178a90bb52f4939d1'/>
<id>urn:sha1:a7fe13b565d141da544ee36178a90bb52f4939d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ECC constant time scalar multiplication support. First step in overhauling</title>
<updated>2018-07-10T21:55:49+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-10T21:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b62b7e947c1bd8c9c63ae48ad7c4bb7943fe2269'/>
<id>urn:sha1:b62b7e947c1bd8c9c63ae48ad7c4bb7943fe2269</id>
<content type='text'>
the EC module.

From Billy Brumley and his team, via
https://github.com/libressl-portable/openbsd/pull/94

With tweaks from jsing and me.

ok jsing
</content>
</entry>
<entry>
<title>use freezero() instead of memset/explicit_bzero + free.  Substantially</title>
<updated>2017-05-02T03:59:45+00:00</updated>
<author>
<name>deraadt</name>
<email></email>
</author>
<published>2017-05-02T03:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5904cc0e04409fde39a97e6580535da34eeb4291'/>
<id>urn:sha1:5904cc0e04409fde39a97e6580535da34eeb4291</id>
<content type='text'>
reduces conditional logic (-218, +82).

MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c
wasn'tt quite right.  Two other tricky bits with ASN1_STRING_FLAG_NDEF and
BN_FLG_STATIC_DATA where the condition cannot be collapsed completely.

Passes regress.  ok beck
</content>
</entry>
<entry>
<title>Send the function codes from the error functions to the bit bucket,</title>
<updated>2017-01-29T17:49:23+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2017-01-29T17:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d1f47bd292f36094480caa49ada36b99a69c59b0'/>
<id>urn:sha1:d1f47bd292f36094480caa49ada36b99a69c59b0</id>
<content type='text'>
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
</content>
</entry>
</feed>
