Lines Matching defs:pool

29  * from external sources and processes it into a pool of entropy (randomness)
60 #define HASHBUFSIZE 64 /* Buffer size used for pool mixing */
87 static uint32_t entropy_bits; /* pool's current amount of entropy */
88 static kmutex_t srndpool_lock; /* protects r/w accesses to the pool, */
93 /* from the pool */
215 * Initialize the pool using
237 /* Schedule periodic mixing of the pool. */
309 * Extraction of entropy from the pool.
313 * MINEXTRACTBITS are present in the pool.
321 uint8_t digest[HASHSIZE], *pool;
368 /* Extract entropy by hashing pool content */
374 * Feed the digest back into the pool so next
377 pool = (uint8_t *)srndpool;
379 pool[pindex++] ^= digest[i];
432 #define SWRAND_ADD_BYTES(ptr, len, i, pool) \
436 (pool)[(i)++] ^= *(ptr); \
441 /* Write some more user-provided entropy to the pool */
445 uint8_t *pool = (uint8_t *)srndpool;
448 SWRAND_ADD_BYTES(ptr, len, pindex, pool);
452 * Add bytes to buffer. Adding the buffer to the random pool
453 * is deferred until the random pool is mixed.
458 uint8_t *pool = (uint8_t *)buffer;
461 SWRAND_ADD_BYTES(ptr, len, bindex, pool);
467 /* Mix the pool */
474 uint8_t *pool = (uint8_t *)srndpool;
490 pool[pindex++] ^= bp[bstart];
505 /* Hash a buffer centered on a block in the pool */
507 HashUpdate(&hashctx, &pool[start], HASHBUFSIZE);
509 HashUpdate(&hashctx, &pool[start],
511 HashUpdate(&hashctx, pool,
519 pool[k++] ^= digest[j];
565 * digest is then mixed into the pool. A single bit from the digest is
568 * changed, no entropy is credited to the pool. If there is a change,
574 * of the changes, the amount of entropy credited to the pool is doubled
576 * change will add a total of 30 bits of entropy to the pool.
619 /* Initialize parity vector with bits from the pool */
636 /* Generate some entropy to further initialize the pool */
669 * Use each 32-bit quantity in the pool to pick a memory
674 /* If the pool is "full", stop after one block */
799 * If the memory block has changed, credit the pool with
808 /* Add the entropy bytes to the pool */
882 * The new timeout value is taken from the pool of random bits.
883 * We're merely reading the first 32 bits from the pool here, not
885 * This routine is usually called right after stirring the pool, so