summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-05-27 02:17:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-05-27 02:17:24 +0000
commit954469152e15172a159d3fc71e45b3641dde2354 (patch)
tree7ff0271b3d3c2002e0a222d6301233b72f4ddb4d
parente66694cb95cf8c5d8c4cca3dead03a40e5c72ec1 (diff)
Update comment block at the top to describe (a) the ring damage logic,
and (b) the boot-time acceleration.
-rw-r--r--sys/dev/rnd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index a3b40900ef2..8aa3f0088df 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.216 2020/05/26 14:27:24 deraadt Exp $ */
+/* $OpenBSD: rnd.c,v 1.217 2020/05/27 02:17:23 deraadt Exp $ */
/*
* Copyright (c) 2011 Theo de Raadt.
@@ -51,15 +51,18 @@
* the entropy collection mechanism enqueue_randomness() and timeout-driven
* mixing into the chacha state. The first submissions come from device
* probes, later on interrupt-time submissions are more common. Entropy
- * data (and timing information) is XOR spread over the entropy input ring
- * rnd_event_space[] for later integration.
+ * data (and timing information) get mixed over the entropy input ring
+ * rnd_event_space[] -- the goal is to collect damage.
*
- * Based upon timeouts, data in the entropy input ring rnd_event_space[] is
- * drawn down, CRC bit-distributed and mixed into entropy_pool[].
+ * Based upon timeouts, a selection of the entropy ring rnd_event_space[]
+ * CRC bit-distributed and XOR mixed into entropy_pool[].
*
* From time to time, entropy_pool[] is SHA512-whitened, mixed with time
* information again, XOR'd with the inner and outer states of the existing
* chacha state, to create a new chacha state.
+ *
+ * During early boot (until cold=0), enqueue operations are immediately
+ * dequeued, and mixed into the chacha.
*/
#include <sys/param.h>