Lines Matching full:entropy

75  * entropy into a subset of pools per iteration with the goal of feeding
107 * Allow the sysadmin to select the broad category of entropy types to harvest.
122 "Entropy Device Parameters");
135 /* The context of the kernel thread processing harvested entropy */
153 "entropy harvest mutex", NULL, MTX_SPIN)
203 /* XXX: FIX!! This is a *great* place to pass hardware/live entropy to random(9) */ in random_kthread()
226 * Run through all fast sources reading entropy for the given
228 * of entropy accumulation pools in use; it is 32 for Fortuna.
233 uint32_t entropy[HARVESTSIZE]; in random_sources_feed() local
255 * all of the PRNG's pools with entropy; if there is enough entropy in random_sources_feed()
256 * available from "fast" entropy sources this will allow us to finish in random_sources_feed()
259 * small chunk of entropy every 1 / RANDOM_KTHREAD_HZ seconds. in random_sources_feed()
263 * PRNG or smaller pools for Fortuna, we might collect more entropy in random_sources_feed()
265 * a different PRNG, larger pools, or fast entropy sources which are in random_sources_feed()
266 * not able to provide as much entropy as we request may result in the in random_sources_feed()
269 * try again for a large amount of entropy. in random_sources_feed()
273 RANDOM_FORTUNA_DEFPOOLSIZE, sizeof(entropy)); in random_sources_feed()
276 * Step over all of live entropy sources, and feed their output in random_sources_feed()
284 /* Source pushes entropy asynchronously. */ in random_sources_feed()
287 n = rrs->rrs_source->rs_read(entropy, sizeof(entropy)); in random_sources_feed()
288 KASSERT((n <= sizeof(entropy)), in random_sources_feed()
290 __func__, n, sizeof(entropy))); in random_sources_feed()
293 * Sometimes the HW entropy source doesn't have anything in random_sources_feed()
295 * We don't perform any other verification of an entropy in random_sources_feed()
297 * to sizeof(entropy), quality is unchecked, etc), so in random_sources_feed()
301 * But it's still a better entropy source than RDRAND. in random_sources_feed()
305 random_harvest_direct(entropy, n, rrs->rrs_source->rs_source); in random_sources_feed()
310 explicit_bzero(entropy, sizeof(entropy)); in random_sources_feed()
314 * State used for conducting NIST SP 800-90B health tests on entropy sources.
348 * For pure entropy sources the timestamp counter is generally in copy_event()
350 * intervals, so does not contribute much to the entropy. To in copy_event()
508 * Set cutoff values for the two tests, given a min-entropy estimate for in random_healthtest_init()
510 * min-entropy estimate of 1 bit and a sample rate of RANDOM_KTHREAD_HZ, in random_healthtest_init()
548 * For environmental sources, the main source of entropy is the in random_healthtest_init()
551 * min-entropy estimate of 1 bit per sample. For "pure" in random_healthtest_init()
609 * Disallow userspace modification of pure entropy sources. in random_check_uint_harvestmask()
620 "Entropy harvesting mask");
648 "Entropy harvesting mask (printable)");
718 "Entropy harvesting mask (symbolic)");
737 * Subroutine to slice up a contiguous chunk of 'entropy' and feed it into the
742 random_early_prime(char *entropy, size_t len) in random_early_prime() argument
757 memcpy(event.he_entropy, entropy + i, sizeof(event.he_entropy)); in random_early_prime()
760 explicit_bzero(entropy, len); in random_early_prime()
798 * Get entropy that may have been preloaded by loader(8) in random_harvestq_prime()
799 * and use it to pre-charge the entropy harvest queue. in random_harvestq_prime()
807 printf("random: no preloaded entropy cache\n"); in random_harvestq_prime()
815 printf("random: no platform bootloader entropy\n"); in random_harvestq_prime()
832 * Entropy harvesting queue routine.
846 random_harvest_queue_(const void *entropy, u_int size, enum random_entropy_source origin) in random_harvest_queue_() argument
865 memcpy(event->he_entropy, entropy, size); in random_harvest_queue_()
869 event->he_entropy[0] = jenkins_hash(entropy, size, (uint32_t)(uintptr_t)event); in random_harvest_queue_()
876 * Entropy harvesting fast routine.
882 random_harvest_fast_(const void *entropy, u_int size) in random_harvest_fast_() argument
888 jenkins_hash(entropy, size, random_get_cyclecount()); in random_harvest_fast_()
893 * Entropy harvesting direct routine.
896 * (e.g.) booting when initial entropy is being gathered.
899 random_harvest_direct_(const void *entropy, u_int size, enum random_entropy_source origin) in random_harvest_direct_() argument
909 memcpy(event.he_entropy, entropy, size); in random_harvest_direct_()
981 "List of active fast entropy sources.");