tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

ed25519-randombytes-custom.h (436B)


      1 /*
      2 a custom randombytes must implement:
      3 
      4 void ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len);
      5 
      6 ed25519_randombytes_unsafe is used by the batch verification function
      7 to create random scalars
      8 */
      9 
     10 /* Tor: Instead of calling OpenSSL's CSPRNG directly, call the wrapper. */
     11 #include "lib/crypt_ops/crypto_rand.h"
     12 
     13 static void
     14 ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len)
     15 {
     16  crypto_rand_unmocked(p, len);
     17 }