- 14 3月, 2004 2 次提交
-
-
由 Geoff Thorpe 提交于
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().
-
由 Geoff Thorpe 提交于
change to work properly; BN_zero() should set 'neg' to zero as well as 'top' to match the behaviour of BN_new().
-
- 09 3月, 2004 2 次提交
-
-
由 Geoff Thorpe 提交于
redefine bn_clear_top2max() to be a NOP in the non-debugging case, and remove some unnecessary usages in bn_nist.c. Submitted by: Nils Larsch Reviewed by: Geoff Thorpe, Ulf Möller
-
由 Geoff Thorpe 提交于
return a "zero" bignum as BN_new() does - so reset 'top'. During BN_CTX_end(), released bignums should be consistent so enforce this in debug builds. Also, reduce the number of wasted BN_clear_free() calls from BN_CTX_end() (typically by 75% or so). Submitted by: Nils Larsch Reviewed by: Geoff Thorpe, Ulf Möller
-
- 23 2月, 2004 1 次提交
-
-
由 Geoff Thorpe 提交于
Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
-
- 07 2月, 2004 1 次提交
-
-
由 Andy Polyakov 提交于
PR: 821
-
- 30 1月, 2004 2 次提交
-
-
由 Andy Polyakov 提交于
-
由 Andy Polyakov 提交于
-
- 29 1月, 2004 1 次提交
-
-
由 Richard Levitte 提交于
-
- 25 1月, 2004 1 次提交
-
-
由 Andy Polyakov 提交于
automatically to accomodate the value, some compilers fail to do so. Most notably 0x0123456789ABCDEF should come out as long long in 32-bit context, but HP compiler truncates it to 32-bit value. Which in turn breaks GF(2^m) arithmetics in hpux-parisc2-cc build. Therefore this fix...
-
- 27 12月, 2003 2 次提交
-
-
由 Richard Levitte 提交于
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
-
由 Richard Levitte 提交于
Use BUF_strlcat() instead of strcat(). Use BIO_snprintf() instead of sprintf(). In some cases, keep better track of buffer lengths. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
-
- 06 12月, 2003 2 次提交
-
-
由 Ulf Möller 提交于
Submitted by: Nils Larsch
-
由 Ulf Möller 提交于
Submitted by: Nils Larsch
-
- 03 12月, 2003 1 次提交
-
-
由 Geoff Thorpe 提交于
- Add missing bn_check_top() calls and relocate some others - Use BN_is_zero() where appropriate - Remove assert()s that bn_check_top() is already covering - Simplify the code in places (esp. bn_expand2()) - Only keep ambiguous zero handling if BN_STRICT isn't defined - Remove some white-space and make some other aesthetic tweaks
-
- 02 12月, 2003 7 次提交
-
-
由 Geoff Thorpe 提交于
the same thing. Also, I have some stuff on the back-burner related to some BN_CTX notes from Peter Gutmann about his cryptlib hacks to the bignum code. The BN_CTX comments are there to remind me of some relevant points in the code.
-
由 Geoff Thorpe 提交于
once in the source (where it is set for the benefit of no other code whatsoever). I've deprecated the declaration in the header and likewise made the use of the flag conditional in bn_lib.c. Note, this change also NULLs the 'd' pointer in a BIGNUM when it is reset but not deallocated.
-
由 Geoff Thorpe 提交于
-
由 Geoff Thorpe 提交于
white-space, and include extra headers to satisfy debugging builds.
-
由 Geoff Thorpe 提交于
white-space.
-
由 Geoff Thorpe 提交于
which, in turn, are used nowhere at all. This is a good thing because bn_set_max() would currently generate code that wouldn't compile (BIGNUM has no 'max' element). The only apparent use for bn_set_[low|high] would be for implementing windowing algorithms, and all of openssl's seem to use bn_***_words() helpers instead (including the BN_div() that Nils fixed recently, which had been using independently-coded versions of what these unused macros are intended for). I'm therefore consigning these macros to cvs oblivion in the name of readability.
-
由 Geoff Thorpe 提交于
bn_correct_top() or bn_check_top() depending on debug settings. For internal source, all bn_fix_top()s should be converted one way or the other depending on whether the use of bn_correct_top() is justified. For BN_div_recp(), these cases should not require correction if the other bignum functions are doing their jobs properly, so convert to bn_check_top().
-
- 01 12月, 2003 3 次提交
-
-
由 Geoff Thorpe 提交于
(ie. where top may be zero, or it may be one if the corresponding word is set to zero). Note, this only affects the macros in bn.h, there are probably similar corrections required in some c files. Also, clarify the audit-related macros at the top of the header. Mental note: I must not forget to clean all this out before 0.9.8 is released ...
-
由 Geoff Thorpe 提交于
tolerance of ambiguous zero-representation, it just improves BN_abs_is_word() and simplifies other macros that depend on it.
-
由 Geoff Thorpe 提交于
pseudo-random data for each bn_pollute().
-
- 30 11月, 2003 1 次提交
-
-
由 Geoff Thorpe 提交于
functions.
-
- 29 11月, 2003 1 次提交
-
-
由 Geoff Thorpe 提交于
-
- 28 11月, 2003 1 次提交
-
-
由 Richard Levitte 提交于
PR: 780 Submitted by: Verdon Walker <VWalker@novell.com> Reviewed by: Richard Levitte
-
- 26 11月, 2003 2 次提交
-
-
由 Geoff Thorpe 提交于
against inconsistent BIGNUMs coming out of any of its API functions. So this change no longer "fixes" the bn_print.c functions, but it makes for cleaner code. This patch was a part of ticket 697. PR: 697 Submitted by: Otto Moerbeek Reviewed by: Geoff Thorpe
-
由 Geoff Thorpe 提交于
ticket 697 (though uses a different solution than the proposed one). This problem was initially raised by Otto Moerbeek. PR: 697 Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
-
- 25 11月, 2003 1 次提交
-
-
由 Geoff Thorpe 提交于
optimizations. Submitted by: Nils Larsch
-
- 23 11月, 2003 1 次提交
-
-
由 Geoff Thorpe 提交于
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
-
- 15 11月, 2003 1 次提交
-
-
由 Ulf Möller 提交于
Keep it as is to avoid an API change, but check for negativ values. Submitted by: Nils Larsch
-
- 13 11月, 2003 1 次提交
-
-
由 Geoff Thorpe 提交于
generally a more efficient comparison than comparing two integers, and the first of these two loops was off-by-one (copying one too many values). This change also removes a superfluous assignment that would set an unused word to zero (and potentially allow an overrun in some cases). Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
-
- 07 11月, 2003 3 次提交
-
-
由 Geoff Thorpe 提交于
bn_correct_top(), previously only bn_check_top() did this.
-
由 Geoff Thorpe 提交于
before.
-
由 Geoff Thorpe 提交于
-
- 06 11月, 2003 3 次提交
-
-
由 Geoff Thorpe 提交于
constant BIGNUMs. It turns out that this trips up different but equally useful compiler warnings to -Wcast-qual, and so wasn't worth the ugliness it created. (Thanks to Ulf for the forehead-slap.)
-
由 Ulf Möller 提交于
-
由 Ulf Möller 提交于
-