@hackage crypto-classical0.0.3
An educational tool for studying classical cryptography schemes.
Categories
License
BSD-3-Clause
Maintainer
colingw@gmail.com
Links
Versions
Installation
Dependencies (12)
- QuickCheck >=2.8.1
- base >=4.7 && <4.9
- bytestring
- containers >=0.5.5.1
- crypto-numbers >=0.2.7
- crypto-random Show all…
Dependents (1)
@hackage/acme-everything
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 Control.Lens > :set -XOverloadedStrings > (key <$> prng) >>= \k -> return (encrypt k "What a great day for an attack!" ^. enigma) "PXQS D KXSGB CFC AYK XJ DEGMON!" > (key <$> prng) >>= \k -> return (encrypt k "What a great day for an attack!" ^. caesar) "RCVO V BMZVO YVT AJM VI VOOVXF!"