OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
How to use /dev/srandom

From: Simon Perreault (simon.perreaultviagenie.ca)
Date: Wed Sep 29 2010 - 08:57:53 CDT


Hello,

I'm trying to use /dev/srandom, but I can't get even a single byte out
of it.

To reproduce:

$ hexdump -n 1 /dev/srandom

It just hangs there, sleeping. If I use /dev/urandom instead, it returns
immediately, as expected:

$ hexdump -n 1 /dev/urandom
0000000 0069
0000001

I tried on various routers that have been forwarding packets since
forever. I waited a "long time" for the read to succeed. I tried on
OpenBSD 4.3 and 4.6. Am I doing something wrong?

Thanks,
Simon
--
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server --> http://numb.viagenie.ca
vCard 4.0 --> http://www.vcarddav.org