OTP goes Thermal
In order to proceed, you’ll need to have your Adafruit Printer set up and working. Fortunately the website has an excellent guide to this available at https://learn.adafruit.com/minithermal-receipt-printer. First install rng-tools as indicated in Step 1 of the walkthrough on p63. You’ll also need to edit /etc/default/rng-tools in your favourite text editor. Remove the # at the beginning of the line HRNGDEVICE=/dev/hwrng. Save and exit. Use sudo /etc/init.d/rng-tools restart to be certain the Pi is using only the hardware RNG now. Next, download the otp-gen software: $ git clone https://github.com/iworkinpixels/ otp-gen.git At this stage if you wish you can go into the opt-gen/ folder and run off a sample pad to see what it looks like: $ cd otp-gen $ sudo ./otp.py $ nano otp.txt Next we need to make sure the software starts automatically when the machine starts: $ sudo nano /etc/rc.local Scroll to the bottom of this file and insert the following three lines above the words ‘exit 0’: $ cd /home/pi/otp-gen $ ./otp.sh $ python ./otp.py
If you have downloaded the otp-gen folder to anywhere else besides /home/pi/ then change the first line accordingly.
Use Ctrl+X to come out of the text editor, and press Y to save the changes. Next use sudo reboot to restart your Pi. The printer should print out a message saying it’s connected to the network along with your IP address, then pause. Simply press the button to generate your own one time pad. Repeat as many times as you like.