<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn, branch OPENBSD_7_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2026-01-23T08:29:04+00:00</updated>
<entry>
<title>bn_const: add RFC 7919 primes</title>
<updated>2026-01-23T08:29:04+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-01-23T08:29:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=87d5ceb7c77925e0cffb6fb9e902a9c722af86c9'/>
<id>urn:sha1:87d5ceb7c77925e0cffb6fb9e902a9c722af86c9</id>
<content type='text'>
There is no intention to expose these via public API or to use them in TLS.
For now these will only be used for short-circuiting pointless expensive
computations in DH_check().

ok beck
</content>
</entry>
<entry>
<title>BN_get_word(): return (BN_ULONG)-1 on error rather than BN_MASK2</title>
<updated>2025-12-15T12:09:46+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-12-15T12:09:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=341829195e0c845cf26339768f275f021b69fedc'/>
<id>urn:sha1:341829195e0c845cf26339768f275f021b69fedc</id>
<content type='text'>
While the latter is more general in that it also works on 1-complement
achitectures, we don't care about that. Adjust documentation and the
only error check for it in libcrypto.

ok deraadt
</content>
</entry>
<entry>
<title>libcrypto: remove BN_{DEC,HEX}_FMT1</title>
<updated>2025-12-05T17:25:55+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-12-05T17:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d2d87522f440af6431264cc158cc728d8c655bfb'/>
<id>urn:sha1:d2d87522f440af6431264cc158cc728d8c655bfb</id>
<content type='text'>
It appears that these were only ever used in bn_test.c...
</content>
</entry>
<entry>
<title>libcrypto: make most of the BN_* macro pollution internal</title>
<updated>2025-12-05T14:12:32+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-12-05T14:12:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f3f05f0cf8c30a990193e332e26fdd8e54b3f59b'/>
<id>urn:sha1:f3f05f0cf8c30a990193e332e26fdd8e54b3f59b</id>
<content type='text'>
This is a first sweep of reducing the number of terribly named macros
in bn.h More can go away. Those we need internally go to bn_local.h.
Annoyingly bn_internal.h uses some of them, so it includes bn_local.h
now. This can be cleaned up later.

ok jsing kenjiro
</content>
</entry>
<entry>
<title>bn_prime.c: fix includes</title>
<updated>2025-11-08T16:27:33+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-11-08T16:27:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=286cd02a2b95cd94707d1ae63155b59302dfefc7'/>
<id>urn:sha1:286cd02a2b95cd94707d1ae63155b59302dfefc7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use 64 bit BN_ULONG on 64 bit Windows platforms.</title>
<updated>2025-11-07T13:41:40+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-11-07T13:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=235bf5dad98ea543384128e2d21e8d4801b6c36c'/>
<id>urn:sha1:235bf5dad98ea543384128e2d21e8d4801b6c36c</id>
<content type='text'>
64 bit Windows is a special LLP snowflake and it is currently incorrectly
using 32 bit BN_ULONG, since _LP64 is not defined. Enable 64 bit BN_ULONG
if _LP64 or _WIN64 is defined.

ok tb@
</content>
</entry>
<entry>
<title>Use BN_ULONG in probable_prime_dh()</title>
<updated>2025-11-06T09:04:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-11-06T09:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6ed58e3a351fdb740941af76336021fa436f2fda'/>
<id>urn:sha1:6ed58e3a351fdb740941af76336021fa436f2fda</id>
<content type='text'>
This was the last user of BN_LONG in code. It had no reason to do so.
BN_mod_word() returns a BN_ULONG and since the largest prime in the
small primes table primes[] is well below 20000, the only return value
that could cause 'mod' to be negative was the error sentinel (BN_ULONG)-1.

ok jsing kenjiro
</content>
</entry>
<entry>
<title>Use more specific types for BN.</title>
<updated>2025-11-05T13:00:26+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-11-05T13:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cfaf7540f6b19032df0f388ad6a4d0e0714671c6'/>
<id>urn:sha1:cfaf7540f6b19032df0f388ad6a4d0e0714671c6</id>
<content type='text'>
Be specific about width and use uint64_t/uint32_t, rather than using
unsigned int/long/long long, based on platform. Additionally use UINT64_C()
and UINT32_C() for constants, along with PRI*64/PRI*32 for formatting. This
makes the platform responsible for providing the correct types/defines -
all we then need to do is determine is if BN should use a 32 bit or 64 bit
configuration.

With input from and ok tb@
</content>
</entry>
<entry>
<title>Remove BN_DIV2W.</title>
<updated>2025-09-07T06:28:03+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-07T06:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=98287b7cd5d64488bbaf57088225f91bd8e8a7f9'/>
<id>urn:sha1:98287b7cd5d64488bbaf57088225f91bd8e8a7f9</id>
<content type='text'>
The BN_DIV2W define provides a code path for double word division via the C
compiler, which is only enabled on hppa. Simplify the code and mop this up.

ok tb@
</content>
</entry>
<entry>
<title>Re-enable bn_sqr_words() assembly.</title>
<updated>2025-09-07T05:21:29+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-07T05:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9283c4361ce1f1a39a1f03c588c3d1a3da64025e'/>
<id>urn:sha1:9283c4361ce1f1a39a1f03c588c3d1a3da64025e</id>
<content type='text'>
This is now only on amd64.
</content>
</entry>
</feed>
