<?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>sebmeyer.de::blog &#187; Java</title>
	<atom:link href="http://sebmeyer.de/index.php/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://sebmeyer.de</link>
	<description>computer.science &#38; other.stuff</description>
	<lastBuildDate>Sun, 25 Jul 2010 13:50:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Cracking Vigenère Cipher</title>
		<link>http://sebmeyer.de/index.php/2010/04/17/cracking-vigenere-cipher/</link>
		<comments>http://sebmeyer.de/index.php/2010/04/17/cracking-vigenere-cipher/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 14:04:35 +0000</pubDate>
		<dc:creator>Archimedes</dc:creator>
				<category><![CDATA[hacking.tools]]></category>
		<category><![CDATA[open.source]]></category>
		<category><![CDATA[uni.sb]]></category>
		<category><![CDATA[Cracking]]></category>
		<category><![CDATA[Crypto]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://sebmeyer.de/?p=235</guid>
		<description><![CDATA[As our lecturer in cryptography wanted us to break some ciphertext (password needed!) encrypted using the Vigenère cipher. As this cipher was invented in 1553, it is, of course, long broken. But I decided to implement the Kasiskitest and some simple frequency analysis as explained by Stinson in &#8220;Cryptography &#8211; Theory and Practice&#8221; using Java [...]]]></description>
			<content:encoded><![CDATA[<p>As our lecturer in <a href="http://www.infsec.cs.uni-saarland.de/teaching/10SS/Cryptography/">cryptography</a> wanted us to break <a href="http://www.infsec.cs.uni-saarland.de/teaching/10SS/Cryptography/material/hw-01.txt" target="_blank">some ciphertext</a> (password needed!) encrypted using the <a href="http://en.wikipedia.org/wiki/Vigenère_cipher">Vigenère cipher</a>. As this cipher was invented in 1553, it is, of course, long broken. But I decided to implement the Kasiskitest and some simple frequency analysis as explained by <a href="http://www.amazon.com/Cryptography-Practice-Discrete-Mathematics-Applications/dp/1584885084/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1271512537&amp;sr=8-1" target="_blank">Stinson in &#8220;Cryptography &#8211; Theory and Practice&#8221;</a> using Java (I decided not to use C++, as the exercise sheet has other, more important questions and I didn&#8217;t want to <span style="text-decoration: line-through;">spend</span> waste my time debugging) as a small exercise for myself. <a href="http://dev.seb7.de/cVigenere.java" target="_blank">You can fetch the code here.</a></p>
<p>How to use it:</p>
<blockquote><p>wget http://dev.seb7.de/cVigenere.java<br />
javac cVigenere.java<br />
java cVigernere &lt;ciphertext goes here&gt;</p></blockquote>
<p>The ciphertext is expected to be just one line, spaces are ignored. I copied the ciphertext we were to break into a file <em>cryptoct</em> (with spaces, but WITHOUT line breaks) and did <em>java cVigenere $(cat cryptoct)</em>. If you have a long ciphertext, you should remove spaces as well (should be faster during initialization).</p>
<p>Now, what does the code do? Basically, we first do the Kasiskitest, which means we look for triplets (ok, I could use longer/shorter/variable patterns here, but triplets work just fine). Now we calculate the distance between each triplet and look for the Greatest common divisor, as this could probably be the keylength.</p>
<p>After we have the keylength, we can do usual frequency analysis, but only consider every <em>key.length</em>-th word. This means, we try to break the ciphertext like a normal <a href="http://en.wikipedia.org/wiki/Caesar_cipher">Ceasar cipher</a>, but instead of going through it only once, we do it <em>key.length</em> times.</p>
<p>If you really want to understand the code, take a look at the book, you can find it in the computer science library in Saarbrücken, but Kaiserslautern should have it as well <img src='http://sebmeyer.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sebmeyer.de/index.php/2010/04/17/cracking-vigenere-cipher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neue jSMTPproxy Version 1.1</title>
		<link>http://sebmeyer.de/index.php/2009/02/13/neue-jsmtpproxy-version-11/</link>
		<comments>http://sebmeyer.de/index.php/2009/02/13/neue-jsmtpproxy-version-11/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 13:25:38 +0000</pubDate>
		<dc:creator>Archimedes</dc:creator>
				<category><![CDATA[open.source]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">https://sebmeyer.de/?p=19</guid>
		<description><![CDATA[Ich habe soeben testweise ein Mail Treshold eingebaut. Man kann nun eine Tick Length einstellen in der nur eine bestimmte Menge Mails verschickt werden darf. Mehr später, eigentlich sollte ich gerade am Lernen sein&#8230; Downloadlink: http://dev.seb7.de/jSMTPproxy-1.1.tar Gruß, Sebastian]]></description>
			<content:encoded><![CDATA[<p>Ich habe soeben testweise ein Mail Treshold eingebaut. Man kann nun eine Tick Length einstellen in der nur eine bestimmte Menge Mails verschickt werden darf.</p>
<p>Mehr später, eigentlich sollte ich gerade am Lernen sein&#8230;</p>
<p>Downloadlink: <a href="http://dev.seb7.de/jSMTPproxy-1.1.tar" target="_blank">http://dev.seb7.de/jSMTPproxy-1.1.tar</a></p>
<p>Gruß, Sebastian</p>
]]></content:encoded>
			<wfw:commentRss>http://sebmeyer.de/index.php/2009/02/13/neue-jsmtpproxy-version-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spam die Zweite</title>
		<link>http://sebmeyer.de/index.php/2009/01/28/spam-die-zweite/</link>
		<comments>http://sebmeyer.de/index.php/2009/01/28/spam-die-zweite/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 23:56:32 +0000</pubDate>
		<dc:creator>Archimedes</dc:creator>
				<category><![CDATA[open.source]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">https://blog.seb7.de/?p=10</guid>
		<description><![CDATA[Nachdem mein eigentlich richtig konfigurierter Postfix nach wenigen Stunden online schon als Spamschleuder herhalten musste habe ich beschlossen herauszufinden wie die Spammer ihn zum Senden überreden konnten. Dazu habe ich mit Java Sockets eine Art &#8220;Multithreaded SMTP Logging Proxy Server&#8221; programmiert, der die Verbindungen an einen SMTP Server weiterleitet und nach Abschluss einer Verbindungen die [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem mein <a href="https://blog.seb7.de/?p=3" target="_self">eigentlich richtig konfigurierter Postfix</a> nach wenigen Stunden online schon als Spamschleuder herhalten musste habe ich beschlossen herauszufinden wie die Spammer ihn zum Senden überreden konnten.</p>
<p>Dazu habe ich mit <a href="http://java.sun.com/javase/6/docs/api/java/net/Socket.html" target="_self">Java Sockets</a> eine Art &#8220;Multithreaded SMTP Logging Proxy Server&#8221; programmiert, der die Verbindungen an einen SMTP Server weiterleitet und nach Abschluss einer Verbindungen die übertragenen Nachrichten auf der Konsole ausgibt.<br />
Was noch fehlt ist Logging in Dateien (und zwar Nachrichten- anstatt Verbindunsweise) sowie sinnvolle Möglichkeiten zur Konfiguration, aber die ist mehr eine Sache des &#8220;Loaders&#8221;, da der Proxy an sich keine main-Funktion hat und alles was ich derzeit als Parameter vorgesehen habe bei der Instanzierung übergeben wird. <a href="http://sebmeyer.de/index.php/2009/01/28/spam-die-zweite/#more-10" class="more-link">(weiterlesen&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sebmeyer.de/index.php/2009/01/28/spam-die-zweite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
