https://github.com/zenhack/chpg
Correct Horse Password Generator
https://github.com/zenhack/chpg
Last synced: 7 months ago
JSON representation
Correct Horse Password Generator
- Host: GitHub
- URL: https://github.com/zenhack/chpg
- Owner: zenhack
- License: mit
- Created: 2013-01-19T17:10:46.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-06T02:42:32.000Z (over 12 years ago)
- Last Synced: 2025-02-03T13:45:04.348Z (about 1 year ago)
- Language: Go
- Size: 58.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Correct Horse Password Generator
## Background Reading
, I sincerely apologize.")
([Source](http://xkcd.com/936/), 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.