summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_mont.c
AgeCommit message (Collapse)Author
2011-10-17bn_mont.c: get corner cases right in updated BN_from_montgomery_word.Andy Polyakov
2011-10-17bn_mont.c: simplify BN_from_montgomery_word.Andy Polyakov
2011-03-19After some adjustments, apply the changes OpenSSL 1.0.0d on OpenVMSRichard Levitte
submitted by Steven M. Schweda <sms@antinode.info>
2011-01-27Move all FIPSAPI renames into fips.h header file, include early inDr. Stephen Henson
crypto.h if needed. Modify source tree to handle change.
2011-01-27Update source files to handle new FIPS_lock() location. Add FIPS_lock()Dr. Stephen Henson
definition. Remove stale function references from fips.h
2011-01-27Change OPENSSL_FIPSEVP to OPENSSL_FIPSAPI as it doesn't just referDr. Stephen Henson
to EVP any more. Move locking #define into fips.h. Set FIPS locking callbacks at same time as OpenSSL locking callbacks.
2011-01-27use FIPSEVP in some bn and rsa filesDr. Stephen Henson
2008-05-02Clarifying comment.Bodo Möller
2008-05-01Montgomery-related minor cleanups/documentationBodo Möller
2008-02-27fix BIGNUM flag handlingBodo Möller
2007-09-18Make sure that BN_from_montgomery keeps the BIGNUMS in proper formatBodo Möller
2007-06-29Latest bn_mont.c modification broke ECDSA test. I've got math wrong, whichAndy Polyakov
is fixed now.
2007-06-11Commentary updates and minor optimization for bn_mont.c.Andy Polyakov
2007-06-10Eliminate conditional final subtraction in Montgomery multiplication.Andy Polyakov
2006-06-16another thread-safety fixBodo Möller
2006-06-14Thread-safety fixesBodo Möller
2005-11-11Update from stable branch.Dr. Stephen Henson
2005-10-22Eliminate gcc warning in bn_mont.c.Andy Polyakov
2005-10-22Change bn_mul_mont declaration and BN_MONT_CTX. Update CHANGES.Andy Polyakov
2005-10-06Refine logic in bn_mont.c and eliminate redundant BN_CTX pulls.Andy Polyakov
2005-10-06Leave the decision to call/implement bn_sqr_mont to assembler developer.Andy Polyakov
2005-10-04Add reference implementation for bn_[mul|sqr]_mont, new candidates forAndy Polyakov
assembler implementation.
2005-07-21set correct bn->top valueNils Larsch
2005-04-26Port BN_MONT_CTX_set_locked() from stable branch.Dr. Stephen Henson
The function rsa_eay_mont_helper() has been removed because it is no longer needed after this change.
2004-12-05Add lots of checks for memory allocation failure, error codes to indicateDr. Stephen Henson
failure and freeing up memory if a failure occurs. PR:620
2004-03-25Adjust various bignum functions to use BN_CTX for variables instead ofGeoff Thorpe
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-13Convert openssl code not to assume the deprecated form of BN_zero().Geoff Thorpe
Remove certain redundant BN_zero() initialisations, because BN_CTX_get(), BN_init(), [etc] already initialise to zero. Correct error checking in bn_sqr.c, and be less wishy-wash about how/why the result's 'top' value is set (note also, 'max' is always > 0 at this point).
2003-11-04Put the first stage of my bignum debugging adventures into CVS. This codeGeoff Thorpe
is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible.
2002-05-30Check the return values where memory allocation failures may happen.Richard Levitte
PR: 49
2001-03-08Implement EC_GFp_mont_method.Bodo Möller
2000-12-07Fix some things that look like bugs.Bodo Möller
One problem that looked like a problem in bn_recp.c at first turned out to be a BN_mul bug. An example is given in bn_recp.c; finding the bug responsible for this is left as an exercise.
2000-11-16More constification of the BN library.Richard Levitte
2000-11-12Make Rijndael work! Those long flights have some good points.Ben Laurie
2000-11-09tmp2 is not used in BN_mod_mul_montgomery.Bodo Möller
2000-11-06Constify the BIGNUM routines a bit more. The only trouble were theRichard Levitte
two functions that did expansion on in parameters (BN_mul() and BN_sqr()). The problem was solved by making bn_dup_expand() which is a mix of bn_expand2() and BN_dup().
2000-09-19Totally remove the supposedly 'faster' variant inBodo Möller
BN_mod_mul_montgomery, which calls bn_sqr_recursive without much preparation. bn_sqr_recursive requires the length of its argument to be a power of 2, which is not always the case here. There's no reason for not using BN_sqr -- if a simpler approach to squaring made sense, then why not change BN_sqr? (Using BN_sqr should also speed up DH where g is chosen such that it becomes small [e.g., 2] when converted to Montgomery representation.) Case closed :-)
2000-09-19Document BN_mod_mul_montgomery bug;Bodo Möller
make disabled code slightly more correct (this does not solve the problem though).
2000-09-19Disable buggy code variant in BN_mod_mul_montgomery that was enabledBodo Möller
in 0.9.6-beta1 and 0.9.6-beta2 and caused the BN_mont_exp_mont_word() failure (bug report "openssh 2.2.0p1 fails with openssl 0.9.6-beta1").
2000-09-14Bug fix: Montgomery multiplication could produce results with the wrongUlf Möller
sign.
2000-08-04Changes needed for Tandem NSK, supplied by Scott Uroff (scott@xypro.com).Dr. Stephen Henson
Fix warnings with BIO_dump_indent().
2000-07-01Don't let top go below zero!Ben Laurie
2000-06-21use faster versionUlf Möller
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte
like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
2000-03-01Bug fix.Ulf Möller
2000-02-05Use MONT_WORD macro to control if the word-based or the bignumUlf Möller
algorithm is used.
2000-02-05New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to accessUlf Möller
temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but the BN_CTX implementation could now easily be changed.
2000-01-27comment was wrong.Ulf Möller
2000-01-27typo in a commentBodo Möller
2000-01-27Update comments to provide a better approximation of reality.Bodo Möller
2000-01-27Add a pointer to a paper (is the algorithm in section 4.2 theBodo Möller
word-based algorithm we are using?)