<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/bn_add_sub.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-05-25T04:30:55+00:00</updated>
<entry>
<title>Provide additional variants of bn_add_words()/bn_sub_words().</title>
<updated>2025-05-25T04:30:55+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-05-25T04:30:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cbdbb6515eba8411eeb6f22618e029f1a461aa60'/>
<id>urn:sha1:cbdbb6515eba8411eeb6f22618e029f1a461aa60</id>
<content type='text'>
Move bn_add_words() and bn_sub_words() from bn_add.c to bn_add_sub.c.
These have effectively been replaced in the previous rewrites. Remove
the asserts - if bad lengths are passed the results will be incorrect
and things will fail (these should use size_t instead of int, but that
is a problem for another day).

Provide bn_sub_words_borrow(), which computes a subtraction but only
returns the resulting borrow. Provide bn_add_words_masked() and
bn_sub_words_masked(), which perform an masked addition or subtraction.
These can also be used to implement constant time addition and subtraction,
especially for reduction.

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