Skip to content

zenhack/chpg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Correct Horse Password Generator

Background Reading

http://xkcd.com/936/

(Source, in case anyone was unaware).

Why?

Because you are not a good enough random number generator for the above to be safe. And because most of the password generators I've seen generate "troubador" passwords, or ones that are harder to remember.

What (not much)

This is just a simple password generator written in go - It generates passwords like the one praised in the comic.

Building & installing

go get github.com/zenhack/chpg

Running

  • Make sure $GOPATH/bin is in your $PATH

  • Make sure you have a valid dictionary at /usr/share/dict/words, and type:

    chpg

  • Or, make sure you have one /somewhere/else, and type:

    chpg -d /somewhere/else

  • This should work with windows style paths if you're using that, but I haven't tried it.

  • The -n flag changes the number of words used in the password.

Notes

  • The dictionary should just be a newline-separated list of words. The file should end with a newline.
  • Using a dictionary that's large enough is is important. The general consensus is that Randall used a 2000-word dictionary in his calculations, which is fairly small; most dictionaries intended for other uses will be larger.
  • This uses the go standard library's cryptographic random number generator, Which slows things down a bit (Just barely perceptible on my laptop), and so this is probably not something you want to use in a performance sensitive context.

License

MIT. See COPYING.

About

Correct Horse Password Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages