<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/arch/i386, branch OPENBSD_7_8_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_8_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_8_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-09-07T03:56:37+00:00</updated>
<entry>
<title>Rename old assembly bn_sqr_words() to bn_sqr_word_wise().</title>
<updated>2025-09-07T03:56:37+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-09-07T03:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6dd87e766b900133746524ad2d5599160de6f5c8'/>
<id>urn:sha1:6dd87e766b900133746524ad2d5599160de6f5c8</id>
<content type='text'>
bn_sqr_words() does not actually compute the square of the words, it only
computes the square of each individual word - rename it to reflect reality.

Discussed with tb@
</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>Rename bn_umul_hilo() to bn_mulw().</title>
<updated>2023-02-16T10:41:03+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-02-16T10:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b11f50c06cb0a98a91ab4cbfb49715c95ee07486'/>
<id>urn:sha1:b11f50c06cb0a98a91ab4cbfb49715c95ee07486</id>
<content type='text'>
This keeps the naming consistent with the other bignum primitives that have
been recently introduced. Also, use 1/0 intead of h/l (e.g. a1 instead of
ah), as this keeps consistency with other primitives and allows for naming
that works with double word, triple word and quadruple word inputs/outputs.

Discussed with tb@
</content>
</entry>
<entry>
<title>Provide inline assembly versions of bn_umul_hilo() for aarch64/amd64/i386.</title>
<updated>2023-01-31T05:53:49+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-31T05:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9c88ed4a67c87199cab1e4e10e846c1fccef4069'/>
<id>urn:sha1:9c88ed4a67c87199cab1e4e10e846c1fccef4069</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Provide bn_div_rem_words() and make use of it.</title>
<updated>2023-01-28T16:33:34+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-28T16:33:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=636918f6cfde69d37b71f6ff3da1a6eb6cf4ad65'/>
<id>urn:sha1:636918f6cfde69d37b71f6ff3da1a6eb6cf4ad65</id>
<content type='text'>
Provide a function that divides a double word (h:l) by d, returning the
quotient q and the remainder r, such that q * d + r is equal to the
numerator. Call this from the three places that currently implement this
themselves.

This is implemented with some slight indirection, which allows for per
architecture implementations, replacing the define/macro tangle, which
messes with variables that are not passed to it.

Also remove a duplicate of bn_div_words() for the BN_ULLONG &amp;&amp; BN_DIV2W
case - this is already handled.

ok tb@
</content>
</entry>
<entry>
<title>Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.</title>
<updated>2023-01-23T12:17:58+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-23T12:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c1cecd93e8ee9b8f82eb8dd7e752b256b5a9caf8'/>
<id>urn:sha1:c1cecd93e8ee9b8f82eb8dd7e752b256b5a9caf8</id>
<content type='text'>
These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.
</content>
</entry>
<entry>
<title>Move bn_sqr_words from bn_asm.c to bn_sqr.c.</title>
<updated>2023-01-23T12:09:06+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-23T12:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=59011d19bae2f06c7da3b93b0f376d59914113a2'/>
<id>urn:sha1:59011d19bae2f06c7da3b93b0f376d59914113a2</id>
<content type='text'>
This is wrapped with #ifndef HAVE_BN_SQR_WORDS, which is then defined for
architectures that provide their own assembly versions.
</content>
</entry>
<entry>
<title>Move bn_div_words from bn_asm.c to bn_div.c.</title>
<updated>2023-01-23T12:02:48+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-23T12:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f19c47039da4275e5bf41ae120247544333dd021'/>
<id>urn:sha1:f19c47039da4275e5bf41ae120247544333dd021</id>
<content type='text'>
This is wrapped with #ifndef HAVE_BN_DIV_WORDS, which are defined for
architectures that provide their own assembly versions.
</content>
</entry>
<entry>
<title>Move bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.</title>
<updated>2023-01-23T10:31:03+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-23T10:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=72c06ed66b15060f591b12db9516011124121c3c'/>
<id>urn:sha1:72c06ed66b15060f591b12db9516011124121c3c</id>
<content type='text'>
These are wrapped with #ifndef HAVE_BN_ADD_WORDS/HAVE_BN_SUB_WORDS, which
are defined for architectures that provide their own assembly versions.
</content>
</entry>
<entry>
<title>Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.</title>
<updated>2023-01-20T17:31:52+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-01-20T17:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b92d9703cbe79988537ce70eae887ac8dd689362'/>
<id>urn:sha1:b92d9703cbe79988537ce70eae887ac8dd689362</id>
<content type='text'>
Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

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