<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/bn_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-06-17T17:11:48+00:00</updated>
<entry>
<title>Make BN_num_bits_word() constant time.</title>
<updated>2019-06-17T17:11:48+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2019-06-17T17:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=aad713565aa006bc353dc31ecaa5e9f0aa3de235'/>
<id>urn:sha1:aad713565aa006bc353dc31ecaa5e9f0aa3de235</id>
<content type='text'>
Previously, this function would leak the most significant word of its
argument due to branching and memory access pattern.  This patch is
enough to fix the use of BN_num_bits() on RSA prime factors in the
library.

The diff is a simplified and more readable (but perhaps less efficient)
version of https://github.com/openssl/openssl/commit/972c87df
by Andy Polyakov and David Benjamin (pre license change). Consult that
commit message for details. Subsequent fixes to follow in the near future.

Issue pointed out by David Schrammel and Samuel Weiser as part of
a larger report.

tests &amp; ok inoguchi, ok jsing
</content>
</entry>
<entry>
<title>Add range checks to varios ASN1_INTEGER functions to ensure the</title>
<updated>2019-03-23T18:48:15+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2019-03-23T18:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c7b9ffc836ad7a05586d7c83c368d784af9cacda'/>
<id>urn:sha1:c7b9ffc836ad7a05586d7c83c368d784af9cacda</id>
<content type='text'>
sizes used remain a positive integer. Should address issue
13799 from oss-fuzz
ok tb@ jsing@
</content>
</entry>
<entry>
<title>Use a size_t instead of an int for the byte count in BN_swap_ct().</title>
<updated>2018-07-23T18:14:32+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-23T18:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1b961cfb65c1f00f26f20454324577edec589a1b'/>
<id>urn:sha1:1b961cfb65c1f00f26f20454324577edec589a1b</id>
<content type='text'>
Since bignums use ints for the same purpose, this still uses an int
internally after an overflow check.

Suggested by and discussed with jsing.
ok inoguchi, jsing
</content>
</entry>
<entry>
<title>Eliminate the weird condition in the BN_swap_ct() API that at most one bit</title>
<updated>2018-07-13T08:43:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-13T08:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=30d844db17bda4a9465f89832a192a4685d70d38'/>
<id>urn:sha1:30d844db17bda4a9465f89832a192a4685d70d38</id>
<content type='text'>
be set in condition. This makes the constant time bit-twiddling a bit
trickier, but it's not too bad. Thanks to halex for an extensive rubber
ducking session over a non-spicy spicy tabouleh falafel..

ok jsing, kn
</content>
</entry>
<entry>
<title>Sync comment</title>
<updated>2018-07-11T13:57:53+00:00</updated>
<author>
<name>kn</name>
<email></email>
</author>
<published>2018-07-11T13:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f1a8f36c4bd220fad86be1b60aa0105b32e88eee'/>
<id>urn:sha1:f1a8f36c4bd220fad86be1b60aa0105b32e88eee</id>
<content type='text'>
Makes it a tad easier to read through and compare with BN_swap_ct().

OK tb
</content>
</entry>
<entry>
<title>Turn yesterday's optimistic ! in an XXX comment into a more cautious ?</title>
<updated>2018-07-11T07:38:00+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-11T07:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=467436bd0e4e1edb3f39ae645b8aba182e9b2b23'/>
<id>urn:sha1:467436bd0e4e1edb3f39ae645b8aba182e9b2b23</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide BN_swap_ct(), a constant time function that conditionally swaps</title>
<updated>2018-07-10T21:52:07+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-07-10T21:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=56d9c9fb3e9ee89475112311a073d8411159080c'/>
<id>urn:sha1:56d9c9fb3e9ee89475112311a073d8411159080c</id>
<content type='text'>
two bignums. It's saner and substantially less ugly than the existing
public BN_constantime_swap() function and will be used in forthcoming work
on constant time ECC code.

From Billy Brumley and his team. Thanks!

ok jsing
</content>
</entry>
<entry>
<title>Use explicit_bzero() rather than memset() when clearing a BIGNUM.</title>
<updated>2018-05-12T17:31:41+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2018-05-12T17:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c3079e78e6b75e352ffdf7f47cb431867798c366'/>
<id>urn:sha1:c3079e78e6b75e352ffdf7f47cb431867798c366</id>
<content type='text'>
ok bcook@ tb@
</content>
</entry>
<entry>
<title>Provide BN_GENCB_new(), BN_GENCB_free() and BN_GENCB_get_arg()</title>
<updated>2018-02-20T17:13:14+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2018-02-20T17:13:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=293a70c9811459080f491f606e3ce48530401462'/>
<id>urn:sha1:293a70c9811459080f491f606e3ce48530401462</id>
<content type='text'>
</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>
</feed>
