<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/bn_rand.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>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>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 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>
<entry>
<title>Correct spelling of OPENSSL_cleanse.</title>
<updated>2015-09-10T15:56:26+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2015-09-10T15:56:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=647569a51c1530d10e75e272f0982682f696caa7'/>
<id>urn:sha1:647569a51c1530d10e75e272f0982682f696caa7</id>
<content type='text'>
ok miod@
</content>
</entry>
<entry>
<title>If BN_rand() or BN_pseudo_rand() are called with a NULL rnd argument,</title>
<updated>2015-02-19T06:10:29+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2015-02-19T06:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=62ebecd0e093eb1e8a47512de67da5c951069913'/>
<id>urn:sha1:62ebecd0e093eb1e8a47512de67da5c951069913</id>
<content type='text'>
BN_bin2bn() will helpfully allocate a BN which is then leaked. Avoid this
by explicitly checking for NULL at the start of the bnrand() function.

Fixes Coverity ID 78831.

ok miod@
</content>
</entry>
<entry>
<title>Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes().</title>
<updated>2014-10-22T13:02:04+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2014-10-22T13:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=fa457604779ff38b511fdfdae3c6a78664281c22'/>
<id>urn:sha1:fa457604779ff38b511fdfdae3c6a78664281c22</id>
<content type='text'>
arc4random_buf() is guaranteed to always succeed - it is worth noting
that a number of the replaced function calls were already missing return
value checks.

ok deraadt@
</content>
</entry>
<entry>
<title>Only import cryptlib.h in the four source files that actually need it.</title>
<updated>2014-07-11T08:44:49+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2014-07-11T08:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=74e2c009c83ad374bd6acdcfc376a384e25ab007'/>
<id>urn:sha1:74e2c009c83ad374bd6acdcfc376a384e25ab007</id>
<content type='text'>
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@
</content>
</entry>
</feed>
