diff options
| author | jsing <> | 2023-02-02 18:39:26 +0000 | 
|---|---|---|
| committer | jsing <> | 2023-02-02 18:39:26 +0000 | 
| commit | cea09ef9db2c57982c7c7d5eb3808c823c8e16ba (patch) | |
| tree | 1674698c28777afc06c9e776cbb2058197484d33 /src/regress/lib/libc/regex | |
| parent | 9a98d1b0a691d9784ff03bc4640dc297775687f0 (diff) | |
| download | openbsd-cea09ef9db2c57982c7c7d5eb3808c823c8e16ba.tar.gz openbsd-cea09ef9db2c57982c7c7d5eb3808c823c8e16ba.tar.bz2 openbsd-cea09ef9db2c57982c7c7d5eb3808c823c8e16ba.zip | |
Refactor BN_uadd() and BN_usub().
Unlike bn_add_words()/bn_sub_words(), the s2n-bignum bignum_add() and
bignum_sub() functions correctly handle inputs with differing word
lengths. This means that they can be called directly, without needing to
fix up any remaining words manually.
Split BN_uadd() in two - the default bn_add() implementation calls
bn_add_words(), before handling the carry for any remaining words.
Likewise split BN_usub() in two - the default bn_sub() implementation
calls bn_sub_words(), before handling the borrow for any remaining words.
On amd64, provide an implementation of bn_add() that calls s2n-bignum's
bignum_add() directly, similarly with an implementation of bn_sub() that
calls s2n-bignum's bignum_sub() directly.
ok tb@
Diffstat (limited to 'src/regress/lib/libc/regex')
0 files changed, 0 insertions, 0 deletions
