Home
last modified time | relevance | path

Searched hist:cd283ea4 (Results 1 – 1 of 1) sorted by relevance

/openbsd/lib/libcrypto/bn/
H A Dbn_mod.ccd283ea4 Fri Feb 03 05:15:40 GMT 2023 jsing <jsing@openbsd.org> Clean up and simplify BN_mod_lshift{,_quick}().

BN_mod_lshift() already has a BN_CTX available, make use of it rather than
calling BN_dup() and BN_free().

In BN_mod_lshift_quick(), BN_copy() already handles dst == src, so avoid
checking this before the call. The max_shift == 0 case can also be handled
without code duplication. And as with other *_quick() functions, use
BN_ucmp() and BN_usub() directly given the 0 <= a < m constraint.

ok tb@