DIY Cryptography with Perl 6

by Arne Sommer

DIY Cryptography with Perl 6

This article is not about using existing cryptography methods in Perl 6, but presents a home made algorithm by yours truly.

To quote Loup Vaillant: «Rolling Your Own Crypto: The standard advice is "don't". You think you know what you're doing? You don't. You think your crypto is secure? It's broken. Just give up. You are not smart enough, you are not wise enough. Those who invented secure crypto just aren't human.»

I'll have a go at it anyway. Sit back, and enjoy the show as I shoot myself in the foot. Or the feet.

This article is quite large, and come in four parts:
Part 1: Base 36
Part 2: Base 400
Part 3: Changing Keys
Part 4: Postscript

The programs presented in part 2, 3 & 4 must be run from the current directory, as they rely on the module directory «lib» being there.

Do not use any of these programs (or algorithms) to encrypt important information.

Further Reading

A beginners guide to codebreaking by Prof. Graham A. Niblo (PDF)
The Code Book by Simon Singh (Book)