Overview

The SwiftRNG entropy-server is a Windows pipe server that uses a duplex named pipe to distribute random bytes generated by a single SwiftRNG device (entropy-cl-server does the same for a cluster of multiple SwiftRNG devices). Windows applications written in languages such as C/C++, C#, Java, Delphi, and VBA can concurrently access entropy-server or entropy-cl-server directly through the named pipe (see Fig. 1). Source code examples are listed on the documentation page.

Entropy Server Diagram

The Entropy Server API operates on request and response byte streams. To request data from a SwiftRNG device through the entropy server, the application fills a 64-bit request with a command (CMD) and the number of requested random bytes (REQBYTES). The request is sent to the named pipe in little-endian byte order, and all 8 request bytes must be sent at once.

Request structure

Entropy Server Diagram

CMD

Value Description
0 Retrieve entropy bytes from the SwiftRNG device. Can request from 1 to 100,000 bytes.
1 Run communication diagnostics. Starting with value 0, each byte in the response contains the value of the previous byte incremented by one. This command is used to validate communication with the entropy server during product development. Can request from 1 to 100,000 bytes.
2 Retrieve the SwiftRNG device identifier (15 bytes of ASCII characters). Not available with entropy-cl-server.
3 Retrieve the SwiftRNG device model (15 bytes of ASCII characters). Not available with entropy-cl-server.
4 Retrieve the SwiftRNG device minor version number (1 byte). Not available with entropy-cl-server.
5 Retrieve the SwiftRNG device major version number (1 byte). Not available with entropy-cl-server.
6 Retrieve the entropy server minor version number (1 byte). Not available with entropy-cl-server.
7 Retrieve the entropy server major version number (1 byte). Not available with entropy-cl-server.
8 Retrieve random bytes from the first noise source of the SwiftRNG device. Can request from 1 to 100,000 bytes. Not available with entropy-cl-server.
9 Retrieve random bytes from the second noise source of the SwiftRNG device. Can request from 1 to 100,000 bytes. Not available with entropy-cl-server.

REQBYTES

The number of bytes requested from the entropy server.