CVSROOT: /cvs Module name: src Changes by: js...@cvs.openbsd.org 2023/02/02 22:15:40
Modified files: lib/libcrypto/bn: bn_mod.c Log message: 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@