summaryrefslogtreecommitdiff
path: root/src/ext/ed25519/donna/ed25519-randombytes-custom.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/ed25519/donna/ed25519-randombytes-custom.h')
-rw-r--r--src/ext/ed25519/donna/ed25519-randombytes-custom.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ext/ed25519/donna/ed25519-randombytes-custom.h b/src/ext/ed25519/donna/ed25519-randombytes-custom.h
index 9f5106340c..e49368bbaf 100644
--- a/src/ext/ed25519/donna/ed25519-randombytes-custom.h
+++ b/src/ext/ed25519/donna/ed25519-randombytes-custom.h
@@ -6,3 +6,12 @@
ed25519_randombytes_unsafe is used by the batch verification function
to create random scalars
*/
+
+/* Tor: Instead of calling OpenSSL's CSPRNG directly, call the wrapper. */
+#include "crypto.h"
+
+static void
+ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len)
+{
+ crypto_rand(p, len);
+}