úÎ%ò!e      Safe-Inferred  ! !  ! portable betaThomas.DuBuisson@gmail.com Safe-Inferred"#$%&'()*+"#$%&'()*+ portable betaThomas.DuBuisson@gmail.comNone ,0Verify hashing a lazy bytestring is the same as + hashing the strict bytestring equivalent. -1Verify the Serialize and Binary instances result 9 in bytestrings of the correct length for a given digest .6Verify the Serilize and Binary (decode . encode = id) /verify: ! blockLength .::. d `rem` 8 == 0 0verify " outputLength .::. d `rem` 8 == 0 8Construct a test group to check common hash properties.  Properties include: Q Operating on lazy bytestrings obtains the same result as on strict bytestrings. R The length of the digest (instance definition) matches the Serialize definition.  encode . decode == id ( Hash block length is byte aligned (the  'crypto-api' operations require this!) < The digest (output) length is byte aligned (also needed by  'crypto-api') 1some generic blockcipher tests Build test groups for encrypt/decrypt identity and 8 equality of operations on strict and lazy ByteStrings. 7Admittedly, these tests conflate testing the algorithm 4 in question and testing the mode implementation in  'crypto-api',  but more testing isn't exactly a bad thing. 1Convert hex strings to bytestrings, for example:  0 "3adf91c0" ==> B.pack [0x3a, 0xdf, 0x91, 0xc0] QStrings of odd length will cause an exception as will non-hex characters such as '0x'. ,-./0123456789:;<=>?@ABCDE FG  ,-./0123456789:;<=>?@ABCDE FGNone OBased on NIST KATs, build a list of Tests for the instantiated AES algorithm.  e.g. -runTests $ makeAESTests (undefined :: AES128) :This is just a hack-job, if the BlockCipher instance doesn' t toss keys  of incorrect length then you'3ll get this test running, say, AES128 being tested 5 with the first 128 bits of AES192 and AES256 tests.  HIJKL   HIJKLNone MN   MNNoneOPQOPQNoneRSTUVRSTUVNoneWXWXY    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYXZ[\]^_`aPbcrypto-api-tests-0.2 Test.CryptoTest.ParseNistKATsTest.AESTest.SHA Test.HMAC Test.TwoFishTest.MD5Paths_crypto_api_teststest-framework-0.8Test.Framework.Runners.Console defaultMain TestCategory TypedTestNistTestRecord PropertiesparseCategoriesmakeHashPropTestsmakeBlockCipherPropTests hexStringToBS makeAESTests makeSHA1TestsmakeSHA224TestsmakeSHA256TestsmakeSHA384TestsmakeSHA512TestsmakeSHA1HMACTestsmakeSHA224HMACTestsmakeSHA256HMACTestsmakeSHA384HMACTestsmakeSHA512HMACTestsmakeTwoFishTests makeMD5TestscatchIOversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileName elimComments elimWhite getCategories getCategory parseProp parseTests parseRecordnotNulltrimchunkprop_LazyStrictEqualprop_DigestLenprop_GetPutHashprop_BlockLengthIsByteAlignedprop_OutputLengthIsByteAlignedgoodKeybKeygetKeybIVisRight comparePaddedprop_ECBEncDecIDprop_BlockMode_EncDec_IDprop_CBCEncDecIDprop_CFBEncDecIDprop_OFBEncDecIDprop_CTREncDecID takeBlockSizel2bprop_StrictLazyEqprop_OFBStrictLazyEqprop_CBCStrictLazyEqprop_CFBStrictLazyEqprop_CTRStrictLazyEqprop_ECBStrictLazyEqtoD$fArbitraryByteString$fArbitraryByteString0 getAES_KATsnistTestsToKAT_AEStestToKatBasicisEnc funcAndBoolgetTestshashNistTestToPairsnistTestToPairsalgToLengetKATs buildTestFuncbuildTestBasiclookupBtoKeymd5KATs