<?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>Algorithm.co.il &#187; Cryptography</title>
	<atom:link href="http://www.algorithm.co.il/blogs/category/computer-science/cryptography/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.algorithm.co.il/blogs</link>
	<description>Algorithms, for the heck of it</description>
	<lastBuildDate>Tue, 21 Jun 2011 20:37:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>10 Awesome Theorems &amp; Results</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/cryptography/10-awesome-theorems-results/</link>
		<comments>http://www.algorithm.co.il/blogs/computer-science/cryptography/10-awesome-theorems-results/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 00:00:39 +0000</pubDate>
		<dc:creator>lorg</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Theorem]]></category>

		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=647</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.algorithm.co.il/blogs/computer-science/cryptography/10-awesome-theorems-results/' addthis:title='10 Awesome Theorems &#038; Results'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>When I look back at various mathematical courses I took, most have at least one theorem that I really liked. Usually I like it because the proof has a surprising trick, sometimes it&#8217;s because of the unexpected conclusion, or maybe &#8230; <a href="http://www.algorithm.co.il/blogs/computer-science/cryptography/10-awesome-theorems-results/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="addthis_toolbox addthis_default_style " addthis:url='http://www.algorithm.co.il/blogs/computer-science/cryptography/10-awesome-theorems-results/' addthis:title='10 Awesome Theorems &#038; Results' ><a href="http://addthis.com/bookmark.php?v=250&#38;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">&#124;</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>]]></description>
			<content:encoded><![CDATA[<p>When I look back at various mathematical courses I took, most have at least one theorem that I really liked. Usually I like it because the proof has a surprising trick, sometimes it&#8217;s because of the unexpected conclusion, or maybe the unintuitive feel to it. In other cases it&#8217;s just the elegance of the proof, or the result itself.<br />
Without further ado, here&#8217;s a selection of my favorite theorems, in no particular order:</p>
<p>1. Linear Algebra: the <a href="http://en.wikipedia.org/wiki/Cayley%E2%80%93Hamilton_theorem">Cayley Hamilton theorem</a>. When I first grokked the fact that you can substitute matrices for the variables in polynomials, I was awestruck. Then I learned that you can define e<sup>A</sup> by using a Taylor series, but the fun doesn&#8217;t stop there. Using the Eigenvalues you can greatly simplify the calculation, and it all &#8220;works out the same&#8221; (i.e., if A=P<sup>-1</sup>DP and D is diagonal, then p(A) = P<sup>-1</sup>p(D)P. This works also for Jordan forms). Also, since you can show that complex numbers are isomorphic to the 2&#215;2 matrices of the form [[a, b], [-b, a]], and that the calculations were exactly the same &#8211; well, everything &#8220;fell into place for me&#8221;. At the time it seemed to be one of the joys of Mathematics.</p>
<p>2. Calculus: the <a href="http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem">Bolzano-Weierstrass Theorem</a>. One of the first non trivial results you learn in calculus, I originally learned the version that says: &#8220;Every bounded infinite set has a limit point&#8221;, and its proof was a bit more elegant in my eyes than the proof of the Wikipedia version. I liked it so much that one time when I was in boot camp in the service, I worked it out again just to keep my mind working. Good times.</p>
<p>3. Probability: The elegant result of <a href="http://en.wikipedia.org/wiki/Law_of_total_variance">V(x) = E(V(x|y)) + V(E(x|y))</a>. Just the sight of it makes one sigh with contentedness, and the result itself is very nice.</p>
<p>4. Calculus, again: <a href="http://en.wikipedia.org/wiki/Stokes%27_theorem">Stokes&#8217; theorem</a> and its friends. Very useful and non intuitive, in layman&#8217;s terms it says that you can reason about what happens in an area just by knowing about its perimeter.</p>
<p>5. Numerical Analysis: <a href="http://en.wikipedia.org/wiki/Richardson_extrapolation">Richardson Extrapolation</a>: one of the most elegant forms of bootstrapping, you start with a simple approximation method as a building block, and at the end you get a very strong high-quality approximation.</p>
<p>6. Computability: <a href="http://en.wikipedia.org/wiki/Smn_theorem">The Parameter theorem</a>. Especially elegant, it basically gives the mathematical definition of the &#8220;bind&#8221; function for function parameters. In simple terms it uses the source code of a function f(x, y), to find the source code of a function g(y) such that g(y) = f(a, y) for some a. The nice thing about it is that it works only on source code, without calling the function themselves.<br />
This theorem had the added bonus that once I grokked it, the test in computability was very, very easy :)</p>
<p>7. Functional analysis: here it&#8217;s a relatively minor result that I ended up remembering distinctly: Given z<sub>1</sub>.. z<sub>n</sub> which are linearly independent in E, show that there exists a d such that for each w<sub>1</sub>&#8230;w<sub>n</sub> that follow ||w<sub>i</sub> &#8211; z<sub>i</sub>|| &lt; d for each i, are also linearly independent. The footnote says that such a finite, linearly independent group is called stable. When visualizing I think of it this way: given a such a group, kick it. As long as you don&#8217;t kick it too strongly &#8211; it will stay linearly independent. Now that&#8217;s stable.</p>
<p>8.  Mathematical Logic: <a href="http://en.wikipedia.org/wiki/Compactness_theorem">The Compactness theorem</a>: &#8220;a set of first-order sentences has a model if and only if every finite subset of it has a model&#8221;. One direction is almost trivial, but the other is deep. When studying for the test in this course, I remember being stuck for days on an exercise that required the use of this theorem. Once I fully understood the method of its use, it became a favorite.<br />
(By the way, the exercise was the following: Let G a countable group of first order statements, and p a first order statement. Show that if p is true in every countable model of G, than G |= p.)</p>
<p>9. Cryptography: I&#8217;ve learned a bit of cryptography on my own before taking the cryptography course. When I did though, two methods were especially memorable: The first was the <a href="http://en.wikipedia.org/wiki/Meet-in-the-middle_attack">&#8220;Meet in the Middle&#8221; attack</a>. Not to be confused with &#8220;Man in the Middle&#8221;, this method allows one to attack symmetric ciphers constructed by repeatedly applying a simpler cipher. This known plaintext attack got its name from its method of operation: the attacker calculates all possible decryptions the ciphertext and stores them in a lookup table. Then, he calculates all encryptions of the plaintext and looks them up in that lookup table. Once a result is found &#8211; the combination of the encryption and the decryption keys used is the final key of the composed cipher.</p>
<p>10. The second cryptography result that I liked was <a href="http://en.wikipedia.org/wiki/Secret_sharing">secret sharing</a>. Trivial secret sharing is so simple, and yet effective, that when I first learned it I thought: &#8220;how come I didn&#8217;t think of this before?&#8221;.</p>
<p>There are obviously many more elegant theorems, some of which I&#8217;ve learned in my studies. I sure hope to learn a few more. Still, these are special. As a highschool math teacher once told us about the Pythagorean theorem: &#8220;I want you to remember the proof even if I wake you in the middle of the night&#8221;. The theorems in this short list come close to that ideal.</p>
<p>Now I wonder &#8211; what are your favorite theorems?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.algorithm.co.il/blogs/computer-science/cryptography/10-awesome-theorems-results/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Using zpint in Cryptography Homework</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/cryptography/using-zpint-in-cryptography-homework/</link>
		<comments>http://www.algorithm.co.il/blogs/computer-science/cryptography/using-zpint-in-cryptography-homework/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 14:41:21 +0000</pubDate>
		<dc:creator>lorg</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[zp]]></category>

		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/index.php/programming/python/using-zpint-in-cryptography-homework/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.algorithm.co.il/blogs/computer-science/cryptography/using-zpint-in-cryptography-homework/' addthis:title='Using zpint in Cryptography Homework'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>Originally, I wrote zpint to help me with my algebric structures homework. For those not familiar with it, it allows you to do computations modulo p the same way you do for ints. Not surprisingly, I found myself using it &#8230; <a href="http://www.algorithm.co.il/blogs/computer-science/cryptography/using-zpint-in-cryptography-homework/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="addthis_toolbox addthis_default_style " addthis:url='http://www.algorithm.co.il/blogs/computer-science/cryptography/using-zpint-in-cryptography-homework/' addthis:title='Using zpint in Cryptography Homework' ><a href="http://addthis.com/bookmark.php?v=250&#38;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">&#124;</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Originally, I wrote <a href="http://www.algorithm.co.il/blogs/index.php/projects/zpint/">zpint</a> to <a href="http://www.algorithm.co.il/blogs/index.php/programming/python/computation-over-zp-in-python/">help me with my algebric structures homework</a>. For those not familiar with it, it allows you to do computations modulo p the same way you do for ints. Not surprisingly, I found myself using it in my cryptography homework as well. At first I used it for trying to breaking the <a href="http://en.wikipedia.org/wiki/Hill_cipher">Hill Cipher</a>. Then for some computations such as using the Chinese Remainder Theorem to solve equations, or to compute RSA values. Last it was for checking if algorithms I wrote were correct.</p>
<p>Usually I prefer to write a script than do all the computations by hand, even if writing the script is more work. Mostly because it is work I enjoy more. This time I had a script ready. I improved it a little bit during the semester, and it is still available. It is certainly not the fastest way to compute, but it is a fast way of <strong>doing computations</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.algorithm.co.il/blogs/computer-science/cryptography/using-zpint-in-cryptography-homework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

