aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_mont.c
Commit message (Collapse)AuthorAgeFilesLines
* bn_mont.c: get corner cases right in updated BN_from_montgomery_word.Andy Polyakov2011-10-171-6/+6
|
* bn_mont.c: simplify BN_from_montgomery_word.Andy Polyakov2011-10-171-84/+26
|
* After some adjustments, apply the changes OpenSSL 1.0.0d on OpenVMSRichard Levitte2011-03-191-1/+1
| | | | submitted by Steven M. Schweda <sms@antinode.info>
* Move all FIPSAPI renames into fips.h header file, include early inDr. Stephen Henson2011-01-271-4/+0
| | | | | | crypto.h if needed. Modify source tree to handle change.
* Update source files to handle new FIPS_lock() location. Add FIPS_lock()Dr. Stephen Henson2011-01-271-0/+4
| | | | definition. Remove stale function references from fips.h
* Change OPENSSL_FIPSEVP to OPENSSL_FIPSAPI as it doesn't just referDr. Stephen Henson2011-01-271-1/+1
| | | | | | | | to EVP any more. Move locking #define into fips.h. Set FIPS locking callbacks at same time as OpenSSL locking callbacks.
* use FIPSEVP in some bn and rsa filesDr. Stephen Henson2011-01-271-0/+2
|
* Clarifying comment.Bodo Möller2008-05-021-0/+5
|
* Montgomery-related minor cleanups/documentationBodo Möller2008-05-011-0/+1
|
* fix BIGNUM flag handlingBodo Möller2008-02-271-0/+1
|
* Make sure that BN_from_montgomery keeps the BIGNUMS in proper formatBodo Möller2007-09-181-0/+2
|
* Latest bn_mont.c modification broke ECDSA test. I've got math wrong, whichAndy Polyakov2007-06-291-26/+20
| | | | is fixed now.
* Commentary updates and minor optimization for bn_mont.c.Andy Polyakov2007-06-111-7/+13
|
* Eliminate conditional final subtraction in Montgomery multiplication.Andy Polyakov2007-06-101-7/+54
|
* another thread-safety fixBodo Möller2006-06-161-6/+8
|
* Thread-safety fixesBodo Möller2006-06-141-10/+75
|
* Update from stable branch.Dr. Stephen Henson2005-11-111-6/+6
|
* Eliminate gcc warning in bn_mont.c.Andy Polyakov2005-10-221-2/+2
|
* Change bn_mul_mont declaration and BN_MONT_CTX. Update CHANGES.Andy Polyakov2005-10-221-6/+42
|
* Refine logic in bn_mont.c and eliminate redundant BN_CTX pulls.Andy Polyakov2005-10-061-32/+55
|
* Leave the decision to call/implement bn_sqr_mont to assembler developer.Andy Polyakov2005-10-061-8/+7
|
* Add reference implementation for bn_[mul|sqr]_mont, new candidates forAndy Polyakov2005-10-041-0/+16
| | | | assembler implementation.
* set correct bn->top valueNils Larsch2005-07-211-1/+1
|
* Port BN_MONT_CTX_set_locked() from stable branch.Dr. Stephen Henson2005-04-261-0/+18
| | | | | The function rsa_eay_mont_helper() has been removed because it is no longer needed after this change.
* Add lots of checks for memory allocation failure, error codes to indicateDr. Stephen Henson2004-12-051-1/+1
| | | | | | failure and freeing up memory if a failure occurs. PR:620
* Adjust various bignum functions to use BN_CTX for variables instead ofGeoff Thorpe2004-03-251-17/+18
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Convert openssl code not to assume the deprecated form of BN_zero().Geoff Thorpe2004-03-131-3/+3
| | | | | | | | | 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).
* Put the first stage of my bignum debugging adventures into CVS. This codeGeoff Thorpe2003-11-041-1/+3
| | | | | | is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible.
* Check the return values where memory allocation failures may happen.Richard Levitte2002-05-301-3/+3
| | | | PR: 49
* Implement EC_GFp_mont_method.Bodo Möller2001-03-081-3/+3
|
* Fix some things that look like bugs.Bodo Möller2000-12-071-19/+25
| | | | | | 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.
* More constification of the BN library.Richard Levitte2000-11-161-2/+2
|
* Make Rijndael work! Those long flights have some good points.Ben Laurie2000-11-121-1/+1
|
* tmp2 is not used in BN_mod_mul_montgomery.Bodo Möller2000-11-091-4/+1
|
* Constify the BIGNUM routines a bit more. The only trouble were theRichard Levitte2000-11-061-1/+1
| | | | | | 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().
* Totally remove the supposedly 'faster' variant inBodo Möller2000-09-191-29/+0
| | | | | | | | | | | | | | | 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 :-)
* Document BN_mod_mul_montgomery bug;Bodo Möller2000-09-191-2/+3
| | | | | make disabled code slightly more correct (this does not solve the problem though).
* Disable buggy code variant in BN_mod_mul_montgomery that was enabledBodo Möller2000-09-191-1/+20
| | | | | 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").
* Bug fix: Montgomery multiplication could produce results with the wrongUlf Möller2000-09-141-0/+1
| | | | sign.
* Changes needed for Tandem NSK, supplied by Scott Uroff (scott@xypro.com).Dr. Stephen Henson2000-08-041-1/+16
| | | | Fix warnings with BIO_dump_indent().
* Don't let top go below zero!Ben Laurie2000-07-011-1/+1
|
* use faster versionUlf Möller2000-06-211-1/+1
|
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-2/+2
| | | | | | | | | 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.
* Bug fix.Ulf Möller2000-03-011-3/+4
|
* Use MONT_WORD macro to control if the word-based or the bignumUlf Möller2000-02-051-114/+95
| | | | algorithm is used.
* New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to accessUlf Möller2000-02-051-9/+14
| | | | | temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but the BN_CTX implementation could now easily be changed.
* comment was wrong.Ulf Möller2000-01-271-1/+1
|
* typo in a commentBodo Möller2000-01-271-1/+1
|
* Update comments to provide a better approximation of reality.Bodo Möller2000-01-271-1/+2
|
* Add a pointer to a paper (is the algorithm in section 4.2 theBodo Möller2000-01-271-3/+4
| | | | word-based algorithm we are using?)