diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-12-08 10:54:42 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-08 10:54:42 -0500 |
commit | 2259de0de726f3f617b2451d64f72f0d4d6bc0ae (patch) | |
tree | 6aeca7dc70a1231f8fd413d9572adbdf0a5c228f /src/ext | |
parent | 943369f927967268cacd2067ccae0bc5f1c5835e (diff) | |
download | tor-2259de0de726f3f617b2451d64f72f0d4d6bc0ae.tar.gz tor-2259de0de726f3f617b2451d64f72f0d4d6bc0ae.zip |
Always hash crypto_strongest_rand() along with some prng
(before using it for anything besides feeding the PRNG)
Part of #17694
Diffstat (limited to 'src/ext')
-rw-r--r-- | src/ext/ed25519/donna/ed25519_tor.c | 3 | ||||
-rw-r--r-- | src/ext/ed25519/ref10/randombytes.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/ext/ed25519/donna/ed25519_tor.c b/src/ext/ed25519/donna/ed25519_tor.c index 12493f7d14..ac726ba045 100644 --- a/src/ext/ed25519/donna/ed25519_tor.c +++ b/src/ext/ed25519/donna/ed25519_tor.c @@ -148,8 +148,7 @@ ed25519_donna_seckey(unsigned char *sk) { ed25519_secret_key seed; - if (crypto_strongest_rand(seed, 32)) - return -1; + crypto_strongest_rand(seed, 32); ed25519_extsk(sk, seed); diff --git a/src/ext/ed25519/ref10/randombytes.h b/src/ext/ed25519/ref10/randombytes.h index fc709fcefc..8bf31631f0 100644 --- a/src/ext/ed25519/ref10/randombytes.h +++ b/src/ext/ed25519/ref10/randombytes.h @@ -1,4 +1,4 @@ /* Added for Tor. */ #include "crypto.h" #define randombytes(b, n) \ - (crypto_strongest_rand((b), (n))) + (crypto_strongest_rand((b), (n)), 0) |