<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Code Spatter - Latest Comments in A New, Simple Way to Salt your Hashes</title><link>http://codespatter.disqus.com/</link><description></description><language>en</language><lastBuildDate>Tue, 05 Aug 2008 13:23:47 -0000</lastBuildDate><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720587</link><description>There is no advantage to doubling the password.  Knowing that all salted passwords are just doubles effectivly adds zero bits of entropy: The hash for two identical passwords is still identical, and subject to the same rainbow table attack.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kyle Lahnakoski</dc:creator><pubDate>Tue, 05 Aug 2008 13:23:47 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720579</link><description>This doesn't do anything to thwart rainbow tables, other than increase the length of the password.  The point (one of) of the salt is to make the hash of an obvious password unrecognizable.  Another point is to thwart rainbow tables.  For the first, any salt that doesn't happen to turn the password into a merely longer common value is fine (you don't want a salt of 'able', because if the password chosen is 'guess' the password + salt is 'guessable').  Also, you want the salt to have some non-printable values, so that an attacker would have to have a much larger set of computed rainbow tables to attempt to brute force passwords.  Finally, you should have a different salt for every user, so that the attacker has to compute rainbow tables for each user vs precomputing for whatever set of salts you are using.&lt;br&gt;&lt;br&gt;So, a salt should: Have non-printable and characters, characters with ord() &amp;gt; 128 and be unique per user.    That way, every password is drawn (potentially) from the full space of available byte values, making lots of attacks harder.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Justin Van Winkle</dc:creator><pubDate>Mon, 04 Aug 2008 18:11:38 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720580</link><description>IMO, the best salt is randomly picked for each hash. That way, if someone steals you user table, they can't tell if two users share the same password..</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt H</dc:creator><pubDate>Mon, 04 Aug 2008 12:49:08 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720584</link><description>Actually, the comments claiming that this adds *no* security are wrong. Doubling the username and hashing it does prevent one class of attack that a non-salted (or single-salted site) password database is vulnerable to: rainbow tables. If there's no variability in the inputs to your hashing function (and re-using the same salt for all inputs is basically just defining a new, site-specific hashing function) an attacker can pre-generate hashed versions of easily-guessed passwords, and try an offline attack against your database to see if any of their guesses match an entry in the DB.&lt;br&gt;&lt;br&gt;However, there is certainly some value to generating a unique nonce for each hashed password, and storing it alongside the password. It doesn't have to be truly *random* though; since it's sitting right there in the record, it's not of the class of value like a private key where both entropy and secrecy matter. You can use the username, or the timestamp for when the password was reset, or any other easily-retrievable datum.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lennon</dc:creator><pubDate>Mon, 04 Aug 2008 12:01:22 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720585</link><description>The problem with this is you are not really salting your hashes. You are just making the passphrase longer. You could add '1234' at the end of everything you hash and don't tell anyone about this. Maybe read &lt;a href="http://en.wikipedia.org/wiki/Salt_%2528cryptography%2529" rel="nofollow"&gt;http://en.wikipedia.org/wiki/Salt_%28cryptograp...&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">me</dc:creator><pubDate>Mon, 04 Aug 2008 10:52:14 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720583</link><description>Don't do this. The whole point of a salt is that it's a completely unknown, as-close-to-random string of characters as possible.&lt;br&gt;&lt;br&gt;As sh1mmer said, introducing patterns or predictability into a crypto system compromises the system's security.&lt;br&gt;&lt;br&gt;There are many easy ways to easily generate a "secure" salt. Eg:&lt;br&gt;-Use a seeded PRNG in your language.&lt;br&gt;-Read from /dev/random .&lt;br&gt;-Use the ID of an object in your program/script.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;Nick</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick Hoffman</dc:creator><pubDate>Mon, 04 Aug 2008 10:44:00 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720586</link><description>I was thinking that if someone were to get ahold of the user table, they would know the salt used and with a lot of time and horsepower try many words with the salt. Hiding the salt in any way would create some kind of pattern, but I wouldn't know how much weaker that would make it. Guessing that this tactic might be used would probably be easier than getting ahold of a random salt.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg Allard</dc:creator><pubDate>Mon, 04 Aug 2008 10:38:46 -0000</pubDate></item><item><title>Re: A New, Simple Way to Salt your Hashes</title><link>http://codespatter.com/2008/08/04/a-new-simple-way-to-salt-your-hashes/#comment-1720582</link><description>The problem with this is you have created a pattern which could (and probably does) introduce a cryptographic weakness. If someone knew or could guess you were using this tactic then they might be able to exploit it.&lt;br&gt;&lt;br&gt;While I don't have an example of a specific weakness to MD5 to hand one of the basic rules of exploiting algorithms is knowing some of the source material or knowing about patterns within it.&lt;br&gt;&lt;br&gt;The point of using a salt is to use a piece of unknown material which is unique in each string. It's common to generate random junk to use rather than anything meaningful.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">http://www.mybloglog.com/buzz/</dc:creator><pubDate>Mon, 04 Aug 2008 10:27:51 -0000</pubDate></item></channel></rss>