@hackage crypto-classical0.2.0

An educational tool for studying classical cryptography schemes.

An educational tool for studying classical cryptography schemes. Do not encrypt anything of worth with this library.

Included Ciphers:

  • Caesar

  • Affine (Linear)

  • Substitution

  • Stream

  • Vigenere

  • Enigma (Wehrmacht Enigma I)

Thanks to polymorphism, we can generate keys and encrypt ByteStrings without worrying much about types:

> import Crypto.Classical
> import Lens.Micro
> :set -XOverloadedStrings
> (\k -> encrypt k "What a great day for an attack!" ^. enigma) . key <$> prng
"PXQS D KXSGB CFC AYK XJ DEGMON!"
> (\k -> encrypt k "What a great day for an attack!" ^. caesar) . key <$> prng
"RCVO V BMZVO YVT AJM VI VOOVXF!"