You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/crypto/libntrup/src/ref/randomsmall.c

15 lines
259 B
C

#include "params.h"
#include "randombytes.h"
#include "crypto_uint32.h"
#include "small.h"
void small_random(small *g)
{
int i;
for (i = 0;i < p;++i) {
crypto_uint32 r = small_random32();
g[i] = (small) (((1073741823 & r) * 3) >> 30) - 1;
}
}