1. 19 8月, 2014 1 次提交
  2. 07 5月, 2014 1 次提交
    • G
      bignum: allow concurrent BN_MONT_CTX_set_locked() · 12e9f627
      Geoff Thorpe 提交于
      The lazy-initialisation of BN_MONT_CTX was serialising all threads, as
      noted by Daniel Sands and co at Sandia. This was to handle the case that
      2 or more threads race to lazy-init the same context, but stunted all
      scalability in the case where 2 or more threads are doing unrelated
      things! We favour the latter case by punishing the former. The init work
      gets done by each thread that finds the context to be uninitialised, and
      we then lock the "set" logic after that work is done - the winning
      thread's work gets used, the losing threads throw away what they've done.
      Signed-off-by: NGeoff Thorpe <geoff@openssl.org>
      12e9f627
  3. 18 10月, 2011 2 次提交
  4. 19 3月, 2011 1 次提交
  5. 28 1月, 2011 1 次提交
  6. 27 1月, 2011 3 次提交
  7. 03 5月, 2008 1 次提交
  8. 02 5月, 2008 1 次提交
  9. 27 2月, 2008 1 次提交
  10. 19 9月, 2007 1 次提交
  11. 29 6月, 2007 1 次提交
  12. 11 6月, 2007 2 次提交
  13. 16 6月, 2006 1 次提交
  14. 14 6月, 2006 1 次提交
  15. 11 11月, 2005 1 次提交
  16. 23 10月, 2005 2 次提交
  17. 06 10月, 2005 2 次提交
  18. 04 10月, 2005 1 次提交
  19. 22 7月, 2005 1 次提交
  20. 27 4月, 2005 1 次提交
  21. 05 12月, 2004 1 次提交
  22. 25 3月, 2004 1 次提交
    • G
      Adjust various bignum functions to use BN_CTX for variables instead of · c86f2054
      Geoff 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.
      c86f2054
  23. 14 3月, 2004 1 次提交
    • G
      Convert openssl code not to assume the deprecated form of BN_zero(). · b6358c89
      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).
      b6358c89
  24. 05 11月, 2003 1 次提交
  25. 31 5月, 2002 1 次提交
  26. 09 3月, 2001 1 次提交
  27. 08 12月, 2000 1 次提交
    • B
      Fix some things that look like bugs. · 8dea52fa
      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.
      8dea52fa
  28. 17 11月, 2000 1 次提交
  29. 12 11月, 2000 1 次提交
  30. 10 11月, 2000 1 次提交
  31. 07 11月, 2000 1 次提交
  32. 20 9月, 2000 3 次提交
    • B
      Totally remove the supposedly 'faster' variant in · fe035197
      Bodo 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 :-)
      fe035197
    • B
      Document BN_mod_mul_montgomery bug; · a45bd295
      Bodo Möller 提交于
      make disabled code slightly more correct (this does not solve
      the problem though).
      a45bd295
    • B
      Disable buggy code variant in BN_mod_mul_montgomery that was enabled · f4364e07
      Bodo 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").
      f4364e07