<?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>CertPal &#187; des</title>
	<atom:link href="http://www.certpal.com/blogs/tag/des/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.certpal.com/blogs</link>
	<description>Technology and certifications</description>
	<lastBuildDate>Mon, 18 Jul 2011 06:48:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Crypt DES and 8 character truncated passwords</title>
		<link>http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/</link>
		<comments>http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/#comments</comments>
		<pubDate>Tue, 18 May 2010 14:38:00 +0000</pubDate>
		<dc:creator>CertPal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[crypt]]></category>
		<category><![CDATA[des]]></category>
		<category><![CDATA[encryption]]></category>

		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=734</guid>
		<description><![CDATA[Be wary of the crypt + DES encryption method as it truncates passwords to 8 characters in length. The users are usually not informed of the truncation which leads the account vulnerable to password guesses]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.certpal.com/blogs/wp-content/uploads/security_lock.png"><img class="alignright size-full wp-image-503" title="security_lock" src="http://www.certpal.com/blogs/wp-content/uploads/security_lock.png" alt="" width="79" height="104" /></a>Many passwords in linux are encrypted using the <a href="http://en.wikipedia.org/wiki/Crypt_%28Unix%29" target="_blank">crypt() utility</a>. The user is usually not aware of the difference between a crypt and a MD5 encryption. Well it can turn out to be important, especially if crypt uses the default DES-based scheme to perform the encryption.</p>
<p>The problem with crypt() + Traditional DES is that it truncates the password length to 8 characters. Users are not usually aware of this and assume that the entire length of the password has been saved and encrypted. Take the apache tool htpasswd for example. It uses <a href="http://httpd.apache.org/docs/2.0/programs/htpasswd.html" target="_blank">crypt() to encrypt passwords</a> (It may also use its own MD5 routine) into a password file. The following command creates a new user in a password file</p>
<p>htpasswd password_file new_user</p>
<p>After this command is executed, you are prompted for a password. If the password is greater than 8 characters, for example &#8211; 123456789, it will still be accepted and no warning will be provided that it was truncated. So providing the password 12345678 will also allow you to be authenticated into the system. Why is this bad ?</p>
<ul>
<li>The time taken to crack 8 character passwords is shorter (in relative comparison).</li>
</ul>
<ul>
<li>It is also likely that the password was truncated in these scenarios, so an attacker may well target passwords that are exactly 8 characters in length.</li>
</ul>
<ul>
<li>Some people have the knack of prefixing the password with the username first. Bad idea if your username happens to be 8 characters long <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<ul>
<li>The user may not even be aware of the problem, since he/she assumes that the password is strong and greater than 8 characters.</li>
</ul>
<p>So the next time you provide a password to a system, you might want to know how they get saved into a persistence store and what encryption is used.</p>
<p><script type="text/javascript">var dzone_url = 'http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/';</script><br />
<script type="text/javascript">var dzone_title = 'Crypt DES and 8 character truncated passwords';</script><br />
<script type="text/javascript">var dzone_blurb = 'Be wary of the crypt + DES encryption method as it truncates passwords to 8 characters in length. The users are usually not informed of the truncation which leads the account vulnerable to password guesses';</script><br />
<script type="text/javascript">var dzone_style = '2';</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.certpal.com%2Fblogs%2F2010%2F05%2Fcrypt-des-and-8-character-truncated-passwords%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.certpal.com/blogs/2010/05/crypt-des-and-8-character-truncated-passwords/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

