Good passwords are long, but easy to remember, so you can use one for each system you log in to. For years, I’ve simply memorized long strings of random characters for my important passwords, but in the past two years, I’ve integerated passphrases into the mix as well. Pass phrases are a series of words that you string together, often with numbers and/or special characters thrown in.
There are lots of tools to do this available, but I thought it would neat to base the word selection on my own corpus culled from literature available online. So, give a directory of titles downloaded from Project Gutenberg in ASCII, this Ruby script will generate a handful of four-word passphrases that you can spice up with numbers or special characters as you see fit.
It runs through all words in the files in the current directory, ranks them by frequency of occurance in the corpus, removes those of length less than four, grabs the top 5000 and samples four from that collection ten times, producing ten passphrases.
There are a ton of ways to make it faster, but I don’t need to use it very often, and it is quite simple, so I thought I’d share.
1 2 3 4 5 6 7 8 9 10