Lines Matching refs:random
0 /* random-csprng.c - CSPRNG style random number generator (libgcrypt classic)
22 This random number generator is modelled after the one described in
60 #include "random.h"
106 /* KEYPOOL is used as a scratch copy to read out random from RNDPOOL.
110 /* This is the offset into RNDPOOL where the next random bytes are to
127 /* If random of level GCRY_VERY_STRONG_RANDOM has been requested we
158 guaranteed to point to function. (On systems without a random
173 requests for very strong random are degraded to strong random. Not
178 indicate that the random generator is not working properly. A
215 /* --- Stuff pertaining to the random daemon support. --- */
218 /* If ALLOW_DAEMON is true, the module will try to use the random
227 for accessing the random daemon. If this value is NULL, the
260 the random pool can be delayed until it is actually needed. We
286 traditionally used for the random levels. */
360 /* Initialize this random subsystem. If FULL is false, this function
381 log_info ("random usage: poolsize=%d mixed=%lu polls=%lu/%lu added=%lu/%lu\n"
392 initialization of this module to place the random pools into secure
461 /* Add BUFLEN bytes from BUF to the internal random pool. QUALITY
504 cryptographically strong random bytes. Level GCRY_WEAK_RANDOM is
546 /* Read the random into the provided buffer. */
724 Note: Multiple instances of applications sharing the same random
729 clock, and up to 16 bytes of weak random non-blockingly. The
917 /* Read random out of the pool. This function is the core of the
918 public random functions. Note that Level GCRY_WEAK_RANDOM is not
960 log_bug("too many random bits requested\n");
987 /* For level 2 make sure that there is enough random in the pool. */
1006 /* Always do a fast random poll (we have to use the unlocked version). */
1009 /* Mix the pid in so that we for sure won't deliver the same random
1050 the very same random number. This test here is to detect forks
1087 the fast random poll. To avoid flagging the pool as
1255 /* The fast random pool function as called at some places in
1258 NOP unless a random function has been used or _gcry_initialize (1)
1261 random pool, even if no random will be required by the process. */
1302 log_info(_("WARNING: using insecure random number generator!!\n"));
1318 *p++ = ((unsigned)(1 + (int) (256.0*random()/(RAND_MAX+1.0)))-1);