Îõ³h&6`3Jö      !"# $ % & ' ( ) * + , -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu Safe-Inferred vwx Safe-InferredÁÃ8yz(c) Dominic Steinitz 2003#BSD-style (see the file ReadMe.tex) experimentalportable Safe-InferredäCryptoŠBasic DES encryption which takes a key and a block of plaintext and returns the encrypted block of ciphertext according to the standard.Crypto‰Basic DES decryption which takes a key and a block of ciphertext and returns the decrypted block of plaintext according to the standard.(c) Dominic Steinitz 2001-2003#BSD-style (see the file ReadMe.tex) experimentalportable Safe-InferredCryptoªIn CBC or Cipher Block Chaining mode each block is XORed with the previous enciphered block before encryption. For the first block, start with an initialization vector. Take an encryption function, an initialisation vector, a key and a list of blocks and return the encrypted blocks using CBC.CryptoáTo decipher in CBC or Cipher Block Chaining mode, decipher each block, then XOR the result with the previous block of plaintext result. Note that the initialization vector is treated as the zeroth block of plaintext. Take a decryption function, an initialisation vector, a key and a list of encrypted blocks using CBC and return plaintext blocks. Safe-Inferred8    (c) John Meacham 2008#BSD-style (see the file ReadMe.tex) experimentalportable Safe-InferredÈ(c) Dominic Steinitz 2003#BSD-style (see the file ReadMe.tex) experimentalportable Safe-Inferred « Crypto/The basic 8-bit type for encoding and decoding.CryptoTake a number x convert it to base n as a list of octets.{Crypto÷This is used to (approximately) get back to a starting word list. For example, if you have a list of 3 Word8 and try to convert them to a Word32, the Word32 will get null-padded, and without correction, you will get 4 Word8s when converting back. This corrects it. Unfortunately, it also means you will have errors if trying to convert Word8 lists with nulls on the end.CryptoÊConverts a list of numbers into a list of octets. The resultant list has nulls trimmed from the end to make this the dual of listFromOctets (except when the original octet list ended with nulls; see {).CryptoThe most significant bit of an .CryptoÓTake a list of octets (a number expressed in base n) and convert it to a number.CryptoSee .Crypto¡Take the length of the required number of octets and convert the number to base 256 padding it out to the required length. If the required length is less than the number of octets of the converted number then return the converted number. NB this is different from the standard  8ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf% but mimics how replicate behaves.CryptoConvert from twos complement.  (c) Dominic Steinitz 2006#BSD-style (see the file ReadMe.tex) experimentalportable Safe-Inferred7(c) Dominic Steinitz 2003/BSD-style (see the file libraries/base/LICENSE) experimentalportable Safe-InferredB CryptoóTake a hash function, a seed and the intended length of the the mask and deliver a mask of the requested length.  /(c) David J. Sankel 2003, Dominic Steinitz 2003GPL (see the file ReadMe.tex) experimental non-portable Safe-Inferredû!CryptoÀTake a mask generating function, a hash function, a label (which may be null), a random seed, the modulus of the key and the message and returns an encoded message. NB you could pass in the length of the modulus but it seems safer to pass in the modulus itself and calculate the length when required. See  8ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf for more details."CryptoùTake a mask generating function, a hash function, a label (which may be null) and the message and returns the decoded.!"!" /(c) David J. Sankel 2003, Dominic Steinitz 2003GPL (see the file ReadMe.tex) experimental non-portable Safe-InferredÕ#CryptožTake the modulus of the RSA key and the public exponent expressed as lists of octets and the plaintext also expressed as a list of octets and return the ciphertext as a list of octets. Of course, these are all large integers but using lists of octets makes everything easier. See  9http://www.rsasecurity.com/rsalabs/pkcs/pkcs-1/index.html for more details.$Crypto»Take the modulus of the RSA key and the private exponent expressed as lists of octets and the ciphertext also expressed as a list of octets and return the plaintext as a list of octets.#$#$ (c) Dominic Steinitz 2003#BSD-style (see the file ReadMe.tex) experimentalportable Safe-Inferred´%CryptošWhen the last block of plaintext is shorter than the block size then it must be padded. PKCS5 specifies that the padding octets should each contain the number of octets which must be stripped off. So, for example, with a block size of 8, "0a0b0c" will be padded with "05" resulting in "0a0b0c0505050505". If the final block is a full block of 8 octets then a whole block of "0808080808080808" is appended.&Crypto»When the last block of plaintext is shorter than the block size then it must be padded. Nulls padding specifies that the padding octets should each contain a null. So, for example, with a block size of 8, "0a0b0c" will be padded to "0a0b0c0000000000". If the final block is a full block of 8 octets then a whole block of "0000000000000000" is appended. NB this is only suitable for data which does not contain nulls, for example, ASCII.'CryptoÇTake a list of blocks padded using the method described in PKCS5 (see  .http://www.rsasecurity.com/rsalabs/pkcs/pkcs-5Ä) and return the list of unpadded octets. NB this function does not currently check that the padded block is correctly formed and should only be used for blocks that have been padded correctly.(Crypto“Take a list of blocks padded with nulls and return the list of unpadded octets. NB if the blocks contain a null then the result is unpredictable.%&'(%'&( (c) Dominic Steinitz 2003#BSD-style (see the file ReadMe.tex) experimental non-portable Safe-InferredÈ)CryptoÐBasic Blowfish encryption which takes a key and a block of plaintext and returns the encrypted block of ciphertext according to the standard. Typical keys are Word8, Word16, Word32, Word64, Word128. See  &http://www.counterpane.com/vectors.txt.*CryptoôBasic Blowfish decryption which takes a key and a block of ciphertext and returns the decrypted block of plaintext.)*)* Safe-Inferred |Cryptokey (16 octets)Cryptomsg (16 octets)Cryptoenciphered msg (16 octets)}Cryptokey (24 octets)Cryptomsg (16 octets)Cryptoenciphered msg (16 octets)~Cryptokey (32 octets)Cryptomsg (16 octets)Cryptoenciphered msg (16 octets)Cryptokey (16 octets)Cryptoenciphered msg (16 octets)Cryptodeciphered msg (16 octets)€Cryptokey (24 octets)Cryptoenciphered msg (16 octets)Cryptodeciphered msg (16 octets)Cryptokey (32 octets)Cryptoenciphered msg (16 octets)Cryptodeciphered msg (16 octets)‚CryptonrCryptonkCryptokeyCryptomsgCryptoenciphered msgƒCryptonrCryptonkCryptokeyCryptoenciphered msgCryptodeciphered msg|}~€  Safe-Inferred"Ó+CryptoEncode binary data into the  Bubble Babble human readable encoding.  Bubble Babble‰ is an encoding that represents binary data as psuedowords which are more pronouncable and memorable than standard hexadecimal encoding.ÞIt is mainly used for representing cryptographic fingerprints. In addition, there is an amount of redundancy and error correction built into the representation so that transcription errors can be more readily identified. See also  Îhttp://web.mit.edu/kenta/www/one/bubblebabble/spec/jrtrjwzi/draft-huima-01.txt6"The Bubble Babble Binary Data Encoding" specification for more details.++ Safe-Inferred"û„…†‡ˆ‰Š‹ŒŽ‘’“ (c) Dominic Steinitz 2004#BSD-style (see the file ReadMe.tex) experimentalportable Safe-Inferred$:,Crypto–Take [Octet] and return [Octet] according to the standard. The length of the result is always 16 octets or 128 bits as required by the standard.,,(c) Dominic Steinitz 2007#BSD-style (see the file ReadMe.tex) experimentalportable Safe-Inferred$¶-./01-.10/(c) Russell O'Connor 2006#BSD-style (see the file ReadMe.tex) Safe-Inferred)F ”Crypto” currently requires that the • of a divide the • of w–CryptoDue to the limitations of ”, –) currently requires that the bitSize of a divide the • of w9Crypto9 currently requires that the • of a divide 32:Crypto: currently requires that the • of a divide 64;Crypto: currently requires that the • of a divide 64<Crypto< currently requires that the • of a divide 32=Crypto=ð assumes that all characters of the strings are ISO-latin-1 characters. ie. each characters fits in one octet.>Crypto>ð assumes that all characters of the strings are ISO-latin-1 characters. ie. each characters fits in one octet.?Crypto?ð assumes that all characters of the strings are ISO-latin-1 characters. ie. each characters fits in one octet.@Crypto@ð assumes that all characters of the strings are ISO-latin-1 characters. ie. each characters fits in one octet. 456789:;<=>?@ <@59=8:>6;?74(c) Russell O'Connor 2006#BSD-style (see the file ReadMe.tex) Safe-Inferred*hOCrypto–Take [Octet] and return [Octet] according to the standard. The length of the result is always 28 octets or 224 bits as required by the standard.OO(c) Russell O'Connor 2006#BSD-style (see the file ReadMe.tex) Safe-Inferred+rPCrypto–Take [Octet] and return [Octet] according to the standard. The length of the result is always 32 octets or 256 bits as required by the standard.PP(c) Russell O'Connor 2006#BSD-style (see the file ReadMe.tex) Safe-Inferred,|QCrypto–Take [Octet] and return [Octet] according to the standard. The length of the result is always 48 octets or 384 bits as required by the standard.QQ(c) Russell O'Connor 2006#BSD-style (see the file ReadMe.tex) Safe-Inferred-†RCrypto–Take [Octet] and return [Octet] according to the standard. The length of the result is always 64 octets or 512 bits as required by the standard.RR(c) Greg Heartsfield 2007#BSD-style (see the file ReadMe.tex) Safe-Inferred0þSCrypto…HMAC works over any hash function, which is represented by HashMethod. A hash function and input block size must be specified.UCryptoAn arbitrary hash functionVCrypto/Bit size of an input block to the hash functionWCrypto   9 ?@@AB?CD.EFGHIJKLMNOPQRSTUVWXYZ[\]^????__`abcdefg@hijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘‘’’““”•–—˜™š›œ%Crypto-4.2.5.2-E8QNGLFTOyaGEV3GVFJ4c3Codec.Encryption.DESCodec.Encryption.Modes!Codec.Encryption.RSA.NumberTheoryCodec.Encryption.TEA Codec.UtilsCodec.Text.RawCodec.Encryption.RSA.MGFCodec.Encryption.RSA.EMEOAEPCodec.Encryption.RSACodec.Encryption.PaddingCodec.Encryption.BlowfishCodec.Binary.BubbleBabbleData.Digest.MD5Data.Digest.SHA1Data.Digest.SHA2Data.Digest.SHA224Data.Digest.SHA256Data.Digest.SHA384Data.Digest.SHA512 Data.HMACData.LargeWordCodec.Encryption.AESCodec.Encryption.BlowfishAuxCodec.Encryption.DESAuxCodec.Encryption.AESAuxData.Digest.MD5AuxencryptdecryptcbcunCbc randomOctetfactorinverse testInverse extEuclGcdgetPrimepgisPrimesimplePrimalityTestrabinMillerPrimalityTestexpmod/|primesTEAKeyOctettoOctets listToOctetsmsb fromOctetslistFromOctetsi2osp fromTwosComp toTwosComphexdump hexdumpBymgfencodedecodepkcs5padNullsunPkcs5 unPadNullshashWord160 toIntegerlift2 $fEqWord160 $fShowWord160Hash224Hash384Hash512Hash256sha256sha384sha512sha224 sha256Ascii sha384Ascii sha512Ascii sha224Ascii$fShaDataWord64$fShaDataWord32 $fShowHash8 $fShowHash384 $fShowHash224 $fHashHash224 $fHashHash384 $fHashHash8 $fEqHash224 $fOrdHash224 $fEqHash384 $fOrdHash384 $fEqHash8 $fOrdHash8 HashMethoddigestinput_blocksize hmac_sha1hmac_md5hmacWord256Word224Word192Word128Word96LargeKey$fLargeWordWord64$fLargeWordWord32$fEnumLargeKey$fRealLargeKey$fIntegralLargeKey$fBoundedLargeKey$fBitsLargeKey $fNumLargeKey$fShowLargeKey$fLargeWordLargeKey $fEqLargeKey $fOrdLargeKeyAESKey$fAESKeyIndirectionLargeKey$fAESKeyIndirectionLargeKey0$fAESKeyIndirectionLargeKey1$fAESKeyLargeKey$fAESKeyLargeKey0$fAESKeyLargeKey1bfEncbfDec bfMakeKeydes_encdes_dec trimNulls aes128Encrypt aes192Encrypt aes256Encrypt aes128Decrypt aes192Decrypt aes256Decrypt aesEncrypt aesDecryptMD5finishedget_nextlen_padWordListBoolListStrABCDZord64md5md5smd5ipaddingbaseGHC.BitsbitSizesha