HG324 Hardware Random Bit Generator Users Manual
Previous Up Next
HG 324 Random Bit Generator Contents Testing random bits

Software

Contents:

General remarks

Drivers for downloading random data from the HG 324 at the moment exist only for IBM compatible PC's based on either Linux or MS-DOS, MS Windows 3x/9x/Me/NT4/2000NT/XP operating systems.

However, we recommend to drive the HG 324 under the Linux because the best drivers exist for Linux and the best overall performance of the generator is achieved under Linux.

Linux is a free and open-code operating system whose popularity has been growing quickly in past years. We believe it is now, and will with time become even more, the most convenient operating system for software development and network oriented multi-user platforms.

Thus we have decided to develop all our software related to the HG 324 primarily for Linux with graphics output to the i X11 windows system. It is not because we like Linux, but simply because Linux gets the most out of your computer as well as from the HG 324 Random Bit Generator. Linux allows to combine low-level communication between software drivers and computer ports with a true 32 bit software architecture and a high-performance graphics,i thus making possible a very fast download of the random data from the HG 324 unit with the minimal load to the processor.

For example, normally serial PC port is designed to support baudrates up to 115200 bits/sec, exceptionally twice as much. Under Linux and with the help of our proprietary technology it is possible to achieve bitrates up to 1,200.000 bits/sec ! Under MS DOS or MS Windows, the actual bitrate is strongly dependent on the particular hardware/software setup but nevertheless the typical performance of 16 bit (DOS) driver falls between 400 and 800 kbit/sec. Much lower bitrate may be expected only under Windows NT4 which seem to have particularly poor support for legacy parallel port mode. The new 32 bit driver for MS Windows however should perform up to the maximum bitrate alowed by the hardware (see the Benchmarks section).

Unfortunately some serial ports seem not to perform very well when pushed to the extreme bitrates, but the worst-case we have tested gave excellent results at 1.0 Mbit/sec with 32 bit drivers (under Linux or MS Windows) and 0.5 Mbit/sec with 16 bit drivers under MS DOS or MS Windows.

On the other hand parallel ports seem to operate well up to the highest possible rate achievable by the hardware.

Note howewer that we do not recomend operation of the HG 324 at bitrates higher than 1,200.000 bits/sec.

On top of all that, there is a possibility that kernel modules for reading the HG 324 as an external device will be available freely from the Linux community in the near future. For the moment, a parallel port device module for a limited number of kernel versions is available from us upon a request. This approach allows you to access the random bits from within your program (written in any programming language) as simple as opening a file and reading as many data as you wish. You have to know nothing about the way the readout is done nor to include any subroutines in your program. This type of readout also achieves the maximum average downloading speed but on top of that it allows for buffering the bits and burst rates much higher that the average.

Nevertheless, for critical applications (such as multi-dimensional Monte Carlo or security protocols) it is strongly advised to test the quality of the random data downloaded from the HG 324 in the particular hardware setup where it is to be used. To that end we supply some programs for randomness testing (described below): graf, ent, utest. For further details please refer to the part of this section concerned with description of the software.

For the performance of the unit under supported operating systems, please look at the Benchmark section.

Description of the software

The software distributed with this package consists of:

Program Description
bitwr a program to download random data from the HG 324 to a binary file
bitplot a program to show random bits read from tht HG 324 as points in plane
zero a program to measure the bias of internal generators
graf a program to display visually bits stored in a file
ent a collection of standard tests for testing randomness of bits stored in a file
utest the Universal Randomness Test.

The last three programs work "offline" that is they operate on previously generated files of random bits.

More detailed description of each program follows.

bitwr

bitplot zero graf ent [options] filename utest

Installing the software under Linux

HG 324 comes with the software for downloading the random data from it and some randomness tests. Please read more about that in the Software section of this manual.

Executables are available for Linux with C library versions libc5 and glibc2. Since only executables are distributed with this disk, it is necessary to find out which version of C library came with your Linux system in order to install adequate binaries. But don't worry: if you are not expert on that matter, you can simply try all versions of binaries and find which one works on your system.

Binaries are organized in two directories named libc5 and glibc2, refering to the version of C library installed on your Linux system. Some Linux systems support both versions of C libraries.

Below is a non-exhaustive table of C library versions used in different Linux distributions.

Linux brand and version C library
Slackware 4.x, Red Hat 5.x libc5
Slackware 7.0 and up, Red Hat 6.0 and up glibc2

In order to install necessary software and manual, please follow a few simple steps:

Installation the software under MS DOS or MS Windows

Drivers for the MS DOS and MS Windows 2x,3x,95,98, ME, NT4, 2000NT and XP are actually a port of the Linux drivers to the 16 bit MS DOS or 32 bit Windows (Win32) architecture. The 16 bit drivers are found in the directory named A:\DOS and one should use them only under MS DOS and MS Windows 2x,3x. Under MS Windows 95 and up one should use 32 bit drivers because they offer better performance. Hovewer, newer MS Windows (that is NT4, 2000NT and XP) do not allow by default the low-level access to PC ports which is needed to obtain the maximum download rate. To enable such an access we make use of a third-party freeware. There are several such programs available and one of them named "UserPort" is distributed with the HG 324 software disk.

Installation procedure of the HG 324 software is simple: you only need to copy all the executables into some directory on your hard disk drive. For MS Windows NT4, 2000NT or XP there is one more step to install the third-party driver.

The installation procedure is as follows:

If you are using MS Windows NT4, 2000NT or XP it is necessary to also install a driver that allows low-level access to the parallel and/or serial ports that are used with HG 324.

When the userport window appears, just click "Start" then "Exit". The driver will be installed in the memory and it will stay there until PC is rebooted. The next time userport may be started from any directory. The executable is located in the C:\winnt (NT) or C:\windows (XP) directory. It is also possible to make uaserport start each time PC is booted by making apropriate entry in the autoexec.bat. Advanced users are encouraged to consult the drivers' documentation supplied with the driver package located in the directory a:\Win32\userport\Userport.zip for further information.

This completes the installation and you may start any program in the directory c:\hg324 .

Although the software is only a port (that is not really optimized for operation under MS DOS/Windows), it nevertheless achieves the download speeds up to 30-50 times faster then of other similar products on the market today, which is primarily due to the use of four independent high-performance bit generators built in the HG 324 and an advanced bit-transfer technology.

For the performance of the unit under all supported systems for IBM compatible PC's, please look at the Benchmark section.

Additional software

On top of the forementioned software for testing of random bits, we have in preparation the PowerTest collection of randomness tests, which will contain a gamut of strong tests. Notably it will contain Diehard-based battery of tests and a bunch of special tests for testing short sequences of bits.


Previous Up Next
HG 324 Random Bit Generator Contents Testing random bits


Comments on this information may be mailed to webmaster@random.com.hr
Copyright © 2001- by Mario Stipcevic. All rights reserved.
Last updated on 08.May 2001 by M.S.