1. 27 6月, 2018 1 次提交
  2. 25 6月, 2018 1 次提交
  3. 15 6月, 2018 1 次提交
  4. 09 6月, 2018 2 次提交
  5. 03 6月, 2018 4 次提交
  6. 02 5月, 2018 1 次提交
  7. 24 4月, 2018 1 次提交
  8. 23 4月, 2018 1 次提交
  9. 14 4月, 2018 1 次提交
    • D
      DRBG: implement a get_nonce() callback · 5bc6bcf8
      Dr. Matthias St. Pierre 提交于
      Fixes #5849
      
      In pull request #5503 a fallback was added which adds a random nonce of
      security_strength/2 bits if no nonce callback is provided. This change raised
      the entropy requirements form 256 to 384 bit, which can cause problems on some
      platforms (e.g. VMS, see issue #5849).
      
      The requirements for the nonce are given in section 8.6.7 of NIST SP 800-90Ar1:
      
        A nonce may be required in the construction of a seed during instantiation
        in order to provide a security cushion to block certain attacks.
        The nonce shall be either:
      
        a) A value with at least (security_strength/2) bits of entropy, or
      
        b) A value that is expected to repeat no more often than a
           (security_strength/2)-bit random string would be expected to repeat.
      
        Each nonce shall be unique to the cryptographic module in which instantiation
        is performed, but need not be secret. When used, the nonce shall be considered
        to be a critical security parameter.
      
      This commit implements a nonce of type b) in order to lower the entropy
      requirements during instantiation back to 256 bits.
      
      The formulation "shall be unique to the cryptographic module" above implies
      that the nonce needs to be unique among (with high probability) among all
      DRBG instances in "space" and "time". We try to achieve this goal by creating a
      nonce of the following form
      
          nonce = app-specific-data || high-resolution-utc-timestamp || counter
      
      Where || denotes concatenation. The application specific data can be something
      like the process or group id of the application. A utc timestamp is used because
      it increases monotonically, provided the system time is synchronized. This approach
      may not be perfect yet for a FIPS evaluation, but it should be good enough for the
      moment.
      
      This commit also harmonizes the implementation of the get_nonce() and the
      get_additional_data() callbacks and moves the platform specific parts from
      rand_lib.c into rand_unix.c, rand_win.c, and rand_vms.c.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/5920)
      5bc6bcf8
  10. 05 4月, 2018 1 次提交
    • R
      Remove ambiguity in rand_pool_add[_end] return value · 8e2bec9b
      Richard Levitte 提交于
      When these two functions returned zero, it could mean:
      
      1. that an error occured.  In their case, the error is an overflow of
         the pool, i.e. the correct response from the caller would be to
         stop trying to fill the pool.
      2. that there isn't enought entropy acquired yet, i.e. the correct
         response from the caller would be to try and add more entropy to
         the pool.
      
      Because of this ambiguity, the returned zero turns out to be useless.
      This change makes the returned value more consistent.  1 means the
      addition of new entropy was successful, 0 means it wasn't.  To know if
      the pool has been filled enough, the caller will have to call some
      other function, such as rand_pool_entropy_available().
      
      Fixes #5846
      Reviewed-by: NMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
      (Merged from https://github.com/openssl/openssl/pull/5876)
      8e2bec9b
  11. 16 3月, 2018 1 次提交
  12. 27 2月, 2018 1 次提交
  13. 14 2月, 2018 1 次提交
  14. 18 10月, 2017 1 次提交
    • D
      Fix reseeding issues of the public RAND_DRBG · c16de9d8
      Dr. Matthias St. Pierre 提交于
      Reseeding is handled very differently by the classic RAND_METHOD API
      and the new RAND_DRBG api. These differences led to some problems when
      the new RAND_DRBG was made the default OpenSSL RNG. In particular,
      RAND_add() did not work as expected anymore. These issues are discussed
      on the thread '[openssl-dev] Plea for a new public OpenSSL RNG API'
      and in Pull Request #4328. This commit fixes the mentioned issues,
      introducing the following changes:
      
      - Replace the fixed size RAND_BYTES_BUFFER by a new RAND_POOL API which
        facilitates collecting entropy by the get_entropy() callback.
      - Don't use RAND_poll()/RAND_add() for collecting entropy from the
        get_entropy() callback anymore. Instead, replace RAND_poll() by
        RAND_POOL_acquire_entropy().
      - Add a new function rand_drbg_restart() which tries to get the DRBG
        in an instantiated state by all means, regardless of the current
        state (uninstantiated, error, ...) the DRBG is in. If the caller
        provides entropy or additional input, it will be used for reseeding.
      - Restore the original documented behaviour of RAND_add() and RAND_poll()
        (namely to reseed the DRBG immediately) by a new implementation based
        on rand_drbg_restart().
      - Add automatic error recovery from temporary failures of the entropy
        source to RAND_DRBG_generate() using the rand_drbg_restart() function.
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      Reviewed-by: NBen Kaduk <kaduk@mit.edu>
      (Merged from https://github.com/openssl/openssl/pull/4328)
      c16de9d8
  15. 30 8月, 2017 1 次提交
  16. 28 8月, 2017 2 次提交
  17. 03 8月, 2017 1 次提交
    • R
      Switch from ossl_rand to DRBG rand · 75e2c877
      Rich Salz 提交于
      If RAND_add wraps around, XOR with existing. Add test to drbgtest that
      does the wrap-around.
      
      Re-order seeding and stop after first success.
      
      Add RAND_poll_ex()
      
      Use the DF and therefore lower RANDOMNESS_NEEDED.  Also, for child DRBG's,
      mix in the address as the personalization bits.
      
      Centralize the entropy callbacks, from drbg_lib to rand_lib.
      (Conceptually, entropy is part of the enclosing application.)
      Thanks to Dr. Matthias St Pierre for the suggestion.
      
      Various code cleanups:
          -Make state an enum; inline RANDerr calls.
          -Add RAND_POLL_RETRIES (thanks Pauli for the idea)
          -Remove most RAND_seed calls from rest of library
          -Rename DRBG_CTX to RAND_DRBG, etc.
          -Move some code from drbg_lib to drbg_rand; drbg_lib is now only the
           implementation of NIST DRBG.
          -Remove blocklength
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      (Merged from https://github.com/openssl/openssl/pull/4019)
      75e2c877
  18. 23 7月, 2017 1 次提交
    • R
      Add --with-rand-seed · 8389ec4b
      Rich Salz 提交于
      Add a new config param to specify how the CSPRNG should be seeded.
      Illegal values or nonsensical combinations (e.g., anything other
      than "os" on VMS or HP VOS etc) result in build failures.
      Add RDSEED support.
      Add RDTSC but leave it disabled for now pending more investigation.
      
      Refactor and reorganization all seeding files (rand_unix/win/vms) so
      that they are simpler.
      
      Only require 128 bits of seeding material.
      
      Many document improvements, including why to not use RAND_add() and the
      limitations around using load_file/write_file.
      Document RAND_poll().
      
      Cleanup Windows RAND_poll and return correct status
      
      More completely initialize the default DRBG.
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      (Merged from https://github.com/openssl/openssl/pull/3965)
      8389ec4b
  19. 15 7月, 2017 1 次提交
    • R
      Start to overhaul RAND API · da8fc25a
      Rich Salz 提交于
      Remove unused rand_hw_xor, MD/EVP indirection
      Make rand_pseudo same as rand.
      Cleanup formatting and ifdef control
      Rename some things:
          - rand_meth to openssl_rand_meth; make it global
          - source file
          - lock/init functions, start per-thread state
          - ossl_meth_init to ossl_rand_init
      Put state into RAND_STATE structure
      And put OSSL_RAND_STATE into ossl_typ.h
      Use "randomness" instead of "entropy"
      Reviewed-by: NBen Kaduk <kaduk@mit.edu>
      (Merged from https://github.com/openssl/openssl/pull/3758)
      da8fc25a
  20. 06 7月, 2017 1 次提交
  21. 30 6月, 2016 1 次提交
  22. 18 5月, 2016 1 次提交
  23. 18 3月, 2016 1 次提交
  24. 27 1月, 2016 1 次提交
    • R
      Remove /* foo.c */ comments · 34980760
      Rich Salz 提交于
      This was done by the following
              find . -name '*.[ch]' | /tmp/pl
      where /tmp/pl is the following three-line script:
              print unless $. == 1 && m@/\* .*\.[ch] \*/@;
              close ARGV if eof; # Close file to reset $.
      
      And then some hand-editing of other files.
      Reviewed-by: NViktor Dukhovni <viktor@openssl.org>
      34980760
  25. 15 1月, 2016 1 次提交
  26. 04 9月, 2015 1 次提交
  27. 14 5月, 2015 1 次提交
  28. 03 5月, 2015 1 次提交
  29. 22 1月, 2015 1 次提交
  30. 18 12月, 2014 1 次提交
  31. 20 12月, 2011 1 次提交
    • D
      PR: 2563 · ad89bf78
      Dr. Stephen Henson 提交于
      Submitted by: Paul Green <Paul.Green@stratus.com>
      Reviewed by: steve
      
      Improved PRNG seeding for VOS.
      ad89bf78
  32. 08 4月, 2009 1 次提交
  33. 15 2月, 2009 1 次提交
  34. 12 11月, 2008 1 次提交
  35. 02 11月, 2008 1 次提交