<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn, branch libressl-v3.2.3</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.2.3</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.2.3'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2020-09-12T17:16:36+00:00</updated>
<entry>
<title>Unindent a bit of code that performs a few too many checks to</title>
<updated>2020-09-12T17:16:36+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-12T17:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ad25ca1fcd0c9ca48a2fcd6e68367cd74d82b01f'/>
<id>urn:sha1:ad25ca1fcd0c9ca48a2fcd6e68367cd74d82b01f</id>
<content type='text'>
figure out whether top &gt; 0 or top == 0.
</content>
</entry>
<entry>
<title>Avoid an out-of-bounds access in BN_rand()</title>
<updated>2020-09-12T15:24:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-12T15:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1e0b199599db7da1624618b2509c1d58106f35f7'/>
<id>urn:sha1:1e0b199599db7da1624618b2509c1d58106f35f7</id>
<content type='text'>
If BN_rand() is called with top &gt; 0 and bits == 1, it would allocate
a buf[] of size 1 and set the top bit of buf[1].

Found in OpenSSL commit efee575ad464bfb60bf72dcb73f9b51768f4b1a1 while
looking for something else.

ok beck djm inoguchi
</content>
</entry>
<entry>
<title>Change generating and checking of primes so that the error rate of</title>
<updated>2019-08-25T19:24:00+00:00</updated>
<author>
<name>schwarze</name>
<email></email>
</author>
<published>2019-08-25T19:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0fd355ae5ac95f1b4265d2c28d096b63de52a902'/>
<id>urn:sha1:0fd355ae5ac95f1b4265d2c28d096b63de52a902</id>
<content type='text'>
not being prime depends on the intended use based on the size of
the input.  For larger primes this will result in more rounds of
Miller-Rabin.  The maximal error rate for primes with more than
1080 bits is lowered to 2^-128.
Patch from Kurt Roeckx &lt;kurt@roeckx.be&gt; and Annie Yousar
via OpenSSL commit feac7a1c Jul 25 18:55:16 2018 +0200,
still under a free license.
OK tb@.
</content>
</entry>
<entry>
<title>make BN_CTX_end(NULL) a NOOP for compatibility with documented behaviour</title>
<updated>2019-08-20T10:59:09+00:00</updated>
<author>
<name>schwarze</name>
<email></email>
</author>
<published>2019-08-20T10:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4569778023d8d4ec0159e09baa48f5f397ff8847'/>
<id>urn:sha1:4569778023d8d4ec0159e09baa48f5f397ff8847</id>
<content type='text'>
in OpenSSL 1.1.1 even though in general, letting random functions
accept NULL is not advisable because it can hide programming errors;

"yes please" tb@
"unfortunately I suspect you're right" jsing@
"oh well" deraadt@
</content>
</entry>
<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>Fix BN_is_prime_* calls in libcrypto, the API returns -1 on error.</title>
<updated>2019-01-20T01:56:59+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2019-01-20T01:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4d359baaefb1597abf730cf3a09574e1e03d620b'/>
<id>urn:sha1:4d359baaefb1597abf730cf3a09574e1e03d620b</id>
<content type='text'>
From BoringSSL's commit 53409ee3d7595ed37da472bc73b010cd2c8a5ffd
by David Benjamin.

ok djm, jsing
</content>
</entry>
<entry>
<title>Flip reversed test in bn_rand_interval().</title>
<updated>2018-11-06T06:49:45+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-11-06T06:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a8249222cfc2738a9d25e498cd781c3b188cb9e0'/>
<id>urn:sha1:a8249222cfc2738a9d25e498cd781c3b188cb9e0</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Introduce bn_rand_interval() that allows specifying an interval [a, b)</title>
<updated>2018-11-05T23:52:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2018-11-05T23:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=180c3e4250e4e8ea8cdade42002a7fd6564d66c2'/>
<id>urn:sha1:180c3e4250e4e8ea8cdade42002a7fd6564d66c2</id>
<content type='text'>
from which a a BIGNUM is chosen uniformly at random.

ok beck 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>
</feed>
