Paper-based Password Management

3 July 2011 | Posted by Jay | Filed in Jay

I have been frustrated with password management for quite sometime. I have tried various digital ways to safe-keep passwords but never really felt completely secure as a computer can be stolen, broken or hacked. And the problem gets complicated when you are dealing with multiple computers on a daily basis (eg. computers at home and work). It’s difficult to memorise passwords specially if you have lots of accounts.

I think paper-based password management is the way to go, at least for my needs. I came across this article which I found really useful. I have adapted it to suit my own needs. For example, instead of using multiple characters, I’ve just used one so that I have control over the length of my passwords.

I found it difficult to generate the passwords I need using a spreadsheet application so I wrote a C++ program that does the job. Basically I declared an array of strings which contains letters (both lower and upper case), numbers and common symbols. A random integer is generated at runtime and it matches an element in the array which outputs a table of 13 (columns) x 5 (rows).

#include <iostream>
#include <string>
#include <time.h>
using namespace std;

int main (void) {
int randInt = 0;
const int MAX = 65;
const string strArray[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!", "@", "#", "$", "%", "^", "&", "*", "+", "="};

/* Initialise random seed */
srand (time(NULL));

/* Generate table of random characters based on strArray */
for (int i = 0; i < MAX; i++) {
/* Breakline every 13 characters */
if ((i != 0) && (i % 13 == 0)) {
cout << endl;
}
/* Generate random number based on number of elements in strArray */
randInt = rand() % (sizeof(strArray)/sizeof(string));
/* Output table */
cout << strArray[randInt] << " ";
}

return 0;
}