<?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>AlferSoft Blog &#187; C encryption S-DES simplified DES cipher</title>
	<atom:link href="http://www.alfersoft.com.ar/blog/tag/c-encryption-s-des-simplified-des-cipher/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alfersoft.com.ar/blog</link>
	<description>Explaining this blog in a few words since 1999</description>
	<lastBuildDate>Wed, 01 Feb 2012 22:36:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Simplified DES (S-DES) file encryption implementation in C</title>
		<link>http://www.alfersoft.com.ar/blog/2009/05/08/simplified-des-s-des-file-encryption-implementation-in-c/</link>
		<comments>http://www.alfersoft.com.ar/blog/2009/05/08/simplified-des-s-des-file-encryption-implementation-in-c/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:34:11 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[C encryption S-DES simplified DES cipher]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=103</guid>
		<description><![CDATA[This encryption algorithm is not secure at all, in fact it was made for educational purposes. It uses a 10-bit key that can be quickly broken by a brute force attack. But, who knows, it may be good for someone interested in some quick encryption where security is not that important, or for embedded devices [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 138px"><img title="Simplified DES" src="http://www.alfersoft.com.ar/files/lock.png" alt="Simplified DES" width="128" height="128" /><p class="wp-caption-text">Simplified DES</p></div>
<p>This encryption algorithm is not secure at all, in fact it was made for educational purposes. It uses a 10-bit key that can be quickly broken by a brute force attack. But, who knows, it may be good for someone interested in some quick encryption where security is not that important, or for embedded devices were resources are limited, or just for lazy students. <img src='http://www.alfersoft.com.ar/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><span id="more-103"></span></p>
<p>So, here is my version of the S-DES algorithm in plain C. Differently from the <a title="S-DES cpp implementation" href="http://www.programmersheaven.com/download/47588/download.aspx" target="_blank">other version in the web</a> my implementation is more byte-oriented while the other (probably more didactic) is converting the input to a string with &#8217;0&#8242;s and &#8217;1&#8242;s and working over it. Also the other implementation uses some C++ functions while mine is written in plain C.</p>
<p><a title="Simplified DES C implementation" href="http://www.alfersoft.com.ar/files/sdes/sdes.c" target="_blank">Download it</a> and take a look to the code (it is less than 300 lines) &#8212; released under BSD license.</p>
<p>To build it with gcc type:</p>
<p>gcc sdes.c -lm -o sdes</p>
<p>Note that I&#8217;m using math library only because of the pow() function that is used only in debug mode.</p>
<p>And here is a copy of a <a title="S-DES algorithm PDF" href="http://www.alfersoft.com.ar/files/sdes/sdes.pdf" target="_blank">document explaining the algorithm</a>.</p>
<h6><a title="Lock" href="http://upload.wikimedia.org/wikipedia/commons/f/ff/Crystal_Clear_action_lock.png" target="_blank">Image source</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2009/05/08/simplified-des-s-des-file-encryption-implementation-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

