<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/bn_mul.c, 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>2025-09-01T15:39:59+00:00</updated>
<entry>
<title>Add const here as well...</title>
<updated>2025-09-01T15:39:59+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-01T15:39:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8262857db881f41bd13636dcc49f7f4b28ba9e08'/>
<id>urn:sha1:8262857db881f41bd13636dcc49f7f4b28ba9e08</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Constify bn_mul_words().</title>
<updated>2025-09-01T15:33:23+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-01T15:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=edd4db8b24106490f82c1a694d4e2b35afe9c6cb'/>
<id>urn:sha1:edd4db8b24106490f82c1a694d4e2b35afe9c6cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename bn_mul_words()/bn_mul_add_words().</title>
<updated>2025-08-30T07:54:27+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-08-30T07:54:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=694b88dc8ad458db9997e90128806a423fec09db'/>
<id>urn:sha1:694b88dc8ad458db9997e90128806a423fec09db</id>
<content type='text'>
Most bn_.*_words() functions operate on two word arrays, however
bn_mul_words() and bn_mul_add_words() operate on one word array and
multiply by a single word. Rename these to bn_mulw_words() and
bn_mulw_add_words() to reflect this, following naming scheme that we use
for primitives.

This frees up bn_mul_words() to actually be used for multiplying two word
arrays. Rename bn_mul_normal() to bn_mul_words(), which will then become
one of the possible assembly integration points.

ok tb@
</content>
</entry>
<entry>
<title>Add special handling for multiplication and squaring of BNs with six words.</title>
<updated>2025-08-14T15:15:04+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-08-14T15:15:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6dbe806d026a9b65d3decbcd23fb9b70559bf259'/>
<id>urn:sha1:6dbe806d026a9b65d3decbcd23fb9b70559bf259</id>
<content type='text'>
In these cases make use of bn_mul_comba6() or bn_sqr_comba6(), which are
faster than the normal path.

ok tb@
</content>
</entry>
<entry>
<title>Provide bn_mul_comba6().</title>
<updated>2025-08-05T15:06:13+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-08-05T15:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=871e14b0960d825feebc1fc7d19f6d3c961cc2d1'/>
<id>urn:sha1:871e14b0960d825feebc1fc7d19f6d3c961cc2d1</id>
<content type='text'>
This allows for fast multiplication of two 6 word arrays.

ok tb@
</content>
</entry>
<entry>
<title>Mark the inputs to bn_mul_comba{4,8}() as const.</title>
<updated>2025-08-05T15:01:13+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-08-05T15:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=dc28959092efae771ef92dcf98fcb3ba4fce15cb'/>
<id>urn:sha1:dc28959092efae771ef92dcf98fcb3ba4fce15cb</id>
<content type='text'>
This makes it consistent with bn_sqr_comba{4,8}() and simplifies an
upcoming change.

ok tb@
</content>
</entry>
<entry>
<title>Avoid signed overflow in BN_mul()</title>
<updated>2025-08-03T10:32:04+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-08-03T10:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b5992183ef86510bda13fd9674c1a55a9ea26f03'/>
<id>urn:sha1:b5992183ef86510bda13fd9674c1a55a9ea26f03</id>
<content type='text'>
Reported by smatch via jsg.
ok beck jsing kenjiro
</content>
</entry>
<entry>
<title>Hide symbols in bn</title>
<updated>2023-07-08T12:21:58+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-08T12:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1dad5f352903aa46e83f0b1265298f7e1d4a9633'/>
<id>urn:sha1:1dad5f352903aa46e83f0b1265298f7e1d4a9633</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Provide and use various quad word primitives.</title>
<updated>2023-06-12T16:17:24+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-06-12T16:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e65682b76bcfaec43a218a52db723a341bec5b90'/>
<id>urn:sha1:e65682b76bcfaec43a218a52db723a341bec5b90</id>
<content type='text'>
This includes bn_qwaddqw(), bn_qwsubqw(), bn_qwmulw_addw() and
bn_qwmulw_addqw_addw(). These can typically be optimised on architectures
that have a reasonable number of general purpose registers.

ok tb@
</content>
</entry>
<entry>
<title>unifdef BN_RECURSION</title>
<updated>2023-04-19T10:51:22+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-04-19T10:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2fb6a5afb5b39fadad20a8acaf72324fd753942b'/>
<id>urn:sha1:2fb6a5afb5b39fadad20a8acaf72324fd753942b</id>
<content type='text'>
This removes a bunch of incomplete and scary code, which potentially leaks
secrets and is not constant time. A performance gain is achieved on arm64
for sizes that we care about, while a minimal decrease in performance is
noted for larger sizes on some other platforms.

While we will potentially reimplement Karatsuba (or Toom-Cook) at a later
date, it will be easier and safer to do it from a clean slate.

ok tb@
</content>
</entry>
</feed>
