Subject: use of rnd(4) from within the kernel
To: None <tech-net@netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: tech-net
Date: 10/05/2000 11:42:43
I have been trying to migrate from random() to rnd(4), in the
kernel network processing (including IPsec).
so my question: is it okay to assume that
rnd_extract_data(RND_EXTRACT_ANY)
returns the specified bytes of random bytes? what will it return
in entropy-starvation situation? how good is the randomness in
entropy-starvation situation?
(NOTE: in the kernel networking code, we can't wait till entropy
to be gathered)
tcp_new_iss() does not check the return value from rnd_extract_data(),
and assumes that we can get enough randomness from the function.
is it a safe thing to do? if so, i'm happy.
itojun