Haskell Cipher Saber
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.
Download and Usage
- cipherSaber.hs -- Encrypter/Decrypter in Haskell
- cipherSaberDecrypt.c -- Same thing in c
- Encryption Usage: cipherSaber e key inputFileName outputFileName
- Decryption Usage: cipherSaber d key inputFileName outputFileName
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 it seems like the Random module is a pain.
Comments(0)
2009-07-26 23:41:28
Add your comment:
Hardware
Software
- TAIM (Alpha Version): GHCI integration with vim
- CheaTorrent -- An evil BitTorrent client
- Self Modifying 2D Turing Automata
- Competing Conway Life Automata
- X11 Timelapse Desktop Video
- Colored Wolfram Automata With Sound Input
- Pseudo Video Feedback in Processing
- Haskell Cipher Saber
- Illegal FIlenames -- Windows and *nix
- Simple Perl SDL Music Keyboard (Updated)
- Image to Spectrogram
- Pastebin Hell
- OMGWTFRNG (OWR)
- OTP Enhancement : Failure Report
- Java Network File Transfer Tool
- AES Encrypted Filesystem Speeds
- Dual Message Encryption
- PHP Website
- Mp3 Splitting Script
- Random Obfuscation Tool
- Filesystem Speed Comparisons
- Java Based Web Server GUI