Remove BIGNUM consistency macros.
authorjsing <jsing@openbsd.org>
Sat, 26 Nov 2022 13:56:33 +0000 (13:56 +0000)
committerjsing <jsing@openbsd.org>
Sat, 26 Nov 2022 13:56:33 +0000 (13:56 +0000)
commitc74511df2ca4b2391eb5546856dda092e57fd0b2
tree76a35a43f61aad3db50d31bb20cfbe18023185c2
parentf8cba460b943d19852738df29fbf7e38f2047c5e
Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@
23 files changed:
lib/libcrypto/bn/bn_add.c
lib/libcrypto/bn/bn_blind.c
lib/libcrypto/bn/bn_ctx.c
lib/libcrypto/bn/bn_div.c
lib/libcrypto/bn/bn_exp.c
lib/libcrypto/bn/bn_exp2.c
lib/libcrypto/bn/bn_gcd.c
lib/libcrypto/bn/bn_gf2m.c
lib/libcrypto/bn/bn_kron.c
lib/libcrypto/bn/bn_lcl.h
lib/libcrypto/bn/bn_lib.c
lib/libcrypto/bn/bn_mod.c
lib/libcrypto/bn/bn_mont.c
lib/libcrypto/bn/bn_mpi.c
lib/libcrypto/bn/bn_mul.c
lib/libcrypto/bn/bn_prime.c
lib/libcrypto/bn/bn_print.c
lib/libcrypto/bn/bn_rand.c
lib/libcrypto/bn/bn_recp.c
lib/libcrypto/bn/bn_shift.c
lib/libcrypto/bn/bn_sqr.c
lib/libcrypto/bn/bn_sqrt.c
lib/libcrypto/bn/bn_word.c