.      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    !!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""""""" " " " " """"""""""""""""""" "!"""#"$"%"&"'"(")"*"+","-#.#/$0$1$2$3$4$5$6$7$8$9$:$;$<$=$>$?$@$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$[$\$]$^$_%`%a&b&c&d&e'f(g(h(i(j)k)l)m)n)o)p)q)r)s)t)u*v*w*x*y*z*{*|*}*~****+++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,---------------------------------...................../////////////////////0000111111 1 1 1 1 1111111111111222222 2!2"3#3$3%3&3'3(3)3*3+4,4-4.4/404142434445464748494:4;4<4=4>4?4@4A4B4C4D4E4F4G4H4I4J4K4L4M4N5O5P6Q6R6S6T6U6V6W6X6Y6Z6[6\6]6^6_6`6a6b6c6d6e6f6g6h6i6j6k6l6m6n6o6p6q6r6s6t6u6v6w6x6y6z6{6|6}6~66666667777777778889999999999999999::::::::::::::::::::;;;;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<===>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > > > >>>>>>>>>>>>>>>>>>> >!>">#>$>%>&>'>(>)>*?+?,@-@{A BSD-styleSafe;=;.a DES block (64 bits)/Basic DES encryption which takes a key and a block of plaintext and returns the encrypted block of ciphertext according to the standard.0Basic DES decryption which takes a key and a block of ciphertext and returns the decrypted block of plaintext according to the standard..12/0.12 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone@Format of padding%PKCS5: PKCS7 with hardcoded size of 8)PKCS7 with padding size between 1 and 255zero padding with block sizeApply some pad to a bytearray,Try to remove some padding from a bytearray.B BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneE33Perform io for hashes that do allocation and FFI. 4 is used when possible as the computation is pure and the output is directly linked to the input. We also do not modify anything after it has been returned to the user.563C BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneF.:789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopD BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneI<q=Chunk some input byte array into @sz byte list of byte array.qE BSD-style#Vincent Hanquez <vincent@snarc.org>stableCompatNoneDQmr$Byteswap Word# to or from Big Endian0On a big endian machine, this function is a nop.s'Byteswap Word# to or from Little Endian3On a little endian machine, this function is a nop.tVSimple compatibility for byteswap the lower 32 bits of a Word# at the primitive levelu<Combine 4 word8 [a,b,c,d] to a word32 representing [a,b,c,d]vpSimple wrapper to handle pre 7.8 and future, where most comparaison functions don't returns a boolean anymore.rstuvF BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeRwxG BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeT,yz{|}~5wxH BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-FKTf .Represent a digest for a given hash algorithm.This type is an instance of j from package  *https://hackage.haskell.org/package/memorymemory . Module Data.ByteArrayY provides many primitives to work with those values including conversion to other types.CCreating a digest from a bytearray is also possible with function I. /Represent a context for a given hash algorithm. &Class representing hashing algorithms.The interface presented here is update in place and lowlevel. the Hash module takes care of hidding the mutable interface properly. 8Associated type for the block size of the hash algorithm 9Associated type for the digest size of the hash algorithm CAssociated type for the internal context size of the hash algorithm&Get the block size of a hash algorithm'Get the digest size of a hash algorithm5Get the size of the context used for a hash algorithmEInitialize a context pointer to the initial state of a hash algorithm%Update the context with some raw dataEFinalize the context and set the digest raw memory to the right value    J BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTi&Whirlpool cryptographic hash algorithmK BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTk'"Tiger cryptographic hash algorithmL BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTo0Skein512 (512 bits) cryptographic hash algorithm0Skein512 (384 bits) cryptographic hash algorithm0Skein512 (256 bits) cryptographic hash algorithm0Skein512 (224 bits) cryptographic hash algorithmM BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTr 0Skein256 (256 bits) cryptographic hash algorithm"0Skein256 (224 bits) cryptographic hash algorithm !"# !"#N BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTv$/SHA512t (256 bits) cryptographic hash algorithm&/SHA512t (224 bits) cryptographic hash algorithm$%&'$%&'O BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTx0(#SHA512 cryptographic hash algorithm()()P BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTz>*#SHA384 cryptographic hash algorithm*+*+Q BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT~,,SHA3 (512 bits) cryptographic hash algorithm.,SHA3 (384 bits) cryptographic hash algorithm0,SHA3 (256 bits) cryptographic hash algorithm2,SHA3 (224 bits) cryptographic hash algorithm,-./0123,-./0123R BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT4#SHA256 cryptographic hash algorithm4545S BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT6#SHA224 cryptographic hash algorithm6767T BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT8!SHA1 cryptographic hash algorithm8989U BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT:&RIPEMD160 cryptographic hash algorithm:;:;V BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT < MD5 cryptographic hash algorithm<=<=W BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT > MD4 cryptographic hash algorithm>?>?X BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT @ MD2 cryptographic hash algorithm@A@AY BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTB.Keccak (512 bits) cryptographic hash algorithmD.Keccak (384 bits) cryptographic hash algorithmF.Keccak (256 bits) cryptographic hash algorithmH.Keccak (224 bits) cryptographic hash algorithmBCDEFGHIBCDEFGHI BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneKVJA Mutable hash contextK"Create a new mutable hash context.Jthe algorithm used is automatically determined from the return constraint.L"Create a new mutable hash context.0The algorithm is explicitely passed as parameterM&Update a mutable hash context in placeN4Finalize a mutable hash context and compute a digestO:Reset the mutable context to the initial state of the hash JKLMNO JKLMNOJZ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTuQ0Blake2sp (256 bits) cryptographic hash algorithmS0Blake2sp (224 bits) cryptographic hash algorithmQRSTQRST[ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FTLU/Blake2s (256 bits) cryptographic hash algorithmW/Blake2s (224 bits) cryptographic hash algorithmY/Blake2s (160 bits) cryptographic hash algorithmUVWXYZUVWXYZ\ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT[0Blake2bp (512 bits) cryptographic hash algorithm[\[\] BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone-1FT]/Blake2b (512 bits) cryptographic hash algorithm_/Blake2b (384 bits) cryptographic hash algorithma/Blake2b (256 bits) cryptographic hash algorithmc/Blake2b (224 bits) cryptographic hash algorithme/Blake2b (160 bits) cryptographic hash algorithm ]^_`abcdef]^_`abcdef^ BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNone1FTgBA simple Either like type to represent a computation that can fail2 possibles values are:hH : The computation succeeded, and contains the result of the computationiJ : The computation failed, and contains the cryptographic error associatedjDEnumeration of all possible errors that can be found in this library^Throw an CryptoError as exception on CryptoFailed result, otherwise return the computed valueSame as $ but throw the error asynchronously.Simple ( like combinator for CryptoFailable type'Transform a CryptoFailable to an Either%Transform a CryptoFailable to a Maybeghijklmnopqrstuvwxyz{|}~ghijklmnopqrstuvwxyz{|}~ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneghijklmnopqrstuvwxyz{|}~jklmnopqrstuvwxyz{|}~ghi_ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneCKV Symmetric cipher class.&Initialize a cipher context from a key Cipher nameYreturn the size of the key required for this cipher. Some cipher accept any size for key AEAD Mode%Authentication Tag for AE cipher mode7Offset inside an XTS data unit, measured in block size.)Different specifier for key size in bytesin the range [min,max]one of the specified valuesa specific size` BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneSymmetric stream cipher classCombine using the stream ciphera BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone )Compute the gfmul with the XTS polynomialblock size need to be 128 bits."FIXME: add support for big endian.b BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneCQVF8Authenticated Encryption with Associated Data algorithmsAEAD Implementation1Append some header information to an AEAD context-Encrypt some data and update the AEAD context-Decrypt some data and update the AEAD context;Finalize the AEAD context and return the authentication tagSimple AEAD encryptionSimple AEAD decryptionA new AEAD Context#Optional Authentication data headerOptional Plaintext Tag length!Authentication tag and ciphertextA new AEAD Context#Optional Authentication data header CiphertextThe authentication tag Plaintextc BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone%>?CQV0class of block cipher with a 128 bits block sizeencrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block onlydecrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block onlySymmetric block cipher class7Return the size of block required for this block cipherEncrypt blocks6the input string need to be multiple of the block sizeDecrypt blocks6the input string need to be multiple of the block sizeencrypt using the CBC mode.,input need to be a multiple of the blocksizedecrypt using the CBC mode.,input need to be a multiple of the blocksizeencrypt using the CFB mode.,input need to be a multiple of the blocksizedecrypt using the CFB mode.,input need to be a multiple of the blocksizecombine using the CTR mode.hCTR mode produce a stream of randomized data that is combined (by XOR operation) with the input stream.1encryption and decryption are the same operation.input can be of any sizeInitialize a new AEAD State:When Nothing is returns, it means the mode is not handled. XTS callback an IV parametrized by the cipher)Create an IV for a specified block cipher:Create an IV that is effectively representing the number 0Increment an IV by a number.&Assume the IV is in Big Endian format.2Usually represent the Data Unit (e.g. disk sector)+Offset in the data unit in number of blocks Plaintext Ciphertext2Usually represent the Data Unit (e.g. disk sector)+Offset in the data unit in number of blocks Ciphertext Plaintext2Usually represent the Data Unit (e.g. disk sector)+Offset in the data unit in number of blocksDataProcessed Data!  BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone1AA BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneKKCompute Miyaguchi-Preneel one way compress using the supplied block cipher.{Compute Miyaguchi-Preneel one way compress using the infered block cipher. Only safe when KEY-SIZE equals to BLOCK-SIZE. Simple usage "mp' msg :: MiyaguchiPreneel AES128%computation step of Miyaguchi-PreneelSkey build function to compute Miyaguchi-Preneel. care about block-size and key-size input message output tag input message output tagNoneO  BSD-style experimental???None*L3DES where the first and third keys are equal, used in alternative directionI3DES where the first and third keys are equal, used in the same direction83DES with 3 different keys used in alternative direction93DES with 3 different keys used all in the same direction  BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone DES Context  BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneK Salsa context\Initialize a new Salsa context with the number of rounds, the key and the nonce associated.pCombine the salsa output and an arbitrary message with a xor, and return the combined output and the new state.9Generate a number of bytes from the Salsa output directlynumber of rounds (8,12,20)the key (128 or 256 bits)the nonce (64 or 96 bits)the initial Salsa statethe current Salsa state$the source to xor with the generatorthe current Salsa statethe length of data to generate  BSD-style-Brandon Hamilton <brandon.hamilton@gmail.com>stablegoodNone ]Initialize a new XSalsa context with the number of rounds, the key and the nonce associated.number of rounds (8,12,20)the key (256 bits)the nonce (192 bits)the initial XSalsa state  BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneKThe encryption state for RC4%C Call for initializing the encryptorRC4 context initialization.gseed the context with an initial key. the key size need to be adequate otherwise security takes a hit.Pgenerate the next len bytes of the rc4 stream without combining it to anything.3RC4 xor combination of the rc4 stream with an inputPointer to the permutationPointer to the clear textLength of the clear text Output buffer The rc4 keyThe key length The contextThe key%The RC4 context with the key mixed in rc4 contextinputnew rc4 context, and the output BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneK!<ChaCha context for DRG purpose (see Crypto.Random.ChaChaDRG)ChaCha context]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.Initialize simple ChaCha State*The seed need to be at least 40 bytes longqCombine the chacha output and an arbitrary message with a xor, and return the combined output and the new state.:Generate a number of bytes from the ChaCha output directly similar to  but assume certains valuesnumber of rounds (8,12,20)the key (128 or 256 bits)the nonce (64 or 96 bits)the initial ChaCha statea 40 bytes long seedthe current ChaCha state$the source to xor with the generatorthe current ChaCha statethe length of data to generated BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone%Kf! AESCCM State AESOCB State AESGCM StateAES Context (pre-processed key))Create an AES AEAD implementation for GCM)Create an AES AEAD implementation for OCB)Create an AES AEAD implementation for CCM#Initialize a new context with a keyRKey needs to be of length 16, 24 or 32 bytes. Any other values will return failure(encrypt using Electronic Code Book (ECB))encrypt using Cipher Block Chaining (CBC)vgenerate a counter mode pad. this is generally xor-ed to an input to make the standard counter mode block operations.if the length requested is not a multiple of the block cipher size, more data will be returned, so that the returned bytearray is a multiple of the block cipher size.vgenerate a counter mode pad. this is generally xor-ed to an input to make the standard counter mode block operations.if the length requested is not a multiple of the block cipher size, more data will be returned, so that the returned bytearray is a multiple of the block cipher size. Similiar to - but also return the next IV for continuation encrypt using Counter mode (CTR)<in CTR mode encryption and decryption is the same operation.encrypt using XTSdthe first key is the normal block encryption key the second key is used for the initial block tweak(decrypt using Electronic Code Book (ECB))decrypt using Cipher block chaining (CBC)!decrypt using Counter mode (CTR).<in CTR mode encryption and decryption is the same operation.decrypt using XTSinitialize a gcm contextGappend data which is only going to be authenticated to the GCM context.Uneeds to happen after initialization and before appending encryption/decryption data.4append data to encrypt and append to the GCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.4append data to decrypt and append to the GCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.!Generate the Tag from GCM contextinitialize an ocb contextGappend data which is going to just be authenticated to the OCB context.Tneed to happen after initialization and before appending encryption/decryption data.4append data to encrypt and append to the OCB contextthe bytearray needs to be a multiple of the AES block size, unless it's the last call to this function. need to happen after AAD appending, or after initialization if no AAD data.4append data to decrypt and append to the OCB contextthe bytearray needs to be a multiple of the AES block size, unless it's the last call to this function. need to happen after AAD appending, or after initialization if no AAD data.!Generate the Tag from OCB contextinitialize a ccm contextGappend data which is only going to be authenticated to the CCM context.Uneeds to happen after initialization and before appending encryption/decryption data.4append data to encrypt and append to the CCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.4append data to decrypt and append to the CCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.!Generate the Tag from CCM context AES Context Initial vector of AES block size plaintext ciphertext Cipher Key.usually a 128 bit integer.length of bytes required. AES ContextIinitial vector of AES block size (usually representing a 128 bit integer)plaintext inputciphertext outputAES cipher and tweak context:a 128 bits IV, typically a sector or a block offset in XTSLnumber of rounds to skip, also seen a 16 byte offset in the sector or block.input to encryptoutput encrypted AES Context6initial vector, usually representing a 128 bit integerciphertext inputplaintext outputAES cipher and tweak context:a 128 bits IV, typically a sector or a block offset in XTSLnumber of rounds to skip, also seen a 16 byte offset in the sector or block.input to decryptoutput decrypted BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneKilAES with 256 bit keyAES with 192 bit keyAES with 128 bit keyeSafe +-FSTkensure the given bitlen is greater or equal to nensure the given bitlen is lesser or equal to nf BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone +-1FSTVvSHAKE256 (256 bits) extendable output function. Supports an arbitrary digest size (multiple of 8 bits), to be specified as a type parameter of kind .Note: outputs from  n and  mb for the same input are correlated (one being a prefix of the other). Results are unrelated to  results.SHAKE128 (128 bits) extendable output function. Supports an arbitrary digest size (multiple of 8 bits), to be specified as a type parameter of kind .Note: outputs from  n and  mb for the same input are correlated (one being a prefix of the other). Results are unrelated to  results.g BSD-style*Nicolas Di Prima <nicolas@primetype.co.uk> experimentalunknownNone-1FTV} Fast cryptographic hash.6It is especially known to target 64bits architectures.Known supported digest sizes: Blake2b 160 Blake2b 224 Blake2b 256 Blake2b 384 Blake2b 5121Fast and secure alternative to SHA1 and HMAC-SHA16It is espacially known to target 32bits architectures.Known supported digest sizes: Blake2s 160 Blake2s 224 Blake2s 256           BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonelY  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIQRSTUVWXYZ[\]^_`abcdef     Y YZWXUVSTQRefcdab_`]^[\@A>?<=896745*+()&'$%:;HIFGDEBC2301./,-     "# ! BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneVQ 'Hash a strict bytestring into a digest.%Hash a lazy bytestring into a digest.0Initialize a new context for this hash algorithmHrun hashUpdates on one single bytestring and return the updated context.`Update the context with a list of strict bytestring, and return a new context with the updates.'Finalize a context and return a digest.7Initialize a new context for a specified hash algorithmRun the 8 function but takes an explicit hash algorithm parameterATry to transform a bytearray into a Digest of specific algorithm.[If the digest is not the right size for the algorithm specified, then Nothing is returned.f  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIQRSTUVWXYZ[\]^_`abcdef      h BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeA type witness for a as phantom typei BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneDRArray of mutable Word32Array of Word64Array of Word32Array of Word8*Create an array of Word8 aliasing an Addr#@Create an Array of Word32 of specific size from a list of Word32-Create an Array of BE Word32 aliasing an Addr.Create an Array of Word32 using an initializer@Create an Array of Word64 of specific size from a list of Word64GCreate a Mutable Array of Word32 of specific size from a list of Word324Create a Mutable Array of BE Word32 aliasing an AddrAfreeze a Mutable Array of Word32 into a immutable Array of Word32Read a Word8 from an ArrayRead a Word32 from an ArrayRead a Word64 from an Array,Read a Word32 from a Mutable Array of Word32-Write a Word32 from a Mutable Array of Word32dWrite into the Mutable Array of Word32 by combining through xor the current value and the new value. x[i] = x[i] xor valuej BSD-styleNoneDMAll subkeys for 12 or 16 rounds(Encrypts a block using the specified key(Decrypts a block using the specified key+Precompute "masking" and "rotation" subkeysTrue( for short keys that only need 12 roundsInput key padded to 16 bytesOutput data structure BSD-style)Olivier Chron <olivier.cheron@gmail.com>stablegoodNoneNCAST5 block cipher (also known as CAST-128). Key is between 40 and 128 bits.k BSD-style experimentalGoodNoneDLCreate a key schedule mutable array of the pbox followed by all the sboxes.l BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe8 Split a  into the highest and lowest  Reconstruct a  from two     mNoneDL -Initialize a 128-bit, 192-bit, or 256-bit key_Return the initialized key or a error message if the given keyseed was not 16-bytes in length.1Encrypts the given ByteString using the given Key1Decrypts the given ByteString using the given Key %The key to create the twofish contextThe key to useThe data to encryptThe key to useThe data to decrypt  None!"#n BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneD$Camellia context%Initialize a 128-bit key`Return the initialized key or a error message if the given keyseed was not 16-bytes in length.&1Encrypts the given ByteString using the given Key'1Decrypts the given ByteString using the given Key%&The key to create the camellia context&The key to useThe data to encrypt'The key to useThe data to decrypt$%&'$()*+,-. BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone%&Camellia block cipher with 128 bit key%%%/o BSD-style experimentalGoodNone%0variable keyed blowfish state1Encrypt blocks&Input need to be a multiple of 8 bytes2Decrypt blocks&Input need to be a multiple of 8 bytes3-Initialize a new Blowfish context from a key.'key needs to be between 0 and 448 bits.48The BCrypt "expensive key schedule" version of blowfish.DSalt must be 128 bits Cost must be between 4 and 31 inclusive See jhttps://www.usenix.org/conference/1999-usenix-annual-technical-conference/future-adaptable-password-scheme5>Create a key schedule for either plain Blowfish or the BCrypt EKSo version For the expensive version, the salt and cost factor are supplied. Salt must be a 128-bit byte array.KThe standard case is just a single key expansion with the salt set to zero.6The key scheduleFirst word of the saltSecond word of the saltThe key0123407 BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneK˿(448 bit keyed blowfish state)256 bit keyed blowfish state*128 bit keyed blowfish state+64 bit keyed blowfish state,variable keyed blowfish state()*+,,+*)((8)9*:+;,< BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone <RParameters that can be adjusted to change the runtime performance of the hashing.AWhich variant of Argon2 to use.BWhich version of Argon2 to use.CCA parallelism degree, which defines the number of parallel threads.pq <= hashParallelism <= pr && ps <= hashParallelism <= ptDDThe memory cost, which defines the memory usage, given in kibibytes.max pu (8 * hashParallelism) <=  hashMemory <= pvEThe time cost, which defines the amount of computation realized and therefore the execution time, given in number of iterations.pw <= hashIterations <= pxFWhich version of Argon2 to useIxWhich variant of Argon2 to use. You should choose the variant that is most applicable to your intention to hash inputs.JArgon2d is faster than Argon2i and uses data-depending memory access, which makes it suitable for cryptocurrencies and applications with no threats from side-channel timing attacks.KArgon2i uses data-independent memory access, which is preferred for password hashing and password-based key derivation. Argon2i is slower as it makes more passes over the memory to protect from tradeoff attacks.LArgon2id is a hybrid of Argon2i and Argon2d, using a combination of data-depending and data-independent memory accesses, which gives some of Argon2i's resistance to side-channel cache timing attacks and much of Argon2d's resistance to GPU cracking attacks<=?>@ABCDEFGHIJKLMN<=>?@ABEDCIJKLFGHMN<=>?@ABFGHIJKL BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneKv_Authentication code`'compute a MAC using the supplied cipheramake sub-keys used in CMAC`key to compute CMAC with input message output tagakey to compute CMAC withsub-keys to compute CMAC= width in byte(irreducible binary polynomial definitionresult bit pattern_`a`_a>?_@ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneK=d;Represent an ongoing HMAC state, that can be appended with k and finalize to an HMAC with  hmacFinalizefORepresent an HMAC that is a phantom type with the hash used to produce the mac.!The Eq instance is constant time.i1compute a MAC using the supplied hashing functionj)Initialize a new incremental HMAC contextk#Incrementally update a HMAC contextl9Increamentally update a HMAC context with multiple inputsm,Finalize a HMAC context and return the HMAC.i Secret keyMessage to MACj Secret keykCurrent HMAC contextMessage to append to the MACUpdated HMAC contextlCurrent HMAC contextMessages to append to the MACUpdated HMAC context defghijklm ifghdejklmdefgh BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonepParameters for PBKDF2rNthe number of user-defined iterations for the algorithms. e.g. WPA2 uses 4000.s-the number of bytes to generate out of PBKDF2tThe PRF used for PBKDF2u>PRF for PBKDF2 using HMAC with the hash algorithm as parameterv;generate the pbkdf2 key derivation function from the outputtthe password parameters the contentprf(password,content) pqsrtuvwxy tupqrsvwxypqrs BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonezParameters for Scrypt|LCpu/Memory cost ratio. must be a power of 2 greater than 1. also known as N.}Must satisfy r * p < 2^30~Must satisfy r * p < 2^30-the number of bytes to generate out of Scrypt'Generate the scrypt key derivation dataz{}|~z{|}~z{|}~ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone Pseudo Random KeyRExtract a Pseudo Random Key using the parameter and the underlaying hash mechanism2Create a PRK directly from the input key material.Only use when guaranteed to have a good quality and random data to use directly as key. This effectively skip a HMAC with key=salt and data=key.<Expand key material of specific length out of the parametersSaltInput Keying MaterialPseudo random keyPseudo Random Key5Optional context and application specific informationOutput length in bytes Output dataAB BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneKu Poly1305 Auth(Poly1305 State. use State instead of CtxPoly1305 Stateinitialize a Poly1305 context"update a context with a bytestring+updates a context with multiples bytestring-finalize the context into a digest bytestringOne-pass authorization creation  C BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone Valid Nonce for ChaChaPoly1305.It can be created with  or A ChaChaPoly1305 State.9The state is immutable, and only new state can be created6Nonce smart constructor 12 bytes IV, nonce constructor8 bytes IV, nonce constructorIncrement a nonce%Initialize a new ChaChaPoly1305 StateIThe key length need to be 256 bits, and the nonce procured using either  or JAppend Authenticated Data to the State and return the new modified State.MOnce no further call to this function need to be make, the user should call >Finalize the Authenticated Data and return the finalized StateNEncrypt a piece of data and returns the encrypted Data and the updated State.NDecrypt a piece of data and returns the decrypted Data and the updated State..Generate an authentication tag from the State.4 bytes constant 8 bytes IV  DEFy BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneD+N GGMP Supported / UnsupportedHDSimple combinator in case the operation is not supported through GMPI-Compute the GCDE of a two integer through GMPJ6Compute the binary logarithm of an integer through GMPKXCompute the power modulus using extra security to remain constant time wise through GMPL%Compute the power modulus through GMPM'Inverse modulus of a number through GMPN4Get the next prime from a specific value through GMPO,Test if a number is prime using Miller RabinP&Return the size in bytes of an integerQ%Return the size in bits of an integerRExport an integer to a memorySImport an integer from a memoryGTUHIJKLMNOPQRSGTU BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone4sqrti returns two integers (l,b) so that l <= sqrt i <= b. The implementation is quite naive, use an approximation for the first number and use a dichotomy algorithm to compute the bound relatively efficiently.8Get the extended GCD of two integer using integer divModgcde a b& find (x,y,gcd(a,b)) where ax + by = d'Check if a list of integer are all even)Compute the binary logarithm of a integer)Compute the number of bits for an integer*Compute the number of bytes for an integerz BSD-style#Vincent Hanquez <vincent@snarc.org> Experimental ExcellentNone1K;T VDefine a point on a curve.WPoint at InfinityXECC Private NumberYPDefine common parameters in a curve definition of the form: y^2 = x^3 + ax + b.Zcurve parameter a[curve parameter b\ base point] order of G^cofactor_!get the size of the curve in bits`"get the size of the curve in bytesa*Define names for known recommended curves.Zbcdefghijklmnopqrstuvwxyz{|}~VWXYZ[\]^_`(bcdefghijklmnopqrstuvwxyz{|}~VWXYZ[\]^ BSD-style"Danny Navarro <j@dannynavarro.net> experimentalGoodNoneY +Binary Polynomial represented by an integer-Addition over F m. This is just a synonym of .Reduction by modulo over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.Multiplication over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.Squaring over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited..Squaring over F m without reduction by modulo.The implementation utilizes the fact that for binary polynomial S(x) we have S(x)^2 = S(x^2). In other words, insert a zero bit between every bits of argument: 1101 -> 1010001.kThis function is undefined for negative arguments, because their bit representation is platform-dependent.,Extended GCD algorithm for polynomials. For a and b returns  (g, u, v) such that a * u + b * v == g. Reference: thttps://en.wikipedia.org/wiki/Polynomial_greatest_common_divisor#B.C3.A9zout.27s_identity_and_extended_GCD_algorithm Modular inversion over F m. If n doesn't have an inverse,  is returned.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.GDivision over F m. If the dividend doesn't have an inverse it returns .This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.ModulusModulusModulusModulusModulusDividendDivisorQuotient BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone1nr@Raised when two numbers are supposed to be coprimes but are not.zCompute the modular exponentiation of base^exponant using algorithms design to avoid side channels and timing measurementPModulo need to be odd otherwise the normal fast modular exponentiation is used.When used with integer-simple, this function is not different from expFast, and thus provide the same unstudied and dubious timing and side channels claims.with GHC 7.10, the powModSecInteger is missing from integer-gmp (which is now integer-gmp2), so is has the same security as old ghc version.Compute the modular exponentiation of base^exponant using the fastest algorithm without any consideration for hiding parameters.AUse this function when all the parameters are public, otherwise  should be prefered.exponentiation$ computes modular exponentiation as  b^e mod m using repetitive squaring.inverse$ computes the modular inverse as in  g^(-1) mod m.~Compute the modular inverse of two coprime numbers. This is equivalent to inverse except that the result is known to exists.GIf the numbers are not defined as coprime, this function will raise a .baseexponantmoduloresultbaseexponantmoduloresult BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonevHFFill a pointer with the big endian binary representation of an integerIf the room available @ptrSz is less than the number of bytes needed, 0 is returned. Likewise if a parameter is invalid, 0 is returned.#Returns the number of bytes written Similar to 3, except it will pad any remaining space with zero.eTransform a big endian binary integer representation pointed by a pointer and a size into an integer  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneEos2ip0 converts a byte string into a positive integer.i2osp0 converts a positive integer into a byte string.`The first byte is MSB (most significant byte); the last byte is the LSB (least significant byte) Just like M, but takes an extra parameter for size. If the number is too big to fit in len bytes, ? is returned otherwise the number is padded with 0 to fit the len required. Just like l except that it doesn't expect a failure: i.e. an integer larger than the number of output bytes requested.hFor example if you just took a modulo of the number that represent the size (example the RSA modulo n).!NoneV"An integral time value in seconds.qThe strength of the calculated HOTP value, namely the number of digits (between 4 and 9) in the extracted value.9A one-time password which is a sequence of 4 to 9 digits.fAttempt to resynchronize the server's counter value with the client, given a sequence of HOTP values.The default TOTP configuration.7Create a TOTP configuration with customized parameters.*Calculate a totp value for the given time.jCheck a supplied TOTP value is valid for the given time, within the window defined by the skew parameter.ENumber of digits in the HOTP value extracted from the calculated HMAC+Shared secret between the client and server8Counter value synchronized between the client and serverThe HOTP valueThe look-ahead window parameter. Up to this many values will be calculated and checked against the value(s) submitted by the clientThe shared secret The current server counter valuedThe first OTP submitted by the client and a list of additional sequential OTPs (which may be empty)The new counter value, synchronized with the client's current counter or Nothing if the submitted OTP values didn't match anywhere within the windowThe T0 parameter in seconds. This is the Unix time from which to start counting steps (default 0). Must be before the current time.FThe time step parameter X in seconds (default 30, maximum allowed 300)0Number of required digits in the OTP (default 6)The number of time steps to check either side of the current value to allow for clock skew between client and server and or delay in submitting the value. The default is two time steps.The shared secretbThe time for which the OTP should be calculated. This is usually the current time as returned by "Data.Time.Clock.POSIX.getPOSIXTime" BSD-style#Vincent Hanquez <vincent@snarc.org> Experimental ExcellentNone1D*Define names for known recommended curves.PDefine common parameters in a curve definition of the form: y^2 = x^3 + ax + b.curve parameter acurve parameter b base point order of GcofactorIDefine an elliptic curve in =p. The first parameter is the Prime Number.zDefine an elliptic curve in =(2^m). The firt parameter is the Integer representatioin of the irreducible polynomial f(x).Define a point on a curve.Point at InfinityECC Private NumberECC Public Point.Define either a binary curve or a prime curve. =(2^m) =p 5Parameters in common between binary and prime curves. HIrreducible polynomial representing the characteristic of a CurveBinary. =Prime number representing the characteristic of a CurvePrime.!get the size of the curve in bitsHGet the curve definition associated with a recommended known curve name.:     :     !  { BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeThis is a strict version of andThis is a strict version of &&.# BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone-%Represent a mask generation algorithm.Mask generation algorithm MGF1-seedlength to generate-.-.$ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone1KȤ/Represent RSA KeyPairRnote the RSA private key contains already an instance of public key for efficiency1Represent a RSA private key.-Only the pub, d fields are mandatory to fill.p, q, dP, dQ, qinv are by-product during RSA generation, but are useful to record here to speed up massively the decrypt and sign operation./implementations can leave optional fields to 0.3,public part of a private key (size, n and e)4private exponant d5p prime number6q prime number7 d mod (p-1)8 d mod (q-1)9 q^(-1) mod p:Represent a RSA public key<size of key in bytes= public p*q>public exponant e?8error possible during encryption, decryption or signing.@Nthe message to decrypt is not of the correct size (need to be == private_size)A"the message to encrypt is too longBDthe message decrypted doesn't have a PKCS15 structure (0 2 .. 0 msg)C the message's digest is too longD-some parameters lead to breaking assumptions.ElBlinder which is used to obfuscate the timing of the decryption primitive (used by decryption and signing).G(get the size in bytes from a private keyHget n from a private keyIget e from a private keyJPublic key of a RSA KeyPairKPrivate key of a RSA KeyPair/0123456789:;<=>?@ABCDEFGHIJK?@ABCDEF:;<=>123456789/0JKGHI/0123456789:;<=>?@ABCDEF% BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone%_Compute the RSA decrypt primitive. if the p and q numbers are available, then dpFast is used otherwise, we use dpSlow which only need d and n.`!Compute the RSA encrypt primitiveKmultiply 2 integers in Zm only performing the modulo operation if necessary_`_`| BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe5RA handle to an entropy maker, either a system capability or a hardware generator.%Try to open an handle for this sourcebTry to gather a number of entropy bytes into a buffer. Return the number of actual bytes gatheredClose an open handle} BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeW3Fake handle to Intel RDRand entropy CPU instruction~ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeVEntropy device devurandom on unix systemEntropy device devrandom on unix system BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodSafeCVaAny Entropy BackendbAll supported backends Open a backend handlec%Gather randomness from an open handlecAn open Entropy BackendPointer to a buffer to write tonumber of bytes to write+return the number of bytes actually writtenabca& BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeedRefill the entropy in a bufferICall each entropy backend in turn until the buffer has been replenished.YIf the buffer cannot be refill after 3 loopings, this will raise an User Error exceptionabcddabc' BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonee2Get some entropy from the system source of entropyee( BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneffPool of Entropy. Contains a self-mutating pool of entropy, that is always guaranteed to contain data.g,Create a new entropy pool of a specific sizegWhile you can create as many entropy pools as you want, the pool can be shared between multiples RNGs.h.Create a new entropy pool with a default size.gWhile you can create as many entropy pools as you want, the pool can be shared between multiples RNGs.-Put a chunk of the entropy pool into a bufferi.Grab a chunk of entropy from the entropy pool.fghifhgif) BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonejOA simple Monad class very similar to a State Monad with the state being a DRG.k,A Deterministic Random Generator (DRG) classl)Generate N bytes of randomness from a DRGm7A monad constraint that allows to generate random bytesoERun a pure computation with a Deterministic Random Generator in the jjklmnomnjklojklmn BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneu]A referentially transparent System representation of the random evaluated out of the system.fHolding onto a specific DRG means that all the already evaluated bytes will be consistently replayed.NThere's no need to reseed this DRG, as only pure entropy is represented here.v#Grab one instance of the System DRGuvu BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneKFw%ChaCha Deterministic Random Generator]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.Initialize a new ChaCha context from 5-tuple of words64. This interface is useful when creating a RNG out of tests generators (e.g. QuickCheck).40 bytes of seedthe initial ChaCha stateww* BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneK y%Create a new Seed from system entropyzConvert a Seed to an integer{Convert an integer to a Seed|Convert a binary to a seed}$Create a new DRG from system entropy~Create a new DRG from a seedCreate a new DRG from 5 Word64._This is a convenient interface to create deterministic interface for quickcheck style testing._It can also be used in other contexts provided the input has been properly randomly generated. Generate 6len random bytes and mapped the bytes to the function f.(This is equivalent to use Control.Arrow  with ljklmnouvwxyz{|}~wuxy{z|v}~oklmnjx BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone This create a random number generator out of thin air with the system entropy; don't generally use as the IO is not exposed this can have unexpected random for.This is useful for probabilistic algorithm like Miller Rabin probably prime algorithm, given appropriate choice of the heuristic1Generally, it's advised not to use this function.+ BSD-style)Olivier Chron <olivier.cheron@gmail.com> experimentalunknownNoneKx An Ed448 signatureAn Ed448 public keyAn Ed448 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Try to build a signature from a bytearray%Create a public key from a secret key!Sign a message using the key pairVerify a messageGenerate a secret keyA public key is 57 bytesA secret key is 57 bytesA signature is 114 bytes  , BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneK _ An Ed25519 signatureAn Ed25519 public keyAn Ed25519 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Try to build a signature from a bytearray%Create a public key from a secret key!Sign a message using the key pairVerify a messageGenerate a secret keyA public key is 32 bytesA secret key is 32 bytesA signature is 64 bytes  - BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneK3 A P256 point A P256 scalar%Get the base point for the P256 CurveLift to curve a scalar0Using the curve generator as base point compute:  scalar * GAdd a point to another pointNegate a pointMultiply a point by a scalarwarning: variable time Similar to i, serializing the x coordinate as binary. When scalar is multiple of point order the result is all zero.multiply the point p with &n2 and add a lifted to curve value @n1 n1 * G + n2 * pwarning: variable time Check if a  is valid!Convert a point to (x,y) Integers&Convert from (x,y) Integers to a point*Convert a point to a binary representation$Convert from binary to a valid point0Convert from binary to a point, possibly invalid(Generate a randomly generated new scalarThe scalar representing 0Check if the scalar is 0$Perform addition between two scalars a + b'Perform subtraction between two scalars a - bGive the inverse of the scalar 1 / awarning: variable timeCompare 2 Scalarconvert a scalar from binaryconvert a scalar to binary(Convert from an Integer to a P256 Scalar(Convert from a P256 Scalar to an Integer. BSD-style John Galt <jgalt@centromere.net> experimentalunknownNoneDK= KA Curve448 Diffie Hellman secret related to a public key and a secret key.A Curve448 public keyA Curve448 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Create a DhSecret from a bytearray objectECompute the Diffie Hellman secret from a public key and a secret key.YThis implementation may return an all-zero value as it does not check for the condition.%Create a public key from a secret keyGenerate a secret key.publicsecretpublic basepointsecret  / BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneDKVG MA Curve25519 Diffie Hellman secret related to a public key and a secret key.A Curve25519 public keyA Curve25519 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Create a DhSecret from a bytearray objectECompute the Diffie Hellman secret from a public key and a secret key.YThis implementation may return an all-zero value as it does not check for the condition.%Create a public key from a secret keyGenerate a secret key.publicsecret basepoint  0None]FCreate a bcrypt hash for a password with a provided cost value. Typically used to create a hash when a new user account is registered or when a user changes their password.{Each increment of the cost approximately doubles the time taken. The 16 bytes of random salt will be generated internally.HCreate a bcrypt hash for a password with a provided cost value and salt.OCost value under 4 will be automatically adjusted back to 10 for safety reason.ICheck a password against a stored bcrypt hash when authenticating a user.Returns False^ if the password doesn't match the hash, or if the hash is invalid or an unsupported version.&Check a password against a bcrypt hashAs for validatePasswordV but will provide error information if the hash is invalid or an unsupported version.~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly.EThe password. Should be the UTF-8 encoded bytes of the password text.#The bcrypt hash in standard format.~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly.@The salt. Must be 16 bytes in length or an error will be raised.EThe password. Should be the UTF-8 encoded bytes of the password text.#The bcrypt hash in standard format.1 BSD-style)Olivier Chron <olivier.cheron@gmail.com> experimentalunknownNoneKu,A point on curve edwards25519.2A scalar modulo prime order of curve edwards25519.Generate a random scalar.CSerialize a scalar to binary, i.e. a 32-byte little-endian number.eDeserialize a little-endian number as a scalar. Input array can have any length from 0 to 64 bytes.Note: it is not advised to put secret information in the 3 lowest bits of a scalar if this scalar may be multiplied to untrusted points outside the prime-order subgroup.Add two scalars. Multiply two scalars. .Multiplies a scalar with the curve base point. %Serialize a point to a 32-byte array.!Format is binary compatible with , from module Crypto.PubKey.Ed25519. UDeserialize a 32-byte array as a point, ensuring the point is valid on edwards25519.WARNING: variable time bTest whether a point belongs to the prime-order subgroup generated by the base point. Result is  for the identity point. pointHasPrimeOrder p =  p ==  l_minus_one p Negate a point.Add two points.Add a point to itself. pointDouble p =  p p Multiply a point by h = 8. pointMulByCofactor p =  scalar_8 p .Scalar multiplication over curve edwards25519.Note: when the scalar had reduction modulo L and the input point has a torsion component, the output point may not be in the expected subgroup.Multiply the point p with s2! and add a lifted to curve value s1. pointsMulVarTime s1 s2 p =  (  s1) ( s2 p) WARNING: variable time          2 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneF(Top bits policy when generating a numberset the highest bitset the two highest bitUGenerate a number for a specific size of bits, and optionaly set bottom and top bitsIf the top bit policy is T, then nothing is done on the highest bit (it's whatever the random generator set).If @generateOdd is set to `, then the number generated is guaranteed to be odd. Otherwise it will be whatever is generated2Generate a positive integer x, s.t. 0 <= x < range9generate a number between the inclusive bound [low,high].number of bitstop bit policyforce the number to be oddrange3None ",Generate a valid scalar for a specific Curve# Elliptic Curve point negation: pointNegate c p returns point q such that pointAdd c p q == PointO.$Elliptic Curve point addition.WARNING: Vulnerable to timing attacks.%Elliptic Curve point doubling.WARNING: Vulnerable to timing attacks.This perform the following calculation: > lambda = (3 * xp ^ 2 + a) / 2 yp > xr = lambda ^ 2 - 2 xp > yr = lambda (xp - xr) - ypWith binary curve: > xp == 0 => P = O > otherwise => > s = xp + (yp / xp) > xr = s ^ 2 + s + a > yr = xp ^ 2 + (s+1) * xr&2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.'?Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks.(BElliptic curve double-scalar multiplication (uses Shamir's trick). }pointAddTwoMuls c n1 p1 n2 p2 == pointAdd c (pointMul c n1 p1) (pointMul c n2 p2)WARNING: Vulnerable to timing attacks.)*Check if a point is the point at infinity.*%check if a point is on specific curveThis perform three checks:x is not out of rangey is not out of range the equation y^2 = x^3 + a*x + b (mod p) holds div and mod "#$%&'()* "$#%&'()*4None1 +ECDSA Key Pair.-ECDSA Public Key.1ECDSA Private Key.5+Represent a ECDSA signature namely R and S.7ECDSA r8ECDSA s9Public key of a ECDSA Key pair.: Private key of a ECDSA Key pair.;<Sign message using the private key and an explicit k number.WARNING: Vulnerable to timing attacks.<#Sign message using the private key.WARNING: Vulnerable to timing attacks.=)Verify a bytestring using the public key.Truncate and hash.;k random number private key hash functionmessage to sign+,-./0124356789:;<=5678-./01234+,9:;<=+,-./0123456785NoneNGenerate Q given d.WARNING: Vulnerable to timing attacks.O)Generate a pair of (private, public) key.WARNING: Vulnerable to timing attacks.OElliptic CurveNONO6 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone1 PRepresent a DSA key pairRRepresent a DSA private key.VOnly x need to be secret. the DSA parameters are publicly shared with the other side.TDSA parametersU DSA private XVRepresent a DSA public key.XDSA parametersY DSA public YZ)Represent a DSA signature namely R and S.\DSA r]DSA s^,Represent DSA parameters namely P, G, and Q.`DSA paDSA gbDSA qc7DSA Private Number, usually embedded in DSA Private Keyd5DSA Public Number, usually embedded in DSA Public KeyePublic key of a DSA Key pairfPrivate key of a DSA Key pairgagenerate a private number with no specific property this number is usually called X in DSA text.hCCalculate the public number from the parameters and the private keyi<sign message using the private key and an explicit k number.j#sign message using the private key.k)verify a bytestring using the public key.ik random number private key hash functionmessage to signPQRSTUVWXYZ[\]^_`abcdefghijk^_`abZ[\]VWXYRSTUdcghjikPQefPQRSTUVWXYZ[\]^_`ab7 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone Returns if the number is probably prime. First a list of small primes are implicitely tested for divisibility, then a fermat primality test is used with arbitrary numbers and then the Miller Rabin algorithm is used with an accuracy of 30 recursions.\Generate a prime number of the required bitsize (i.e. in the range [2^(b-1)+2^(b-2), 2^b)). May throw a { if the requested size is less than 5 bits, as the smallest prime meeting these conditions is 29. This function requires that the two highest bits are set, so that when multiplied with another prime to create a key, it is guaranteed to be of the proper size.|Generate a prime number of the form 2p+1 where p is also prime. it is also knowed as a Sophie Germaine prime or safe prime.The number of safe prime is significantly smaller to the number of prime, as such it shouldn't be used if this number is supposed to be kept safe. May throw a {l if the requested size is less than 6 bits, as the smallest safe prime with the two highest bits set is 59.;Find a prime from a starting point where the property hold.=Find a prime from a starting point with no specific property.Miller Rabin algorithm return if the number is probably prime or composite. the tries parameter is the number of recursion, that determines the accuracy of the test.Probabilitic Test using Fermat primility test. Beware of Carmichael numbers that are Fermat liars, i.e. this test is useless for them. always combines with some other test.eTest naively is integer is prime. while naive, we skip even number and stop iteration at i > sqrt(n)-Test is two integer are coprime to each other#List of the first primes till 2903.%number of iterations of the algorithm starting anumber to test for primality  8 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneb"Generate a key pair given p and q.*p and q need to be distinct prime numbers.e need to be coprime to phi=(p-1)*(q-1). If that's not the case, the function will not return a key pair. A small hamming weight results in better performance.e=0x10001 is a popular choiceFe=3 is popular as well, but proven to not be as secure for some cases.:generate a pair of (private, public) key of size in bytes.?Generate a blinder to use with decryption and signing operationWthe unique parameter apart from the random number generator is the public key value N.chosen distinct primes p and q size in bytesRSA public exponant e size in bytesRSA public exponant eRSA public N parameter.123456789:;<=>?@ABCDEF?@ABCD:;<=>123456789EF9 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone*Parameters for PSS signature/verification.Hash function to useMask Gen algorithm to use&Length of salt. need to be <= to hLen.Trailer field, usually 0xbc-Default Params with a specified hash function$Default Params using SHA1 algorithm.LSign using the PSS parameters and the salt explicitely passed as parameters.6the function ignore SaltLength from the PSS ParametersLSign using the PSS parameters and the salt explicitely passed as parameters.6the function ignore SaltLength from the PSS ParametersSign using the PSS ParametersSign using the PSS ParametersESign using the PSS Parameters and an automatically generated blinder.ESign using the PSS Parameters and an automatically generated blinder.+Verify a signature using the PSS Parameters+Verify a signature using the PSS Parameters Salt to useoptional blinder to usePSS Parameters to useRSA Private KeyMessage digest Salt to useoptional blinder to usePSS Parameters to useRSA Private KeyMessage to signoptional blinder to usePSS Parameters to useRSA Private KeyMessage to signoptional blinder to usePSS Parameters to useRSA Private KeyMessage digestPSS Parameters to use private keymessage to signPSS Parameters to use private key message digst\PSS Parameters to use to verify, this need to be identical to the parameters when signingRSA Public KeyMessage to verify Signature\PSS Parameters to use to verify, this need to be identical to the parameters when signingRSA Public KeyDigest to verify Signature: BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone K A specialized class for hash algorithm that can product a ASN1 wrapped description the algorithm plus the content of the digest.;Convert a Digest into an ASN1 wrapped descriptive ByteArray6This produce a standard PKCS1.5 padding for encryption0Produce a standard PKCS1.5 padding for signature4Try to remove a standard PKCS1.5 encryption padding.&decrypt message using the private key.When the decryption is not in a context where an attacker could gain information from the timing of the operation, the blinder can be set to None.2If unsure always set a blinder or use decryptSafer"The message is returned un-padded.Pdecrypt message using the private key and by automatically generating a blinder.*encrypt a bytestring using the public key.ZThe message needs to be smaller than the key size - 11. The message should not be padded.?sign message using private key, a hash and its ASN1 descriptionWhen the signature is not in a context where an attacker could gain information from the timing of the operation, the blinder can be set to None./If unsure always set a blinder or use signSaferMsign message using the private key and by automatically generating a blinder.&verify message with the signed messagemake signature digest, used in  and optional blinderRSA private key cipher textRSA private key cipher textoptional blinderhash algorithm private keymessage to signHash algorithm private keymessage to signoptional hashing algorithm  ; BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone )Parameters for OAEP encryption/decryptionHash function to use.Mask Gen algorithm to use.$Optional label prepended to message.-Default Params with a specified hash function4Encrypt a message using OAEP with a predefined seed.Encrypt a message using OAEPun-pad a OAEP encoded message.-It doesn't apply the RSA decryption primitiveDecrypt a ciphertext using OAEPWhen the signature is not in a context where an attacker could gain information from the timing of the operation, the blinder can be set to None.2If unsure always set a blinder or use decryptSaferJDecrypt a ciphertext using OAEP and by automatically generating a blinder.Seed!OAEP params to use for encryption Public key.Message to encrypt"OAEP params to use for encryption. Public key.Message to encryptOAEP params to usesize of the key in bytesencoded message (not encrypted)Optional blinder!OAEP params to use for decryption Private key Cipher text!OAEP params to use for decryption Private key Cipher text  < BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone1K-s 'Represent Diffie Hellman shared secret.*Represent Diffie Hellman private number X.)Represent Diffie Hellman public number Y.HRepresent Diffie Hellman parameters namely P (prime), and G (generator).generate params from a specific generator (2 or 5 are common values) we generate a safe prime (a prime number of the form 2p+1 where p is also prime)`generate a private number with no specific property this number is usually called X in DH text.pcalculate the public number from the parameters and the private key this number is usually called Y in DH text.pcalculate the public number from the parameters and the private key this number is usually called Y in DH text.DEPRECATED use calculatePublicPgenerate a shared key using our private number and the other party public numbernumber of bits generator BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneKC 1ElGamal Ephemeral key. also called Temporary key.ElGamal Signaturegenerate a private number with no specific property this number is usually called a and need to be between 0 and q (order of the group G).~generate an ephemeral key which is a number with no specific property, and need to be between 0 and q (order of the group G).cgenerate a public number that is for the other party benefits. this number is usually called h=g^aCencrypt with a specified ephemeral key do not reuse ephemeral key.Zencrypt a message using params and public keys will generate b (called the ephemeral key)decrypt message(sign a message with an explicit k number7if k is not appropriate, then no signature is returned.with some appropriate value of k, the signature generation can fail, and no signature is returned. User of this function need to retry with a different k value. sign messageThis function will generate a random number, however as the signature might fail, the function will automatically retry until a proper signature has been created.verify a signature3random number k, between 0 and p-1 and gcd(k,p-1)=1DH params (p,g)DH private key"collision resistant hash algorithmmessage to signDH params (p,g)DH private key"collision resistant hash algorithmmessage to sign= BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneGGenerating a private number d.Generating a public point Q.UGenerating a shared key using our private number and the other party public point.NoneV]L ,Generate a valid scalar for a specific Curve Elliptic Curve point negation:  pointNegate p returns point q such that pointAdd p q == PointO.Elliptic Curve point addition.WARNING: Vulnerable to timing attacks.Elliptic Curve point doubling.WARNING: Vulnerable to timing attacks.This perform the following calculation: > lambda = (3 * xp ^ 2 + a) / 2 yp > xr = lambda ^ 2 - 2 xp > yr = lambda (xp - xr) - ypWith binary curve: > xp == 0 => P = O > otherwise => > s = xp + (yp / xp) > xr = s ^ 2 + s + a > yr = xp ^ 2 + (s+1) * xr2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.?Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks.BElliptic curve double-scalar multiplication (uses Shamir's trick). qpointAddTwoMuls n1 p1 n2 p2 == pointAdd (pointMul n1 p1) (pointMul n2 p2)WARNING: Vulnerable to timing attacks.*Check if a point is the point at infinity.5Make a point on a curve from integer (x,y) coordinate\if the point is not valid related to the curve then an error is returned instead of a point%check if a point is on specific curveThis perform three checks:x is not out of rangey is not out of range the equation y^2 = x^3 + a*x + b (mod p) holds div and mod > BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone1FKTVrA P256 Curvealso known as P256Add points on a curveNegate a curve point Scalar Multiplication on a curve'Generate a Diffie hellman secret value.UThis is generally just the .x coordinate of the resulting point, that is not hashed.use $ to keep the result in Point format.WARNING: Curve implementations may return a special value or an exception when the public point lies in a subgroup of small order. This function is adequate when the scalar is in expected range and contributory behaviour is not needed. Otherwise use .`Generate a Diffie hellman secret value and verify that the result is not the point at infinity.9This additional test avoids risks existing with function #. Implementations always return a j- instead of a special value or an exception.Point on an Elliptic Curve#Scalar in the Elliptic Curve domainGenerate a new random scalar on the curve. The scalar will represent a number between 1 and the order of the curve non includedGenerate a new random keypairGet the curve size in bits.Encode a elliptic curve point into binary form8Try to decode the binary form of an elliptic curve point^An elliptic curve key pair composed of the private part (a scalar), and the associated point.!   !       ? BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonez*\Generate random a new Shared secret and the associated point to do a ECIES style encryption+NDerive the shared secret with the receiver key and the R point of the scheme.*representation of the curvethe public key of the receiver+representation of the curveCThe received R (supposedly, randomly generated on the encrypt side)The secret key of the receiver*+*+@ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneVK,MSplit data to diffused data, using a random generator and an hash algorithm.the diffused data will consist of random data for (expandTimes-1) then the last block will be xor of the accumulated random data diffused by the hash algorithm. ---------orig - ---------#--------- ---------- --------------"rand1 - - rand2 - - orig ^ acc -#--------- ---------- --------------9where acc is : acc(n+1) = hash (n ++ rand(n)) ^ acc(n)-9Merge previously diffused data back to the original data.%inplace Xor with an input dst = src  dst,!Hash algorithm to use as diffuserRandom generator to use$Number of times to diffuse the data.original data to diffuse.The diffused data-Hash algorithm used as diffuser&Number of times to un-diffuse the data Diffused data Original data Hash function to use as diffuser"buffer to diffuse, modify in placelength of buffer to diffuse,-,-SafeHHHHHHHHHHHHJJKKLLLLLLLLMMMMNNNNOOPPQQQQQQQQRRSSTTUUVVWWXXYYYYYYYYZZZZ[[[[[[\\]]]]]]]]]]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^______________________________``bbbbbbbb b b b b bbbbccccccccccccccc c!c"#$%&'( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = = > ? @ A > = > @ ? B AC=>D?@EAFGHIJKLMNOPQRSTUfVfVfWfWgXgXgYgYgZgZg[g[\]^_`abcIdefghijklmnopqrstuvwxyz{|}~\>@@=>B=>    !!!!!!!!!!!!!!!!!!!!!!!!!!"" " " " " """"""""""""""""""" "!"""#"$"%"&"'"(")"*"*"+","-"."/"0"0"1"1"2"2"3"4"5"6"7"8"9":";"<"=">"?"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O"P"Q"R"S"T"U"V"W"X"Y"Z#[#\$]$]$^$^$_$`$a$b$c$d$e$$$f$g$h$i$j$k$l$m$n$o$o$p$q$r$s$t$u$v$w$x$y$z${$|$}$~$$$$$$$$$%%&'(((()))))))))))**********++++++++++++++++++{+}++u++++,,,,,,,,,,,,,,,,,,{,},,u,,,,-2------------------------------@-B->..............{.}..u....//////////////{/}//u////000012111111111111111111B1@111>222222223333333334]4]44444^4^44`44444s4t444444444444{4|4}4~444455@6]6]6^6^66666666666 6 6 6 6 646 6s6t66666666u6v6666666666{6|6}6~6666666677777777788@89 9 9!9"9#9$9%9&9'9(99)9*9+99,:-::.:::/:::*::0:1:2:3:4:5:6:7:8:9;:;:;;;<;=;>;?;;;/<@<@<4<4< < < < < < <A<<<<B<C<<<<<<D<E<F<G<H<I<J<K<L<M<N<O<P<Q<R<S<T<U<V<W===C>X>X>Y>Y>Z>Z>[>[>\>\>]>]>^>>>_>`>a>b>c>2>>d>e><>f>g>h>h>]>]>i>j>k>l>m>n>o>p>q>r>s>t>u>v>w>x>y>z>{>|>}>~>>>>>>>>>>??@@AAAAABCDEEEEE     HHacc ) * + , 9   =C=ddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:ddddGHIe;e<e=e>e?e@eABhChCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiDiEiFiGjVjjjWjXjYjZjZj[j[dk\l]l^_`_`mammmbmcmdmemfmgmhmhmimjmkmlmmmnmbmompghinqnrnnnqnpnsntnunvnwpooooxoyozo{o|stuvw}~Z==yyyyyyyyyyyyyyyz2z3zzzzzzzz<zzz)z)z(z(z'z'z&z&z%z%z$z$z#z#z"z"z!z!z z zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz z z z z z z z z z z2zzz1z0zzzzzz6zz!{{%||||}}~~~~(())>*+++,,,-2-.....////00121347::;B@@&cryptonite-0.25-EOQaYN5onmC6tXi7mz4uiHCrypto.Data.Padding Crypto.HashCrypto.Hash.IOCrypto.Hash.Algorithms Crypto.ErrorCrypto.Cipher.Types%Crypto.ConstructHash.MiyaguchiPreneelCrypto.Cipher.UtilsCrypto.Cipher.TripleDESCrypto.Cipher.DESCrypto.Cipher.SalsaCrypto.Cipher.XSalsaCrypto.Cipher.RC4Crypto.Cipher.ChaChaCrypto.Cipher.AESCrypto.Cipher.CAST5Crypto.Cipher.TwofishCrypto.Cipher.CamelliaCrypto.Cipher.BlowfishCrypto.KDF.Argon2Crypto.MAC.CMACCrypto.MAC.HMACCrypto.KDF.PBKDF2Crypto.KDF.ScryptCrypto.KDF.HKDFCrypto.MAC.Poly1305Crypto.Cipher.ChaChaPoly1305Crypto.Number.BasicCrypto.Number.F2mCrypto.Number.ModArithmetic Crypto.Number.Serialize.InternalCrypto.Number.Serialize Crypto.OTPCrypto.PubKey.ECC.TypesCrypto.PubKey.MaskGenFunctionCrypto.PubKey.RSA.TypesCrypto.PubKey.RSA.PrimCrypto.Random.Entropy.UnsafeCrypto.Random.EntropyCrypto.Random.EntropyPoolCrypto.Random.Types Crypto.RandomCrypto.PubKey.Ed448Crypto.PubKey.Ed25519Crypto.PubKey.ECC.P256Crypto.PubKey.Curve448Crypto.PubKey.Curve25519Crypto.KDF.BCryptCrypto.ECC.Edwards25519Crypto.Number.GenerateCrypto.PubKey.ECC.PrimCrypto.PubKey.ECC.ECDSACrypto.PubKey.ECC.GenerateCrypto.PubKey.DSACrypto.Number.PrimeCrypto.PubKey.RSACrypto.PubKey.RSA.PSSCrypto.PubKey.RSA.PKCS15Crypto.PubKey.RSA.OAEPCrypto.PubKey.DHCrypto.PubKey.ECC.DH Crypto.ECCCrypto.PubKey.ECIESCrypto.Data.AFISCrypto.Cipher.DES.PrimitiveCrypto.Internal.CompatCrypto.Internal.ByteArrayCrypto.Cipher.Types.UtilsCrypto.Internal.CompatPrimCrypto.Internal.DeepSeqCrypto.Internal.ImportsCrypto.Hash.TypesdigestFromByteStringCrypto.Hash.WhirlpoolCrypto.Hash.TigerCrypto.Hash.Skein512Crypto.Hash.Skein256Crypto.Hash.SHA512tCrypto.Hash.SHA512Crypto.Hash.SHA384Crypto.Hash.SHA3Crypto.Hash.SHA256Crypto.Hash.SHA224Crypto.Hash.SHA1Crypto.Hash.RIPEMD160Crypto.Hash.MD5Crypto.Hash.MD4Crypto.Hash.MD2Crypto.Hash.KeccakCrypto.Hash.Blake2spCrypto.Hash.Blake2sCrypto.Hash.Blake2bpCrypto.Hash.Blake2bCrypto.Error.TypesCrypto.Cipher.Types.BaseCrypto.Cipher.Types.StreamCrypto.Cipher.Types.GFCrypto.Cipher.Types.AEADCrypto.Cipher.Types.BlockCrypto.Cipher.AES.PrimitiveCrypto.Internal.NatCrypto.Hash.SHAKECrypto.Hash.Blake2Crypto.Internal.ProxyCrypto.Internal.WordArrayCrypto.Cipher.CAST5.PrimitiveCrypto.Cipher.Blowfish.BoxCrypto.Internal.WordsCrypto.Cipher.Twofish.Primitive Crypto.Cipher.Camellia.Primitive Crypto.Cipher.Blowfish.PrimitiveFFIARGON2_MIN_LANESARGON2_MAX_LANESARGON_MIN_THREADSARGON2_MAX_THREADSARGON2_MIN_MEMORYARGON2_MAX_MEMORYARGON2_MIN_TIMEARGON2_MAX_TIMECrypto.Number.CompatCrypto.ECC.Simple.TypesCrypto.PubKey.InternalCrypto.Random.Entropy.SourceCrypto.Random.Entropy.RDRandCrypto.Random.Entropy.UnixCrypto.Random.Entropy.BackendCrypto.Random.SystemDRGCrypto.Random.ChaChaDRGCrypto.Random.Probabilistic PublicKeyCrypto.PubKey.ElGamalCrypto.ECC.Simple.PrimCrypto.TutorialFormatPKCS5PKCS7ZEROpadunpad $fShowFormat $fEqFormatDigestContext HashAlgorithm HashBlockSizeHashDigestSizeHashInternalContextSize hashBlockSizehashDigestSizehashInternalContextSizehashInternalInithashInternalUpdatehashInternalFinalize WhirlpoolTiger Skein512_512 Skein512_384 Skein512_256 Skein512_224 Skein256_256 Skein256_224 SHA512t_256 SHA512t_224SHA512SHA384SHA3_512SHA3_384SHA3_256SHA3_224SHA256SHA224SHA1 RIPEMD160MD5MD4MD2 Keccak_512 Keccak_384 Keccak_256 Keccak_224MutableContexthashMutableInithashMutableInitWithhashMutableUpdatehashMutableFinalizehashMutableReset$fByteArrayAccessMutableContext Blake2sp_256 Blake2sp_224 Blake2s_256 Blake2s_224 Blake2s_160 Blake2bp_512 Blake2b_512 Blake2b_384 Blake2b_256 Blake2b_224 Blake2b_160CryptoFailable CryptoPassed CryptoFailed CryptoErrorCryptoError_KeySizeInvalidCryptoError_IvSizeInvalidCryptoError_SeedSizeInvalid CryptoError_AEADModeNotSupported CryptoError_SecretKeySizeInvalid%CryptoError_SecretKeyStructureInvalid CryptoError_PublicKeySizeInvalid#CryptoError_SharedSecretSizeInvalidCryptoError_EcScalarOutOfBoundsCryptoError_PointSizeInvalidCryptoError_PointFormatInvalid"CryptoError_PointFormatUnsupported#CryptoError_PointCoordinatesInvalid'CryptoError_ScalarMultiplicationInvalidCryptoError_MacKeyInvalid(CryptoError_AuthenticationTagSizeInvalidCryptoError_PrimeSizeInvalidCryptoError_SaltTooSmall CryptoError_OutputLengthTooSmallCryptoError_OutputLengthTooBigthrowCryptoErrorIOthrowCryptoErroronCryptoFailureeitherCryptoErrormaybeCryptoErrorCipher cipherInit cipherName cipherKeySizeAEADModeAEAD_OCBAEAD_CCMAEAD_EAXAEAD_CWCAEAD_GCMCCM_LCCM_L2CCM_L3CCM_L4CCM_MCCM_M4CCM_M6CCM_M8CCM_M10CCM_M12CCM_M14CCM_M16AuthTag unAuthTagDataUnitOffsetKeySizeSpecifier KeySizeRange KeySizeEnum KeySizeFixed StreamCipher streamCombineAEAD aeadModeImpl aeadState AEADModeImplaeadImplAppendHeaderaeadImplEncryptaeadImplDecryptaeadImplFinalizeaeadAppendHeader aeadEncrypt aeadDecrypt aeadFinalizeaeadSimpleEncryptaeadSimpleDecryptBlockCipher128 xtsEncrypt xtsDecrypt BlockCipher blockSize ecbEncrypt ecbDecrypt cbcEncrypt cbcDecrypt cfbEncrypt cfbDecrypt ctrCombineaeadInitIVmakeIVnullIVivAddMiyaguchiPreneelcompute'compute$fEqMiyaguchiPreneel!$fByteArrayAccessMiyaguchiPreneelvalidateKeySizeDES_EDE2DES_EEE2DES_EDE3DES_EEE3$fBlockCipherDES_EEE3$fCipherDES_EEE3$fBlockCipherDES_EDE3$fCipherDES_EDE3$fBlockCipherDES_EEE2$fCipherDES_EEE2$fBlockCipherDES_EDE2$fCipherDES_EDE2 $fEqDES_EEE3 $fEqDES_EDE3 $fEqDES_EEE2 $fEqDES_EDE2DES$fBlockCipherDES $fCipherDES$fEqDESState initializecombinegenerate $fNFDataState$fByteArrayAccessState StateSimpleinitializeSimplegenerateSimple$fNFDataStateSimpleAES256AES192AES128$fBlockCipher128AES128$fBlockCipherAES128$fCipherAES128$fBlockCipher128AES192$fBlockCipherAES192$fCipherAES192$fBlockCipher128AES256$fBlockCipherAES256$fCipherAES256$fNFDataAES128$fNFDataAES192$fNFDataAES256SHAKE256SHAKE128Blake2bpBlake2spBlake2bBlake2shashhashlazyhashInit hashUpdate hashUpdates hashFinalize hashInitWithhashWithCAST5$fBlockCipherCAST5 $fCipherCAST5 Twofish256 Twofish192 Twofish128$fBlockCipherTwofish128$fCipherTwofish128$fBlockCipherTwofish192$fCipherTwofish192$fBlockCipherTwofish256$fCipherTwofish256 Camellia128$fBlockCipherCamellia128$fCipherCamellia128 Blowfish448 Blowfish256 Blowfish128 Blowfish64Blowfish$fBlockCipherBlowfish$fCipherBlowfish$fBlockCipherBlowfish64$fCipherBlowfish64$fBlockCipherBlowfish128$fCipherBlowfish128$fBlockCipherBlowfish256$fCipherBlowfish256$fBlockCipherBlowfish448$fCipherBlowfish448$fNFDataBlowfish$fNFDataBlowfish64$fNFDataBlowfish128$fNFDataBlowfish256$fNFDataBlowfish448Options iterationsmemory parallelismvariantversion Parallelism MemoryCostTimeCostVersion Version10 Version13VariantArgon2dArgon2iArgon2iddefaultOptions $fEqVariant $fOrdVariant $fReadVariant $fShowVariant $fEnumVariant$fBoundedVariant $fEqVersion $fOrdVersion $fReadVersion $fShowVersion $fEnumVersion$fBoundedVersion $fEqOptions $fOrdOptions $fReadOptions $fShowOptionsCMACcmacsubKeys$fEqCMAC$fByteArrayAccessCMACHMAC hmacGetDigesthmacupdateupdatesfinalize$fEqHMAC$fByteArrayAccessHMAC Parameters iterCounts outputLengthPRFprfHMACfastPBKDF2_SHA1fastPBKDF2_SHA256fastPBKDF2_SHA512nrpPRKextract extractSkipexpand$fByteArrayAccessPRK$fEqPRKAuthCtxauthTagauth$fEqAuth$fByteArrayAccessAuth $fNFDataAuthNoncenonce12nonce8incrementNonce appendAAD finalizeAADencryptdecrypt$fByteArrayAccessNoncesqrtigcdeareEvenlog2numBitsnumBytesBinaryPolynomialaddF2mmodF2mmulF2m squareF2m squareF2m'invF2mdivF2mexpSafeexpFastinverseinverseCoprimes!$fExceptionCoprimesAssertionError$fShowCoprimesAssertionErrori2ospi2ospOfos2ipi2ospOf_ ClockSkewNoSkewOneStepTwoSteps ThreeSteps FourSteps TOTPParamsOTPTime OTPDigitsOTP4OTP5OTP6OTP7OTP8OTP9OTPhotp resynchronizedefaultTOTPParams mkTOTPParamstotp totpVerify$fShowOTPDigits$fEnumClockSkew$fShowClockSkew$fShowTOTPParams CurveName SEC_p112r1 SEC_p112r2 SEC_p128r1 SEC_p128r2 SEC_p160k1 SEC_p160r1 SEC_p160r2 SEC_p192k1 SEC_p192r1 SEC_p224k1 SEC_p224r1 SEC_p256k1 SEC_p256r1 SEC_p384r1 SEC_p521r1 SEC_t113r1 SEC_t113r2 SEC_t131r1 SEC_t131r2 SEC_t163k1 SEC_t163r1 SEC_t163r2 SEC_t193r1 SEC_t193r2 SEC_t233k1 SEC_t233r1 SEC_t239k1 SEC_t283k1 SEC_t283r1 SEC_t409k1 SEC_t409r1 SEC_t571k1 SEC_t571r1 CurveCommonecc_aecc_becc_gecc_necc_h CurvePrime CurveBinaryPointPointO PrivateNumber PublicPointCurveCurveF2mCurveFP common_curveecc_fxecc_p curveSizeBitsgetCurveByName $fNFDataPoint$fNFDataCurveBinary $fShowPoint $fReadPoint $fEqPoint $fDataPoint$fShowCurveCommon$fReadCurveCommon$fEqCurveCommon$fDataCurveCommon$fShowCurvePrime$fReadCurvePrime$fEqCurvePrime$fDataCurvePrime$fShowCurveBinary$fReadCurveBinary$fEqCurveBinary$fDataCurveBinary $fShowCurve $fReadCurve $fEqCurve $fDataCurve$fShowCurveName$fReadCurveName $fEqCurveName$fOrdCurveName$fEnumCurveName$fBoundedCurveName$fDataCurveNameMaskGenAlgorithmmgf1KeyPair PrivateKey private_pub private_d private_p private_q private_dP private_dQ private_qinv public_sizepublic_npublic_eErrorMessageSizeIncorrectMessageTooLongMessageNotRecognizedSignatureTooLongInvalidParametersBlinder private_size private_n private_e toPublicKey toPrivateKey$fNFDataPublicKey$fNFDataPrivateKey $fShowBlinder $fEqBlinder $fShowError $fEqError$fShowPublicKey$fReadPublicKey $fEqPublicKey$fDataPublicKey$fShowPrivateKey$fReadPrivateKey$fEqPrivateKey$fDataPrivateKey $fShowKeyPair $fReadKeyPair $fEqKeyPair $fDataKeyPair$fNFDataKeyPairdpepEntropyBackendsupportedBackends gatherBackend replenish getEntropy EntropyPoolcreateEntropyPoolWithcreateEntropyPoolgetEntropyFromMonadPseudoRandomDRGrandomBytesGenerate MonadRandomgetRandomByteswithDRG$fMonadRandomIO$fMonadRandomMonadPseudoRandom$fMonadMonadPseudoRandom$fApplicativeMonadPseudoRandom$fFunctorMonadPseudoRandom SystemDRG getSystemDRG ChaChaDRGSeedseedNew seedToIntegerseedFromIntegerseedFromBinarydrgNew drgNewSeed drgNewTestwithRandomBytes$fByteArrayAccessSeed Signature SecretKey publicKey secretKey signaturetoPublicsignverifygenerateSecretKey publicKeySize secretKeySize signatureSize$fShowSecretKey $fEqSecretKey$fByteArrayAccessSecretKey$fNFDataSecretKey$fByteArrayAccessPublicKey$fShowSignature $fEqSignature$fByteArrayAccessSignature$fNFDataSignatureScalar pointBasetoPointpointAdd pointNegatepointMulpointDhpointsMulVarTime pointIsValidpointToIntegerspointFromIntegers pointToBinarypointFromBinaryunsafePointFromBinaryscalarGenerate scalarZero scalarIsZero scalarAdd scalarSub scalarInv scalarCmpscalarFromBinaryscalarToBinaryscalarFromIntegerscalarToInteger $fShowScalar $fEqScalar$fByteArrayAccessScalar$fNFDataScalarDhSecretdhSecretdh$fShowDhSecret $fEqDhSecret$fByteArrayAccessDhSecret$fNFDataDhSecret hashPasswordbcryptvalidatePasswordvalidatePasswordEither scalarEncodescalarDecodeLong scalarMul pointEncode pointDecodepointHasPrimeOrder pointDoublepointMulByCofactor GenTopPolicy SetHighest SetTwoHighestgenerateParams generateMaxgenerateBetween$fShowGenTopPolicy$fEqGenTopPolicy pointBaseMulpointAddTwoMulsisPointAtInfinity isPointValid public_curvepublic_q private_curvesign_rsign_ssignWith$fReadSignature$fDataSignature generateQprivate_params private_x public_paramspublic_yParamsparams_pparams_gparams_q PublicNumbergeneratePrivatecalculatePublic$fNFDataParams $fShowParams $fReadParams $fEqParams $fDataParamsisProbablyPrime generatePrimegenerateSafePrimefindPrimeFromWith findPrimeFromprimalityTestMillerRabinprimalityTestFermatprimalityTestNaive isCoprime generateWithgenerateBlinder PSSParamspssHash pssMaskGenAlg pssSaltLengthpssTrailerFielddefaultPSSParamsdefaultPSSParamsSHA1signDigestWithSalt signWithSalt signDigest signSafersignDigestSafer verifyDigestHashAlgorithmASN1 padSignature decryptSafer$fHashAlgorithmASN1RIPEMD160$fHashAlgorithmASN1SHA512t_256$fHashAlgorithmASN1SHA512t_224$fHashAlgorithmASN1SHA512$fHashAlgorithmASN1SHA384$fHashAlgorithmASN1SHA256$fHashAlgorithmASN1SHA224$fHashAlgorithmASN1SHA1$fHashAlgorithmASN1MD5$fHashAlgorithmASN1MD2 OAEPParamsoaepHashoaepMaskGenAlg oaepLabeldefaultOAEPParamsencryptWithSeed SharedKey params_bitsgeneratePublic getShared$fShowPublicNumber$fReadPublicNumber$fEqPublicNumber$fEnumPublicNumber$fRealPublicNumber$fNumPublicNumber$fOrdPublicNumber$fNFDataPublicNumber$fShowPrivateNumber$fReadPrivateNumber$fEqPrivateNumber$fEnumPrivateNumber$fRealPrivateNumber$fNumPrivateNumber$fOrdPrivateNumber$fNFDataPrivateNumber$fShowSharedKey $fEqSharedKey$fByteArrayAccessSharedKey$fNFDataSharedKeyCurve_Edwards25519 Curve_X448 Curve_X25519 Curve_P521R1 Curve_P384R1 Curve_P256R1EllipticCurveArith pointSmulEllipticCurveDHecdhRawecdh EllipticCurvecurveGenerateScalarcurveGenerateKeyPair encodePoint decodePoint SharedSecretkeypairGetPublickeypairGetPrivate$fEllipticCurveDHCurve_P256R1 $fEllipticCurveArithCurve_P256R1$fEllipticCurveCurve_P256R1$fEllipticCurveDHCurve_P384R1 $fEllipticCurveArithCurve_P384R1$fEllipticCurveCurve_P384R1$fEllipticCurveDHCurve_P521R1 $fEllipticCurveArithCurve_P521R1$fEllipticCurveCurve_P521R1$fEllipticCurveDHCurve_X25519$fEllipticCurveCurve_X25519$fEllipticCurveDHCurve_X448$fEllipticCurveCurve_X448&$fEllipticCurveArithCurve_Edwards25519!$fEllipticCurveCurve_Edwards25519$fEqSharedSecret$fByteArrayAccessSharedSecret$fNFDataSharedSecret$fShowCurve_P256R1$fDataCurve_P256R1$fShowCurve_P384R1$fDataCurve_P384R1$fShowCurve_P521R1$fDataCurve_P521R1$fShowCurve_X25519$fDataCurve_X25519$fShowCurve_X448$fDataCurve_X448$fShowCurve_Edwards25519$fDataCurve_Edwards25519 deriveEncrypt deriveDecryptsplitmergeBlockunBlock unsafeDoIObase GHC.IO.UnsafeunsafeDupablePerformIOGHC.Word byteSwap64 Data.BitspopCount%memory-0.14.14-3ajmCMZGTesKHiqb9P7PzmData.ByteArray.BytesBytesData.ByteArray.EncodingconvertFromBase convertToBaseBaseBase16Base32Base64Base64URLUnpadded Base64OpenBSDData.ByteArray.Mapping mapAsWord64 mapAsWord128 fromW64BEtoW64LEtoW64BEData.ByteArray.ViewdropViewtakeViewviewViewData.ByteArray.MethodsconvertallanyconstEqeqzero replicate copyAndFreezecopyRetcopyappendconcatspandroptakesplitAtindexxorsnoccons singletonunconsunpackpacknullempty unsafeCreateallocAndFreezecreateallocData.ByteArray.ScrubbedBytes ScrubbedBytesData.ByteArray.MemViewMemViewData.ByteArray.TypesByteArrayAccesslength withByteArraycopyByteArrayToPtr ByteArrayallocRet constAllZerochunkbe32Primle32Primbyteswap32Prim convert4To32 booleanPrimdeepseq-1.4.3.0Control.DeepSeqNFDatarnfGHC.Base<$ Applicativepure<*>*>liftA2<*ghc-prim GHC.TypesWordWord8Word16Word32Word64Data.TraversableforMControl.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipList Control.ArrowfirstsecondData.Functor.ConstConstgetConst Data.FoldableforM_ byteSwap32 byteSwap16 Data.Functorvoid<$>liftA3liftA<**> Alternative<|>somemany Data.EithereitherxtsGFMulXTSstepMP c_rc4_init c_rc4_combineAESCCMAESOCBAESGCMAESgcmModeocbModeccmModeinitAES encryptECB encryptCBCgenCTR genCounter encryptCTR encryptXTS decryptECB decryptCBC decryptCTR decryptXTSgcmInit gcmAppendAADgcmAppendEncryptgcmAppendDecrypt gcmFinishocbInit ocbAppendAADocbAppendEncryptocbAppendDecrypt ocbFinishccmInit ccmAppendAAD ccmEncrypt ccmDecrypt ccmFinish IsAtLeastIsAtMostIsDivisibleBy8Mod8Div8byteLenintegralNatValNatProxyMutableArray32Array64Array32Array8array8array32array32FromAddrBEallocArray32AndFreezearray64mutableArray32mutableArray32FromAddrBEmutableArray32Freeze arrayRead8 arrayRead32 arrayRead64mutableArrayRead32mutableArrayWrite32mutableArrayWriteXor32KeybuildKeyK12K16QPcreateKeySchedulew64to32w32to64Data.Memory.ExtendedWordsWord128 initTwofishTwofishColumnZeroOneTwoThree KeyPackage rawKeyBytesbyteSizeByteSizeBytes16Bytes24Bytes32skCamellia initCamelliakwkeModeDecryptEncrypt initBlowfish eksBlowfishmakeKeySchedule expandKeyBF expandIPT' IPolynomial PRK_NoExpandNonce8Nonce12 GmpSupportedonGmpUnsupportedgmpGcdegmpLog2gmpPowModSecIntegergmpPowModInteger gmpInverse gmpNextPrimegmpTestPrimeMillerRabingmpSizeInBytes gmpSizeInBitsgmpExportIntegergmpImportIntegerGmpUnsupportedCurveParameters curveEccA curveEccB curveEccG curveEccN curveEccHcurveSizeBytes$fCurveSEC_p112r1 CurveTypeCurvePrimeParamCurveBinaryParamcurveParameters curveTypegcdF2mNothingCoprimesAssertionErrorexponentiationTPand'&&!multiplication EntropySource entropyOpen entropyGather entropyCloseRDRand DevURandom DevRandom openBackend getEntropyPtrrunPseudoRandominitializeWords probabilisticdecaf_x448_derive_public_key decaf_x448ccryptonite_curve25519 BCryptHashBCHTruedivmodtHash firstPrimeshashDigestASN1 makeSignature EphemeralKeygenerateEphemeral encryptWithxorMemdiffuse