The shell script run-alrng-pserver.sh
can be used on Linux and macOS to distribute true random bytes downloaded from an AlphaRNG device using a named pipe.
This is the simplest way to access true random bytes concurrently from a range of applications running in Linux user spaces.
It can be accomplished with the following steps:
Make sure the software kit is built with make
and installed successfully.
Verify that an AlphaRNG device is plugged into an available USB port.
Open a command line window and enter the following command:
sudo run-alrng-pserver.sh
If successfully, the script will create a named pipe /tmp/alpharng and will make it available for read access.
In a new command line session verify the random bytes are available with the following command:
dd if=/tmp/alpharng of=/dev/null iflag=fullblock bs=12000000 count=1
You can now access random bytes by reading from /tmp/alpharng
like a regular binary file.
To schedule the pipe server script run-alrng-pserver.sh
to run as a background process at boot time then follow these steps:
Edit the crontab configuration with the following command:
sudo crontab -e
Add the following line to the existing crontab configuration:
@reboot /usr/local/bin/run-alrng-pserver.sh >> /var/log/run-alrng-pserver.log 2>&1