<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx</link><description>My friend Kristen asked me over the weekend when I was going to stop blogging about crypto math and say something funny again. Everyone's a critic! Patience. my dear. Today, the final entry in my series on salt. Tomorrow, who knows? ***********************</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#368682</link><pubDate>Mon, 07 Feb 2005 21:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368682</guid><dc:creator>Sean</dc:creator><description>An excellent series. I found this very informative.&lt;br&gt;Thanks&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#368683</link><pubDate>Mon, 07 Feb 2005 21:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368683</guid><dc:creator>JD</dc:creator><description>Fantastic series! Thanks! I would try to come up with working example in PHP to implement this!&lt;br&gt;&lt;br&gt;Thanks once again!&lt;br&gt;&lt;br&gt;JD&lt;br&gt;&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#368686</link><pubDate>Mon, 07 Feb 2005 21:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368686</guid><dc:creator>Eric Lippert</dc:creator><description>Argh!&lt;br&gt;&lt;br&gt;What part of DO NOT ATTEMPT TO ROLL YOUR OWN SECURITY SYSTEM was unclear?&lt;br&gt;&lt;br&gt;This series of articles gives just a quick overview of some of the simpler techniques used by authentication systems and the people who try to crack them.  There is nowhere NEAR enough information in here to actually build a secure system.&lt;br&gt;&lt;br&gt;Let me give you an example.  The Kerberos authentication system is breakable if the cryptographic algorithm used allows for mutagenic encryption.  &lt;br&gt;&lt;br&gt;Muta-what?  If you don't know what that means, if you can't look at an encryption algorithm and see whether it's susceptible to mutation attacks, then you can't write a secure implementation.  &lt;br&gt;&lt;br&gt;Writing a good authentication system is HARD, it is one of the hardest tasks that face computer scientists today.  Realtime robot controllers are a piece of cake compared to authentication systems, so PLEASE leave it to the experts.  &lt;br&gt;&lt;br&gt;(And I am no expert -- I have nowhere near enough experience to write an authentication system.)&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#368717</link><pubDate>Mon, 07 Feb 2005 21:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368717</guid><dc:creator>foxyshadis</dc:creator><description>(I have a confession: I wrote my own challenge/response, and then a cut-down version of kerebos, for my site. On the other hand, I wrote the first web server it used, several database servers, pseudo-ssl, fat-client web pages, and so on. It was fun, frustrating, and educational. =D)&lt;br&gt;&lt;br&gt;Eventually most of it was scrapped for the much more secure and usable Apache/Tomcat + Mysql/Xalan. I'm not smart enough to make uncrackable servers.</description></item><item><title>Ye Olde Salt</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#368901</link><pubDate>Tue, 08 Feb 2005 07:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368901</guid><dc:creator>Phylyp</dc:creator><description>Great series Eric.  &lt;br&gt;&lt;br&gt;Encryption is one area where the more I learn, the less I know... &lt;br&gt;&lt;br&gt;Would you believe I once thought XORing data (against a single byte value, no less!) was a *great* way of encrypting it?&lt;br&gt;&lt;br&gt;Thinking back, I'm almost embarrassed to admit it here.  Not to mention other equally hilarious forays into encryption.  &lt;br&gt;&lt;br&gt;Presently, I'm able to use the CryptoAPI in my apps that require it, and leave the implementation of encryption techniques to the mathematicians, thank you.  &lt;br&gt;&lt;br&gt;Looking forward to more foundation-building articles like the same.  </description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#368928</link><pubDate>Tue, 08 Feb 2005 08:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368928</guid><dc:creator>Eric Lippert</dc:creator><description>I don't know if Mike came up with the term or if it's an old joke, but Michael Howard refers to algorithms like the XOR encryption as &amp;quot;encraption&amp;quot;.  &lt;br&gt;&lt;br&gt;Ah, those witty Kiwis.&lt;br&gt;&lt;br&gt;Anyhow, thanks for the compliment -- like I said, I'm not sure what I'll blog about next.  I've got a whole lot of ideas but not very much time these days.</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#369076</link><pubDate>Tue, 08 Feb 2005 14:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369076</guid><dc:creator>G. Man</dc:creator><description>System #4, &amp;quot;Unfortunately, this system is worse&amp;quot; : I dont think that sending a hashed password is WORSE than sending the password in the clear! Granted it is not effective, but it put up barriers for the casual snoop who knows how to run a packet sniffer but knows nothing about hashes or writing their own clients!&lt;br&gt;&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#369081</link><pubDate>Tue, 08 Feb 2005 14:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369081</guid><dc:creator>G. Man</dc:creator><description>P.S. Why not just use a timestamp i.e. &amp;quot;2004-06-21T11:29:01.9346744&amp;quot; as the salt, you dont have to worry about unique salts.&lt;br&gt;&lt;br&gt;Also, you are still open to man-in-the-middle attacks. The server must sign its hashes using asymmetric encryption otherwise I could pretend to be the server and get passwords from the client whenever I need them.&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#369083</link><pubDate>Tue, 08 Feb 2005 14:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369083</guid><dc:creator>G. Man</dc:creator><description>sorry, I meant use the timestamp as the challenge, not the password salt&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#369212</link><pubDate>Tue, 08 Feb 2005 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369212</guid><dc:creator>Skywing</dc:creator><description>You might also want to check out [url=&lt;a target="_new" href="http://srp.stanford.edu"&gt;http://srp.stanford.edu&lt;/a&gt;]SRP[/url].</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#369826</link><pubDate>Wed, 09 Feb 2005 15:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369826</guid><dc:creator>Lance Fisher</dc:creator><description>Great Series Eric!</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#370112</link><pubDate>Wed, 09 Feb 2005 23:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370112</guid><dc:creator>James</dc:creator><description>Eric, I might have a series of dumb questions: how are password policies enforced? If the server implements them, I assume that the password is sent in clear text? Either way, I suspect the only reason techniques similar to those you describe are employed -- as opposed to full-blown encryption -- is related to available processor resources. Am I right? Do you see this changing?</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#370129</link><pubDate>Thu, 10 Feb 2005 00:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370129</guid><dc:creator>Eric Lippert</dc:creator><description>You're now asking about an entirely different problem -- how to securely transmit the original secret to the server.&lt;br&gt;&lt;br&gt;&amp;gt; I assume that the password is sent in clear text?&lt;br&gt;&lt;br&gt;I should hope not!&lt;br&gt;&lt;br&gt;&amp;gt; how are password policies enforced? &lt;br&gt;&lt;br&gt;Like, say, passwords must be longer than a certain number of characters?  Clearly the server must get the password somehow!&lt;br&gt;&lt;br&gt;&amp;gt; I suspect the only reason techniques similar to those you describe are employed -- as opposed to full-blown encryption &lt;br&gt;&lt;br&gt;By &amp;quot;full blown encryption&amp;quot; I assume you mean &amp;quot;using encryption to transmit a message which can be turned back into plaintext by the recipient&amp;quot;.&lt;br&gt;&lt;br&gt;&amp;gt;  is related to available processor resources&lt;br&gt;&lt;br&gt;Encryption of short messages such as passwords is cheap, so no, that's not it.  Sending the bits over the wire a reasonable distance is almost certainly more expensive in terms of raw time than doing the math.&lt;br&gt;&lt;br&gt;Let me give the shortest reason for why you wouldn't use &amp;quot;full blown encryption&amp;quot;: because full blown encryption is HARD TO IMPLEMENT CORRECTLY, and NOT NECESSARY TO SOLVE THE PROBLEM.  &lt;br&gt;&lt;br&gt;When it comes to authentication schemes, you want it to be as simple as possible, but no simpler.  The key management problems inherent in full-blown encryption -- as in SSL, for example -- are non-trivial.  If you can build an authentication system that doesn't need them in order to succeed, then do so!&lt;br&gt;&lt;br&gt;Now, you are entirely correct in noting that I have hand-waved away the problem of getting the password or pasword-equivalent-hash onto the server in the first place.  That DOES require some kind of encryption whereby the message can be recovered by the server.  I might do a series on how that works sometime.&lt;br&gt;</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#370558</link><pubDate>Thu, 10 Feb 2005 18:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370558</guid><dc:creator>William</dc:creator><description>Thanks Eric.  You pointed it out, but I think it is worth saying again that this is not secure nor is any Non-Encrypted means because you can do a dictionary attack as you have all the information you need off the wire.  Once you find the password (taking as much time as you need offline), you now have access to this box or any others that use same password.  So this is more or less Security-Via-Obscurity which we know is not really security.  Even WS-Security and the SendHashed option uses a similar method of using a &amp;quot;Nonce&amp;quot; (one time value), Date &amp;quot;Created&amp;quot; value and &amp;quot;Password Digest&amp;quot; to form a validator that the server can verify. The problem is, all that fancy mojo still does not stop a simple dictionary attack as I point out in &amp;quot;Crack your WSE SendHashed Passwords. &amp;quot;&lt;br&gt;&lt;a target="_new" href="&lt;a target="_new" href="http://spaces.msn.com/members/staceyw/Blog/cns"&gt;http://spaces.msn.com/members/staceyw/Blog/cns&lt;/a&gt;"&gt;&lt;a target="_new" href="http://spaces.msn.com/members/staceyw/Blog/cns"&gt;http://spaces.msn.com/members/staceyw/Blog/cns&lt;/a&gt;&lt;/a&gt;!1pnsZpX0fPvDxLKC6rAAhLsQ!178.entry&lt;br&gt;&lt;br&gt;And that spec was created by industry experts in the field!  Even passwords people think are strong like &amp;quot;Letmein;12&amp;quot; can be cracked in ~minutes.  BTW - How many people when forced to add digits to a password start at 1 or 12 and increment them when prompted for a change?&lt;br&gt;&lt;br&gt;IMO, I would not recommend any scheme based on hashes unless the session is *encrypted with SSL or WS-SecureConversation (or other).  If the session is encrypted you probably don't need hashes to begin with unless your doing something special with them at the back end.  Also, I don't know why people want to use another database when we have AD/SAM and can leverage its' tools.  So use encryption, get the clear password on server component, and use win32's LogonUser to authenticate.  The ~downside is you have the clear password in a server process for some short time, but only the private key can decrypt, so we can control/guard the logic that uses it closely.  Naturally, the Admins can use dictionary attack on ADs password DB, put if we can't trust the admins, then not sure what solution you could implement.&lt;br&gt;&lt;br&gt;So I would use WSE and SecurityContextTokens(SCT) to sign and encrypt data/body.  And don't use UsernameTokens or pw hashes at all.  You can get a SCT with public WSE apis.  I have also written a way to get a SCT over Soap.tcp and authenticate at same time using PKI encryption and one request/reply pair. Anyone please feel free to review and provide feedback:&lt;br&gt;&lt;a target="_new" href="&lt;a target="_new" href="http://spaces.msn.com/members/staceyw/Blog/cns"&gt;http://spaces.msn.com/members/staceyw/Blog/cns&lt;/a&gt;"&gt;&lt;a target="_new" href="http://spaces.msn.com/members/staceyw/Blog/cns"&gt;http://spaces.msn.com/members/staceyw/Blog/cns&lt;/a&gt;&lt;/a&gt;!1pnsZpX0fPvDxLKC6rAAhLsQ!303.entry&lt;br&gt;&lt;br&gt;--William</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#370736</link><pubDate>Fri, 11 Feb 2005 01:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370736</guid><dc:creator>Eric Lippert</dc:creator><description>If you can establish an SSL connection then all communications have an additional level of encryption, yes.  If you're going to do that, then there's no reason why you couldn't just send the password. No need to muck about with challenge-response, etc, to avoid a replay attack.  The unique session key is sufficient to avoid the replay, and the session key is encrypted with the server's public key.&lt;br&gt;&lt;br&gt;However, SSL does beg the question somewhat. SSL builds a trustworthy connection over an untrustworthy network by leveraging a trusted root certificate.  Essentially for any SSL-based scheme to work, every client must trust a given root cert.&lt;br&gt;&lt;br&gt;Essentially we're talking about mutual authentication here, which is quite a bit harder than one-way authentication.  I might do another series on mutual authentication some time.</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#371389</link><pubDate>Fri, 11 Feb 2005 22:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:371389</guid><dc:creator>Dave Anderson</dc:creator><description>&amp;quot;...refers to algorithms like the XOR encryption as &amp;quot;encraption&amp;quot;...&amp;quot;&lt;br&gt;&lt;br&gt;And yet XOR is at the very heart of DES and other algorithms. Heck - we can achieve perfect secrecy with XOR and a one-time pad (assuming a pad made with a perfectly random generator, of course). And it would be a hell of a lot faster than exponentiation over an enormous finite field.&lt;br&gt;&lt;br&gt;Encraption may be a funny word, but it certainly understates the power of XOR.</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#371409</link><pubDate>Fri, 11 Feb 2005 23:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:371409</guid><dc:creator>JD</dc:creator><description>Sorry for replying bit late.&lt;br&gt;&lt;br&gt;Eric, when I said that I will try to create working example in PHP, I didn't mean that I will write my own encryption system. What I meant was I would write a working login page which will use MD5 or SHA on both client side (using Javascript) and on Server side (using PHP) to authenticate a user. This example can teach others how they can go about implementing the same in their projects.&lt;br&gt;&lt;br&gt;I hope I am clear this time.&lt;br&gt;JD</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#371979</link><pubDate>Sun, 13 Feb 2005 19:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:371979</guid><dc:creator>William</dc:creator><description>&amp;quot;What I meant was I would write a working login page which will use MD5 or SHA on both client side (using Javascript) &amp;quot;&lt;br&gt;&lt;br&gt;But why?  IMO, hashing is not encryption.  And we showed that it is pretty easy to dictionary attack.  Using a true encrypted session such as SSL or WS-SecureConversation would be more useful and secure.&lt;br&gt;--William</description></item><item><title>Eric Rounds it off </title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#372249</link><pubDate>Mon, 14 Feb 2005 17:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372249</guid><dc:creator>Scott Galloway's Personal Blog</dc:creator><description /></item><item><title>Do not use string hashes for security purposes</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#4795936</link><pubDate>Fri, 07 Sep 2007 01:44:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4795936</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description>&lt;p&gt;A recent question I got about the .NET CLR's hashing algorithm for strings is apropos of our discussion&lt;/p&gt;
</description></item><item><title>re: You Want Salt With That? Part Four: Challenge-Response</title><link>http://blogs.msdn.com/ericlippert/archive/2005/02/07/you-want-salt-with-that-part-four-challenge-response.aspx#7075423</link><pubDate>Fri, 11 Jan 2008 18:42:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7075423</guid><dc:creator>L. Michael Asher</dc:creator><description>&lt;p&gt;-&amp;gt; &amp;quot;IMO, hashing is not encryption...&amp;quot;&lt;/p&gt;
&lt;p&gt;It is a form of encrpytion, plain and simple.&lt;/p&gt;
&lt;p&gt;-&amp;gt; &amp;quot;we showed that it is pretty easy to dictionary attack&amp;quot;&lt;/p&gt;
&lt;p&gt;No more or less so than symmetric encryption is.&lt;/p&gt;
&lt;p&gt;-&amp;gt; &amp;quot;Using a true encrypted session such as [SSL] would be more useful and secure...&amp;quot;&lt;/p&gt;
&lt;p&gt;Do you thin kthat SSL doesn't use hashing to authenticate messages? &amp;nbsp;Think again.&lt;/p&gt;
</description></item></channel></rss>