Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
rng.c File Reference
#include "rng.h"
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
Include dependency graph for rng.c:

Go to the source code of this file.

Functions

void randombytes (void *x, size_t l)

Function Documentation

◆ randombytes()

void randombytes ( void * x,
size_t l )

Definition at line 8 of file rng.c.

9{
10 static int fd = -1;
11 ssize_t n;
12 if (fd < 0 && 0 > (fd = open("/dev/urandom", O_RDONLY)))
13 exit(1);
14 for (size_t i = 0; i < l; i += n)
15 if (0 >= (n = read(fd, (char *) x + i, l - i)))
16 exit(2);
17}
for i

References i.

Referenced by csidh_private(), fp_random(), fp_sample(), isogeny_walks_sample_bit_string(), isogeny_walks_sample_trit_string(), random_boundedl1(), random_coin(), and random_wombats().

Here is the caller graph for this function: