![]() |
frandomThe frandom suite comes as a Linux kernel module for several kernels, or a kernel patch for 2.4.22. It implements a random number generator, which is 10-50 times faster than what you get from Linux' built-in /dev/urandom. And it uses very little (/dev/frandom)
or none (/dev/erandom) of the kernel's entropy
pool, so it is very useful for applications that require a handy source for lots of random data.
When compiled into the kernel (as opposed to used as a kernel module), a sysctl() interface is enabled, which makes it possible to grab up to 16 bytes of random data with a single sysctl() call. This requires patching the kernel, not just compiling a package. An example when this is useful is in the Hardened Linux From Scratch (hlfs), where small chunks of random data are needed very often. There were two reasons why I wrote this module: First, I wanted to try writing for the kernel for a long time. Unfortunately, I couldn't find anything interesting to write: Everything had been done, and all drivers were working well on my hardware. And then I attended a lecture by Oleg Goldshmidt at Haifux, the Haifa Linux Club. This lecture dealt with pseudo-number generation. One of the points in the lecture was that /dev/urandom was a good random number generator, but it was slow. It so happened that I had recently implemented the RC4 crypto algorithm for one of my clients, so I was familiar with the algorithm and how simple it was. After searching in the web, I found that some people actually wanted a faster generator. So I wrote one. With great pleasure, I must say. The kernel community didn't like the idea of including frandom in the kernel. The interesting thing was that supporting a /dev/frandom device wasn't even on their agenda. And here's some answers to things you might ask yourself:
Last modified on Fri Sep 7 22:21:16 2007. E-mail:
|