Search


Rss feeds
Posts Comments Source Code
Rating
Image to SpectrogramNontransitive DicecheaTorrentDomain ColoringiMac G5 CPU Fan view all...
Recent
Pretty GraphHypernova EngineEmergent FeedbackSDL Euclid OrchardSingularity Viewer view all...
Tags

All source code released under the BSD License unless otherwise specified
© 2010, Gavin Black

CipherSaber

Overview

Cipher Saber is an easily implementable form of strong encryption. It makes it so that if encryption programs are ever banned, people can simply write their own and use that. I decided to implement the algorithm in Haskell for practice. This was when I very first started learning Haskell, so I really need to revisit the code because it wasn't that great :P

Source Code

Source Tree: http://devrand.org:8080/cgi-bin/cgit/cipherSaber/tree/
Snapshots: http://devrand.org:8080/cgi-bin/cgit/cipherSaber/commit/
Git Access: git clone http://devrand.org:8080/git/cipherSaber

Conclusion

It took me much longer than it should have since I'm still a newbie to Haskell. Chris pointed me to an RC4 implementation that looks cleaner than mine, but they don't do any I/O or IV setup. It looks like mainly the swap function is different, but they used Array Int types instead of [Int] like I did, making it difficult to simply use theirs. As far as speed, decrypting the Cipher Knight certificate took .006 seconds with the C version, and 24.706 seconds with the Haskell version. Also I was lazy about doing a random IV, since I didn't understand the IO monad at the time/



Last Edited: 2010-10-17 12:43:56

+ Add a comment