1. 25 Jan, 2018 1 commit
    • Nick Mathewson's avatar
      In relay_digest_matches(), use stack instead of heap. · 91c63aae
      Nick Mathewson authored
      We'd been using crypto_digest_dup() and crypto_digest_assign() here,
      but they aren't necessary.  Instead we can just use the stack to
      store the previous state of the SHA_CTX and avoid a malloc/free pair.
      
      Closes ticket 24914.
      91c63aae
  2. 08 Jan, 2018 1 commit
  3. 08 Dec, 2017 2 commits
  4. 17 Nov, 2017 1 commit
  5. 19 Sep, 2017 1 commit
    • David Goulet's avatar
      Add a BASE32_DIGEST_LEN define · 5dea4b56
      David Goulet authored
      
      
      Use this value instead of hardcoded values of 32 everywhere. This also
      addresses the use of REND_DESC_ID_V2_LEN_BASE32 in
      hs_lookup_last_hid_serv_request() for the HSDir encoded identity digest length
      which is accurate but semantically wrong.
      
      Fixes #23305.
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      5dea4b56
  6. 15 Sep, 2017 1 commit
  7. 24 Jul, 2017 1 commit
  8. 07 Jul, 2017 2 commits
  9. 31 Mar, 2017 1 commit
  10. 15 Mar, 2017 1 commit
  11. 30 Jan, 2017 1 commit
  12. 11 Jan, 2017 1 commit
  13. 14 Dec, 2016 2 commits
  14. 16 Sep, 2016 2 commits
  15. 09 Sep, 2016 1 commit
  16. 28 Jul, 2016 1 commit
  17. 11 Jun, 2016 1 commit
    • Nick Mathewson's avatar
      Add -Wmissing-variable-declarations, with attendant fixes · 53a3b39d
      Nick Mathewson authored
      This is a big-ish patch, but it's very straightforward.  Under this
      clang warning, we're not actually allowed to have a global variable
      without a previous extern declaration for it.  The cases where we
      violated this rule fall into three roughly equal groups:
        * Stuff that should have been static.
        * Stuff that was global but where the extern was local to some
          other C file.
        * Stuff that was only global when built for the unit tests, that
          needed a conditional extern in the headers.
      
      The first two were IMO genuine problems; the last is a wart of how
      we build tests.
      53a3b39d
  18. 23 May, 2016 1 commit
  19. 16 May, 2016 1 commit
  20. 27 Feb, 2016 1 commit
  21. 10 Feb, 2016 3 commits
  22. 06 Feb, 2016 1 commit
  23. 27 Jan, 2016 1 commit
  24. 29 Dec, 2015 1 commit
  25. 23 Dec, 2015 1 commit
  26. 19 Dec, 2015 2 commits
    • Yawning Angel's avatar
      Add `crypto_xof_t` and assorted routines, backed by SHAKE256. · 94674855
      Yawning Angel authored
      This is an eXtendable-Output Function with the following claimed
      security strengths against *all* adversaries:
      
       Collision: min(d/2, 256)
       Preimage: >= min(d, 256)
       2nd Preimage: min(d, 256)
      
       where d is the amount of output used, in bits.
      94674855
    • Yawning Angel's avatar
      Add the SHA-3 hash functions to common/crypto.h. · 687f9b3b
      Yawning Angel authored
       * DIGEST_SHA3_[256,512] added as supported algorithms, which do
         exactly what is said on the tin.
       * test/bench now benchmarks all of the supported digest algorithms,
         so it's possible to see just how slow SHA-3 is, though the message
         sizes could probably use tweaking since this is very dependent on
         the message size vs the SHA-3 rate.
      687f9b3b
  27. 08 Dec, 2015 1 commit
  28. 26 Nov, 2015 3 commits
  29. 24 Nov, 2015 1 commit
  30. 02 Oct, 2015 1 commit
  31. 15 Sep, 2015 1 commit