Simplify BN_mod_{lshift1,sub}_quick().
authorjsing <jsing@openbsd.org>
Fri, 3 Feb 2023 05:06:20 +0000 (05:06 +0000)
committerjsing <jsing@openbsd.org>
Fri, 3 Feb 2023 05:06:20 +0000 (05:06 +0000)
commit5169a775cb2b73f8e2adb91a445ca98af14c3e16
treec4db9b4a1d5fd450b92b658d06950f5adcc0863c
parentee5d149b5fdf24f45082149194fa4d66c33c3b4a
Simplify BN_mod_{lshift1,sub}_quick().

The BN_mod_.*_quick() functions require that their inputs are non-negative
and are already reduced. As such, they can and should use BN_ucmp() and
BN_usub() instead of BN_cmp() and BN_add()/BN_sub() (which internally call
BN_uadd()/BN_usub() and potentially BN_cmp()).

ok tb@
lib/libcrypto/bn/bn_mod.c