crypto-classical-0.2.0: An educational tool for studying classical cryptography schemes.

Copyright(c) Colin Woodbury, 2015
LicenseBSD3
MaintainerColin Woodbury <colingw@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Crypto.Classical.Test

Contents

Description

 

Synopsis

Cipher Tests

cycleT :: (Monad c, Cipher k c) => (c ByteString -> ByteString) -> IO () Source

An encrypted message should decrypt to the original plaintext.

notSelfT :: (Monad c, Cipher k c) => (c ByteString -> ByteString) -> IO () Source

A message should never encrypt to itself.

diffKeyT :: (Eq k, Monad c, Cipher k c) => (c ByteString -> ByteString) -> IO () Source

Different keys should yield different encryptions.

noSelfMappingT :: IO () Source

A letter can never encrypt to itself.

Misc. Tests

stretchT :: IO () Source

A stretch should always double the length.

plugFromT :: IO () Source

Any list of pairs should always result in a Plugboard of 26 mappings.

Batch Tests

testAll :: IO () Source

Run every test on every Cipher.