<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Secure Passwords sans SSL</title>
	<atom:link href="http://terrbear.org/?feed=rss2&#038;p=210" rel="self" type="application/rss+xml" />
	<link>http://terrbear.org/?p=210</link>
	<description>ruby! rails! kids! oh my! ... and other fun from terry heath</description>
	<lastBuildDate>Tue, 31 Aug 2010 17:32:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Caffeine Driven Development &#187; Blog Archive &#187; L33t Links #65</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-858</link>
		<dc:creator>Caffeine Driven Development &#187; Blog Archive &#187; L33t Links #65</dc:creator>
		<pubDate>Sun, 10 Jan 2010 20:02:03 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-858</guid>
		<description>[...] Secure Passwords sans SSL [...]</description>
		<content:encoded><![CDATA[<p>[...] Secure Passwords sans SSL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Can't you see the problem here ?</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-857</link>
		<dc:creator>Can't you see the problem here ?</dc:creator>
		<pubDate>Sun, 10 Jan 2010 10:44:37 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-857</guid>
		<description>What happends if javascript is disabled/unavaillable ?

Simple, not only you send the password in plaintext for anyone to see, but the authentication is rejected every time, so it&#039;s likely the user will try again (just in case it&#039;s password wasn&#039;t stolen already).

Like Donald Parish suggested, just use HTTP Digest Authentication. It&#039;s the Standart Way That Works, and you can still use javascript to make it beautiful to your users if you want.
But don&#039;t expect it to be as secure as SSL. SSL is SSL for a reason.</description>
		<content:encoded><![CDATA[<p>What happends if javascript is disabled/unavaillable ?</p>
<p>Simple, not only you send the password in plaintext for anyone to see, but the authentication is rejected every time, so it&#8217;s likely the user will try again (just in case it&#8217;s password wasn&#8217;t stolen already).</p>
<p>Like Donald Parish suggested, just use HTTP Digest Authentication. It&#8217;s the Standart Way That Works, and you can still use javascript to make it beautiful to your users if you want.<br />
But don&#8217;t expect it to be as secure as SSL. SSL is SSL for a reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TempusFactor &#187; Blog Archive &#187; links for 2010-01-08</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-854</link>
		<dc:creator>TempusFactor &#187; Blog Archive &#187; links for 2010-01-08</dc:creator>
		<pubDate>Sat, 09 Jan 2010 00:13:28 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-854</guid>
		<description>[...] Secure Passwords sans SSL @ terrbear.org (tags: javascript password security) [...]</description>
		<content:encoded><![CDATA[<p>[...] Secure Passwords sans SSL @ terrbear.org (tags: javascript password security) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Borzenkov</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-853</link>
		<dc:creator>Alexey Borzenkov</dc:creator>
		<pubDate>Fri, 08 Jan 2010 18:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-853</guid>
		<description>Oh, and one important note: you shouldn&#039;t use cookie session stores with non-SSL authentication. The problem is that man-in-the-middle can intercept cookie snapshots and reuse the same stamp/message again for authenticating a different browser. To be sure no one can &#039;rollback&#039; session like that you must use database store.</description>
		<content:encoded><![CDATA[<p>Oh, and one important note: you shouldn&#8217;t use cookie session stores with non-SSL authentication. The problem is that man-in-the-middle can intercept cookie snapshots and reuse the same stamp/message again for authenticating a different browser. To be sure no one can &#8216;rollback&#8217; session like that you must use database store.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Borzenkov</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-852</link>
		<dc:creator>Alexey Borzenkov</dc:creator>
		<pubDate>Fri, 08 Jan 2010 17:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-852</guid>
		<description>@mike
Why would you want a way to securely pass salt to clients? Salt is just an arbitrary random value, stored unencrypted in the database. There&#039;s no reason in treating salt as secret: it is not.</description>
		<content:encoded><![CDATA[<p>@mike<br />
Why would you want a way to securely pass salt to clients? Salt is just an arbitrary random value, stored unencrypted in the database. There&#8217;s no reason in treating salt as secret: it is not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Borzenkov</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-851</link>
		<dc:creator>Alexey Borzenkov</dc:creator>
		<pubDate>Fri, 08 Jan 2010 17:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-851</guid>
		<description>I notice that you don&#039;t use salt in your database. In my solutions I use ajax to request salt for the user and then scramble it using salt and per-login secret value. This way I am protected from database leaks. Look at http://git.kitsu.ru/mine/quicknote.git in public/javascripts/users/login.js and other logic.

But thanks for pointing out HMAC and sha256 plugin for jquery. :)</description>
		<content:encoded><![CDATA[<p>I notice that you don&#8217;t use salt in your database. In my solutions I use ajax to request salt for the user and then scramble it using salt and per-login secret value. This way I am protected from database leaks. Look at <a href="http://git.kitsu.ru/mine/quicknote.git" rel="nofollow">http://git.kitsu.ru/mine/quicknote.git</a> in public/javascripts/users/login.js and other logic.</p>
<p>But thanks for pointing out HMAC and sha256 plugin for jquery. <img src='http://terrbear.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donald Parish</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-850</link>
		<dc:creator>Donald Parish</dc:creator>
		<pubDate>Fri, 08 Jan 2010 16:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-850</guid>
		<description>Also is similar to WSSE used for ATOM authentication (http://www.xml.com/pub/a/2003/12/17/dive.html).  This is an extension to HTTP authentication that hashes the password with a nonce sent in a challenge from the server and the current date. It does require the password to be stored on the server in plaintext.</description>
		<content:encoded><![CDATA[<p>Also is similar to WSSE used for ATOM authentication (<a href="http://www.xml.com/pub/a/2003/12/17/dive.html" rel="nofollow">http://www.xml.com/pub/a/2003/12/17/dive.html</a>).  This is an extension to HTTP authentication that hashes the password with a nonce sent in a challenge from the server and the current date. It does require the password to be stored on the server in plaintext.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donald Parish</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-849</link>
		<dc:creator>Donald Parish</dc:creator>
		<pubDate>Fri, 08 Jan 2010 15:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-849</guid>
		<description>IamJosh did something similar using RSA encryption by creating a public/private key, and encrypting the password with the public key, while storing the private key in session (make sure you use EncryptedCookieStore if you are using CookieStore!). See: http://iamjosh.wordpress.com/2008/03/18/encrypting-login-password-without-ssl-in-ruby-on-rails/

Don&#039;t forget, the standard HTTP way to authenticate without sending passwords in the clear is HTTP Digest Authentication (RFC2617)</description>
		<content:encoded><![CDATA[<p>IamJosh did something similar using RSA encryption by creating a public/private key, and encrypting the password with the public key, while storing the private key in session (make sure you use EncryptedCookieStore if you are using CookieStore!). See: <a href="http://iamjosh.wordpress.com/2008/03/18/encrypting-login-password-without-ssl-in-ruby-on-rails/" rel="nofollow">http://iamjosh.wordpress.com/2008/03/18/encrypting-login-password-without-ssl-in-ruby-on-rails/</a></p>
<p>Don&#8217;t forget, the standard HTTP way to authenticate without sending passwords in the clear is HTTP Digest Authentication (RFC2617)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: terry</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-847</link>
		<dc:creator>terry</dc:creator>
		<pubDate>Thu, 07 Jan 2010 15:51:40 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-847</guid>
		<description>@Mike
1) The password is not stored as plain text on the server side, it&#039;s stored as an SHA256.

2) Brute forcing a hash is always a possibility. I don&#039;t know of any encryption scheme that prevents brute force attacks. 

3) I think you&#039;re missing the point of this post. It&#039;s for when SSL isn&#039;t necessary or wants to be avoided, but you want to keep a password more secure than sending it as plaintext to the server.</description>
		<content:encoded><![CDATA[<p>@Mike<br />
1) The password is not stored as plain text on the server side, it&#8217;s stored as an SHA256.</p>
<p>2) Brute forcing a hash is always a possibility. I don&#8217;t know of any encryption scheme that prevents brute force attacks. </p>
<p>3) I think you&#8217;re missing the point of this post. It&#8217;s for when SSL isn&#8217;t necessary or wants to be avoided, but you want to keep a password more secure than sending it as plaintext to the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://terrbear.org/?p=210&#038;cpage=1#comment-846</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Thu, 07 Jan 2010 15:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://terrbear.org/?p=210#comment-846</guid>
		<description>I see some issues with this:

The first rule of cryptography is that you don&#039;t create a cryptographic scheme unless you are a real cryptographer.

The mechanism presumes that you are storing passwords in clear text on the server side, which is a massive no-no. You should never store passwords in the clear, or even as a simple hash. You use salts for good reason: they prevent simple lookups of passwords using an MD5/SHA rainbow table.

Also, if the data passed from client to server is intercepted, everything is provided to enable off-line brute-force recovery of the password. The message-portion of your HMAC consists of the username and timestamp, which is passed in the clear, so I know half the equation. Using the SHA-256 of the password as the key does nothing to improve things, except for adding a minute computational exercise to produce a potential key. 

I wouldn&#039;t waste my time trying to figure out a way to securely pass a salt to the client. You&#039;re not going to without implementing public-key encryption. 

The solution is:
1. Be good, and salt&amp;hash your user&#039;s passwords when you&#039;re storing them in a DB.
2. Use SSL to encrypt the authentication.
3. If you are worried about brute-forcing passwords, then rate-limit logins or set up account lockouts after X number of failed attempts.</description>
		<content:encoded><![CDATA[<p>I see some issues with this:</p>
<p>The first rule of cryptography is that you don&#8217;t create a cryptographic scheme unless you are a real cryptographer.</p>
<p>The mechanism presumes that you are storing passwords in clear text on the server side, which is a massive no-no. You should never store passwords in the clear, or even as a simple hash. You use salts for good reason: they prevent simple lookups of passwords using an MD5/SHA rainbow table.</p>
<p>Also, if the data passed from client to server is intercepted, everything is provided to enable off-line brute-force recovery of the password. The message-portion of your HMAC consists of the username and timestamp, which is passed in the clear, so I know half the equation. Using the SHA-256 of the password as the key does nothing to improve things, except for adding a minute computational exercise to produce a potential key. </p>
<p>I wouldn&#8217;t waste my time trying to figure out a way to securely pass a salt to the client. You&#8217;re not going to without implementing public-key encryption. </p>
<p>The solution is:<br />
1. Be good, and salt&amp;hash your user&#8217;s passwords when you&#8217;re storing them in a DB.<br />
2. Use SSL to encrypt the authentication.<br />
3. If you are worried about brute-forcing passwords, then rate-limit logins or set up account lockouts after X number of failed attempts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->