Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/random/fortuna.c
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | random_fortuna_process_event(struct harvest_event *event) | ||||
/*- | /*- | ||||
* Don't wrap the length. This is a "saturating" add. | * Don't wrap the length. This is a "saturating" add. | ||||
* XXX: FIX!!: We don't actually need lengths for anything but fs_pool[0], | * XXX: FIX!!: We don't actually need lengths for anything but fs_pool[0], | ||||
* but it's been useful debugging to see them all. | * but it's been useful debugging to see them all. | ||||
*/ | */ | ||||
fortuna_state.fs_pool[pl].fsp_length = MIN(RANDOM_FORTUNA_MAXPOOLSIZE, | fortuna_state.fs_pool[pl].fsp_length = MIN(RANDOM_FORTUNA_MAXPOOLSIZE, | ||||
fortuna_state.fs_pool[pl].fsp_length + | fortuna_state.fs_pool[pl].fsp_length + | ||||
sizeof(event->he_somecounter) + event->he_size); | sizeof(event->he_somecounter) + event->he_size); | ||||
explicit_bzero(event, sizeof(*event)); | |||||
RANDOM_RESEED_UNLOCK(); | RANDOM_RESEED_UNLOCK(); | ||||
} | } | ||||
/*- | /*- | ||||
* FS&K - Reseed() | * FS&K - Reseed() | ||||
* This introduces new key material into the output generator. | * This introduces new key material into the output generator. | ||||
* Additionally it increments the output generator's counter | * Additionally it increments the output generator's counter | ||||
* variable C. When C > 0, the output generator is seeded and | * variable C. When C > 0, the output generator is seeded and | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |