<?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>A Stich in Time</title>
	<atom:link href="http://stichintime.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stichintime.wordpress.com</link>
	<description>or, A stich in the mud</description>
	<lastBuildDate>Fri, 04 Sep 2009 01:23:10 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='stichintime.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/7182dfe512095a7d2bcf5438881b8424?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>A Stich in Time</title>
		<link>http://stichintime.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stichintime.wordpress.com/osd.xml" title="A Stich in Time" />
		<item>
		<title>Secret Thoughts &#8211; Website Passwords</title>
		<link>http://stichintime.wordpress.com/2009/09/04/secret-thoughts-website-passwords/</link>
		<comments>http://stichintime.wordpress.com/2009/09/04/secret-thoughts-website-passwords/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 01:23:10 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=157</guid>
		<description><![CDATA[Chance are, you use the same password for the different systems.  If you are lucky, perhaps they are all integrated and you only need to update your password in one place.  But what about all those web sites you log into?  It is really important not to use the same password across multiple sites! Especially [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=157&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Chance are, you use the same password for the different systems.  If you are lucky, perhaps they are all integrated and you only need to update your password in one place.  But what about all those web sites you log into?  It is <em>really</em> important not to use the same password across multiple sites! Especially since you probably don&#8217;t change all those web passwords regularly (ever).  Need convincing?  Here are four reasons why you should use a unique password on <em>every</em> website:</p>
<ol>
<li>Don&#8217;t assume that the password is stored securely.  When one website is hacked, the hackers get your username &amp; password for only that one site.</li>
<li>When one of those websites is bought by a company you don&#8217;t trust, same thing.</li>
<li>When one of those websites goes bankrupt and the computers are auctioned off without being reformatted&#8230;</li>
<li>When you decide to stop using one of the websites, they still have your data&#8230;</li>
</ol>
<p><a href="http://www.lifehacker.com" target="_blank">Lifehacker&#8217;s</a> Gina Trapani published one of the <a title="Lifehacker - great passwords" href="http://lifehacker.com/software/passwords/geek-to-live--choose-and-remember-great-passwords-184773.php" target="_blank">best articles I&#8217;ve seen</a> about how to create unique passwords for each website. In short, she recommends creating a base phrase that you use for all websites, and adding a part of the website&#8217;s URL to it.  For example, as a Beatles fan, I might use John Lennon&#8217;s initials, birth year, and the first 3 letters of the website.  For StichInTime, that would be <em>JWL40sti. </em>Read the article.  It is worth it.</p>
<p><em><br />
</em></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=157&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/09/04/secret-thoughts-website-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Secret Thoughts &#8211; More Numbers &amp; Special Characters</title>
		<link>http://stichintime.wordpress.com/2009/08/28/secret-thoughts-more-numbers-special-characters/</link>
		<comments>http://stichintime.wordpress.com/2009/08/28/secret-thoughts-more-numbers-special-characters/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 01:12:48 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=153</guid>
		<description><![CDATA[Two weeks ago, I offered a way to create passwords using phrases from a book near your desk. I gave an example from Programming Perl, &#8220;Perl is a language for getting your job done,&#8221; which yielded the password PialfgyjdI. In the last post, I discussed using substitutions to get numbers and symbols and came up [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=153&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Two weeks ago, I offered a way to create passwords using phrases from a book near your desk. I gave an example from <span style="text-decoration:underline;">Programming Perl</span>, &#8220;Perl is a language for getting your job done,&#8221; which yielded the password <em>PialfgyjdI</em>. In the last post, I discussed using substitutions to get numbers and symbols and came up with the password <em>P!@7f9yjd</em>.</p>
<p>Another way to get numbers is to follow (or precede) each letter with the number of letters in that word.  In my perl example, I would get <em>P4i2a1l8f3g7y4j3d4</em>.  This helps get a nice long password, but it is a pain, especially for words longer than 4 or 5 letters.  To simplify things a bit, you might only do the first and last words: <em>P4ialfgyjd4</em>.</p>
<p>For special characters, you can replace the number with whatever the character is when you use SHIFT plus the number.  So, you might change the simplification above to use the number for the first word and the character for the last word.  That would give you P4ialfgyjd$.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=153&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/08/28/secret-thoughts-more-numbers-special-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Secret Thoughts &#8211; Adding Numbers and Symbols</title>
		<link>http://stichintime.wordpress.com/2009/08/21/secret-thoughts-adding-numbers-and-symbols/</link>
		<comments>http://stichintime.wordpress.com/2009/08/21/secret-thoughts-adding-numbers-and-symbols/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 01:33:50 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=151</guid>
		<description><![CDATA[In the last post, we came up with a password based on the first sentence of a book.  I gave the example of &#8220;Perl is a language for getting your job done&#8221;: Pialfgyjd. It is a pretty good password, but many times you&#8217;re required to include at least one number in your password, so lets [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=151&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In the last post, we came up with a password based on the first sentence of a book.  I gave the example of &#8220;Perl is a language for getting your job done&#8221;: <em>Pialfgyjd</em>. It is a pretty good password, but many times you&#8217;re required to include at least one number in your password, so lets look at some ways to do this.</p>
<p>One of the most common ways to put numbers in passwords is to have a standard set of replacements that you use.  Whenever you would enter a certain letter, you enter a number that looks a little like that letter instead.  For example, you might choose to replace all the following letters with these numbers: A=4, E=3, I=1, o=0. Some people even add in B=8, g=9, L=7, or s=5.</p>
<p>If the system allows for special characters, you might use the following: a=@, i=!, s=$, u=^.</p>
<p>In such a scheme, the &#8220;Perl is a language for getting your job done&#8221; example might become <em>P!@7f9yjd</em></p>
<p>This is a pretty good way to strengthen your passwords, but there are some gotchas to think about:</p>
<ul>
<li>A lot of the substitutions are really common &#8211; so much so that many passwords can be guessed.  For example, b00kst0r3 would be an obvious guess for a bookstore application.</li>
<li>You need to remember your substitutions.  Did you use ! or 1 for i?  This is fine once you&#8217;ve been doing it for  a while and know your system, but you&#8217;re likely to have a lot of inconsistencies before you have your system nailed.</li>
<li>Your password may not have any of the letters that you decided to use. Then what do you do?  You end up creating a new mapping, and now you have multiple inconsistent systems.</li>
</ul>
<p>We&#8217;ll look at another way to add numbers in the next post.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=151&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/08/21/secret-thoughts-adding-numbers-and-symbols/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Secret Thoughts &#8211; Phrase from a book</title>
		<link>http://stichintime.wordpress.com/2009/08/17/secret-thoughts-phrase-from-a-book/</link>
		<comments>http://stichintime.wordpress.com/2009/08/17/secret-thoughts-phrase-from-a-book/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 06:24:02 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=148</guid>
		<description><![CDATA[Chances are you have a bookshelf near your computer. Pick a book, open it up, and look at the first sentence.  For example, the first sentence of the preface to Programming Perl (&#8220;the Camel book&#8221;) by Wall, Christiansen, &#38; Schwartz is &#8220;Perl is a language for getting your job done.&#8221;  Take the first letter of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=148&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Chances are you have a bookshelf near your computer. Pick a book, open it up, and look at the first sentence.  For example, the first sentence of the preface to <span style="text-decoration:underline;">Programming Perl</span> (&#8220;the Camel book&#8221;) by Wall, Christiansen, &amp; Schwartz is &#8220;Perl is a language for getting your job done.&#8221;  Take the first letter of each word, and you get a pretty strong password: <em>Pialfgyjd</em>.</p>
<p>If you pick a book that you use a lot, or like the contents, chances are you will find it fairly easy to remember your phrase.  When it comes time to change your password, just go to the next chapter.  One nice aspect to this approach is it is easy to find an old passphrase if you need to.</p>
<p>We&#8217;ll improve the password a bit in the next post by adding some numbers.</p>
<p>Try not to be too obvious.  If you&#8217;re a Dickens fan, you might not want to pick <em>Iwtbot</em>&#8230; On the other hand, anything but that first line would probably be great.</p>
<p>For fun, match the author to the first line.  I&#8217;ll give the answers in a future post.</p>
<pre>Melville        WiJG
John            Imyamvy
Coleridge       Iiatua
Rand            Mdt
Austin          ItbwtW
Camus           IiaaMAhsoot
Fitzgerald      Thhtbaeoadcg
Locke           CmI
Adams           Foitub</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=148&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/08/17/secret-thoughts-phrase-from-a-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Secret Thoughts &#8211; Perspectives on Passwords</title>
		<link>http://stichintime.wordpress.com/2009/08/17/secret-thoughts-perspectives-on-passwords/</link>
		<comments>http://stichintime.wordpress.com/2009/08/17/secret-thoughts-perspectives-on-passwords/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 05:23:07 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=144</guid>
		<description><![CDATA[We all have to deal with passwords.  A necessary evil of computing. We need to make them hard enough that they can&#8217;t easily be guessed (either by someone who knows us or through dictionary attacks), but we need to be able to remember them. We also should change them regularly (and maybe we even do, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=144&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We all have to deal with passwords.  A necessary evil of computing. We need to make them hard enough that they can&#8217;t easily be guessed (either by someone who knows us or through dictionary attacks), but we need to be able to remember them. We also <em>should</em> change them regularly (and maybe we even do, if forced to), and we <em>should</em> use different passwords for different places, especially for different websites.  And, if we&#8217;re talking websites, we might want to log on to them from different places &#8211; so those sticky notes under the keyboard might not be available. (Please tell me you don&#8217;t do that.)</p>
<p>So how do we handle this and keep our sanity?  This series of articles will look at some ways to do that.  I don&#8217;t recommend following any single idea exactly as suggested. Instead, I hope you find the ideas help you come up with your own system that is unique to you &#8211; and simple enough to use regularly.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=144&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/08/17/secret-thoughts-perspectives-on-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Part 6 &#8211; Addendum</title>
		<link>http://stichintime.wordpress.com/2009/04/12/part-6-addendum/</link>
		<comments>http://stichintime.wordpress.com/2009/04/12/part-6-addendum/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 01:06:13 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Rainbow Tables]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=141</guid>
		<description><![CDATA[I&#8217;ll update this more later (or just replace it), but wanted to comment on the fact that there is an important difference between my sample rainbow tables and those in the Wikipedia article.  in my rainbow tables, the leftmost column is plaintext, and the rightmost is a hash.  In the wikipedia article, the rightmost column [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=141&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ll update this more later (or just replace it), but wanted to comment on the fact that there is an important difference between my sample rainbow tables and those in the Wikipedia article.  in my rainbow tables, the leftmost column is plaintext, and the rightmost is a hash.  In the wikipedia article, the rightmost column is also plaintext.  It is the same table, but they do one extra reduction (R3) to get the plaintext.  This means that you can&#8217;t look up your hashed value in the table &#8211; the first thing you MUST do is run your last reduction, and then look up the resultant plaintext.  Why would you do this?</p>
<p>Space.</p>
<p>In my example (and the wikipedia example), the plaintext and hashes are similar sizes (and small).  In reality, if you&#8217;re dealing with MD5 or SHA-1 hashes, your plaintext values are going to be MUCH shorter!  So, you can save a lot of space by doing one more reduction, and using the reduced values instead.  Of course, you increase the risk of collisions (and run extra calculations), but that is the price of admission.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=141&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/04/12/part-6-addendum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Rainbow Tables &#8211; Part 5 (Chains and Rainbow Tables)</title>
		<link>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/</link>
		<comments>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 02:00:02 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Rainbow Tables]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=52</guid>
		<description><![CDATA[This is Part 5 of a five part series:

Introduction
Encryption and Hashes
Simple Hashes and Collisions
Reduction Functions
Rainbow Tables and Chains (you are here)

So &#8211; here we go!  Let&#8217;s look at rainbow tables!
Here is a sample lookup table for a very simplistic encryption algorithm (discussed in Part 2) that takes a number from 0 to 99 and hashes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=52&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is Part 5 of a five part series:</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a> (you are here)</li>
</ol>
<p>So &#8211; here we go!  Let&#8217;s look at rainbow tables!</p>
<p>Here is a sample lookup table for a very simplistic encryption algorithm (discussed in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Part 2</a>) that takes a number from 0 to 99 and hashes it into a 4 digit number:</p>
<table style="border-collapse:collapse;text-align:right;height:102px;" border="0" cellspacing="0" cellpadding="0" width="140">
<col style="width:57pt;" width="76"></col>
<col style="width:48pt;" width="64"></col>
<tbody>
<tr style="height:12.75pt;">
<td class="xl25" style="height:12.75pt;width:57pt;" width="76" height="17"><span style="text-decoration:underline;"><strong> p1</strong></span></td>
<td class="xl25" style="width:48pt;" width="64"><strong> <span style="text-decoration:underline;">h3</span></strong></td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">3</td>
<td class="xl24" align="right">3708</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">10</td>
<td class="xl24" align="right">5850</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">25</td>
<td class="xl24" align="right">4202</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">68</td>
<td class="xl24" align="right">5520</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">89</td>
<td class="xl24" align="right">5109</td>
</tr>
</tbody>
</table>
<p>It looks like a plain old lookup table with plaintext in the left column, and the hashed value in the right column.  But, that isn&#8217;t the case.  In fact, with the encryption algorithm we&#8217;re using for the example, the hashed value for 3 is 3955.  So what are we looking at?</p>
<p>As we discussed in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Part 1</a>, a basic lookup table would simply list every possible password (plaintext) and its corresponding encrypted value (hash).  If you know the encrypted value, you just look it up and see what the password is.  The problem with an ordinary lookup table is that it can quickly get huge.  A rainbow table provides a way to make it dramatically smaller.  A rainbow table does this through the use of <em>chains</em> and <em>reduction functions.</em></p>
<p>The beauty of a rainbow table is that you don&#8217;t store the whole table. Instead, you store the left-most column and the right-most column, and you calculate the values in between as needed.  The table we saw above contains those two columns (leftmost and rightmost) from this rainbow table:</p>
<table style="border-collapse:collapse;width:338pt;" border="0" cellspacing="0" cellpadding="2" width="450">
<col style="width:57pt;" width="76"></col>
<col style="width:48pt;" width="64"></col>
<col style="width:68pt;" width="90"></col>
<col style="width:50pt;" width="67"></col>
<col style="width:67pt;" width="89"></col>
<col style="width:48pt;" width="64"></col>
<tbody>
<tr style="height:12.75pt;text-align:right;">
<td class="xl25" style="height:12.75pt;width:57pt;" width="76" height="17"><span style="text-decoration:underline;"><strong>p1</strong></span></td>
<td class="xl24" style="width:48pt;" width="64"><span style="text-decoration:underline;"><strong> h1=H(p1)</strong></span></td>
<td class="xl24" style="width:68pt;" width="90"><span style="text-decoration:underline;"><strong>p2=R1(h1)<br />
</strong></span></td>
<td class="xl24" style="width:50pt;" width="67"><span style="text-decoration:underline;"><strong> h2=H(p2)</strong></span></td>
<td class="xl24" style="width:67pt;" width="89"><span style="text-decoration:underline;"><strong>p3=R2(h2)<br />
</strong></span></td>
<td class="xl25" style="width:48pt;" width="64"><span style="text-decoration:underline;"><strong> h3=H(p3)</strong></span></td>
</tr>
<tr style="height:12.75pt;">
<td class="xl26" style="height:12.75pt;" height="17" align="right">3</td>
<td class="xl27" align="right">3955</td>
<td align="right">55</td>
<td class="xl27" align="right">4532</td>
<td align="right">45</td>
<td class="xl28" align="right">3708</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl26" style="height:12.75pt;" height="17" align="right">10</td>
<td class="xl27" align="right">0823</td>
<td align="right">23</td>
<td class="xl27" align="right">5603</td>
<td align="right">56</td>
<td class="xl28" align="right">5850</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl26" style="height:12.75pt;" height="17" align="right">25</td>
<td class="xl27" align="right">2059</td>
<td align="right">59</td>
<td class="xl27" align="right">3626</td>
<td align="right">36</td>
<td class="xl28" align="right">4202</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl26" style="height:12.75pt;" height="17" align="right">68</td>
<td class="xl27" align="right">3131</td>
<td align="right">31</td>
<td class="xl27" align="right">3790</td>
<td align="right">37</td>
<td class="xl28" align="right">5520</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl26" style="height:12.75pt;" height="17" align="right">91</td>
<td class="xl27" align="right">2554</td>
<td align="right">54</td>
<td class="xl27" align="right">3213</td>
<td align="right">32</td>
<td class="xl28" align="right">5109</td>
</tr>
</tbody>
</table>
<p>Because we&#8217;ve used 10 entries to represent the 30 entries in table above, we&#8217;ve reduced the space by 66%!  Of course, there is a cost &#8211; we have more calculations to do. It is a tradeoff between size and speed.   We&#8217;ll look into that later; for now, lets just see how the rainbow table works by considering some examples.</p>
<p>Let&#8217;s say you have an encrypted value of 5520 that you want to decrypt.  Let&#8217;s look it up in our table.  Remember, we&#8217;ve only stored the lookup table, not the full rainbow table, so that is where we need to look:</p>
<table style="border-collapse:collapse;text-align:right;height:102px;" border="0" cellspacing="0" cellpadding="0" width="140">
<col style="width:57pt;" width="76"></col>
<col style="width:48pt;" width="64"></col>
<tbody>
<tr style="height:12.75pt;">
<td class="xl25" style="height:12.75pt;width:57pt;" width="76" height="17"><span style="text-decoration:underline;"><strong> p1</strong></span></td>
<td class="xl25" style="width:48pt;" width="64"><strong> <span style="text-decoration:underline;">h3</span></strong></td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">3</td>
<td class="xl24" align="right">3708</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">10</td>
<td class="xl24" align="right">5850</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">25</td>
<td class="xl24" align="right">4202</td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right"><span style="color:#ff0000;">68</span></td>
<td class="xl24" align="right"><span style="color:#ff0000;">5520</span></td>
</tr>
<tr style="height:12.75pt;">
<td class="xl24" style="height:12.75pt;" height="17" align="right">89</td>
<td class="xl24" align="right">5109</td>
</tr>
</tbody>
</table>
<p>Yay!  We have a match!  If this were a simple lookup table, we would be done.  But it isn&#8217;t!  This lookup table represents the rainbow table above.  Because we&#8217;ve saved space, we have some calculations to do.  Time to pay the piper&#8230;  (This is where it gets interesting.)</p>
<p>Right now, all we know is that we have a hashed value of 5520, which is the right-most value in the chain that begins with 68:</p>
<table style="border-collapse:collapse;width:338pt;" border="0" cellspacing="0" cellpadding="0" width="450">
<col style="width:57pt;" width="76"></col>
<col style="width:48pt;" width="64"></col>
<col style="width:68pt;" width="90"></col>
<col style="width:50pt;" width="67"></col>
<col style="width:67pt;" width="89"></col>
<col style="width:48pt;" width="64"></col>
<tbody>
<tr style="height:12.75pt;text-align:right;">
<td class="xl25" style="height:12.75pt;width:57pt;" width="76" height="17"><span style="text-decoration:underline;"><strong>p1</strong></span></td>
<td class="xl24" style="width:48pt;" width="64"><span style="text-decoration:underline;"><strong>h1=H(p1)</strong></span></td>
<td class="xl24" style="width:68pt;" width="90"><span style="text-decoration:underline;"><strong>p2=R1(h1)</strong></span></td>
<td class="xl24" style="width:50pt;" width="67"><span style="text-decoration:underline;"><strong>h2=H(p2)</strong></span></td>
<td class="xl24" style="width:67pt;" width="89"><span style="text-decoration:underline;"><strong>p3=R2(h2)</strong></span></td>
<td class="xl25" style="width:48pt;" width="64"><span style="text-decoration:underline;"><strong>h3=H(p3)</strong></span></td>
</tr>
<tr style="height:12.75pt;">
<td class="xl26" style="height:12.75pt;" height="17" align="right"><span style="color:#ff0000;">68</span></td>
<td class="xl27" align="right">3131</td>
<td align="right">31</td>
<td class="xl27" align="right">3790</td>
<td align="right">37</td>
<td class="xl28" align="right"><span style="color:#ff0000;">5520</span></td>
</tr>
</tbody>
</table>
<p>So, we take 68 and hash it to get 3131.  With hashes, we can always hash a plaintext value, to get its resulting hashed value, but we cannot go backwards (see Part 3). We can&#8217;t take a hashed value and get its plaintext value. (That&#8217;s what rainbow tables are for!)   Great &#8211; so we have 3131.  Now what do we do?</p>
<p>Here we meet the really clever part of rainbow tables.  Rainbow tables use something called reduction functions to &#8220;reduce&#8221; the hashed value (4 digits in our case) to a valid plaintext value (2 digits for us).  Reduction functions are really important, and are discussed in more detail in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Part 4</a>.  For now, let&#8217;s just learn enough about them to be able to walk through our examples.  A few important points:</p>
<ul>
<li>A reduction function is NOT an inverse of a hash function. Hash functions don&#8217;t have an inverse.</li>
<li>But, a reduction function DOES consistently map a hashed value to <em>some </em>plaintext value.  But the plaintext value is meaningless. (Meaningless, but helpful for the rainbow table!)</li>
<li>For any given valid hash value (eg, 3131), the reduction function MUST generate a valid plaintext value.</li>
<li>Just like hashes have collisions, so do reduction functions. Because of this, rainbow tables use multiple reduction functions.  (More about this in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Part 4</a>.)</li>
</ul>
<p>So, for our example, we apply our reduction function, R1, to the value we got from encrypting 68.  R1(3131) = 31.  Next, we hash 31:  H(31)=3790.  We pause, check if that is the value we started with (5520), notice that it is not, and repeat the steps.</p>
<p>That is, we apply our second reduction function, R2, to 3790.  R2(3790) = 37.  We hash 37, which results in H(37)=5520.  We pause, check if this is the value we started with (5520), and it is!  So we stop, knowing that 37 hashes into 5520.  So our plaintext is 37.</p>
<p>Boy, that was a lot of work, especially given that we had a match in our table!  Yes, that&#8217;s true.  Remember &#8211; we&#8217;re doing extra work to save space.</p>
<p>So let&#8217;s recap the algorithm we have seen so far:</p>
<pre>1. Find the hashed value in the lookup table.
2. Take the plaintext value and hash it.
3. Does that hash match the hash we have?
   If so, stop. The value you just hashed is the value you're looking for.
4. If not, apply the reduction function to get a new plaintext value,
   and go back to step 2.</pre>
<p>So what happens if the hashed value we have isn&#8217;t in the lookup table?  For example, what would we do if we started with the hashed value of  3626?  Step 1 in our algorithm obviously isn&#8217;t sufficient!</p>
<p>The solution is to apply the reduction function.  Since this is essentially walking backwards through the chains, we apply the last reduction function (R2).  What is R2(3626)?  Well, you don&#8217;t know (unless you&#8217;ve read Part 4), but that is okay.  Let R1 and R2 be &#8220;black boxes&#8221; for now and take my word for it &#8211; R2 (3626) is 36.  (Take a close look at what you&#8217;ve seen so far for R1 and R2 &#8211; you might be able to guess the algorithms.)  Hash that number, H(36)=4202, and try the algorithm again.  Looking back at the lookup table (not the full rainbow table), this time we find 4202.  We see that its corresponding value for p1 is 25.  Now we can go on to step 2: H(25)=2059.  Step3: is 2059 the number we&#8217;re looking for?  No, we looking for 3626, so on to step 4: R1(2059)=59.  Back to step 2: H(59)=3626.  Step 3: s 3626 the number we&#8217;re looking for?  Yes!  Therefore, 59 is its plaintext.</p>
<p>So, let&#8217;s rewrite the algorithm a little bit:</p>
<pre>1. Find the hashed value in the lookup table.  If you find it, go to step 2.
  If not:
  1a. Starting with the <em>last</em> reduction function (e.g., R2), "reduce" the
      hashed value to get a new plaintext number. Every time you repeat
      step 1, you go to the next lowest reduction function (e.g., R2,
      then R1).
  1b. Hash the new plaintext number and repeat step 1 from he beginning
      with this new hash value.
2. Take the plaintext value and hash it.
3. Does that hash match the hash we have?
   If so, stop. The value you just hashed is the value you're looking for.
4. If not, apply the reduction function to get a new plaintext value, and
   go back to step 2.</pre>
<p>Essentially, step 1 backs you up column-by-column in the rainbow table until you find a hash and can match a row.  Then, steps 2-4 move you forward through a specific row to obtain the value you need.  (And if you don&#8217;t find a value in these steps, then your rainbow table doesn&#8217;t have the information you&#8217;re looking for.)</p>
<p>Try it on your own, perhaps using 2554.</p>
<p>So, there you go &#8211; a gentle introduction to Rainbow Tables.  Hopefully this will help make other descriptions (such as those at <a href="http://en.wikipedia.org/wiki/Rainbow_tables" target="_blank">wikipedia</a> and <a href="http://kestas.kuliukas.com/RainbowTables/" target="_blank">kuliukas</a>) a bit easier.  I encourage playing around with the <a href="http://spreadsheets.google.com/ccc?key=pI5DPYdPDmWT6ZCA5RD4oRg" target="_blank">spreadsheet</a><em> </em>and walking through the process with other sample values.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=52&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Rainbow Tables &#8211; Part 4 (Reduction Functions)</title>
		<link>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/</link>
		<comments>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 01:59:33 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Rainbow Tables]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=50</guid>
		<description><![CDATA[This is Part 4 of a five part series:

Introduction
Encryption and Hashes
Simple Hashes and Collisions
Reduction Functions (you are here)
Rainbow Tables and Chains

Reduction functions are at the heart of how rainbow tables work.
To understand reduction functions, lets look at a set of two-digit values that are &#8220;encrypted&#8221; into four-digit hashes.  For example, using the sample hashing algorithm [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=50&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is Part 4 of a five part series:</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a> (you are here)</li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a></li>
</ol>
<p><em>Reduction functions</em> are at the heart of how rainbow tables work.</p>
<p>To understand reduction functions, lets look at a set of two-digit values that are &#8220;encrypted&#8221; into four-digit hashes.  For example, using the sample hashing algorithm described in Part 3, the number 10 is encrypted into 0823:</p>
<pre> p     h
10  0823</pre>
<p>Now, imagine if we had a special function that could somehow map a 4 digit hash to a 2 digit number.  Because hashes are irreversible, the two digit number is not the original password.  But, it <em>is </em>a two digit number, which means it is a valid password.  For example,  a really simple reduction function could take the last two digits of a four digit number.  That would map the hash 0823 into the plaintext 23:</p>
<pre>   h    p
0823   23</pre>
<p>That&#8217;s all a reduction function is &#8211; a function that consistently maps a hashed value into a valid plaintext value. It is worth repeating that the reduction funtion is NOT the inverse of the hash.  In the example above, 0823 &#8220;reduces&#8221; to 23, but 23 does not hash into 0823 (23 hashes into 5603).</p>
<p>It is also important that the results of the reduction function be valid plaintext. This is easy to do in our samples where we&#8217;re dealing with two and four digit numbers. But let&#8217;s say you are dealing with a system that allows passwords to be only alphanumerics, no special characters.  If your reduction function results in characters like !,@,#, or $, then you&#8217;ll be saying !@#$ because you&#8217;ll get invalid plaintext!</p>
<p>In part 3, we looked at the fact that all encryption algorithms can have collisions.  This is also true for reduction functions.  In fact, the situation tends to be worse for reduction functions, because chances are that your maximum password size is much shorter than the size of your hashed values.  In our simple example, we&#8217;re mapping four digit numbers into two digit numbers.  Clearly, we&#8217;ll frequently collide!</p>
<p>The collisions are a real problem for rainbow tables.  One strategy to reduce (but not eliminate) their impact is to use multiple reduction functions.  In Part 5, we talk about R1 and R2.  In those samples, R1 is our function above &#8211; the last two digits.  R2 is equally simple &#8211; it just takes the first two digits.</p>
<p>Let&#8217;s go look at rainbow tables in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Part 5</a>!</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a> (next)</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=50&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Rainbow Tables &#8211; Part 3 (Simple Hashes and Collisions)</title>
		<link>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/</link>
		<comments>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 01:58:47 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Rainbow Tables]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=40</guid>
		<description><![CDATA[This is Part 3 of a five part series:

Introduction
Encryption and Hashes
Simple Hashes and Collisions (you are here)
Reduction Functions
Rainbow Tables and Chains

Geoff Kuenning, a computer science professor at Harvey Mudd College, has a great web page about hashes as a part of one of his classes.  Let&#8217;s look at two of the three simple hash functions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=40&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is Part 3 of a five part series:</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a> (you are here)</li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a></li>
</ol>
<p><a href="http://www.cs.hmc.edu/~geoff/" target="_blank">Geoff Kuenning</a>, a computer science professor at Harvey Mudd College, has a great <a href="http://www.cs.hmc.edu/~geoff/classes/hmc.cs070.200101/homework10/hashfuncs.html" target="_blank">web page about hashes</a> as a part of one of his classes.  Let&#8217;s look at two of the three simple hash functions he presents (we&#8217;ll use one of these for our rainbow table).</p>
<p><em>If you haven&#8217;t looked at the <a href="http://spreadsheets.google.com/ccc?key=pI5DPYdPDmWT6ZCA5RD4oRg" target="_blank">spreadsheet</a> yet, now is probably a good time to do so.  It is broken into tabbed pages. The first four tabs are dedicated to Kuenning&#8217;s three hash functions.</em></p>
<p>When we look at the hash functions, one of the things we want to consider is the number of <em>collisions</em> that occur.  Part of the nature of hash functions is  that multiple input values can produce the same output result.  When this happens, it is known as a collision.  (If you remember high-school trigonometry, this is like the sin() and cos() functions.  sin(0) and sin(180 degrees) both equal zero.)</p>
<p><em>Note: </em>My nomenclature differs slightly from Kuenning&#8217;s.  I use H() to indicate the hash function, h to indicate the hashed value, and p to indicated the unencrypted password (aka plaintext).  On this page only, I&#8217;ll make <span style="color:#ff6600;">p</span> and<strong> </strong><span style="color:#ff6600;">h <span style="color:#000000;">orange </span></span>so you remember that we&#8217;re starting with one and calculating the other.</p>
<h3>Hash Function 1: The Division Method</h3>
<p>The division method simply uses the <a href="http://en.wikipedia.org/wiki/Modulo_operation" target="_blank">modulo</a> function:</p>
<pre>     <span style="color:#ff6600;">h </span>= <span style="color:#ff6600;">p </span>mod m</pre>
<p>where m is a prime number.  (m should be far from a power of 2, but for our purposes it doesn&#8217;t matter.)</p>
<p>here is a table of hash values for plaintext values from 0-19, with a m value of 13:</p>
<pre>    p  h      p  h      p  h      p  h
    0  0      5  5     10 10     15  2
    1  1      6  6     11 11     16  3
    2  2      7  7     12 12     17  4
    3  3      8  8     13  0     18  5
    4  4      9  9     14  1     19  6</pre>
<p>Lousy for encryption, don&#8217;t you agree?  But, it <em>is </em>a hash &#8211; you can&#8217;t tell what the plaintext value is if you only know the result.  And, there are collisions.</p>
<p>I&#8217;m going to skip the next function that Kuenning presents, the Knuth variant on division. It is easy to understand, and is included in the spreadsheet if you want to see how it compares with the other two.</p>
<h3>Hash Function 2: The Multiplication Method</h3>
<p>This hash function is a little more involved, but is still simple enough to implement easily in a spreadsheet.  Kuenning conveniently breaks it into three calculations.  This makes it easier to understand (and easier to program).</p>
<pre>     s = <span style="color:#ff6600;">p</span>*A
     x = fractional part of s
     <span style="color:#ff6600;">h </span>= floor(m*x)</pre>
<p>Below is a table of the results of this hash applied to the numbers 0-19, with A set to 6.213335, m set to Kuenning&#8217;s recommended value of (SQRT(5) &#8211; 1)/2, and x truncated to 4 digits (if s = 1.234567, x is then 2345)</p>
<pre>p:  s:          x:     Hash:           p:  s:          x:     Hash:
0   0              0    0000           10  62.13335    1333    0823
1   6.213335    2133    1318           11  68.346685   3466    2142
2   12.42667    4266    2636           12  74.56002    5600    3460
3   18.640005   6400    3955           13  80.773355   7733    4779
4   24.85334    8533    5273           14  86.98669    9866    6097
5   31.066675    666    0411           15  93.200025   2000    1236
6   37.28001    2800    1730           16  99.41336    4133    2554
7   43.493345   4933    3048           17  105.626695  6266    3872
8   49.70668    7066    4367           18  111.84003   8400    5191
9   55.920015   9200    5685           19  118.053365   533    0329</pre>
<p>A few points are worth noting:</p>
<ul>
<li>We don&#8217;t see any collisions here.  However, the spreadsheet shows that there are collisions.</li>
<li>No matter what integer we use as the source, the resulting hash will always be a fixed length: 4 digits.  In other words, the hash will always be less than or equal to 9999.  (Actually, it will be less than 6180).</li>
<li>Because the hash is always an integer between 0 and 6180, we know that if we have a set of over 6180 numbers, we are guaranteed to have collisions.</li>
<li>Zero does not hash particularly well with this algorithm.</li>
</ul>
<p>This is a great hash for creating a simple rainbow table to learn how they work.  Before we do so, however, let&#8217;s look at the notion of reduction functions in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Part 4</a>.</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a> (next)</li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a></li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=40&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
		<item>
		<title>Rainbow Tables &#8211; Part 2 (Encryption and Hashes)</title>
		<link>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/</link>
		<comments>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 01:58:12 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Rainbow Tables]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://stichintime.wordpress.com/?p=31</guid>
		<description><![CDATA[This is Part 2 of a five part series:

Introduction
Encryption and Hashes (you are here)
Simple Hashes and Collisions
Reduction Functions
Rainbow Tables and Chains

As I mentioned in the first post of this series, rainbow tables are used to find a password if you know the encrypted password.
Passwords typically are (or should be) encrypted with a one-way encryption algorithm. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=31&subd=stichintime&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is Part 2 of a five part series:</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a> (you are here)</li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a></li>
</ol>
<p>As I mentioned in the first post of this series, rainbow tables are used to find a password if you know the encrypted password.</p>
<p>Passwords typically are (or should be) encrypted with a one-way encryption algorithm. This type of encryption is known as a <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function" target="_blank">hash</a>.  With a hash, there is no algorithm that can be applied to the encrypted password to determine the unencrypted password.  There are only two ways to determine the unencrypted password:</p>
<ul>
<li>keep trying passwords until you find the right one (brute force)</li>
<li>in advance, create a list of passwords and their encrypted results.  This is known as a lookup table.  Such a table can be huge, but is very simple to use and is fast.  Rainbow tables are a compromise.  They consume less space, but require more processing.  Compared with brute force, they still can be very fast (unless the password is poor and can be guessed immediately).</li>
</ul>
<p>To understand rainbow tables, you need to be comfortable with hashes.  Most experienced computer users are at least somewhat familiar with MD-5 hashes, which are often used as a checksum to validate that a downloaded file was not corrupted in-flight. MD-5 is known to be vulnerable, but it makes a fine checksum.  SHA-1 is a more secure hash.</p>
<p>The rainbow table explanations I cited before (<a href="http://en.wikipedia.org/wiki/Rainbow_tables" target="_blank">wikipedia </a>and <a href="http://kestas.kuliukas.com/RainbowTables/" target="_blank">kuliukas</a>) both use MD-5 for their example hashes.  While MD-5 is well-known and is easily available, it is difficult to calculate an MD-5 hash within Excel.  Because Excel makes a great platform for experimenting with data and tables to learn a concept, I found some simpler hash functions that I&#8217;ll use for the examples here.  These hashes would be terrible for real encryption, but they work well for creating a simple, understandable rainbow table in Excel.  We&#8217;ll look at those hash algorithms in Part 3.</p>
<p>If you&#8217;re not comfortable with hashes, these simple algorithms will also provide a gentle introduction to the concept.</p>
<p>The examples in the other articles use character strings for their passwords to hash.  To keep things simple, my examples will stick to encrypting numbers between 0 and 99.  After all, in a computer, characters are all represented by numbers anyway, so we&#8217;re just skipping the step of translating a character into ASCII or Unicode.</p>
<p>Let&#8217;s go look at these simple hashes in <a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Part 3</a>.</p>
<ol>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-1-introduction/" target="_self">Introduction</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/" target="_self">Encryption and Hashes</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-3-simple-hashes-collisions/" target="_self">Simple Hashes and Collisions</a> (next)</li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-4-reduction-functions/" target="_self">Reduction Functions</a></li>
<li><a href="http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-5-chains-and-rainbow-tables/" target="_self">Rainbow Tables and Chains</a></li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stichintime.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stichintime.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stichintime.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stichintime.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stichintime.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stichintime.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stichintime.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stichintime.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stichintime.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stichintime.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stichintime.wordpress.com&blog=4236920&post=31&subd=stichintime&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://stichintime.wordpress.com/2009/04/09/rainbow-tables-part-2-password-encryption/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09e6b70ca511905a39f5704de84d2758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paul</media:title>
		</media:content>
	</item>
	</channel>
</rss>