-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Generic cryptography cipher tests
--   
--   Generic cryptography cipher tests
@package crypto-cipher-tests
@version 0.0.11


module Crypto.Cipher.Tests

-- | Return tests for a specific blockcipher and a list of KATs
testBlockCipher :: BlockCipher a => KATs -> a -> Test

-- | Return test for a specific blockcipher and a list of KATs
testBlockCipherIO :: BlockCipherIO a => KATs -> a -> Test

-- | Return tests for a specific streamcipher and a list of KATs
testStreamCipher :: StreamCipher a => [KAT_Stream] -> a -> Test

-- | the empty KATs
defaultKATs :: KATs

-- | the empty KATs for stream
defaultStreamKATs :: [KAT_Stream]

-- | all the KATs. use defaultKATs to prevent compilation error from future
--   expansion of this data structure
data KATs
KATs :: [KAT_ECB] -> [KAT_CBC] -> [KAT_CFB] -> [KAT_CTR] -> [KAT_XTS] -> [KAT_AEAD] -> KATs
kat_ECB :: KATs -> [KAT_ECB]
kat_CBC :: KATs -> [KAT_CBC]
kat_CFB :: KATs -> [KAT_CFB]
kat_CTR :: KATs -> [KAT_CTR]
kat_XTS :: KATs -> [KAT_XTS]
kat_AEAD :: KATs -> [KAT_AEAD]

-- | KAT for Stream cipher
data KAT_Stream
KAT_Stream :: ByteString -> ByteString -> ByteString -> KAT_Stream
streamKey :: KAT_Stream -> ByteString
streamPlaintext :: KAT_Stream -> ByteString
streamCiphertext :: KAT_Stream -> ByteString

-- | ECB KAT
data KAT_ECB
KAT_ECB :: ByteString -> ByteString -> ByteString -> KAT_ECB

-- | Key
ecbKey :: KAT_ECB -> ByteString

-- | Plaintext
ecbPlaintext :: KAT_ECB -> ByteString

-- | Ciphertext
ecbCiphertext :: KAT_ECB -> ByteString

-- | CBC KAT
data KAT_CBC
KAT_CBC :: ByteString -> ByteString -> ByteString -> ByteString -> KAT_CBC

-- | Key
cbcKey :: KAT_CBC -> ByteString

-- | IV
cbcIV :: KAT_CBC -> ByteString

-- | Plaintext
cbcPlaintext :: KAT_CBC -> ByteString

-- | Ciphertext
cbcCiphertext :: KAT_CBC -> ByteString

-- | CFB KAT
data KAT_CFB
KAT_CFB :: ByteString -> ByteString -> ByteString -> ByteString -> KAT_CFB

-- | Key
cfbKey :: KAT_CFB -> ByteString

-- | IV
cfbIV :: KAT_CFB -> ByteString

-- | Plaintext
cfbPlaintext :: KAT_CFB -> ByteString

-- | Ciphertext
cfbCiphertext :: KAT_CFB -> ByteString

-- | CTR KAT
data KAT_CTR
KAT_CTR :: ByteString -> ByteString -> ByteString -> ByteString -> KAT_CTR

-- | Key
ctrKey :: KAT_CTR -> ByteString

-- | IV (usually represented as a 128 bits integer)
ctrIV :: KAT_CTR -> ByteString

-- | Plaintext
ctrPlaintext :: KAT_CTR -> ByteString

-- | Ciphertext
ctrCiphertext :: KAT_CTR -> ByteString

-- | XTS KAT
data KAT_XTS
KAT_XTS :: ByteString -> ByteString -> ByteString -> ByteString -> ByteString -> KAT_XTS

-- | 1st XTS key
xtsKey1 :: KAT_XTS -> ByteString

-- | 2nd XTS key
xtsKey2 :: KAT_XTS -> ByteString

-- | XTS IV
xtsIV :: KAT_XTS -> ByteString

-- | plaintext
xtsPlaintext :: KAT_XTS -> ByteString

-- | Ciphertext
xtsCiphertext :: KAT_XTS -> ByteString

-- | AEAD KAT
data KAT_AEAD
KAT_AEAD :: AEADMode -> ByteString -> ByteString -> ByteString -> ByteString -> ByteString -> Int -> AuthTag -> KAT_AEAD

-- | AEAD mode to use
aeadMode :: KAT_AEAD -> AEADMode

-- | Key
aeadKey :: KAT_AEAD -> ByteString

-- | IV for initialization
aeadIV :: KAT_AEAD -> ByteString

-- | Authentificated Header
aeadHeader :: KAT_AEAD -> ByteString

-- | Plaintext
aeadPlaintext :: KAT_AEAD -> ByteString

-- | Ciphertext
aeadCiphertext :: KAT_AEAD -> ByteString

-- | aead tag len
aeadTaglen :: KAT_AEAD -> Int

-- | expected tag
aeadTag :: KAT_AEAD -> AuthTag
