aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/rndtest/rndtest.c
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2013-09-06 17:51:52 +0000
committerMark Murray <markm@FreeBSD.org>2013-09-06 17:51:52 +0000
commitc6c7b2912cd70d1c98219cd09bd564863b751d06 (patch)
tree95fc4f3c6e930dc97a3bb9eb8e0d624d9cd9335d /sys/dev/rndtest/rndtest.c
parent0fbf163e60fe783d01ba4358d503695a0286e79d (diff)
downloadsrc-c6c7b2912cd70d1c98219cd09bd564863b751d06.tar.gz
src-c6c7b2912cd70d1c98219cd09bd564863b751d06.zip
Yarrow wants entropy estimations to be conservative; the usual idea
is that if you are certain you have N bits of entropy, you declare N/2.
Notes
Notes: svn path=/projects/random_number_generator/; revision=255319
Diffstat (limited to 'sys/dev/rndtest/rndtest.c')
-rw-r--r--sys/dev/rndtest/rndtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/rndtest/rndtest.c b/sys/dev/rndtest/rndtest.c
index 13ecdd6b0105..3c42972c36f7 100644
--- a/sys/dev/rndtest/rndtest.c
+++ b/sys/dev/rndtest/rndtest.c
@@ -152,7 +152,7 @@ rndtest_harvest(struct rndtest_state *rsp, void *buf, u_int len)
for (len /= sizeof (u_int32_t); len; len--)
add_true_randomness(*p++);
#else
- random_harvest(buf, len, len*NBBY, 0, RANDOM_PURE);
+ random_harvest(buf, len, len*NBBY/2, 0, RANDOM_PURE);
#endif
}
}