APC Australia

OTP goes Thermal

-

In order to proceed, you’ll need to have your Adafruit Printer set up and working. Fortunatel­y, the website has an excellent guide to this available at learn.adafruit. com/mini-thermal-receipt-printer.

First, install rng-tools as indicated in Step 1 of the walkthroug­h on page 99. 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/rngtools restart to be certain the Pi is using only the hardware RNG now. Next, download the otp-gen software: $ git clone https://github. com/iworkinpix­els/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 automatica­lly 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 accordingl­y.

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.

 ??  ?? Sample printout of an OTP. It’s a good idea to leave the first five characters unencrypte­d so it’s easy for your contact to know where to start.
Sample printout of an OTP. It’s a good idea to leave the first five characters unencrypte­d so it’s easy for your contact to know where to start.

Newspapers in English

Newspapers from Australia