<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Timing attack in Google Keyczar library</title>
	<atom:link href="http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/</link>
	<description>Embedded security, crypto, software protection</description>
	<lastBuildDate>Mon, 06 Feb 2012 20:16:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Nate Lawson</title>
		<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/comment-page-1/#comment-5939</link>
		<dc:creator><![CDATA[Nate Lawson]]></dc:creator>
		<pubDate>Wed, 11 Aug 2010 21:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://rdist.root.org/?p=355#comment-5939</guid>
		<description><![CDATA[Unlike local timing attacks where you have to worry more about cache, branch prediction cache, etc., remote timing attacks are easiest to avoid by using a simple constant time loop. More complicated countermeasures are more likely to fail.]]></description>
		<content:encoded><![CDATA[<p>Unlike local timing attacks where you have to worry more about cache, branch prediction cache, etc., remote timing attacks are easiest to avoid by using a simple constant time loop. More complicated countermeasures are more likely to fail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis H.</title>
		<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/comment-page-1/#comment-5937</link>
		<dc:creator><![CDATA[Travis H.]]></dc:creator>
		<pubDate>Wed, 11 Aug 2010 19:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://rdist.root.org/?p=355#comment-5937</guid>
		<description><![CDATA[Hey Nate,

Regarding Steve Hurcombe&#039;s comment, I wonder if you had heard of anyone injecting a delay, not random, but based on a function of the user-selected guess and a secret value.  It seems that the function computation could be potentially expensive, but it would be simpler to implement in some cases than constant-time algorithms.  Example, much simplified for didactic purposes:

...do comparison...
sleep(HMAC(user_supplied_guess, secret_delay_key))

Described among possible counter-measures here:
http://www.subspacefield.org/security/security_concepts/index.html#tth_sEc31.2.4

Another idea, off the top of my head, would be to hash the two values before comparison, so knowing how many octets were identical doesn&#039;t help you much - you find out about the hash of the correct value, but preimage resistance prevents you from learning about the correct value.

I throw these out there as ideas because DJB makes me skeptical of my ability to write truly constant-time code. :-)]]></description>
		<content:encoded><![CDATA[<p>Hey Nate,</p>
<p>Regarding Steve Hurcombe&#8217;s comment, I wonder if you had heard of anyone injecting a delay, not random, but based on a function of the user-selected guess and a secret value.  It seems that the function computation could be potentially expensive, but it would be simpler to implement in some cases than constant-time algorithms.  Example, much simplified for didactic purposes:</p>
<p>&#8230;do comparison&#8230;<br />
sleep(HMAC(user_supplied_guess, secret_delay_key))</p>
<p>Described among possible counter-measures here:<br />
<a href="http://www.subspacefield.org/security/security_concepts/index.html#tth_sEc31.2.4" rel="nofollow">http://www.subspacefield.org/security/security_concepts/index.html#tth_sEc31.2.4</a></p>
<p>Another idea, off the top of my head, would be to hash the two values before comparison, so knowing how many octets were identical doesn&#8217;t help you much &#8211; you find out about the hash of the correct value, but preimage resistance prevents you from learning about the correct value.</p>
<p>I throw these out there as ideas because DJB makes me skeptical of my ability to write truly constant-time code. :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Lawson</title>
		<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/comment-page-1/#comment-5789</link>
		<dc:creator><![CDATA[Nate Lawson]]></dc:creator>
		<pubDate>Thu, 08 Apr 2010 22:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://rdist.root.org/?p=355#comment-5789</guid>
		<description><![CDATA[Every call to &quot;==&quot; is a branch. So you will reveal the timing difference of whether or not the branch is taken on each character. This is actually easier to attack than &quot;terminate early&quot; behavior since it allows you to test a number of possibilities in parallel.]]></description>
		<content:encoded><![CDATA[<p>Every call to &#8220;==&#8221; is a branch. So you will reveal the timing difference of whether or not the branch is taken on each character. This is actually easier to attack than &#8220;terminate early&#8221; behavior since it allows you to test a number of possibilities in parallel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aahz</title>
		<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/comment-page-1/#comment-5783</link>
		<dc:creator><![CDATA[Aahz]]></dc:creator>
		<pubDate>Mon, 05 Apr 2010 22:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://rdist.root.org/?p=355#comment-5783</guid>
		<description><![CDATA[I&#039;m curious why this loop isn&#039;t used, it would be a lot faster because
of avoiding the function calls:

for x, y in zip(correctMac, sig_bytes):
    result += (x == y)

Assuming I understand correctly, this should not result in a timing
difference until you have a digest that&#039;s bigger than two gigabytes.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m curious why this loop isn&#8217;t used, it would be a lot faster because<br />
of avoiding the function calls:</p>
<p>for x, y in zip(correctMac, sig_bytes):<br />
    result += (x == y)</p>
<p>Assuming I understand correctly, this should not result in a timing<br />
difference until you have a digest that&#8217;s bigger than two gigabytes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Lawson</title>
		<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/comment-page-1/#comment-5504</link>
		<dc:creator><![CDATA[Nate Lawson]]></dc:creator>
		<pubDate>Wed, 27 Jan 2010 05:41:55 +0000</pubDate>
		<guid isPermaLink="false">http://rdist.root.org/?p=355#comment-5504</guid>
		<description><![CDATA[I assume you&#039;re referring to the x86 string instructions such as &quot;rep cmpsd&quot;? They still terminate early so there is a timing difference. It will be very small, but you have to consider the attacker&#039;s vantage point. It still may be exploitable and is highly dependent on the security model.]]></description>
		<content:encoded><![CDATA[<p>I assume you&#8217;re referring to the x86 string instructions such as &#8220;rep cmpsd&#8221;? They still terminate early so there is a timing difference. It will be very small, but you have to consider the attacker&#8217;s vantage point. It still may be exploitable and is highly dependent on the security model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuhong Bao</title>
		<link>http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/comment-page-1/#comment-5503</link>
		<dc:creator><![CDATA[Yuhong Bao]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 07:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://rdist.root.org/?p=355#comment-5503</guid>
		<description><![CDATA[What about fast string ops?]]></description>
		<content:encoded><![CDATA[<p>What about fast string ops?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

