• R/O
  • SSH

MakePW: Commit

The main repository. Contains both Python and Javascript implementations.


Commit MetaInfo

Revision0eda3b1990cb95ef22853e3d130428713cc84552 (tree)
Time2019-02-24 04:47:25
AuthorEric Hopper <hopper@omni...>
CommiterEric Hopper

Log Message

Make --help better. Update README.md for recent changes.

Change Summary

Incremental Difference

diff -r 665ce8cf64e6 -r 0eda3b1990cb README.md
--- a/README.md Fri Jan 11 21:56:44 2019 -0800
+++ b/README.md Sat Feb 23 11:47:25 2019 -0800
@@ -41,7 +41,7 @@
4141 ```text
4242 $ ./makepw.py --help
4343 usage: makepw.py [-h] [--iterations ITERS] [--site SITE] [--extra] [--old]
44- [--no-check]
44+ [--format FORMAT] [--list-formats] [--random] [--no-check]
4545
4646 Generate a site password from a master password and a site name.
4747
@@ -51,26 +51,39 @@
5151 Number of hash iterations. Defaults to 200000. For the
5252 original behavior of a non-iterated hash, use an
5353 iteration count of 0.
54- --site SITE, -s SITE Last two components of site domain name (aka
55- slashdot.org).
56- --extra, -e Add just a few more bits of entropy to the result
57- while still satisfying the requires of both upper and
58- lowercase, a digit and a symbol.
54+ --site SITE, -s SITE Unique site or account identifier, usually the last
55+ two components of site domain name (aka slashdot.org).
56+ --extra, -e Backwards compatility - equivalent to --format
57+ stupid_policy14
5958 --old, -o Use old non-PBKDF2 function for generating the
60- password.
59+ password. Not relevant with -r
60+ --format FORMAT, -f FORMAT
61+ Output format of resulting password. Defaults to
62+ 'stupid_policy13'. Use --list-formats for a list of
63+ supported formats.
64+ --list-formats, -l Print out a list of supported formats, like --help,
65+ this short-circuits any other function.
66+ --random, -r Use the OS secure random number generation to creae a
67+ random password instead of asking for a master
68+ password. Useful for generating master passwords, or
69+ with the xkcd algorithm. Implies --no-check and
70+ ignores the site name and --iterations.
6171 --no-check, -n Do not print out hash for check_site site. This hash
6272 can help you tell if you entered the wrong password.
6373 ```
6474
6575 ## How It Works ##
6676
67-It uses the PKCS#5 v2.0 PBKDF2 with a large (but configurable) number
68-of iterations to make sure that even if an attacker manages to get the
69-plaintext password for a given site, it will be practically impossible
70-for them to reverse the hash and figure out the master password.
77+When not using `--random` mode, it uses the PKCS#5 v2.0 PBKDF2 with a
78+large (but configurable) number of iterations to make sure that even if
79+an attacker manages to get the plaintext password for a given site, it
80+will be practically impossible for them to reverse the hash and figure
81+out the master password.
7182
7283 ## Known Bugs ##
7384
7485 It has a small bug in which it skips 'Z', 'z' and '9' for generating the
75-uppercase, lowercase and digit characters. This bug should be faithfully
76-replicated to all the various implementations.
86+uppercase, lowercase and digit characters. When implementing this for
87+some other language, this this bug should be faithfully replicated to
88+maintain compatibility and allow people to use any implementation for
89+re-creating a password they created with a different implementation.
diff -r 665ce8cf64e6 -r 0eda3b1990cb makepw.py
--- a/makepw.py Fri Jan 11 21:56:44 2019 -0800
+++ b/makepw.py Sat Feb 23 11:47:25 2019 -0800
@@ -130,21 +130,22 @@
130130 "use an iteration count of 0.")
131131 parser.add_argument('--site', '-s',
132132 metavar='SITE', type=str,
133- help="Last two components of site domain name "
134- "(aka slashdot.org).")
133+ help="Unique site or account identifier, usually the"
134+ " last two components of site domain name (aka"
135+ " slashdot.org).")
135136 parser.add_argument('--extra', '-e', action='store_true', default=False,
136- help="Add just a few more bits of entropy to the "
137- "result while still satisfying the requires of both "
138- "upper and lowercase, a digit and a symbol.")
137+ help="Backwards compatility - equivalent to "
138+ "--format stupid_policy14")
139139 parser.add_argument('--old', '-o', action='store_true', default=False,
140140 help="Use old non-PBKDF2 function for generating the "
141- "password.")
141+ "password. Not relevant with -r")
142142 parser.add_argument('--format', '-f',
143143 metavar='FORMAT', type=str, default=None,
144- help="Output format of resulting password. This will"
145- " supercede the -eargument. Use --list-formats for a"
144+ help="Output format of resulting password. Defaults"
145+ " to 'stupid_policy13'. Use --list-formats for a"
146146 " list of supported formats.")
147147 parser.add_argument('--list-formats', '-l', action='store_true',
148+ default="stupid_policy13",
148149 help="Print out a list of supported formats,"
149150 " like --help, this short-circuits any other function.")
150151 parser.add_argument('--random', '-r', action='store_true',
Show on old repository browser