diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-05-15 14:04:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-05-15 14:04:01 +0000 |
commit | 1d4dcc75c6c88f9d2b6578ff786009da0467bf42 (patch) | |
tree | 5225d7e1882d02d9c4ba1601c65d1317316d2ef2 /sys | |
parent | ae0815cf9d974d0666c273417429eed27d3b2f28 (diff) |
Describe the purpose of add_entropy_words() in simpler terms.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rnd.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index d91c335d74e..0b94bbc0d37 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.209 2020/05/15 14:02:06 deraadt Exp $ */ +/* $OpenBSD: rnd.c,v 1.210 2020/05/15 14:04:00 deraadt Exp $ */ /* * Copyright (c) 2011 Theo de Raadt. @@ -228,17 +228,8 @@ enqueue_randomness(u_int val) } /* - * This function adds a byte into the entropy pool. It does not - * update the entropy estimate. The caller must do this if appropriate. - * - * The pool is stirred with a polynomial of degree POOLWORDS over GF(2); - * see POOL_TAP[1-4] above - * - * Rotate the input word by a changing number of bits, to help assure - * that all bits in the entropy get toggled. Otherwise, if the pool - * is consistently fed small numbers (such as keyboard scan codes) - * then the upper bits of the entropy pool will frequently remain - * untouched. + * This function merges entropy ring information into the buffer using + * a polynomial to spread the bits. */ void add_entropy_words(const u_int32_t *buf, u_int n) |