Software Home Software Home Software Home
Readme
Download
rndos2

Readme

rndos2.dll is a port of the various /dev/random devices of OpenBSD, done as a dynamic link library (DLL).

Although rndos2 has been developed for the GnuPG port, its use is in no way restricted to GnuPG and it can also be used in other projects.

OS' status information like IP statistics, information about running processes and open files and things like that are used to feed the entropy pool. At the moment these APIs are used:

Really good sources of random data for the entropy pool (timedeltas between interrupts, ...) are only available at kernel level, but that requires a device driver.

Software requirements

To compile rndos2 you will need the OS/2 Developer's Toolkit 4.5 (because of DosQuerySysState() and sysctl()). The makefile is written for IBM VisualAge C++ but EMX GCC should also work if you tweak the makefile a bit.

rndos2 requires OS/2 Warp 4 FP13+, Warp Server for eBusiness or eCS (also because of DosQuerySysState()) and a 32-bit TCP/IP stack (TCP/IP 4.1+, because AFAIK sysctl() wasn't available in older releases).

rndos2dmn

The rndos2 archive also contains the program "rndos2dmn", which provides random data via named pipes.

Please read the random(4) man page for differences between these random sources.

Status

rndos2 is Work-In-Progress. The quality of the produced random numbers should already suffice for most uses, but there is still room for improvements, mainly in the part that fills the entropy pool.

Test rndos2

If you want to test rndos2, you might have a look at the DIEHARD tests. Download the executables for DOS -- they are actually Win32 exes that run great with Odin. For the test you will need a file with random numbers, at least 10 - 15 Megabyte in size. To create such a testfile simply use the rndos2dmn daemon. Start rndos2dmn in the background and type the following command:

You may also use \pipe\srandom as a source but then you'll probably wait some days before the filesize has reached some Megabytes. \pipe\srandom is user for key generation in my GnuPG port.

Depending on your computer's performance it may take some minutes to create a file of sufficient size. On my AMD Athlon XP 1800+ it takes about 2 minutes to create a 10 Megabyte testfile. Exit "copy" with Ctrl-C when the file is big enough.

Now start the DIEHARD test with "pec diehard" and follow the instructions. Read the first few lines of the result file to understand the test results.

Note: I'm not a mathematician and as far as I understand the DIEHARD test just says something about the quality of algorithm that outputs the random numbers but it does not judge the quality of the data in the entropy pool. Please correct me, if you're a real mathematician and I'm write something wrong here!

Changelog

Licence

rndos2 is released under the BSD licence.


© 2003-2005, Tobias Hürlimann <tobias@tobiashuerlimann.de>. My PGP key can be found here. Impressum (German)