Simply run ./generate.sh
to generate a passphrase based on the XKCD method:
The word list is based on another repository. Many thanks to Josh Kaufman, Peter Norvig and Google for contributing this.
Notes:
- The original comic quoted “~44 bits of entropy” for a four word passphrase like “correct horse battery staple”, making it simple to assume that the dictionary contained 2048 words (2^(44/4)). The dictionary used is unknown, but even though the first three words are all in the word list, “staple” is actually word number 333,333 in Peter Norvig’s list.
- The security of this approach has been discussed elsewhere. User beware.
The code is licensed under the GNU Affero GPL v3+.