Fortuna: Add trivial assert to match FS&K definition
FS&K GenerateBlocks function asserts C (counter) != 0. This should also be true in our implementation. Reviewed by: delphij, markm Approved by: secteam (delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D16936
This commit is contained in:
parent
90545403e9
commit
84880efae7
@ -310,6 +310,8 @@ random_fortuna_genblocks(uint8_t *buf, u_int blockcount)
|
||||
u_int i;
|
||||
|
||||
RANDOM_RESEED_ASSERT_LOCK_OWNED();
|
||||
KASSERT(!uint128_is_zero(fortuna_state.fs_counter), ("FS&K: C != 0"));
|
||||
|
||||
for (i = 0; i < blockcount; i++) {
|
||||
/*-
|
||||
* FS&K - r = r|E(K,C)
|
||||
|
Loading…
x
Reference in New Issue
Block a user