<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	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>deadhacker.com &#187; Cryptography</title>
	<atom:link href="http://deadhacker.com/category/cryptography/feed/" rel="self" type="application/rss+xml" />
	<link>http://deadhacker.com</link>
	<description>research repository of cyphunk://nathan.fain</description>
	<lastBuildDate>Sun, 07 Feb 2010 23:03:46 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='deadhacker.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/64b59878717e00c39f632d8307a5e59f?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>deadhacker.com &#187; Cryptography</title>
		<link>http://deadhacker.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://deadhacker.com/osd.xml" title="deadhacker.com" />
	<atom:link rel='hub' href='http://deadhacker.com/?pushpress=hub'/>
		<item>
		<title>Cryptology ePrint Archive RSS</title>
		<link>http://deadhacker.com/2006/02/28/cryptology-eprint-archive-rss/</link>
		<comments>http://deadhacker.com/2006/02/28/cryptology-eprint-archive-rss/#comments</comments>
		<pubDate>Tue, 28 Feb 2006 22:42:08 +0000</pubDate>
		<dc:creator>cyphunk</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://cyphunk.wordpress.com/2006/02/28/cryptology-eprint-archive-rss/</guid>
		<description><![CDATA[Update: Just use their RSS feeds. They have updated them to include full details rendering my own versions mute.
One of the resources I use to monitor for current cryptography papers is the Cryptology ePrint Archive, a routinely updated repository of all cryptography papers. Recently the Archive setup their own RSS feeds. Their feed provides a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=22&subd=cyphunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>Update: Just use <a href="http://eprint.iacr.org/rss/">their RSS feeds</a></em><em>. They have updated them to include full details rendering my own versions mute.</em></p></blockquote>
<p>One of the resources I use to monitor for current cryptography papers is the <a title="ePrint ArchiveCryptology ePrint Archive" href="http://eprint.iacr.org/" target="_blank">Cryptology ePrint Archive</a>, a routinely updated repository of all cryptography papers. Recently the Archive setup their own RSS feeds. Their feed provides a link to the article summaries. For me this isn&#8217;t enough and for a while I&#8217;ve had my own bot building an RSS feed listing the latest additions to the archive including their full summary inside the feed itself, not just a link to it. It was too buggy to link publicly so last night I fixed what should be the last of the problems to providing a stable feed.  I have a feed for just <a title="Cryptology ePrint Archive RSS feed" href="http://admin.cypherpoet.com/feeds/crypteprint_new.xml">newly published articles</a> and another for <a title="Cryptology ePrint Archive RSS feed" href="http://admin.cypherpoet.com/feeds/crypteprint_all.xml">all articles new or updated</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cyphunk.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cyphunk.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyphunk.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyphunk.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyphunk.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyphunk.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyphunk.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyphunk.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyphunk.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyphunk.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyphunk.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyphunk.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=22&subd=cyphunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://deadhacker.com/2006/02/28/cryptology-eprint-archive-rss/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cyphunk</media:title>
		</media:content>
	</item>
		<item>
		<title>Formal aspects of mobile code security &#8211; Chapter 5</title>
		<link>http://deadhacker.com/2006/02/22/formal-aspects-of-mobile-code-security-chapter-5/</link>
		<comments>http://deadhacker.com/2006/02/22/formal-aspects-of-mobile-code-security-chapter-5/#comments</comments>
		<pubDate>Wed, 22 Feb 2006 11:11:53 +0000</pubDate>
		<dc:creator>cyphunk</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://cyphunk.wordpress.com/2006/02/22/formal-aspects-of-mobile-code-security-chapter-5/</guid>
		<description><![CDATA[Formal aspects of mobile code security &#8211; Chapter 5
PhD thesis for Richard Drews Dean
23 page chapter.
Incomplete: Need to discuss how the author discovered attacks. Need to check my description using the detailed equations provided. I must illustrate the attack methods.
The interest in this thesis is due to its reference in Heard Hash Functions and many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=37&subd=cyphunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cyphunk.files.wordpress.com/2006/02/ddean-thesis.pdf">Formal aspects of mobile code security</a> &#8211; Chapter 5<br />
PhD thesis for Richard Drews Dean<br />
23 page chapter.</p>
<blockquote><p><em>Incomplete: Need to discuss how the author discovered attacks. Need to check my description using the detailed equations provided. I must illustrate the attack methods.</em></p></blockquote>
<p>The interest in this thesis is due to its reference in <a href="http://cyphunk.wordpress.com/2006/02/01/herding-hash-functions/">Heard Hash Functions</a> and many other papers relating to hash algorithms.  In Chapter 5 a <em>fixed point</em> attack against hash algorithms is discussed.  Methods are given for overcoming the appended message length specified in <a href="http://en.wikipedia.org/wiki/Hash_functions_based_on_block_ciphers">Merkle-Damgård</a> (<a href="http://cyphunk.files.wordpress.com/2006/02/Wikipedia%20Merkle-Damg%C3%A5rd%20construction.pdf">cache</a>) constructed hash functions.</p>
<p><strong>What is a Fixed Point Attack?</strong><br />
A Fixed Point Attack involves finding a random block whose properties allow the attacker to insert the block into the original message without changing the final hash.  As a result two different messages are created with the same hash (the original message and the original+the special block). To produce this special block first make note of all the <em>internal hash states</em> produced after each block is compressed (see: <a href="http://cyphunk.wordpress.com/2006/02/21/sha-1-illustrated/">SHA-1 Illustrated</a>).  Next generate random blocks (X<em>i</em>) until you find one that meets two properties:</p>
<ol>
<li>The hash state before compression of block X<em>i</em> is the same as the hash state returned after compression.</li>
<li>The hash state of X<em>i</em> equals one of the <em>internal hash states</em> of the original message.</li>
</ol>
<p>After finding such a block it can be inserted into the message directly after the message block whose <em>internal hash state</em> it matched.</p>
<p><strong>Overcoming Message Length<br />
</strong>MD5, MD4 and SHA use <a href="http://en.wikipedia.org/wiki/Hash_functions_based_on_block_ciphers">Merkle-Damgård construction</a> (<a href="http://cyphunk.files.wordpress.com/2006/02/Wikipedia%20Merkle-Damg%C3%A5rd%20construction.pdf">cache</a>) which specifies that the length of the entire message be appended to it.  Therefor, a simple Fixed Point Attack will not do because the message length will change when the special block is inserted.  This intern changes the hash of the last block thereby changing the final hash returned.  The paper gives 3 methods to overcome this.</p>
<p><strong>1. </strong>The length is a 64 bit integer so add the special block 2^64 times, in affect causing the number to loop.  This does not work on SHA because SHA does not cover messages greater than 2^64 bits.</p>
<p><strong>2. </strong>Look for any two <em>internal hash states</em> in the message that equal each other.  If you are lucky enough to have such a message you can delete all the blocks between the two and then expand the message  back to the original size using the Fixed Point Attack.</p>
<p><strong>3. </strong>Run a Fixed Point Attack and make note of the place in the original message where you can insert the special block.  Now, remember that the block compression function adds the resulting hash state to the previous hash state.  That means that compression is a function of the current block and the previous blocks hash state.  With that understood, we want to find another random block that means the following two requirements:</p>
<ul>
<li>The hash state before compression of block X<em>j</em> is set to the first hash state of the original message.</li>
<li>The resulting hash state of X<em>j</em> equals one of the <em>internal hash states</em> of the original message which is less than the hash state matched by the Fixed Point attack.</li>
</ul>
<p>You&#8217;ll notice that this block uses the same method as the Fixed Point only it initializes the incoming hash state to the compression function to be that of the first hash state of the message.</p>
<p>Now we can insert the X<em>j</em> into the message directly after the message block whose <em>internal hash state</em> it matched.  Since the compression of X<em>j </em>takes the first hash state of the message we delete all the blocks up until that point, effectively making X<em>j</em> the first block and reducing the size of the message.  Now the Fixed Point block X<em>i</em> can be inserted into the message directly after the message block whose <em>internal hash state</em> it matched and can be repeated to bring the message back to it&#8217;s original size.</p>
<p>This chapter also discusses how the attack was found as well as possible solutions. which I still need to cover.</p>
<p><strong>References</strong><br />
References I must find:</p>
<ul>
<li>[PvO95] Bart Preneel and Paul C. van Oorschot. MDx-MAC and building fast MACs from hash functions. In Don Coppersmith, editor, Proc. CRYPTO 95, pages 1–14. Springer, 1995. Lecture Notes in Computer Science No. 963.</li>
</ul>
<p>To find the attacks the author used Binary Decision Diagrams to look at the logical structure of MD5,MD5,SHA-1. References I must find:</p>
<ul>
<li>[Bry92] Randal E. Bryant. Symbolic boolean manipulation with ordered binary decision diagrams. ACM Computing Surveys, 24(3):293–318, September 1992.</li>
<li>[Hu97] Alan J. Hu. Formal hardware verification with BDDs: An introduction. In IEEE Pacific Rim Conference on Communications, Computers, and Signal Processing, pages 677–682, 1997.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cyphunk.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cyphunk.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyphunk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyphunk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyphunk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyphunk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyphunk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyphunk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyphunk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyphunk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyphunk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyphunk.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=37&subd=cyphunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://deadhacker.com/2006/02/22/formal-aspects-of-mobile-code-security-chapter-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cyphunk</media:title>
		</media:content>
	</item>
		<item>
		<title>SHA-1 Illustrated</title>
		<link>http://deadhacker.com/2006/02/21/sha-1-illustrated/</link>
		<comments>http://deadhacker.com/2006/02/21/sha-1-illustrated/#comments</comments>
		<pubDate>Tue, 21 Feb 2006 14:29:56 +0000</pubDate>
		<dc:creator>cyphunk</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://cyphunk.wordpress.com/2006/02/21/sha-1-illustrated/</guid>
		<description><![CDATA[ By Nathan Fain
Incomplete: must create detailed diagram for compression functions.

The following simplifies the specification of SHA-1 in an easy to digest form. First we will cover the general structure of the algorithm. Detail of the expansion and compression routines are covered separately.
First we start with a message. The message is padded and the length [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=50&subd=cyphunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a rel="license" href="http://creativecommons.org/licenses/publicdomain/"> </a>By Nathan Fain</p>
<blockquote><p><em>Incomplete: must create detailed diagram for compression functions.<br />
</em></p></blockquote>
<p>The following simplifies the specification of SHA-1 in an easy to digest form. First we will cover the general structure of the algorithm. Detail of the expansion and compression routines are covered separately.</p>
<p><img align="right" alt="message" src="http://cyphunk.files.wordpress.com/2006/02/message.png?w=600" />First we start with a message. The message is padded and the length of the message is added to the end. It is then split into blocks of 512 bits (Figure 2).</p>
<p><img alt="message blocks" src="http://cyphunk.files.wordpress.com/2006/02/message_blocks.png?w=600" /><br />
(Figure 2)</p>
<p>The blocks are then processed one at a time.  Each block must be expanded and compressed.  The value after each compression is added to a 160bit buffer called the current <em>hash state</em>.  After the last block is processed the current hash state is returned as the final hash.  A overview of this procedure can be seen in Figure 3.</p>
<p><img alt="sha-1 general process overview" src="http://cyphunk.files.wordpress.com/2006/02/overview.png?w=600" /><br />
(Figure 3)</p>
<p>Let&#8217;s look more closely at the expansion and compression functions.  For expansion each 512 bit message block is separated into chunks of 32 bits. As you can see in Figure 3 these 16 chunks are then used to create 64 more chunks for a total of 80. Details of how this is done are described later.</p>
<p><img alt="expand block to 80 32 bit chunks" src="http://cyphunk.files.wordpress.com/2006/02/block_expland.png?w=600" /><br />
(Figure 4)</p>
<p>Now all 80 of these chunks are compressed into a 160 bit value which is <strong>added</strong> to the <em>current hash state</em> (Figure 5):</p>
<p><img alt="compress block into hash state" src="http://cyphunk.files.wordpress.com/2006/02/compress_chunks.png?w=600" /><br />
(Figure 5)</p>
<p>Figure 5 shows one block being processed.  The expansion and compression functions are repeated for each block with the return constantly being added to the <em>current hash state</em> buffer.   <img align="right" alt="return hash state as hash" src="http://cyphunk.files.wordpress.com/2006/02/return_hash.png?w=600" /> Once all blocks have been processed it is this value that is returned as the hash of the message.</p>
<p>3 tasks were generalized above: How the message is prepared before processing, how exactly the block is expanded to 80 chunks (Figure 4) and how those chunks are compressed (Figure 5).  It is not essential to understand them in detail but should you desire, here are the details.</p>
<p><strong>Message Preparation</strong></p>
<p>The message is prepared in 4 steps:</p>
<ol>
<li>Append a single binary 1 bit to the message</li>
<li>Split into blocks of 512 bits each (Figure 2 above)</li>
<li>The last block must be equal to 448 so that we can append the message length (next step).  If it is under pad with binary 0 bits until equal to 448.  If over, pad until it is 512 bits and create an additional block of 448 binary 0 bits.</li>
<li>Append the length of the original message to the last block.  Represent this length as a 64 bit integer (making the last block equal to 512 bits).</li>
</ol>
<p>I should also mention that before we process any blocks we must initiate the <em>hash state</em> buffer.  The buffer is actually 5 separate 32 bit integers:</p>
<ul>
<li><tt>h0 = 67452301</tt></li>
<li><tt>h1 = EFCDAB89</tt></li>
<li><tt>h2 = 98BADCFE</tt></li>
<li><tt>h3 = 10325476</tt></li>
<li><tt>h4 = C3D2E1F0</tt></li>
</ul>
<p><strong>Block expansion</strong><br />
<img align="right" alt="Animation of block expansion" src="http://cyphunk.files.wordpress.com/2006/02/expand_anim.gif?w=600" />Each 512 bit block is split further into 32 bit chunks (&#8220;<em>words</em>&#8220;) as seen in Figure 4.  These 16 chunks are then expanded to a total of 80.  The processes of expansion is a simple XOR of 4 values.  For instance, the next chunk, chunk 17, is created by XOR&#8217;ing together chunk 17-3,  17-8, 17-14 and 17-16.  For chunk 18 run the same processes but subtracting from 18 instead of 17.  This continues until all 80 have been created.  This can clearly be seen in the animation to the right. (If the animation is not playing reload the page.)</p>
<p><strong>Block compression</strong></p>
<p><!--Creative Commons License--> <a rel="license" href="http://creativecommons.org/licenses/publicdomain/"> <img border="0" align="left" alt="Creative Commons License" src="http://cyphunk.files.wordpress.com/2006/02/norights.gif?w=600" /></a>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/publicdomain/">Creative Commons Public Domain License</a> and may be used however you wish.  For sources to Dia based diagrams, contact me.<!--/Creative Commons License--></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cyphunk.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cyphunk.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyphunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyphunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyphunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyphunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyphunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyphunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyphunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyphunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyphunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyphunk.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=50&subd=cyphunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://deadhacker.com/2006/02/21/sha-1-illustrated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cyphunk</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/message.png" medium="image">
			<media:title type="html">message</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/message_blocks.png" medium="image">
			<media:title type="html">message blocks</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/overview.png" medium="image">
			<media:title type="html">sha-1 general process overview</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/block_expland.png" medium="image">
			<media:title type="html">expand block to 80 32 bit chunks</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/compress_chunks.png" medium="image">
			<media:title type="html">compress block into hash state</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/return_hash.png" medium="image">
			<media:title type="html">return hash state as hash</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/expand_anim.gif" medium="image">
			<media:title type="html">Animation of block expansion</media:title>
		</media:content>

		<media:content url="http://cyphunk.files.wordpress.com/2006/02/norights.gif" medium="image">
			<media:title type="html">Creative Commons License</media:title>
		</media:content>
	</item>
		<item>
		<title>An Illustrated Guide to Cryptographic Hashes Intro.</title>
		<link>http://deadhacker.com/2006/02/06/an-illustrated-guide-to-cryptographic-hashes-intro/</link>
		<comments>http://deadhacker.com/2006/02/06/an-illustrated-guide-to-cryptographic-hashes-intro/#comments</comments>
		<pubDate>Mon, 06 Feb 2006 20:39:59 +0000</pubDate>
		<dc:creator>cyphunk</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://cyphunk.wordpress.com/2006/02/06/an-illustrated-guide-to-cryptographic-hashes-intro/</guid>
		<description><![CDATA[An Illustrated Guide to Cryptographic Hashes
by Steve Friedl
15 pages of text
Update 2006.02.11: clearer explanation of CTFP preimage resistance.
This is a very good introduction to what a hash algorithm is, what it is for and what collisions are all about. It does not cover specific details, only the general understanding. It&#8217;s a quick read so I&#8217;ll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=34&subd=cyphunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cyphunk.files.wordpress.com/2006/02/An%20Illustrated%20Guide%20to%20Cryptographic%20Hashes.pdf">An Illustrated Guide to Cryptographic Hashes</a><br />
by Steve Friedl<br />
15 pages of text</p>
<blockquote><p><em>Update 2006.02.11: clearer explanation of CTFP preimage resistance.</em></p></blockquote>
<p>This is a very good introduction to what a hash algorithm is, what it is for and what collisions are all about. It does not cover specific details, only the general understanding. It&#8217;s a quick read so I&#8217;ll forgo summarizing the contents.</p>
<p>The article explains the common terms used in most papers that discuss collisions. These terms are used to classify the type of collision attacks possible and are necessary to understand when reading other papers:</p>
<ul>
<li><strong>Collision resistance</strong> measures how difficult it is to create two inputs which produce any hash value which is the same for both inputs. In this scenario the attacker can control both inputs.</li>
<li><strong>Preimage resistance</strong> measures how difficult it is to create one input which matches the hash value of an unknown input. Here the attacker does not know the other input and is restricted by needing to create a specific hash value.</li>
<li><strong>Second preimage resistance</strong> measures how difficult it is to create one input which matches the hash value of a known input. Here the attacker can see both inputs but only controls one. Attacker is still restricted by having to create an input which matches the specific hash value of the other. However, knowing the input that produced the hash might be of assistance.</li>
</ul>
<p>Both preimage and second preimage are similar in that the objective is to get one input to match a predefined hash which is not controlled by the attacker. Also, in the <a title="Herding Hash Functions" href="/2006/02/01/herding-hash-functions/">Herding Hash Functions</a> by John Kelsey and Tadayoshi Kohno they that there is a 4rth resistance value:</p>
<ul>
<li><strong>Chosen Target Forced Prefix preimage resistance</strong> measures how difficult it is to create a collision when the first input is known while the second input is not know yet.   This is similar to preimage resistance except that here the attacker controls the first input and not the second.  Well, almost.  The attacker is permitted to append data to the second input.  The attacker must determine the hash first using the first input and then &#8220;herd&#8221; the second input to the same hash.  Herding is done by adding data to the second input to make it collide.  Is a process that involves carefully predetermining the first input and using internal states from its hash generation in the appended data to the second.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cyphunk.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cyphunk.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyphunk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyphunk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyphunk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyphunk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyphunk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyphunk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyphunk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyphunk.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyphunk.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyphunk.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=34&subd=cyphunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://deadhacker.com/2006/02/06/an-illustrated-guide-to-cryptographic-hashes-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cyphunk</media:title>
		</media:content>
	</item>
		<item>
		<title>Herding Hash Functions</title>
		<link>http://deadhacker.com/2006/02/01/herding-hash-functions/</link>
		<comments>http://deadhacker.com/2006/02/01/herding-hash-functions/#comments</comments>
		<pubDate>Wed, 01 Feb 2006 23:07:31 +0000</pubDate>
		<dc:creator>cyphunk</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://cyphunk.wordpress.com/2006/02/01/herding-hash-functions/</guid>
		<description><![CDATA[Herding Hash Functions and the Nostradamus Attack (presentation slides)
by John Kelsey and Tadayoshi Kohno
8 pages of text
The paper describes an attack that would allow an attacker to massage (&#8220;herd&#8221;) an object to a point where it matches a hash value chosen by the attacker prior. What appears to be an important restriction is that the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=8&subd=cyphunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cyphunk.files.wordpress.com/2006/02/HerdingHash_paper.pdf">Herding Hash Functions and the Nostradamus Attack</a> (<a href="http://cyphunk.files.wordpress.com/2006/02/HerdingHash_slides_and_paper.pdf">presentation slides</a>)<br />
by John Kelsey and Tadayoshi Kohno<br />
8 pages of text</p>
<p>The paper describes an attack that would allow an attacker to massage (&#8220;herd&#8221;) an object to a point where it matches a hash value chosen by the attacker prior. What appears to be an important restriction is that the hash value has to be defined by the attacker prior to attack. This is important because in most uses of hash algorithms the victim would be the one defining the hash, not the attacker. Hence, this attack will not help you construct a message that matches a password hash.</p>
<p><strong>The steps</strong> required for the attack are:</p>
<ul />
<ol>
<li>Attacker runs a collision finding attack on a hash algorithm and creates an array of <em>intermediate hash states</em>. In the paper this array is referred to as the &#8220;diamond structure&#8221;. It is not clear to me how the size of this structure is determined but half of the <em>intermediate hash states</em> in this structure can be used in creating message blocks (next step) to be imposed on the victim object in order to allow the attacker to edit that object and still produce the same hash as the original.</li>
<li>After having the diamond structure made the attacker then runs an exhaustive search for a string which collides with one of the intermediate hash states in the structure. Once found the attacker can &#8220;construct a sequence of message blocks&#8221; in order to build the proper suffix which will be added to the original object and the attackers edited version.</li>
</ol>
<p><strong>Questions </strong>I have concerning the above process are:</p>
<ul>
<li>After finding a collision how does one build the <em>intermediate hash states</em>. For this I will need to read up more on current collision finding methods: <a target="_blank" href="http://www.springerlink.com/index/DWWVMQJU0N0A3UGJ.pdf">Multicollisions in iterated has functions</a> by Antoine Joux (need to find), <a href="http://cyphunk.files.wordpress.com/2006/02/ddean-thesis.pdf">Formal aspects of mobile code security</a> by Richard Drews Dean (attached). Learning more about hash states in a few hash algorithms should also help.</li>
<li>How is the size of the diamond structure determined?</li>
<li>What is the relation of the message blocks (used to create the final suffix added to the two different objects that collide) and the intermediate hash states?</li>
<li>Finally, how does the attacker determine which message blocks are to be used with the suffix, and what is the function for creating the suffix.</li>
</ul>
<p>Perhaps some of the above questions can be answered with another read, if I can find the time. Also would like to find is &#8220;How to Swindle Rabin&#8221; by Gideon Yuval.</p>
<p>One example application mentioned is abusing trust in a manner similar to <a target="_blank" href="http://en.wikipedia.org/wiki/Social_engineering">social engineering</a>. A malicious programmer writing a piece of code for a project which manages the code trust based on hash values. The attacker first runs a computation for building a diamond like structure/list of hash values that are optimum for collision. They then write some legitimate unsuspecting code which hashes to one of the chosen values. An auditor reviews the code and enters it into the code repository. The attacker can now edit that code and add a small back door.</p>
<p>All in all this paper reminds me in some way of Dan Kaminsky&#8217;s exploit of the MD5 collision examples which he describes in his paper <a href="http://cyphunk.files.wordpress.com/2006/02/md5_someday.pdf">MD5 To Be Considered Harmful Someday</a> (attached). He constructed files that included the example collision messages within and continued to produce MD5 collisions. The difference with the Hash herding described here is that the message used can look coherent and unsuspecting. The method differs from Dan&#8217;s in that hash herding uses the internal messages produced at different stages of the hash algorithm to give the attack the flexibility required to have greater control on the message.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cyphunk.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cyphunk.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyphunk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyphunk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyphunk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyphunk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyphunk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyphunk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyphunk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyphunk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyphunk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyphunk.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deadhacker.com&blog=31698&post=8&subd=cyphunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://deadhacker.com/2006/02/01/herding-hash-functions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">cyphunk</media:title>
		</media:content>
	</item>
	</channel>
</rss>