Lines Matching defs:entropy
75 * entropy into a subset of pools per iteration with the goal of feeding
105 * entropy types to harvest.
131 /* The context of the kernel thread processing harvested entropy */
134 * Lockless ring buffer holding entropy events
138 * the buffer contains harvested entropy.
206 /* XXX: FIX!! This is a *great* place to pass hardware/live entropy to random(9) */
228 * Run through all fast sources reading entropy for the given
230 * of entropy accumulation pools in use; it is 32 for Fortuna.
235 uint32_t entropy[HARVESTSIZE];
257 * all of the PRNG's pools with entropy; if there is enough entropy
258 * available from "fast" entropy sources this will allow us to finish
261 * small chunk of entropy every 1 / RANDOM_KTHREAD_HZ seconds.
265 * PRNG or smaller pools for Fortuna, we might collect more entropy
267 * a different PRNG, larger pools, or fast entropy sources which are
268 * not able to provide as much entropy as we request may result in the
271 * try again for a large amount of entropy.
275 RANDOM_FORTUNA_DEFPOOLSIZE, sizeof(entropy));
278 * Step over all of live entropy sources, and feed their output
285 n = rrs->rrs_source->rs_read(entropy, sizeof(entropy));
286 KASSERT((n <= sizeof(entropy)), ("%s: rs_read returned too much data (%u > %zu)", __func__, n, sizeof(entropy)));
288 * Sometimes the HW entropy source doesn't have anything
290 * We don't perform any other verification of an entropy
292 * to sizeof(entropy), quality is unchecked, etc), so
296 * But it's still a better entropy source than RDRAND.
300 random_harvest_direct(entropy, n, rrs->rrs_source->rs_source);
305 explicit_bzero(entropy, sizeof(entropy));
328 * Disallow userspace modification of pure entropy sources.
441 * Subroutine to slice up a contiguous chunk of 'entropy' and feed it into the
446 random_early_prime(char *entropy, size_t len)
461 memcpy(event.he_entropy, entropy + i, sizeof(event.he_entropy));
464 explicit_bzero(entropy, len);
503 * Get entropy that may have been preloaded by loader(8)
504 * and use it to pre-charge the entropy harvest queue.
512 printf("random: no preloaded entropy cache\n");
520 printf("random: no platform bootloader entropy\n");
552 random_harvest_queue_(const void *entropy, u_int size, enum random_entropy_source origin)
568 memcpy(event->he_entropy, entropy, size);
573 event->he_entropy[0] = jenkins_hash(entropy, size, (uint32_t)(uintptr_t)event);
587 random_harvest_fast_(const void *entropy, u_int size)
592 harvest_context.hc_entropy_fast_accumulator.buf[pos] ^= jenkins_hash(entropy, size, (uint32_t)get_cyclecount());
600 * (e.g.) booting when initial entropy is being gathered.
603 random_harvest_direct_(const void *entropy, u_int size, enum random_entropy_source origin)
613 memcpy(event.he_entropy, entropy, size);
699 "List of active fast entropy sources.");