Crypt::XKCDCommon1949 - xkcd password style wordlist provider
use Crypt::XKCDCommon1949 qw(xkcd_common_1949); my @wordlist = xkcd_common_1949; # but you probably want to use the interface to Crypt::Diceware # or Crypt::XkcdPassword or Acme::MetaSyntatic described below
Crypt::XKCDCommon1949 providers a simple wordlist based on the 1949 english words most frequently occurening in newspapers published by http://passphra.se (which is in turn based on data published at http://www.paulnoll.com/Books/Clear-English/English-3000-common-words.html)
This list of words is handy as it represents a compromise between having a reasonable number of words to pick from (almost 11 bits of entropy per word) and having a word that someone is likely to be able to remember.
Please be aware that while passwords generated with this wordlist are much more secure than the standard type "human readable" password if many randomly picked words are used to constuct a password, the passwords are not as secure as less readable passwords consisting of random characters (such as those generated by password vault software such as 1Password.) Use at your own risk.
Can be exported on demand or used fully qualified
Function returning 1949 common english words.
Array containing 1949 common english words.
Support is baked in for other modules:
Crypt::Diceware is the most secure of the options listed here, using proper random numbers to pick the words. It requires non-pure-perl dependancies however.
use Crypt::Diceware words => { wordlist => 'XKCDCommon1949' } say join " ", words(4);
Crypt::XkcdPassword can be configured to use proper random numbers, but by default (as in the example shown below) it doesn't.
say Crypt::XkcdPassword->new( words => "XKCDCommon1949" ) ->make_password(4);
For completeness. Doesn't have proper random number generator, relies on List::Util's shuffle method to do the random picking.
shuffle
use Acme::MetaSyntactic qw( xkcdcommon1949 ); say join " ", metaxkcdcommon1949(4);
Written by Mark Fowler <mark@twoshortplanks.com>
Copyright Mark Fowler 2013. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Note that the majority of this module is just a table of data taken from http://passphras.se. Tables of data aren't generally considered copyrightable (see http://www.lib.umich.edu/copyright-office-mpublishing/copyrightability-charts-tables-and-graphs for an explanation)
Bugs should be reported via this distribution's CPAN RT queue. This can be found at https://rt.cpan.org/Dist/Display.html?Crypt-XKCDCommon1949
You can also address issues by forking this distribution on github and sending pull requests. It can be found at http://github.com/2shortplanks/Crypt-XKCDCommon1949
http://xkcd.com/936/, http://preshing.com/20110811/xkcd-password-generator
Crypt::Diceware, Crypt::XkcdPassword, Acme::MetaSyntactic
To install Crypt::XKCDCommon1949, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::XKCDCommon1949
CPAN shell
perl -MCPAN -e shell install Crypt::XKCDCommon1949
For more information on module installation, please visit the detailed CPAN module installation guide.