Please tell me I am missing something. There is no salt. The hashing algorithm is hence vulnerable to a simple dictionary attack. It does not matter if you do a gigazillion rounds. Someone can still pre-calculate a list of common passwords and then test that list against each and every user.
As usual, purity is overrated.<p>The #1 benefit of a purely stateless password manager is that there is no password database, so your password database cannot be compromised.<p>The drawback, as others have mentioned, is that it's difficult to use strong salts without keeping some sort of database. Changing passwords also becomes a big hassle.<p>But what about a compromise? Keep a database, but only store the salts in the database. Generate the passwords on the fly using the master password and the domain-specific salt. Now you can have your cake and eat it too! If anyone steals your database, all they have is a bunch of salts. You probably won't even have to keep it encrypted.<p>Keeping a database will also let you add some of the following features, which I consider essential to any modern password manager:<p>- Remember the username for each website. Some websites ask for my email address, others ask for a simple handle, and I shouldn't have to remember which is which.<p>- Manage more than one account for the same domain, each with a different username.<p>- Change the password for only one website, without changing the master password, and without having to use a silly suffix. Just change the salt for that website. (This is one reason why it's a bad idea to use the username as the salt. The salt should be random and easily changeable.)<p>- Remember password restrictions for each website. If your bank limits passwords to 12 characters, you can store this setting in the database and automatically truncate the hash to the desired length. If your school doesn't allow special characters in the password, also remember this setting and skip non-alphanumeric characters from the auto-generated hash.<p>Until now, most of the features I listed above have only been possible with password databases. But if you think about it, there's no reason not to go the hybrid route.
There are many of this type of hash function based generators, but pretty much all use fast hash functions. The no salt thing also makes me uneasy.<p>From another Ask HN[0], I learned about bpasswd[1] which does bcrypt and allows the cost (iterations) to be configured. That looks pretty cool.<p>For me, I chose to go with a hybrid approach and wrote hash0[2] for my less important passwords (important ones live in KeePass). Hash0 does 100,000 iterations of PBKDF2 with salt from CSPRNG unique for each site. It stores the encrypted metadata (just the salt, length, symbol/no symbol, etc) at a location of your choosing (I just store it in my Google App Engine).<p>Would love to get more eyes on it and get feedback (See services.js for generation logic).<p>Benefits of hybrid are that:<p><pre><code> - Allows me to use random salt
- Allows me to easily change password for individual sites (thanks for random salt)
- Allows me to store website's preferred password length and whether to use symbols or not
- Allows me to create mappings (so say www.twitter.com and account.twitter.com can use the same password)
- Allows me to store notes along with the metadata (e.g. what username I used)
</code></pre>
[0]: <a href="https://news.ycombinator.com/item?id=8753534" rel="nofollow">https://news.ycombinator.com/item?id=8753534</a><p>[1]: <a href="http://www.alexhornung.com/code/bpasswd/" rel="nofollow">http://www.alexhornung.com/code/bpasswd/</a><p>[2]: <a href="https://github.com/dannysu/hash0" rel="nofollow">https://github.com/dannysu/hash0</a>
It needs to be improved to be secure<p>- salt. To avoid rainbow table attacks. One could use the login/email as salt<p>- key strengthening function. Instead of repeating naively SHA-256 a few times, use PBDKF2 or even better, something which is also memory hard like scrypt.<p>Finally. What happens when the password requires to have upper case, symbols, x number of digits, min or max number of characters... If you think about it, some websites have conflicting requirements.
Ok, the idea in general isn't good because most people won't use a good password and also because now there's a single point of failure if someone sees your password.<p>However, it might be okay if one can provide their own hashing function. Like a JS function that takes the domain and secret key as parameters.
Existing extensions for FF and Chrome using the same idea ; both use the same algorithm so you can share passwords:<p>Firefox: <a href="https://addons.mozilla.org/pl/firefox/addon/password-hasher/" rel="nofollow">https://addons.mozilla.org/pl/firefox/addon/password-hasher/</a><p>Chrome: <a href="https://chrome.google.com/webstore/detail/pawhash/adgekjfphhgngpdoklolpjenmgneobfg?hl=en-US" rel="nofollow">https://chrome.google.com/webstore/detail/pawhash/adgekjfphh...</a>
I've been using SuperGenPass for this for years. There is a Chrome extension that is safe (from website snooping of your key) and a browser bookmarklet that is not safe. But, I just use the mobile browser version in another tab and copy paste since I choose to use Firefox. It's a little less convenient, but not inconvenient enough that I've spent time trying to figure out how to make a safe extension for Firefox.<p>So, what's different about this from the SuperGenPass session Chrome plugin?
It's an interesting idea, but is it really usable? If you ever need to change the master key, you'll have to update all the websites you are using, and you won't even know on which websites you used the password manager with since there is no database. I just don't see how I could ever want this. Or is it assumed that master keys never need to be changed?
Use slower / heavier hash -- PBKDF2 or better. For lulz use something like Darkcoin Cryptocurrency 'X11' Proof of Work function - multiple rounds of 11 different hashes.
Or more. (X13, X15 and X17 all exist as PoW functions in CryptoCurrencies today).<p>A <$1000 bitcoin (SHA-256) mining ASIC appliance is likely to be doing 1TH/s. Makes 2^16 rounds look kinda weak.
Here's a short analysis of such password generators: <a href="http://crypto.stackexchange.com/a/5691/291" rel="nofollow">http://crypto.stackexchange.com/a/5691/291</a>
This is why beginners should not design crypto, much less encourage others to use their creations...<p>Do not use this, it's a textbook example of how to <i>not</i> do it.
<a href="http://passwordmaker.org" rel="nofollow">http://passwordmaker.org</a> does the same thing and already has extensions for all browsers.