Geoff Thorpe c86f2054f3 Adjust various bignum functions to use BN_CTX for variables instead of
locally initialising their own.

NB: I've removed the "BN_clear_free()" loops for the exit-paths in some of
these functions, and that may be a major part of the performance
improvements we're seeing. The "free" part can be removed because we're
using BN_CTX. The "clear" part OTOH can be removed because BN_CTX
destruction automatically performs this task, so performing it inside
functions that may be called repeatedly is wasteful. This is currently safe
within openssl due to the fact that BN_CTX objects are never created for
longer than a single high-level operation. However, that is only because
there's currently no mechanism in openssl for thread-local storage. Beyond
that, this might be an issue for applications using the bignum API directly
and caching their own BN_CTX objects. The solution is to introduce a flag
to BN_CTX_start() that allows its variables to be automatically sanitised
on release during BN_CTX_end(). This way any higher-level function (and
perhaps the application) can specify this flag in its own
BN_CTX_start()/BN_CTX_end() pair, and this will cause inner-loop functions
specifying the flag to be ignored so that sanitisation is handled only once
back out at the higher level. I will be implementing this in the near
future.
2004-03-25 04:32:24 +00:00
..
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2004-02-10 18:46:10 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-06-19 16:56:48 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2004-03-04 21:44:39 +00:00
2003-11-28 13:10:58 +00:00
2004-03-24 10:50:42 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2003-12-27 14:59:07 +00:00
2004-01-21 08:17:08 +00:00
2003-06-26 10:26:42 +00:00
2003-12-27 14:59:07 +00:00
2002-11-13 18:10:30 +00:00
2004-03-23 14:50:16 +00:00
2000-02-01 02:21:16 +00:00
2003-11-28 13:10:58 +00:00
2004-03-24 09:40:59 +00:00
2003-09-09 23:44:39 +00:00
2001-07-05 10:20:07 +00:00
2003-02-13 13:21:13 +00:00
2003-11-28 13:10:58 +00:00
2003-11-28 13:10:58 +00:00