Intro
SwiftRNG is a hardware true random number generator. Manufactured as a USB device, it is compatible with most server-oriented operating systems and hardware platforms. See the SwiftRNG documentation for full details.
Hardware requirements
The SwiftRNG device is compatible with the USB 2.0 high-speed and USB 1.1 full-speed interface specifications, and can be plugged into any available USB 2.0, USB 1.1, or USB 3.0/3.1 port.
OS requirements
- Linux (x86, x64, ARM)
- FreeBSD 12/13/14
- macOS (Intel and Apple Silicon)
- Windows 10/11 (64-bit) or Windows Server 2016/2019 (64-bit)
SwiftRNG devices manufactured before March 2020 also work with Windows 7 and 8.1 and with 32-bit Windows builds; see the notes for those older devices below.
Windows
On Windows, SwiftRNG devices offer two integration paths: direct access through the SwiftRNG API, or indirect access through the Entropy Server API. This section covers the SwiftRNG API method. For the Entropy Server API, see entropy-server for Windows.
Device driver installation on 64-bit Windows 10/11 (devices manufactured after March 2020)
As soon as a SwiftRNG is plugged into an available USB port, the OS installs the appropriate driver automatically.
When the driver is installed successfully, an entry appears under the Ports (COM & LPT) group in the Device Manager application, as shown in the following screenshot:

Device driver installation on Windows 10 (devices manufactured before March 2020)
This section applies only to SwiftRNG devices manufactured before March 2020. As soon as such a device is plugged into an available USB port, the OS installs the appropriate driver automatically. If the driver is not available on the local computer, the OS may need internet access to download it.
When the driver is installed successfully, an entry appears under the Universal Serial Bus devices group in the Device Manager application, as shown in the following screenshot:

Device driver installation on Windows 7 and 8.1 (devices manufactured before March 2020)
This section applies only to SwiftRNG devices manufactured before March 2020. When such a device is plugged into an available USB port, Windows 7 and Windows 8.1 install the appropriate driver automatically.
When the driver is installed successfully, an entry appears under the Universal Serial Bus devices group in the Device Manager application, as shown in the following screenshot (Windows 7):

In some cases the driver may not be available on your Windows 7 or Windows 8.1 computer, and you will need to download and install it manually with the following steps:
- Download the WinUSB device driver from https://tectrolabs.com/downloads/winusbcompat.zip.
- Extract the contents of the downloaded
winusbcompat.zipfile to a temporary folder. - In Device Manager, select “Update driver software…” and then “Browse my computer for driver software”.
- Navigate to the temporary folder with the downloaded driver and complete the installation.
Using pre-built Windows utilities and components
The SwiftRNG software kit contains pre-built utilities and components for Windows. Download the latest windows-binaries.zip from the latest release.
windows-binaries.zip contains two folders:
windows-x64-vs-2019contains DLLs and executables for 64-bit Windows, built with Visual Studio 2019.windows-x86contains DLLs and executables for 32-bit Windows applications (for SwiftRNG devices manufactured before March 2020).
To verify that the SwiftRNG device has been installed successfully, locate the swrng.exe utility in the appropriate folder and run the following command from the command prompt:
swrng.exe -ld
If the device is installed and ready for use, the output may look like this:
{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}
You can also use swdiag.exe to run the SwiftRNG device diagnostics. It should not report any failures or warnings.
Rebuilding SwiftRNG utilities and components from source on Windows
64-bit Windows
You can rebuild the SwiftRNG utilities and components for 64-bit Windows using Visual Studio 2015 or newer. Download the source code from the latest release. The Visual Studio solution (SwiftRNG) is located in the swiftrng-N.N.N\windows-x64\ folder. Before you rebuild the solution, make sure the x64 target platform is selected (not Win32) in the Visual Studio IDE. A SwiftRNG.dll built with Visual Studio 2015 is not compatible with applications built with Visual Studio 2017 or 2019; for example, if you plan to use SwiftRNG.dll with Excel, make sure your Excel version is compatible with the specific build of the DLL.
32-bit Windows (devices manufactured before March 2020)
This section applies only to SwiftRNG devices manufactured before March 2020. You can rebuild the SwiftRNG utilities and components for 32-bit Windows using Microsoft Visual C++ 2010 Express. Download the source code from the latest release. The Visual C++ solution (SwiftRNG) is located in the swiftrng-N.N.N\windows-x86\ folder.
Linux
On Linux, SwiftRNG devices can be integrated in two ways: directly through the SwiftRNG API, or indirectly through the swrandom kernel module. This section covers the SwiftRNG API method. For the kernel module, see the swrandom kernel module page.
Downloading the software kit
The SwiftRNG software kit does not include binaries for Linux. You will need to download the source code and build the utilities and components for your OS. The software kit can be downloaded from the latest release. 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 the make, gcc, libusb, and gcc-c++ packages are installed before running the build.
Important: due to issues with libusb version 1.0.25, we strongly advise installing a libusb version earlier or later than 1.0.25.
Ubuntu
On Ubuntu, run 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
Note: on Ubuntu 24.04 or later, you may need to install the libusb dependency with the following command:
sudo apt-get install libusb-1.0-0-dev
CentOS and Red Hat
On CentOS or Red Hat, run 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 the utilities, run the following commands:
make
sudo make install
To verify that the SwiftRNG device has been installed successfully, run the following command:
sudo swrng -ld
If the device is installed and ready for use, the output may look like this:
{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}
You can also use swdiag to run the SwiftRNG device diagnostics. It should not report any failures or warnings.
Linux kernel module swrandom
See the swrandom kernel module page for details on building and using the kernel module.
macOS
Downloading the software kit
The SwiftRNG software kit does not include binaries for macOS. You will need to download the source code and build the utilities and components on your Mac. The software kit can be downloaded from the latest release. 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
On macOS, the libusb dependency can be installed with Homebrew by running the following command:
brew install libusb
Building utilities and components
To build and install the utilities, run the following commands:
make
sudo make install
To verify that the SwiftRNG device has been installed successfully, run the following command:
swrng -ld
If the device is installed and ready for use, the output may look like this:
{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}
You can also use swdiag to run the SwiftRNG device diagnostics. It should not report any failures or warnings.
FreeBSD
Downloading the software kit
The software kit for FreeBSD can be downloaded from the latest release. 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
On FreeBSD, the gcc dependency can be installed by running the following command:
sudo pkg install lang/gcc
Building utilities and components
To build and install the utilities, run the following commands:
make -f Makefile.bsd
sudo make -f Makefile.bsd install
To verify that the SwiftRNG device has been installed successfully, run the following command:
sudo swrng -ld
If the device is installed and ready for use, the output may look like this:
{DevNum=0 DevModel=SwiftRNG DevVer=V1.2 DevS/N=BCDE0A6AE2F1234}
Using SwiftRNG devices in virtual environments
SwiftRNG devices manufactured after March 2020 work with Linux, FreeBSD, macOS, Windows 10/11 (64-bit), and Windows Server 2016/2019 (64-bit), and run in virtual machines using software such as VMware Workstation Player, VMware ESXi, Oracle VirtualBox, and Parallels Desktop. We have noticed, however, a decrease in SwiftRNG performance when using virtual machines. For best results in a virtual machine, connect the SwiftRNG device to a USB 3.0 or later port, or configure the USB port as a pass-through device.