In the spirit of the RSA algorithm in the shape of a dolphin, RC5 in six lines of Perl, and similar feats of encryption methods shrunk down to tattoo-worthy sizes, I present a one-time pad cipher golfed to 18 characters.
The arguments to this should be the pad file (acting as the key) and the message file. You should use a pad file the same length as the message file, or possibly longer. If you use one that's longer, you'll end up with unused pad data after your message.
Obviously don't use a pad that's shorter than the message. Also, it's called a one-time pad for a reason -- don't reuse the pad file for another message if you want the best security.
While public-key crypto has advantages there's also a place for shared-key ciphers, and this one should cost a lot less to put on a shirt or into the skin than some others. ;-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: encryption golf (one time pad)
by ikegami (Patriarch) on Mar 17, 2008 at 09:10 UTC | |
by mr_mischief (Monsignor) on Mar 17, 2008 at 09:25 UTC | |
by ikegami (Patriarch) on Mar 17, 2008 at 09:31 UTC | |
by mr_mischief (Monsignor) on Mar 17, 2008 at 09:36 UTC | |
by Hue-Bond (Priest) on Mar 17, 2008 at 10:49 UTC | |
by mr_mischief (Monsignor) on Mar 17, 2008 at 14:51 UTC | |
Re: encryption golf (one time pad)
by jwkrahn (Abbot) on Mar 17, 2008 at 09:21 UTC | |
by ikegami (Patriarch) on Mar 17, 2008 at 09:24 UTC | |
by jwkrahn (Abbot) on Mar 17, 2008 at 09:31 UTC | |
by ikegami (Patriarch) on Mar 17, 2008 at 09:40 UTC | |
by mr_mischief (Monsignor) on Mar 17, 2008 at 09:28 UTC |