summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib
diff options
context:
space:
mode:
authorjsing <>2025-05-25 04:30:55 +0000
committerjsing <>2025-05-25 04:30:55 +0000
commit0e050e6526943c7e04e6e1dd84130e91a12d8798 (patch)
tree19e7b4eacaae1f3b1f76f1ddd4e2c9ea08cfc4e5 /src/lib/libc/stdlib
parent53d43909d135b928ff58dfdf0554e5e6b2eef4ab (diff)
downloadopenbsd-0e050e6526943c7e04e6e1dd84130e91a12d8798.tar.gz
openbsd-0e050e6526943c7e04e6e1dd84130e91a12d8798.tar.bz2
openbsd-0e050e6526943c7e04e6e1dd84130e91a12d8798.zip
Provide additional variants of bn_add_words()/bn_sub_words().
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@
Diffstat (limited to 'src/lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions