TRNG9803 Serial Port True Random Number Generator

The TRNG9803 is a simple serial port device combining simplicity and a very competitive price. In some applications the complexity of an USB driver could be problematic; if you also need to investigate and validate the USB-driver's internal function(s). In that case most customers prefer working with a serial port device, that can be run using a minimum of external system software.
The 9803 is compatible with most serial ports and application softwares.

Direct link the the shop's product page here.
Download the TRNG9803 true hardware random number generator information sheet.

New Software Distribution for the TRNG9803

We are working on a new software distribution for the TRNG9803, that will replace the old distribution. We intend to make the new distribution compatible with serial-USB converters and the TRNG9815. Please contact us if you want to obtain a pre-release of the new software.

Hardware and processing parts are now written. We currently work with application testing and consider including a multi-thread option.


  • The example software is written in "C".
  • Support for various integer sizes; for 16-128 bit computers
  • A module for handling the serial port hardware
  • Support for USB-Serial converters, including hot plugging.
  • Test software for the hardware
  • A fast hardware test provide quick response
  • Speed increase using multiple TRNG9803 generators.
  • Increased relaiability when using multiple TRNG9803 generators.
  • User adjustable computation buffer size.
  • This software is still single-thread; a multi-thread option included on next update.
  • Includes a stream cipher; may be usable in other applications.
  • Processing of random numbers using the DES; version with independent subkeys.
  • Includes a function to convert output into an integer in a specific range.
  • Very efficient operation, conserving random numbers, to provide increased speed.
  • Example application: Print random characters in a specified alphabet.
  • Example application: Print unique random codes in specified range.
  • Example application: Simple Lotto draw or general Urn experiments.
  • Example application: Transfers random bytes into a set of files, endless loop.

The software is written to be as portable as possible. It compile on Windows, Linux, Solaris, and all other Unix style operating systems. The software can run on a variety of integer types, where general integers can be 16 upto 128 bit wide, without any software modification. The main computation Buffer can be set to use any from 8 bits upto 128bit integers and any size from 64 integers upto integer-range limitations, in 64 integer increments. This is to support also smaller processors or applications where a large random umber buffer is required.

16 bit DSP processors, where sizeof( char) == 1 == 16 bits is not supported by the software, but if you contact us, we will convert the software to also support this situation.

Binary Random Numbers

The program take a file name and a file size as parameters, and fill the file with a binary random string. Optionally can a continuous stream of numbered files be generated.

Random Code Generator

The program generates a series of numeric codes in a specified range. The software checks for duplicates so each numeric code appear only once. This is useful in some applications like phone scratch off cards or for printing security labels. The compiled version run on 64 bit integers allowing large codes to be generated.

Random Text Generator

The random text generator application print randomised symbols taken from an input symbol set. A typical input symbol set could be numbers 0-9 or letters A-Z. The set is held in a configuration file, making it easy to build your own set suitable for your application. The random text appliaction can be used when generating random passwords, or when generataing random number codes. The distribution includes binary (0/1) numeric (0-9) hex (0-9,A-F) and character (A-Z) configuration files.

Lotto Number Generator

The application run a simple lotto system. Input parameters is the ball set size, the number of numbers to draw from the urn to be printed in ascending order; the number of "Extra" balls to draw to be printed unsorted. By associating the proper parameters of a problem, with the lotto application, several selection and random order problems can be solved. This is a general Urn implementation.

Label TRNG9803


If your program communicates using only a keyboard and printed text on the screen, it is called a console application. You can read more about a console application HERE! We have had customers who never before seen a console application in Windows.


Ordinary desktop computers seldom have serial ports nowadays. A problem with serial ports, is that some bad implementations exist, that don't really work in any serious application. If you have a problem with a serial port product, check if another computer possibly have a "good" port, and the product works.

We can not provide any list of ports, manufacturers, models that are OK and work. The ports that did not work was found on economy prised motherboards. All expansion boards have worked, so forth.



Some simple randomization problems can be solved directly using the provided application.