ChangeLog

28 January 2018

  • Fixed systemd script (systemd is not a shell).

03 January 2018

  • Simplified and fixed the startup procedure given that kernels >= 3.13 do not run commands via udev on system boot.

About

OneRNG is a hardware entropy generator developed by Moonbase Tago and this page is a short addendum to the official OneRNG documentation on how to get the device running under Linux. Regardless whether you have a device with an internal USB connector or an external one, the setup is the same from the point of view of Linux.

Requirements

The device uses the standard cdc_acm Linux USB modem driver such that no special drivers have to be loaded. However, the rngd daemon should be installed since it will pull entropy from the device - the daemon can be installed on Linux by issuing the command:

aptitude install rngd

The rest of the setup will provide the necessary files along with the filesystem layout such that the OneRNG will be initialized when it is connected to the USB port.

Filesystem Layout

80-moonbase-onerng.rules is the file that defines the rules for the /dev/ttyACM* device when plugged in: it tells udev to:

  1. create a symlink to /dev/onerng* depending on the device number being created by the kernel,
  2. restart /etc/systemd/system/onerng@.service for the /dev/onerng* device.

Knowing that the kernel creates a device file for OneRNG at /dev/ttyACM0, then the following command:

systemctl enable onerng0.service

will enable the OneRNG device.

The system is designed to allow for multiple OneRNG devices.

+                                          
|                                          
+-+ etc                                    
     +                                     
     |                                     
     +-+ udev                              
     |    +                                
     |    |                                
     |    +-+ rules.d                      
     |           +                         
     |           |                         
     |           + 80-moonbase-onerng.rules     
     |                                     
     +-+ systemd                           
            +                              
            |                              
            + system                       
                +                          
                |                          
                + onerng@.service          

Restarting the Services

Once the files are in-place, issue:

udevadm control --reload

followed by:

systemctl restart udev.service 

to restart udev and apply the rules and then finally:

systemctl daemon-reload

to make systemctl reload the files.

Index

All the required files are listed in the following index menu to be placed at their designated locations.


hardware/onerng.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.