SwiftRNG Software API cluster capability with Linux and macOS

Beginning with SwiftRNG Software Kit version 3.3, the SwiftRNG API contains device cluster scalability and fail-over capabilities. With this, it is possible to use multiple SwiftRNG devices to additively increase the random number generation speed. By doing so, the reliability of the cluster is increased. This new API feature seamlessly integrates multiple devices and uses them concurrently as a single stream of random data. The API will monitor the health of the cluster and will resize the cluster on-the-fly, allowing device swapping in real-time. This makes it possible to remove and add SwiftRNG devices in the middle of random number generation.

How to disable or use an alternative post processing method for a raw random byte stream

When using SwiftRNG revision 1.2 and later (with the exception of SwiftRNG Pro which has post processing turned off by default), the post processing of the raw random byte stream can be disabled in the SwiftRNG software API, in swrandom linux kernel module and in swrng utility. You may need this feature when checking the health of the RAW random output of the device. The following describes how to do that.

To disable post processing when using swrng utility, just add option -dpp to the command line. The following command will download 10,000 of random bytes from SwiftRNG v1.2+ to rnd.bin file without applying post processing to the final random bytes:

sudo swrng -dd -fn rnd.bin -nb 10000 -dpp

Add disablePostProcessing option to the command line to disable post processing in swrandom module as following:

sudo ./ins-swrandom.sh disablePostProcessing

By default, the software API will use SHA-256 as a bitstream post processing algorithm (with the exception of SwiftRNG Pro which has post processing turned off by default). The following command demonstrates how to use Marsaglia’s XorShift64 method as a post processing algorithm when using swrng utility. Compared to SHA-256, the XorShift64 will produce same or better results with less bit manipulations and less CPU effort. XorShift64 is usually used as a PRNG, however we found that if repeatedly seeded with RAW hardware random bytes, it is an excellent method for removing the BIAS. The following command will download 10,000 of random bytes from SwiftRNG v1.2+ to rnd.bin file using xorshift64 post processing method:

sudo swrng -dd -fn rnd.bin -nb 10000 -ppm xorshift64