<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn, branch libressl-v3.8.0</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.8.0</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.8.0'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2023-05-19T00:54:28+00:00</updated>
<entry>
<title>backout alignment changes (breaking at least two architectures)</title>
<updated>2023-05-19T00:54:28+00:00</updated>
<author>
<name>deraadt</name>
<email></email>
</author>
<published>2023-05-19T00:54:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3dc51b1807e9a69624721300010e6e6ce16d5709'/>
<id>urn:sha1:3dc51b1807e9a69624721300010e6e6ce16d5709</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use crypto_internal.h's CTASSERT()</title>
<updated>2023-05-17T07:42:38+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-05-17T07:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=11b2caf2d2be047efd96d29f1a2278031692364a'/>
<id>urn:sha1:11b2caf2d2be047efd96d29f1a2278031692364a</id>
<content type='text'>
Now that this macro is available in a header, let's use that version
rather than copies in several .c files.

discussed with jsing
</content>
</entry>
<entry>
<title>Use is_pseudoprime instead of is_prime in bn_bpsw.c</title>
<updated>2023-05-10T21:05:24+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-05-10T21:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a71a6115c0cd290f9e5dd15d6c84d8d3dde57b59'/>
<id>urn:sha1:a71a6115c0cd290f9e5dd15d6c84d8d3dde57b59</id>
<content type='text'>
This is more accurate and improves readability a bit. Apart from a comment
tweak this is sed + knfmt (which resulted in four wrapped lines).

Discussed with beck and jsing
</content>
</entry>
<entry>
<title>Add Miller-Rabin test for random bases to BPSW</title>
<updated>2023-05-10T12:21:55+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-05-10T12:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=536ed901af3f95bbdf5d437d3f0ad7d96659ee96'/>
<id>urn:sha1:536ed901af3f95bbdf5d437d3f0ad7d96659ee96</id>
<content type='text'>
The behavior of the BPSW primality test for numbers &gt; 2^64 is not very
well understood. While there is no known composite that passes the test,
there are heuristics that indicate that there are likely infinitely many.
Therefore it seems appropriate to harden the test. Having a settable
number of MR rounds before doing a version of BPSW is also the approach
taken by Go's primality check in math/big.

This adds a new implementation of the old MR test that runs before running
the strong Lucas test. I like to imagine that it's slightly cleaner code.
We're effectively at about twice the cost of what we had a year ago. In
addition, it adds some non-determinism in case there actually are false
positives for the BPSW test.

The implementation is straightforward. It could easily be tweaked to use
the additional gcds in the "enhanced" MR test of FIPS 186-5, but as long
as we are only going to throw away the additional info, that's not worth
much.

This is a first step towards incorporating some of the considerations in
"A performant misuse-resistant API for Primality Testing" by Massimo and
Paterson. Further work will happen in tree. In particular, there are plans
to crank the number of Miller-Rabin tests considerably so as to have a
guaranteed baseline. The manual will be updated shortly.

positive feedback beck
ok jsing
</content>
</entry>
<entry>
<title>bn_exp: also special case -1 modulus</title>
<updated>2023-05-09T05:38:11+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-05-09T05:38:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d10ac5ed91efbdc49fc0b13ac24a411c020beaab'/>
<id>urn:sha1:d10ac5ed91efbdc49fc0b13ac24a411c020beaab</id>
<content type='text'>
Anything taken to the power of 0 is 1, and then reduced mod 1 or mod -1 it
will be 0. If "anything" includes 0 or not is a matter of convention, but
it should not depend on the sign of the modulus...

Reported by Guido Vranken

ok jsing (who had the same diff)
</content>
</entry>
<entry>
<title>Rewrite BN_bn2hex() using CBB/CBS.</title>
<updated>2023-05-09T05:15:55+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-05-09T05:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=eb5c4831ebe1fd7e22ce96c554a2521c81a1ea95'/>
<id>urn:sha1:eb5c4831ebe1fd7e22ce96c554a2521c81a1ea95</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Rewrite BN_bn2dec() using CBB/CBS.</title>
<updated>2023-05-09T05:12:49+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-05-09T05:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f82e79aa8805e5defba66b3e8dc6c86a6f1c5ae8'/>
<id>urn:sha1:f82e79aa8805e5defba66b3e8dc6c86a6f1c5ae8</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Garbage collect BN_zero_ex()</title>
<updated>2023-04-30T19:15:48+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-30T19:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f2f3a3e6551fa9a5a84a5e5d217b68f6440313eb'/>
<id>urn:sha1:f2f3a3e6551fa9a5a84a5e5d217b68f6440313eb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>whitespace</title>
<updated>2023-04-30T05:21:20+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-30T05:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6f2f6dd47c5d8c196f6fe676be3e56cd9e572194'/>
<id>urn:sha1:6f2f6dd47c5d8c196f6fe676be3e56cd9e572194</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove a useless doxygen comment</title>
<updated>2023-04-27T06:48:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-27T06:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6d0c1e2ca3d7406df9e1f77ae7cc0d5464b31209'/>
<id>urn:sha1:6d0c1e2ca3d7406df9e1f77ae7cc0d5464b31209</id>
<content type='text'>
</content>
</entry>
</feed>
