License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | Stable |
Portability | Excellent |
Safe Haskell | None |
Language | Haskell98 |
Crypto.Cipher.Tests
Contents
Description
Synopsis
- testBlockCipher :: BlockCipher a => KATs -> a -> Test
- testBlockCipherIO :: BlockCipherIO a => KATs -> a -> Test
- testStreamCipher :: StreamCipher a => [KAT_Stream] -> a -> Test
- defaultKATs :: KATs
- defaultStreamKATs :: [KAT_Stream]
- data KATs = KATs {}
- data KAT_Stream = KAT_Stream {
- streamKey :: ByteString
- streamPlaintext :: ByteString
- streamCiphertext :: ByteString
- data KAT_ECB = KAT_ECB {
- ecbKey :: ByteString
- ecbPlaintext :: ByteString
- ecbCiphertext :: ByteString
- data KAT_CBC = KAT_CBC {
- cbcKey :: ByteString
- cbcIV :: ByteString
- cbcPlaintext :: ByteString
- cbcCiphertext :: ByteString
- data KAT_CFB = KAT_CFB {
- cfbKey :: ByteString
- cfbIV :: ByteString
- cfbPlaintext :: ByteString
- cfbCiphertext :: ByteString
- data KAT_CTR = KAT_CTR {
- ctrKey :: ByteString
- ctrIV :: ByteString
- ctrPlaintext :: ByteString
- ctrCiphertext :: ByteString
- data KAT_XTS = KAT_XTS {
- xtsKey1 :: ByteString
- xtsKey2 :: ByteString
- xtsIV :: ByteString
- xtsPlaintext :: ByteString
- xtsCiphertext :: ByteString
- data KAT_AEAD = KAT_AEAD {
- aeadMode :: AEADMode
- aeadKey :: ByteString
- aeadIV :: ByteString
- aeadHeader :: ByteString
- aeadPlaintext :: ByteString
- aeadCiphertext :: ByteString
- aeadTaglen :: Int
- aeadTag :: AuthTag
Documentation
testBlockCipher :: BlockCipher a => KATs -> a -> Test Source #
Return tests for a specific blockcipher and a list of KATs
testBlockCipherIO :: BlockCipherIO a => KATs -> a -> Test Source #
Return test for a specific blockcipher and a list of KATs
testStreamCipher :: StreamCipher a => [KAT_Stream] -> a -> Test Source #
Return tests for a specific streamcipher and a list of KATs
KATs
defaultKATs :: KATs Source #
the empty KATs
defaultStreamKATs :: [KAT_Stream] Source #
the empty KATs for stream
all the KATs. use defaultKATs to prevent compilation error from future expansion of this data structure
Constructors
KATs | |
data KAT_Stream Source #
KAT for Stream cipher
Constructors
KAT_Stream | |
Fields
|
Instances
Eq KAT_Stream Source # | |
Defined in Crypto.Cipher.Tests.KATs | |
Show KAT_Stream Source # | |
Defined in Crypto.Cipher.Tests.KATs Methods showsPrec :: Int -> KAT_Stream -> ShowS show :: KAT_Stream -> String showList :: [KAT_Stream] -> ShowS |
ECB KAT
Constructors
KAT_ECB | |
Fields
|
CBC KAT
Constructors
KAT_CBC | |
Fields
|
CFB KAT
Constructors
KAT_CFB | |
Fields
|
CTR KAT
Constructors
KAT_CTR | |
Fields
|
XTS KAT
Constructors
KAT_XTS | |
Fields
|
AEAD KAT
Constructors
KAT_AEAD | |
Fields
|