openssl/crypto/bn
Geoff Thorpe 5d735465d1 The efforts to eliminate the dual-representation of zero and to ensure
bignums are passed in and out of functions and APIs in a consistent form
has highlighted that zero-valued bignums don't need any allocated word
data. The use of BN_set_word() to initialise a bignum to zero causes
needless allocation and gives it a return value that must be checked. This
change converts BN_zero() to a self-contained macro that has no
return/expression value and does not cause any expansion of bignum data.

Note, it would be tempting to rewrite the deprecated version as a
success-valued comma expression, such as;
   #define BN_zero(a) ((a)->top = (a)->neg = 0, 1)
However, this evaluates 'a' twice and would confuse initialisation loops
(eg. while(..) { BN_zero(bn++) } ). As such, the deprecated version
continues to use BN_set_word().
2004-03-13 23:04:15 +00:00
..
asm Typo in crypto/bn/asm/x86_64.c, bn_div_words(). 2004-02-07 09:51:28 +00:00
.cvsignore
bn_add.c Add "dif" variable to clean up the loop implementations. 2003-12-06 11:55:46 +00:00
bn_asm.c
bn_blind.c
bn_ctx.c Document a change I'd already made, and at the same time, correct the 2004-03-13 22:10:15 +00:00
bn_depr.c
bn_div.c Document a change I'd already made, and at the same time, correct the 2004-03-13 22:10:15 +00:00
bn_err.c
bn_exp2.c Use the BN_is_odd() macro in place of code that (inconsistently) does much 2003-12-02 03:28:24 +00:00
bn_exp.c Use the BN_is_odd() macro in place of code that (inconsistently) does much 2003-12-02 03:28:24 +00:00
bn_gcd.c Avoid segfault if ret==0. 2003-12-06 11:39:37 +00:00
bn_gf2m.c Even though C specification explicitly says that constant type "stretches" 2004-01-25 10:53:43 +00:00
bn_kron.c Add missing bn_check_top()s to bn_kron.c, remove some miscellaneous 2003-12-01 23:11:45 +00:00
bn_lcl.h Minimise the amount of code dependent on BN_DEBUG_RAND. In particular, 2004-03-09 03:53:40 +00:00
bn_lib.c Use BUF_strlcpy() instead of strcpy(). 2003-12-27 14:40:17 +00:00
bn_mod.c When adding positive elements, we can use BN_uadd() instead of BN_add(). 2004-02-22 19:30:41 +00:00
bn_mont.c
bn_mpi.c
bn_mul.c
bn_nist.c Minimise the amount of code dependent on BN_DEBUG_RAND. In particular, 2004-03-09 03:53:40 +00:00
bn_prime.c
bn_prime.h
bn_prime.pl
bn_print.c Use BUF_strlcpy() instead of strcpy(). 2003-12-27 14:40:17 +00:00
bn_rand.c
bn_recp.c
bn_shift.c
bn_sqr.c
bn_sqrt.c
bn_word.c
bn.h The efforts to eliminate the dual-representation of zero and to ensure 2004-03-13 23:04:15 +00:00
bn.mul
bnspeed.c
bntest.c
divtest.c
exp.c
expspeed.c
exptest.c
Makefile.ssl Typo in PA-RISC 2 rules in crypto/bn/Makefile.ssl 2004-01-30 05:41:23 +00:00
todo
vms-helper.c