cryp-d'oh!

By anders pearson 28 Jan 2002

taking a class on cryptography this semester at columbia since one of the benefits of my job is that i can take one class a semester for free. looks like a fun class. lots of number theory. all around a good excuse to spend a lot of money on textbooks.

<p>at the last lecture, the professor was going over modular exponentiation, which is an algorithm for doing things like 1,456,765<small><sup>3,567,234</sup></small> mod 67 really quickly without having to actually calculate the intermediate step of 1,456,765<small><sup>3,567,234</sup></small>, which would be way too large for any computer to handle. i&#8217;ve been over it a few times before, once for my algorithms class at bates and again for discrete math at columbia but i felt like i haven&#8217;t actually <em>done</em> it in long enough that i&#8217;m rusty. since it&#8217;s so important to cryptography, i figured i should brush up on it. so i do a search on the web and find&#8230; <a href="http://a-nders.dhs.org/code/expmod.html">my own code</a> for doing it in javascript that i wrote as part of a homework assignment for my algorithms class. i actually played with it for a couple minutes and clicked on the broken &#8220;view-source&#8221; link before i noticed that it was my own work.</p>

<p>i guess it&#8217;s true that long-term memory is the second thing to go&#8230;</p>