crypto-cipher-tests-0.0.6: Generic cryptography cipher tests

PortabilityExcellent
StabilityStable
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellNone

Crypto.Cipher.Tests

Contents

Description

 

Synopsis

Documentation

testBlockCipher :: BlockCipher a => KATs -> a -> TestSource

Return tests for a specific blockcipher and a list of KATs

testStreamCipher :: StreamCipher a => [KAT_Stream] -> a -> TestSource

Return tests for a specific streamcipher and a list of KATs

KATs

defaultKATs :: KATsSource

the empty KATs

defaultStreamKATs :: [KAT_Stream]Source

the empty KATs for stream

data KATs Source

all the KATs. use defaultKATs to prevent compilation error from future expansion of this data structure

Constructors

KATs 

Instances

data KAT_ECB Source

ECB KAT

Constructors

KAT_ECB 

Fields

ecbKey :: ByteString

Key

ecbPlaintext :: ByteString

Plaintext

ecbCiphertext :: ByteString

Ciphertext

Instances

data KAT_CBC Source

CBC KAT

Constructors

KAT_CBC 

Instances

data KAT_CTR Source

CTR KAT

Constructors

KAT_CTR 

Fields

ctrKey :: ByteString

Key

ctrIV :: ByteString

IV (usually represented as a 128 bits integer)

ctrPlaintext :: ByteString

Plaintext

ctrCiphertext :: ByteString

Ciphertext

Instances

data KAT_XTS Source

XTS KAT

Constructors

KAT_XTS 

Fields

xtsKey1 :: ByteString

1st XTS key

xtsKey2 :: ByteString

2nd XTS key

xtsIV :: ByteString

XTS IV

xtsPlaintext :: ByteString

plaintext

xtsCiphertext :: ByteString

Ciphertext

Instances

data KAT_AEAD Source

AEAD KAT

Constructors

KAT_AEAD 

Fields

aeadMode :: AEADMode

AEAD mode to use

aeadKey :: ByteString

Key

aeadIV :: ByteString

IV for initialization

aeadHeader :: ByteString

Authentificated Header

aeadPlaintext :: ByteString

Plaintext

aeadCiphertext :: ByteString

Ciphertext

aeadTaglen :: Int

aead tag len

aeadTag :: AuthTag

expected tag

Instances