Intro

SwiftRNG is a hardware random number generator that can produce high quality true random numbers. Manufactured as a USB device, it is compatible with most server oriented operating systems and hardware platforms. Full documentation is available here.

Hardware requirements

Compatible with USB 2.0 high-speed and USB 1.1 full-speed interface specifications, when used with a computer system, the SwiftRNG device can be plugged into one of the available USB 2.0, USB 1.1 or USB 3.0/3.1 ports directly or by use of an USB 2.0 ‘A’ male to ‘A‘ female extension cable (we recommend using a short extension cable).

Operation system requirements

  • Ubuntu, Red Hat, CentOS 7, CentOS 6.6 or other Linux based x86-64 systems
  • macOS 10.6 or newer
  • Windows 7, 8.1, or 10

Windows

Device driver installation for Windows 10

As soon as a SwiftRNG is plugged into one of the USB ports available, an appropriate driver should be installed automatically by the OS. If the driver is not available on local computer system, the OS may need internet access to download the driver so it can be installed successfully.

When the Windows driver is successfully installed for the SwiftRNG device, an entry should show up under the Universal Serial Bus devices group in the Device Manager application as shown in the following screenshot:

Windows Device Manager

Device driver installation for Windows 7 and 8.1

When you plug a SwiftRNG into one of the USB ports available, an appropriate driver should be installed automatically by Windows 8.1 and Windows 7.

When the Windows driver is successfully installed for the SwiftRNG device, an entry should show up under Universal Serial Bus devices group in the Device Manager application as as shown in the following screenshot (Windows 7):

Windows7 Device Manager

However, in some cases the driver may not be available on your Windows 7 or Windows 8.1 computer system, and you will need to download and install the driver manually. That can be done with the following steps:

  1. Download “WinUsb Device driver” from the following location: https://tectrolabs.com/downloads/winusbcompat.zip
  2. Extract the contents of the downloaded winusbcompat.zip file to a temporary folder.
  3. In Device Manager, select “Update driver software …” –> “Browse my computer for driver software”.
  4. Navigate to the temporary folder with the downloaded driver and complete the installation.

Using pre-built Windows utilities and components

SwiftRNG software kit contains pre-built utilities and components that can be used on Windows. You can download the latest windows-binaries.zip here.

windows-binaries.zip contains three folders:

  • windows-x64-vs-2015 contains DLLs and executables for 64-bit Windows, built with Visual Studio 2015.
  • windows-x64-vs-2017 contains DLLs and executables for 64-bit Windows, built with Visual Studio 2017.
  • windows-x86 contains DLLs and executables for 32-bit Windows.

To verify if the SwiftRNG device has been installed successfully, locate ‘swrng.exe’ utility which is available in one the folders mentioned above, and run it from command line prompt as following:

swrng.exe -ld

If the device is successfully installed and ready for usage, the output may look like this:

{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}

In addition you can also use swdiag.exe to run the SwiftRNG device diagnostics. It should not report any failures or warnings during execution.

Rebuilding SwiftRNG utilities and components from supplied source code on Windows

For Windows 32 bits

You can rebuild SwiftRNG utilities and components for Windows 32 bits using Microsoft Visual C++ 2010 Express. You will need to download the source code here. The Visual C++ project solution (SwiftRNG) is located in the swiftrng-4.X.X\windows-x86\ folder.

For Windows 64 bits

You can rebuild SwiftRNG utilities and components for Windows 64 bits using Visual Studio 2015 or Visual Studio 2017. You will need to download the source code here. The Visual Studio project solution (SwiftRNG) is located in the swiftrng-4.X.X\windows-x64\ folder (before you rebuild the solution, make sure you select x64 target platform and not Win32 in Visual Studio IDE). SwiftRNG.dll built with Visual Studio 2015 is not compatible with applications built based on Visual Studio 2017 (for example, if you plan to use SwiftRNG.dll with Excel then you will need to make sure the Excel version will be compatible with the specific version of the SwiftRNG.dll).

Linux

Downloading the software kit

SwiftRNG software kit doesn’t include binaries for Linux platforms. You will need to download the source code and build utilities and components for specific OS. The SwiftRNG software kit can be downloaded from this location. Alternatively it can be downloaded with git using the following command:

git clone https://github.com/tectrolabs/swiftrng.git

Locate the source code with the following command:

cd swiftrng/linux-and-macOS/swrng/

Prerequisites

Make sure packages make, gcc, libusb and gcc-c++ are installed before running the build.

Ubuntu

On Ubuntu, this can be done with the following commands to install the required dependencies:

sudo apt-get update
sudo apt-get install make
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install libusb-1.0

CentOS and Red Hat

On CentOS or Red Hat, use the following commands to install the required dependencies:

sudo yum update
sudo yum install make
sudo yum install gcc
sudo yum install gcc-c++
sudo yum install libusb*

Building utilities and components

To build and install utilities you will need to run the following from the command line:

make
sudo make install

To verify if the SwiftRNG device has been installed successfully, run the following from command line prompt:

sudo swrng -ld

If the device is successfully installed and ready for usage, the output may look like this:

{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}

In addition you can also use swdiag to run the SwiftRNG device diagnostics. It should not report any failures or warnings during execution.

macOS

Downloading the software kit

The SwiftRNG software kit doesn’t include binaries for MacOS platform. You will need to download the source code and build utilities and components for your Mac. The software kit can be downloaded here. Alternativelly it can be downloaded with git using the following command:

git clone https://github.com/tectrolabs/swiftrng.git

Locate the source code with the following command:

cd swiftrng/linux-and-macOS/swrng/

Prerequisites

On macOS, the libusb dependency can be installed by running the following from the command line. You must have Homebrew installed first.

brew install libusb

Building utilities and components

To build and install utilities you will need to run the following from the command line:

make
sudo make install

To verify that the SwiftRNG device has been installed successfully, run the following command line prompt:

swrng -ld

If the device is successfully installed and ready for usage, the output may look like this:

{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}

In addition you can also use swdiag to run the SwiftRNG device diagnostics. It should not report any failures or warnings during execution.