“Diceware is a way of generating harder to crack passwords.
You roll 5 dice, look up the number in a table and jot down the word you find there, by chaining a string of words together you create a hard to crack password that is easier to remember. The use of a table is time consuming so I thought I would try to create a box where I enter the dice number and it looks the word up for me.
The original table runs in at 7775 words but there are now a couple of different word lists available.
The Electronic Frontier Foundation (EFF) has produced a second list with the aim of eliminating the more obscure words, words which sound alike and a variety of other quirks of the original table. The EFF also has 2 lists of short words requiring only 4 dice for each word.
I initially built and tested my program with the 5 dice words lists later modifying the code to handle the 2 EFF short words lists.
I have not tested any of the other words lists such as those in other languages.
The project consists of an Arduino UNO a Deek robot data logging shield and LCD shield with buttons stacked together like a cake, there are no external connections to make.
I have removed pin 10 of my LCD keyboard shield as it is used by the data logging shield as chip select (CS) and also because it was faulty.
Note that the SD card shield shown in my photo’s has a piezo sounder soldered into the prototype area, this component is not required for this project; it is an artefact from other projects I have done.
The Diceware words lists are stored in text files on the SD card; the words lists referenced all store their data in the format of - number tab word newline.
There are 3 main parts to the code.
The buttons are handled by an interrupt driven chorded keyboard routine that I have used on many occasions. This allows the selection and incrementation of each dice and when they are set initiates the word lookup.
The search routine is handled by code I copied from an Auduino forum post by CatweazleNZ to search and retrieve data from CSV formatted files.
The display control is handled by a set of dedicated functions.”