Just finished up with RubyDES, my DES implementation in Ruby. The reason for building RubyDES was two fold: To better push my ruby fu and to allow other Ruby programmers who are interested in cryptography to better understand the worlds most influential cryptographic algorithm.

The best way to read the RubyDES source code if you are new to the DES, is to first familiarize yourself with the algorithm. The best way to do so is read the DES wikipedia page and FIPS 46. You will also notice that the variable and constant names are quite terse (e.g. IP, E, PC_2, r, k). This was on purpose, as I wanted to stay true to the technical specs of the DES so that reading through a DES explanation with the RubyDES source code will allow you to follow along.

To checkout RubyDES, go on over to the github page. Also, feel free to send over any comments or suggestions (or even better, fork it and let me know when to pull).