BN_div() cleanup: replace the use of BN_sub and BN_add with bn_sub_words
authorGeoff Thorpe <geoff@openssl.org>
Sat, 22 Nov 2003 20:23:41 +0000 (20:23 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Sat, 22 Nov 2003 20:23:41 +0000 (20:23 +0000)
commit9e989810bade356f3edd599d5b62d159795f2d53
tree883e97d00042092fb53db52eff884f8609d15f20
parentec2179cf81687380eaef3c745e2dbbc15bbbe2cb
BN_div() cleanup: replace the use of BN_sub and BN_add with bn_sub_words
and bn_add_words to avoid using fake bignums to window other bignums that
can lead to corruption. This change allows all bignum tests to pass with
BN_DEBUG and BN_DEBUG_RAND debugging and valgrind. NB: This should be
tested on a few different architectures and configuration targets, as the
bignum code this deals with is quite preprocessor (and assembly) sensitive.

Submitted by: Nils Narsch
Reviewed by: Geoff Thorpe, Ulf Moeller
crypto/bn/bn_div.c