<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/regress/lib/libcrypto/bn, branch OPENBSD_7_4</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_4</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_4'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2023-08-03T18:53:56+00:00</updated>
<entry>
<title>Make the bn_rand_interval() API a bit more ergonomic</title>
<updated>2023-08-03T18:53:56+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-08-03T18:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=44ff07e01874ea8be0c72bf9d20cb7f13b76cca8'/>
<id>urn:sha1:44ff07e01874ea8be0c72bf9d20cb7f13b76cca8</id>
<content type='text'>
Provide bn_rand_in_range() which is a slightly tweaked version of what was
previously called bn_rand_range().

The way bn_rand_range() is called in libcrypto, the lower bound is always
expressible as a word. In fact, most of the time it is 1, the DH code uses
a 2, the MR tests in BPSW use 3 and an exceptinally high number appears in
the Tonelli-Shanks implementation where we use 32. Converting these lower
bounds to BIGNUMs on the call site is annoying so let bn_rand_interval()
do that internally and route that through bn_rand_in_range(). This way we
can avoid using BN_sub_word().

Adjust the bn_isqrt() test to use bn_rand_in_range() since that's the
only caller that uses actual BIGNUMs as lower bounds.

ok jsing
</content>
</entry>
<entry>
<title>Retire the bn_rand_interval() test</title>
<updated>2023-08-03T18:44:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-08-03T18:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6ce6cf23a77a446252150319206f0075eb6267cf'/>
<id>urn:sha1:6ce6cf23a77a446252150319206f0075eb6267cf</id>
<content type='text'>
This test was never particularly useful. An upcoming API change for
the internal bn_rand_interval() API would require some adjustments.
It's not worth it.
</content>
</entry>
<entry>
<title>Annotate bogus output as incorrect</title>
<updated>2023-07-27T06:41:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-27T06:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1fff3338bb0ddbb0bc692678dddf845672732555'/>
<id>urn:sha1:1fff3338bb0ddbb0bc692678dddf845672732555</id>
<content type='text'>
Some people already have way too many simple and not too important diffs in
their inbox. This isn't worth kicking something more important out of the
queue.
</content>
</entry>
<entry>
<title>Add test case for negative number with highest bit of top octet set</title>
<updated>2023-07-10T20:21:37+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-10T20:21:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=987c9d09fa4171ebd33a66e334cf7edc8b73c437'/>
<id>urn:sha1:987c9d09fa4171ebd33a66e334cf7edc8b73c437</id>
<content type='text'>
This currently adds an incorrect 00: padding, consistent with OpenSSL's
behavior.
</content>
</entry>
<entry>
<title>Add test coverage for leading zero octet dance</title>
<updated>2023-07-07T07:47:25+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-07T07:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0ab81f6f7614b34883c7a9337251d673e142d410'/>
<id>urn:sha1:0ab81f6f7614b34883c7a9337251d673e142d410</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bn_print: remove unused bio, plug leak</title>
<updated>2023-07-06T15:11:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-06T15:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=83f9366821e685aefb9733e3797204f7939604ad'/>
<id>urn:sha1:83f9366821e685aefb9733e3797204f7939604ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add regress coverage for bn_printf</title>
<updated>2023-07-06T15:08:54+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-06T15:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f3a92efb3424a84ed8b53338aa7f8cbc8a893a9b'/>
<id>urn:sha1:f3a92efb3424a84ed8b53338aa7f8cbc8a893a9b</id>
<content type='text'>
This must be one of the ugliest tests I've ever written, but I can't think
of a better way of doing it.
</content>
</entry>
<entry>
<title>Codify BN_asc2bn(NULL, *) behavior in regress.</title>
<updated>2023-06-23T10:50:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-06-23T10:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cd8a35403eca59025f86b12bff4b62dc923f2274'/>
<id>urn:sha1:cd8a35403eca59025f86b12bff4b62dc923f2274</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add tests for BN_sqr() corner cases.</title>
<updated>2023-06-21T07:18:10+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-06-21T07:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=49d358ba4102b545829d23eeead5528ff3342df4'/>
<id>urn:sha1:49d358ba4102b545829d23eeead5528ff3342df4</id>
<content type='text'>
Test BN_sqr() with a newly allocated BN, a BN explicitly set to zero and
small values that fit in a single BN_ULONG.
</content>
</entry>
<entry>
<title>Add BN_cmp()/BN_ucmp() tests with zero padded inputs.</title>
<updated>2023-06-21T07:16:08+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-06-21T07:16:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a88d085da8637994f920a65e914fe4811644321e'/>
<id>urn:sha1:a88d085da8637994f920a65e914fe4811644321e</id>
<content type='text'>
Currently BN_hex2bn() removes the leading zeros, however this will not be
the case in the future.
</content>
</entry>
</feed>
