<?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/"
	>

<channel>
	<title>stacyprowell.com &#187; password</title>
	<atom:link href="http://stacyprowell.com/blog/tag/password/feed/" rel="self" type="application/rss+xml" />
	<link>http://stacyprowell.com/blog</link>
	<description>Ugh, Stacy&#039;s talking again...</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:01:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Eight Character Passwords</title>
		<link>http://stacyprowell.com/blog/2009/10/19/eight-character-passwords/</link>
		<comments>http://stacyprowell.com/blog/2009/10/19/eight-character-passwords/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 21:49:13 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[crypt]]></category>
		<category><![CDATA[cyber]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=432</guid>
		<description><![CDATA[How long are your passwords?  Let&#8217;s say eight characters is the length.  How many possibilities are there?  Well, you can use any single-byte printable character (though I once used an escape key in an RS/6000 password; it worked, but isn&#8217;t a good idea everywhere), and any length from one to eight. Printable ASCII is roughly [...]]]></description>
			<content:encoded><![CDATA[<p>How long are your passwords?  Let&#8217;s say eight characters is the length.  How many possibilities are there?  Well, you can use any single-byte printable character (though I once used an escape key in an RS/6000 password; it worked, but isn&#8217;t a good idea everywhere), and any length from one to eight.<span id="more-432"></span></p>
<p>Printable ASCII is roughly codes 32 through 126, or 126-32+1 = 95 characters.  There are 95 passwords of length one, $95\times 95$ passwords of length two, $95^3$ passwords of length three, etc.  This gives a grand total of:</p>
<p>\[\sum_{i=1}^8 95^i = 6,704,780,954,517,120\]</p>
<p>This is a lot of passwords.  A lot.  That&#8217;s well over 6 <em>quadrillion</em> passwords.  It includes the passwords ~ and ~~~~~~~~.</p>
<p>Not all those are available for use in most cases.  First, you typically have to do the following.</p>
<ol>
<li>Choose a lower-case letter.  26 of those.</li>
<li>Choose an upper-case letter.  26 of those.</li>
<li>Choose a digit.  10 of those.</li>
<li>Choose punctuation.  Let&#8217;s call that &#8220;everything else&#8221; and say that space is punctuation.  Thus there are $95-26-26-10 = 33$ punctuation characters.</li>
</ol>
<p>So that limits our choice on four characters.  Let&#8217;s try again!  Now there is a grand total of:</p>
<p>\[26\times 26\times 10\times 33\times \sum_{i=0}^4 95^i = 223,080\times 82,317,121 = 18,363,303,352,680\]</p>
<p>That&#8217;s over 18 <em>trillion</em> passwords.  That&#8217;s actually way, way down from the full potential!</p>
<p>How much memory is required to store every single stinkin&#8217; password&#8217;s crypt, MD5, etc.  Well, if we do it stupidly (<em>i.e.</em>, ignore collisions, ignore smart data structures, etc.), then for MD5 we need 16 bytes for each.  That&#8217;s approximately $16\times 17~\mbox{Tib} \approx 272~\mbox{Tib}$.  That isn&#8217;t as much as you might think.  A single terabyte drive costs about \$100 (US) right now, and we&#8217;d need 272 of them.  Let&#8217;s say 300, just to be safe.  How much is that?  $300\times \$100 = \$30,000$.  Overhead, installation, maintenance, etc., all add to that, but not that much.  In short, it is very cost effective.</p>
<p>Computing them all?  We&#8217;d need to compute <em>a lot</em> of hashes.  Let&#8217;s pick on MD5 (even though it is almost cracked).  Suppose it takes us one millisecond to compute one hash.  We still need to compute 18.4 trillion hashes.  Serially, that&#8217;s $18.4\times 10^{12}~\mbox{passwords}\cdot 1\times 10^{-3}~\frac{\mbox{sec}}{\mbox{password}} = 1.84\times 10^{10}~\mbox{sec}$.  That&#8217;s just over 583 years.  Whew!  We&#8217;re all completely safe.</p>
<p>Not even close.  Suppose I have a 1024 node machine (small by today&#8217;s standards).  That cuts three orders of magnitude from the result, since every hash can be computed independently of the others (though smart storage would cause some serialization).  Now we&#8217;re down to under 6 years.  And how fast can we compute MD5 hashes???</p>
<p>Smart folks are making MD5 very fast.  See http://www.faqs.org/rfcs/rfc1810.html.  That&#8217;s from 1995.  Well, <code>md5 -t</code>, on my little 32-bit Intel MacBook, reports a speed of 313,406,912 bytes per second.  Eight bytes should take just about $2.55\times 10^{-8}~\mbox{seconds}$.  Yes, there&#8217;s overhead at the end of each hash, but I can counter with the following: I can hard code the eight byte limit to get a more efficient algorithm.  I can do a smart iteration with single-byte modifications and hash updates instead of a whole new hash computation.  Plus, there are much faster processors and, I feel confident, faster implementations.  I&#8217;ve got some confidence in my machine&#8217;s performance as an upper bound.  So, back to our 1024 node machine.</p>
<p>\[\frac{18.4\times 10^{12}~\mbox{passwords}}{1024~\mbox{node}} \cdot 2.55\times 10^{-8}~\frac{\mbox{seconds}}{\mbox{password}} = 458 \frac{\mbox{seconds}}{\mbox{node}}\]</p>
<p>That&#8217;s under eight minutes.  I can&#8217;t even manage to make coffee in that time.  Even assuming we add two orders of magnitude for storage and overhead, that&#8217;s just 800 minutes, or a few days.</p>
<p>I&#8217;d be surprised if there isn&#8217;t a database somewhere of all 8-byte (or shorter) passwords and their crypt, MD5, SHA1, and what-have-you.  That is, I expect 8-byte passwords have been <em>solved</em>.  Think about that next time you log in to a site on the web, secure in the knowledge that your password is being sent encrypted.</p>
<p>Who could do this?  If I were highly motivated, I could.  I&#8217;d do better data reduction (to save on data warehousing) and maybe even ship everything up to be computed on one of the &#8220;clouds&#8221; at Google, Dell, or Amazon.  If I can do this sitting in my house at my laptop&#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F10%2F19%2Feight-character-passwords%2F&amp;title=Eight%20Character%20Passwords" id="wpa2a_2"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/10/19/eight-character-passwords/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

