Home Forums TrueRNG Hardware random number generator Sticky – FAQ (Answers to questions that have been asked)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #562
    Ubld.it Staff
    Moderator

    Note: These FAQs are for TrueRNG V2
    Question: What’s the whitening algorithm?

    Whitening, We split the data into multiple streams and use the XOR method to reduce bias (whiten) the output data.

    Here is a better description of this process.
    Software Whitening on wikipedia
    A significant amount of time was spent getting the whitening correct without reducing the throughput too much. Currently, the random data is XORed/downselected at about a 20:1 rate to whiten while keeping maximum entropy.

    ——————————————————————————————————

    Question: Does the TrueRNG have any serial commands ?

    No, the only ‘command’ is toggling the DTR line on the virtual serial port. The DTR flag being set will cause the TrueRNG to start sending data as fast as it can. When the DTR flag is cleared, it will stop.

    ——————————————————————————————————

    Question: How do I pause the stream of data?

    By clearing the DTR flag on the virtual serial port, the stream of data will stop. The stream of data will resume when DTR is set.

    Here is a screenshot showing this functionality in RealTerm (a windows based program on sourceforge).

    RealTerm screenshot

    ——————————————————————————————————

    When I turn DTR off, is the semiconductor junction powered off? And do I need to be concerned with biasing for repeatedly turning DTR on/off ?

    No, only the stream of data being sent is turned off. By turning DTR off it is saving a few mA by not utilizing the USB transceiver, but there are no biasing issues with turning DTR on and off repeatedly.

    ——————————————————————————————————

    What baud rate should I use when opening the USB Serial port ?

    Baud rate doesn’t matter, since the port is virtualized and not connected to an actual timing sensitive UART, 9600, 57600, 115200 all produce the same results. Most people feel better setting it to 115200 and there is nothing wrong with that.

    ——————————————————————————————————

     What support do you have for OSX ?

    The TrueRNG device enumerates as a standard USB CDC class device under OSX, thus not requiring any drivers in OSX.  So while the device will work fine under OSX, it doesn’t actually do anything without some application reading data from the virtual com port.  It should be possible to compile rng-tools for OSX and follow very similar instructions as the Linux setup, filling the kernel’s entropy, or using something like python and reading the port for random data and doing a custom application.

    ——————————————————————————————————

    Will TrueRNG work on Ubuntu ARM-based devices (like BeagleBoard, etc)?

    Yes, the TrueRNG behaves as a standard USB Serial device, so any of these devices with an available USB port should function properly.

    ——————————————————————————————————

    Can I use the DD command in unix/linux/osx to capture data with the TrueRNG?

    Yes, just make sure if you are specifying blocksize via ‘bs=xxx’ that you add ‘iflag=fullblock’ or you may end up with partially filled blocks. I suggest that you look at the man page for the dd command and inspect the other values such as conv=XXX as well.

    An example is below;

    Linux: dd if=/dev/TrueRNG of=data.bin bs=1024 count=1024 iflag=fullblock
    OSX: dd if=/dev/cu.usbmodem12345 of=data.bin bs=1024 count=1024 iflag=fullblock

    ——————————————————————————————————

    When I read from the USB port, am I getting data from a buffer on the device or is it direct from the ADC

    It’s as direct as it can be. The TrueRNG device doesn’t buffer data intentionally (for speed or anything), but the data from the ADC has to be read into a temporary USB Request Block buffer to be transmitted over usb (63 byte URBs), and then how long that URB sits in the various operating system layers is dependent on your OS, but in general aside from transporting, no the random data is not buffered.

    When the serial port is closed, or the DTR signal is low, the TrueRNG still reads the ADC to generate the random numbers, but they are thrown away instead of being sent to the PC, so by closing the port or toggling DTR you are not buffering old random numbers.

    ——————————————————————————————————

    When dd’ing or reading from the port, my stream randomly stops

    Because the TrueRNG emulates a character device, most character device interfaces have high end control codes like flow control and END OF LINE. For Linux we have a udevd script that will set the port to RAW mode when the device is detected. This turns off the control code mode so that all bytes may be passed without being interpreted as an END OF LINE character or flow control.

    This may apply to other operating systems such as FreeBSD or OSX as well.

    ——————————————————————————————————
     

     

    • This topic was modified 10 years, 9 months ago by Ubld.it Staff.
    • This topic was modified 10 years, 8 months ago by Ubld.it Staff.
    • This topic was modified 10 years, 8 months ago by Ubld.it Staff.
    • This topic was modified 9 years, 9 months ago by Ubld.it Staff. Reason: Added question about buffering
    • This topic was modified 9 years, 6 months ago by Ubld.it Staff.
    • This topic was modified 9 years, 2 months ago by Ubld.it Staff.
    #2575
    Anaswara
    Member

    We are facing an issue while using TrueRNG in Windows 10. In Windows 7, it is working fine. But in Windows 10, even though it is listed in Device Manager, it is not detected by the system.Please suggest a solution.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.