|Newbie questions about Pliant
Timeout reading OS random device
Getting this error from http server
|Message posted by maybe Boris Reitman on 2006/12/01 05:46:50
I am running fullpliant as user pliant. These are the permissions on /dev/random
crw-rw-rw- 1 root root 1, 8 2006-10-19 08:06 random
What else am I missing ? This is kernel 2.6.11.
|Message posted by maybe Hubert Tonneau on 2006/12/01 11:13:37
|Having timeout on reading random device is a Linux kernel related problem:
on mainstream hardware, they take the entropy from the keyboard and mouse,
but not the network card or disk because it migh eventualy be forged.
As a result, on a server, they are starving.
This should not be a serious issue because Pliant will also use the pentium
processor high resolution timer to increase the entropy,
so you can safely ignore the problem.
The only side effect is that it can make Pliant process starve a fiew
seconds while trying to get some random bits.
You can see 'memory_true_random' fonction in /pliant/util/crypto/random.pli
In my current code, the fonction calls 'os_socket_wait' fonction with a
timeout of 15, so the Pliant process will not starve for more than 15 seconds.
I remember there was a much higher in older Pliant releases, so it might
explain why you get a very long answering time the first time you request
|Message posted by maybe Hubert Tonneau on 2006/12/01 11:49:50
|Rereading my random generator code, I find it suboptimal, so I'll improve it
a bit through waiting only for 1 second, and using the pentium high resolution
timer also in 'datetime_string'