!Ã      !"#$%&'()*+,-./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){)|)})~)))))**++++,----.........../////////////000000000000000000000000011111111111111111111111112222222222222222222222222222222223333333333333333 3 3 3 3 3444444444444444444 4!4"4#5$5%5&5'6(6)6*6+6,6-6.6/606162636465666768696:6;6<6=6>7?7@7A7B7C7D7E7F8G8H8I8J8K8L8M8N8O9P9Q9R9S9T9U9V9W9X9Y9Z9[9\9]9^9_9`9a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u:v:w;x;y;z;{;|;};~;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<<<<<<<<<=======>>>>>>>>????????????????????????@@@@@@@@@@@@@@@@@@@@@AAAAAAAAAAAAAAAAAAAAAAAA A A A A AAAABBBCCCCCCCCCCCC C!C"C#C$D%D&D'D(D)D*D+D,D-D.D/D0D1D2D3D4D5D6D7D8E9E:E;E<E=E>E?E@EAEBFCFDFEFFFGFHFIFJFKFLFMFNFOFPFQFRFSFTFUFVFWFXFYFZF[F\F]F^F_F`FaFbFcFdFeFfFgFhFiFjFkGlGmGnHoHpHqHrHsHtHuHvHwHxHyHzH{H|H}H~HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIJJK BSD-styleSafe=?B cryptonitea DES block (64 bits) cryptoniteBasic DES encryption which takes a key and a block of plaintext and returns the encrypted block of ciphertext according to the standard. cryptoniteBasic DES decryption which takes a key and a block of ciphertext and returns the decrypted block of plaintext according to the standard. BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneH1 cryptoniteFormat of padding cryptonite%PKCS5: PKCS7 with hardcoded size of 8 cryptonite)PKCS7 with padding size between 1 and 255 cryptonitezero padding with block size cryptoniteApply some pad to a bytearray cryptonite,Try to remove some padding from a bytearray.L BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNone2HVS cryptoniteBA simple Either like type to represent a computation that can fail2 possibles values are: H : The computation succeeded, and contains the result of the computation J : The computation failed, and contains the cryptographic error associated  cryptoniteDEnumeration of all possible errors that can be found in this library  cryptonite^Throw an CryptoError as exception on CryptoFailed result, otherwise return the computed value! cryptoniteSame as  $ but throw the error asynchronously." cryptoniteSimple ( like combinator for CryptoFailable type# cryptonite'Transform a CryptoFailable to an Either$ cryptonite%Transform a CryptoFailable to a Maybe  !"#$ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneU  !"#$  !"#$M BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNone[D cryptonite3Perform io for hashes that do allocation and FFI.  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.N BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNone\k;O BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone_ cryptonite=Chunk some input byte array into @sz byte list of byte array.P BSD-style#Vincent Hanquez <vincent@snarc.org>stableCompatNoneFh cryptonite$Byteswap Word# to or from Big Endian0On a big endian machine, this function is a nop. cryptonite'Byteswap Word# to or from Little Endian3On a little endian machine, this function is a nop. cryptoniteVSimple compatibility for byteswap the lower 32 bits of a Word# at the primitive level cryptonite<Combine 4 word8 [a,b,c,d] to a word32 representing [a,b,c,d] cryptonitepSimple wrapper to handle pre 7.8 and future, where most comparaison functions don't returns a boolean anymore.Q BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeiR BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneEMXs" % cryptoniteSymmetric cipher class.& cryptonite&Initialize a cipher context from a key' cryptonite Cipher name( cryptoniteYreturn the size of the key required for this cipher. Some cipher accept any size for key) cryptonite AEAD Mode; cryptonite%Authentication Tag for AE cipher mode> cryptonite7Offset inside an XTS data unit, measured in block size.? cryptonite)Different specifier for key size in bytes@ cryptonitein the range [min,max]A cryptoniteone of the specified valuesB cryptonitea specific size%&'()*+,-./0123456789:;<=>?@ABS BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNonevC cryptoniteSymmetric stream cipher classD cryptoniteCombine using the stream cipherCDT BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafewT,      !"#$%&U BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone .2HMVX E cryptonite.Represent a digest for a given hash algorithm.This type is an instance of  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 V.F cryptonite/Represent a context for a given hash algorithm.G cryptonite&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.H cryptonite8Associated type for the block size of the hash algorithmI cryptonite9Associated type for the digest size of the hash algorithmJ cryptoniteCAssociated type for the internal context size of the hash algorithmK cryptonite&Get the block size of a hash algorithmL cryptonite'Get the digest size of a hash algorithmM cryptonite5Get the size of the context used for a hash algorithmN cryptoniteEInitialize a context pointer to the initial state of a hash algorithmO cryptonite%Update the context with some raw dataP cryptoniteEFinalize the context and set the digest raw memory to the right valueE'F(GHIJLMPNOKW BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HViQ cryptonite&Whirlpool cryptographic hash algorithmQRX BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVS cryptonite"Tiger cryptographic hash algorithmSTY BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVU cryptonite0Skein512 (512 bits) cryptographic hash algorithmW cryptonite0Skein512 (384 bits) cryptographic hash algorithmY cryptonite0Skein512 (256 bits) cryptographic hash algorithm[ cryptonite0Skein512 (224 bits) cryptographic hash algorithmUVWXYZ[\Z BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV4] cryptonite0Skein256 (256 bits) cryptographic hash algorithm_ cryptonite0Skein256 (224 bits) cryptographic hash algorithm]^_`[ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVa cryptonite/SHA512t (256 bits) cryptographic hash algorithmc cryptonite/SHA512t (224 bits) cryptographic hash algorithmabcd\ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVe cryptonite#SHA512 cryptographic hash algorithmef] BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVg cryptonite#SHA384 cryptographic hash algorithmgh^ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVi cryptonite,SHA3 (512 bits) cryptographic hash algorithmk cryptonite,SHA3 (384 bits) cryptographic hash algorithmm cryptonite,SHA3 (256 bits) cryptographic hash algorithmo cryptonite,SHA3 (224 bits) cryptographic hash algorithmijklmnop_ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV%q cryptonite#SHA256 cryptographic hash algorithmqr` BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVRs cryptonite#SHA224 cryptographic hash algorithmsta BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVwu cryptonite!SHA1 cryptographic hash algorithmuvb BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVw cryptonite&RIPEMD160 cryptographic hash algorithmwxc BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVy cryptonite MD5 cryptographic hash algorithmyzd BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV{ cryptonite MD4 cryptographic hash algorithm{|e BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV} cryptonite MD2 cryptographic hash algorithm}~f BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV* cryptonite.Keccak (512 bits) cryptographic hash algorithm cryptonite.Keccak (384 bits) cryptographic hash algorithm cryptonite.Keccak (256 bits) cryptographic hash algorithm cryptonite.Keccak (224 bits) cryptographic hash algorithm BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneMXm cryptoniteA Mutable hash context cryptonite"Create a new mutable hash context.Jthe algorithm used is automatically determined from the return constraint. cryptonite"Create a new mutable hash context.0The algorithm is explicitely passed as parameter cryptonite&Update a mutable hash context in place cryptonite4Finalize a mutable hash context and compute a digest cryptonite:Reset the mutable context to the initial state of the hashGHIJLMPNOKGHIJLMPNOKg BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV7 cryptonite0Blake2sp (256 bits) cryptographic hash algorithm cryptonite0Blake2sp (224 bits) cryptographic hash algorithmh BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HVx cryptonite/Blake2s (256 bits) cryptographic hash algorithm cryptonite/Blake2s (224 bits) cryptographic hash algorithm cryptonite/Blake2s (160 bits) cryptographic hash algorithmi BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV cryptonite0Blake2bp (512 bits) cryptographic hash algorithmj BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.2HV cryptonite/Blake2b (512 bits) cryptographic hash algorithm cryptonite/Blake2b (384 bits) cryptographic hash algorithm cryptonite/Blake2b (256 bits) cryptographic hash algorithm cryptonite/Blake2b (224 bits) cryptographic hash algorithm cryptonite/Blake2b (160 bits) cryptographic hash algorithm k BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone/) cryptonite)Compute the gfmul with the XTS polynomialblock size need to be 128 bits."FIXME: add support for big endian.)l BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneESX\ cryptonite8Authenticated Encryption with Associated Data algorithms cryptoniteAEAD Implementation cryptonite1Append some header information to an AEAD context cryptonite-Encrypt some data and update the AEAD context cryptonite-Decrypt some data and update the AEAD context cryptonite;Finalize the AEAD context and return the authentication tag cryptoniteSimple AEAD encryption cryptoniteSimple AEAD decryption cryptoniteA new AEAD Context cryptonite#Optional Authentication data header cryptoniteOptional Plaintext cryptonite Tag length cryptonite!Authentication tag and ciphertext cryptoniteA new AEAD Context cryptonite#Optional Authentication data header cryptonite Ciphertext cryptoniteThe authentication tag cryptonite Plaintextm BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone%@AESX cryptonite0class of block cipher with a 128 bits block size cryptoniteencrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block only cryptonitedecrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block only cryptoniteSymmetric block cipher class cryptonite7Return the size of block required for this block cipher cryptoniteEncrypt blocks6the input string need to be multiple of the block size cryptoniteDecrypt blocks6the input string need to be multiple of the block size cryptoniteencrypt using the CBC mode.,input need to be a multiple of the blocksize cryptonitedecrypt using the CBC mode.,input need to be a multiple of the blocksize cryptoniteencrypt using the CFB mode.,input need to be a multiple of the blocksize cryptonitedecrypt using the CFB mode.,input need to be a multiple of the blocksize cryptonitecombine 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 size cryptoniteInitialize a new AEAD State:When Nothing is returns, it means the mode is not handled.* cryptonite XTS callback cryptonite an IV parametrized by the cipher cryptonite)Create an IV for a specified block cipher cryptonite:Create an IV that is effectively representing the number 0 cryptoniteIncrement an IV by a number.&Assume the IV is in Big Endian format. cryptonite2Usually represent the Data Unit (e.g. disk sector) cryptonite+Offset in the data unit in number of blocks cryptonite Plaintext cryptonite Ciphertext cryptonite2Usually represent the Data Unit (e.g. disk sector) cryptonite+Offset in the data unit in number of blocks cryptonite Ciphertext cryptonite Plaintext* cryptonite2Usually represent the Data Unit (e.g. disk sector) cryptonite+Offset in the data unit in number of blocks cryptoniteData cryptoniteProcessed Data!*+ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone2uA%&'()*+,-./0123456789:;<=>?@ABCDA%&'(CD>?@AB)*+,-.3456789:/012;<= BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneM cryptoniteKCompute Miyaguchi-Preneel one way compress using the supplied block cipher. cryptonite{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, cryptonite%computation step of Miyaguchi-Preneel cryptoniteSkey build function to compute Miyaguchi-Preneel. care about block-size and key-size cryptonite input message cryptonite output tag cryptonite input message cryptonite output tagNone'  BSD-style experimental???None cryptoniteL3DES where the first and third keys are equal, used in alternative direction cryptoniteI3DES where the first and third keys are equal, used in the same direction cryptonite83DES with 3 different keys used in alternative direction cryptonite93DES with 3 different keys used all in the same direction  BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone8 cryptonite DES Context  BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneM$u cryptonite Salsa context cryptonite\Initialize a new Salsa context with the number of rounds, the key and the nonce associated. cryptonitepCombine the salsa output and an arbitrary message with a xor, and return the combined output and the new state. cryptonite9Generate a number of bytes from the Salsa output directly cryptonitenumber of rounds (8,12,20) cryptonitethe key (128 or 256 bits) cryptonitethe nonce (64 or 96 bits) cryptonitethe initial Salsa state cryptonitethe current Salsa state cryptonite$the source to xor with the generator cryptonitethe current Salsa state cryptonitethe length of data to generate  BSD-style-Brandon Hamilton <brandon.hamilton@gmail.com>stablegoodNone) cryptonite]Initialize a new XSalsa context with the number of rounds, the key and the nonce associated. cryptonitenumber of rounds (8,12,20) cryptonitethe key (256 bits) cryptonitethe nonce (192 bits) cryptonitethe initial XSalsa state  BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneM7 cryptoniteThe encryption state for RC4- cryptonite%C Call for initializing the encryptor cryptoniteRC4 context initialization.gseed the context with an initial key. the key size need to be adequate otherwise security takes a hit. cryptonitePgenerate the next len bytes of the rc4 stream without combining it to anything. cryptonite3RC4 xor combination of the rc4 stream with an input. cryptonitePointer to the permutation cryptonitePointer to the clear text cryptoniteLength of the clear text cryptonite Output buffer- cryptonite The rc4 key cryptoniteThe key length cryptonite The context cryptoniteThe key cryptonite%The RC4 context with the key mixed in cryptonite rc4 context cryptoniteinput cryptonitenew rc4 context, and the output BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneMFI cryptonite<ChaCha context for DRG purpose (see Crypto.Random.ChaChaDRG) cryptoniteChaCha context cryptonite]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated. cryptoniteInitialize simple ChaCha State*The seed need to be at least 40 bytes long cryptoniteqCombine the chacha output and an arbitrary message with a xor, and return the combined output and the new state. cryptonite:Generate a number of bytes from the ChaCha output directly cryptonite similar to  but assume certains values cryptonitenumber of rounds (8,12,20) cryptonitethe key (128 or 256 bits) cryptonitethe nonce (64 or 96 bits) cryptonitethe initial ChaCha state cryptonitea 40 bytes long seed cryptonitethe current ChaCha state cryptonite$the source to xor with the generator cryptonitethe current ChaCha state cryptonitethe length of data to generaten BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone%M!/ cryptonite AESCCM State0 cryptonite AESOCB State1 cryptonite AESGCM State2 cryptoniteAES Context (pre-processed key)3 cryptonite)Create an AES AEAD implementation for GCM4 cryptonite)Create an AES AEAD implementation for OCB5 cryptonite)Create an AES AEAD implementation for CCM6 cryptonite#Initialize a new context with a keyRKey needs to be of length 16, 24 or 32 bytes. Any other values will return failure7 cryptonite(encrypt using Electronic Code Book (ECB)8 cryptonite)encrypt using Cipher Block Chaining (CBC)9 cryptonitevgenerate 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.: cryptonitevgenerate 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 9- but also return the next IV for continuation; cryptonite encrypt using Counter mode (CTR)<in CTR mode encryption and decryption is the same operation.< cryptoniteencrypt using XTSdthe first key is the normal block encryption key the second key is used for the initial block tweak= cryptonite(decrypt using Electronic Code Book (ECB)> cryptonite)decrypt using Cipher block chaining (CBC)? cryptonite!decrypt using Counter mode (CTR).<in CTR mode encryption and decryption is the same operation.@ cryptonitedecrypt using XTSA cryptoniteinitialize a gcm contextB cryptoniteGappend data which is only going to be authenticated to the GCM context.Uneeds to happen after initialization and before appending encryption/decryption data.C cryptonite4append 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.D cryptonite4append 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.E cryptonite!Generate the Tag from GCM contextF cryptoniteinitialize an ocb contextG cryptoniteGappend data which is going to just be authenticated to the OCB context.Tneed to happen after initialization and before appending encryption/decryption data.H cryptonite4append 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.I cryptonite4append 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.J cryptonite!Generate the Tag from OCB contextK cryptoniteinitialize a ccm contextL cryptoniteGappend data which is only going to be authenticated to the CCM context.Uneeds to happen after initialization and before appending encryption/decryption data.M cryptonite4append 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.N cryptonite4append 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.O cryptonite!Generate the Tag from CCM context8 cryptonite AES Context cryptonite Initial vector of AES block size cryptonite plaintext cryptonite ciphertext9 cryptonite Cipher Key. cryptoniteusually a 128 bit integer. cryptonitelength of bytes required.; cryptonite AES Context cryptoniteIinitial vector of AES block size (usually representing a 128 bit integer) cryptoniteplaintext input cryptoniteciphertext output< cryptoniteAES cipher and tweak context cryptonite:a 128 bits IV, typically a sector or a block offset in XTS cryptoniteLnumber of rounds to skip, also seen a 16 byte offset in the sector or block. cryptoniteinput to encrypt cryptoniteoutput encrypted? cryptonite AES Context cryptonite6initial vector, usually representing a 128 bit integer cryptoniteciphertext input cryptoniteplaintext output@ cryptoniteAES cipher and tweak context cryptonite:a 128 bits IV, typically a sector or a block offset in XTS cryptoniteLnumber of rounds to skip, also seen a 16 byte offset in the sector or block. cryptoniteinput to decrypt cryptoniteoutput decrypted0123456789:;<=>?@AFK BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneM cryptoniteAES with 256 bit key cryptoniteAES with 192 bit key cryptoniteAES with 128 bit keyoSafe ,.HUV0 cryptoniteensure the given bitlen is divisible by 8 cryptoniteensure the given bitlen is greater or equal to n cryptoniteensure the given bitlen is lesser or equal to nPQRSTp BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone .2HUVX cryptoniteSHAKE256 (256 bits) extendable output function. Supports an arbitrary digest size, to be specified as a type parameter of kind U.Note: outputs from  n and  mb for the same input are correlated (one being a prefix of the other). Results are unrelated to   results.  cryptoniteSHAKE128 (128 bits) extendable output function. Supports an arbitrary digest size, to be specified as a type parameter of kind U.Note: outputs from   n and   mb for the same input are correlated (one being a prefix of the other). Results are unrelated to  results.  cryptoniteType class of SHAKE algorithms.V cryptonite(Alternate finalization needed for cSHAKEW cryptoniteGet the digest bit length   VWq BSD-style*Nicolas Di Prima <nicolas@primetype.co.uk> experimentalunknownNone.2HVXV cryptoniteFast cryptographic hash.6It is especially known to target 64bits architectures.Known supported digest sizes: Blake2b 160 Blake2b 224 Blake2b 256 Blake2b 384 Blake2b 512 cryptonite1Fast 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> experimentalunknownNoneYGQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    YG}~{|yzuvstqrghefcdabwxSTopmnklij    _`]^[\YZWXUVQR BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneX  cryptonite'Hash a strict bytestring into a digest. cryptonite%Hash a lazy bytestring into a digest. cryptonite0Initialize a new context for this hash algorithm cryptoniteHrun hashUpdates on one single bytestring and return the updated context. cryptonite`Update the context with a list of strict bytestring, and return a new context with the updates. cryptonite'Finalize a context and return a digest. cryptonite7Initialize a new context for a specified hash algorithm cryptoniteRun the 8 function but takes an explicit hash algorithm parameter cryptoniteATry 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.fEFGLKQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     FEKLr BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneF X cryptoniteArray of mutable Word32Y cryptoniteArray of Word64Z cryptoniteArray of Word32[ cryptoniteArray of Word8\ cryptonite*Create an array of Word8 aliasing an Addr#] cryptonite@Create an Array of Word32 of specific size from a list of Word32^ cryptonite-Create an Array of BE Word32 aliasing an Addr_ cryptonite.Create an Array of Word32 using an initializer` cryptonite@Create an Array of Word64 of specific size from a list of Word64a cryptoniteGCreate a Mutable Array of Word32 of specific size from a list of Word32b cryptonite4Create a Mutable Array of BE Word32 aliasing an Addrc cryptoniteAfreeze a Mutable Array of Word32 into a immutable Array of Word32d cryptoniteRead a Word8 from an Arraye cryptoniteRead a Word32 from an Arrayf cryptoniteRead a Word64 from an Arrayg cryptonite,Read a Word32 from a Mutable Array of Word32h cryptonite-Write a Word32 from a Mutable Array of Word32i cryptonitedWrite into the Mutable Array of Word32 by combining through xor the current value and the new value. x[i] = x[i] xor valueXYZ[\]^_`abcdefghisNoneFںj cryptonite-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.k cryptonite1Encrypts the given ByteString using the given Keyl cryptonite1Decrypts the given ByteString using the given Keyj cryptonite%The key to create the twofish contextk cryptoniteThe key to use cryptoniteThe data to encryptl cryptoniteThe key to use cryptoniteThe data to decryptmjklNonet BSD-styleNoneFn cryptoniteAll subkeys for 12 or 16 roundso cryptonite(Encrypts a block using the specified keyp cryptonite(Decrypts a block using the specified keyq cryptonite+Precompute "masking" and "rotation" subkeysq cryptoniteTrue( for short keys that only need 12 rounds cryptoniteInput key padded to 16 bytes cryptoniteOutput data structurenopq BSD-style)Olivier Chron <olivier.cheron@gmail.com>stablegoodNonep& cryptoniteNCAST5 block cipher (also known as CAST-128). Key is between 40 and 128 bits.&&u BSD-style experimentalGoodNoneFr cryptonitewCopy the state of one key schedule into the other. The first parameter is the destination and the second the source.s cryptoniteLCreate a key schedule mutable array of the pbox followed by all the sboxes.tursv BSD-style experimentalGoodNone?v cryptonite-Initialize a new Blowfish context from a key.'key needs to be between 0 and 448 bits.w cryptoniteEGet an immutable Blowfish context by freezing a mutable key schedule.x cryptoniteEncrypt blocks&Input need to be a multiple of 8 bytesy cryptoniteDecrypt blocks&Input need to be a multiple of 8 bytesz cryptonite-Encrypt or decrypt a single block of 64 bits.;The inverse argument decides whether to encrypt or decrypt.{ cryptoniteCBlowfish encrypt a Word using the current state of the key schedule| cryptoniteThe key schedule cryptoniteThe key cryptoniteThe salt} cryptoniteThe key schedule cryptoniteThe key cryptoniteFirst word of the salt cryptoniteSecond word of the salt ts~vwxy{ BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneM) cryptonite448 bit keyed blowfish state* cryptonite256 bit keyed blowfish state+ cryptonite128 bit keyed blowfish state, cryptonite64 bit keyed blowfish state- cryptonitevariable keyed blowfish state)*+,--,+*)w BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe cryptoniteSplit a   into the highest and lowest  cryptoniteReconstruct a   from two x BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneF cryptoniteCamellia context cryptoniteInitialize a 128-bit key`Return the initialized key or a error message if the given keyseed was not 16-bytes in length. cryptonite1Encrypts the given ByteString using the given Key cryptonite1Decrypts the given ByteString using the given Key cryptonite&The key to create the camellia context cryptoniteThe key to use cryptoniteThe data to encrypt cryptoniteThe key to use cryptoniteThe data to decrypt BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone= cryptonite&Camellia block cipher with 128 bit key== BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone @ cryptoniteRParameters that can be adjusted to change the runtime performance of the hashing.E cryptoniteWhich variant of Argon2 to use.F cryptoniteWhich version of Argon2 to use.G cryptoniteCA parallelism degree, which defines the number of parallel threads.yz <= hashParallelism <= y{ && y| <= hashParallelism <= y}H cryptoniteDThe memory cost, which defines the memory usage, given in kibibytes.max y~ (8 * hashParallelism) <=  hashMemory <= yI cryptoniteThe time cost, which defines the amount of computation realized and therefore the execution time, given in number of iterations.y <= hashIterations <= yJ cryptoniteWhich version of Argon2 to useM cryptonitexWhich variant of Argon2 to use. You should choose the variant that is most applicable to your intention to hash inputs.N cryptoniteArgon2d 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.O cryptoniteArgon2i 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.P cryptoniteArgon2id 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@ACBDEFGHIJKLMNOPQR@ACBDEFIHGMNOPJKLQR BSD-style experimentalGoodNone$e cryptoniteHThe number of user-defined iterations for the algorithm (must be > 0)f cryptoniteJThe number of bytes to generate out of BCryptPBKDF (must be in 1..1024)g cryptoniteBDerive a key of specified length using the bcrypt_pbkdf algorithm.h cryptoniteInternal hash function used by g."Normal users should not need this.cdfeghcdfegh BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneM+l cryptoniteAuthentication codem cryptonite'compute a MAC using the supplied ciphern cryptonitemake sub-keys used in CMACm cryptonitekey to compute CMAC with cryptonite input message cryptonite output tagn cryptonitekey to compute CMAC with cryptonitesub-keys to compute CMAC cryptonite width in byte cryptonite(irreducible binary polynomial definition cryptoniteresult bit patternlmnmln BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneM; q cryptonite;Represent an ongoing HMAC state, that can be appended with x and finalize to an HMAC with  hmacFinalizes cryptoniteORepresent an HMAC that is a phantom type with the hash used to produce the mac._The Eq instance is constant time. No Show instance is provided, to avoid printing by mistake.v cryptonite1compute a MAC using the supplied hashing functionw cryptonite)Initialize a new incremental HMAC contextx cryptonite#Incrementally update a HMAC contexty cryptonite9Increamentally update a HMAC context with multiple inputsz cryptonite,Finalize a HMAC context and return the HMAC.v cryptonite Secret key cryptoniteMessage to MACw cryptonite Secret keyx cryptoniteCurrent HMAC context cryptoniteMessage to append to the MAC cryptoniteUpdated HMAC contexty cryptoniteCurrent HMAC context cryptoniteMessages to append to the MAC cryptoniteUpdated HMAC context qrstuvwxyz vstuqrwxyz BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneC} cryptoniteParameters for PBKDF2 cryptoniteNthe number of user-defined iterations for the algorithms. e.g. WPA2 uses 4000. cryptonite-the number of bytes to generate out of PBKDF2 cryptoniteThe PRF used for PBKDF2 cryptonite>PRF for PBKDF2 using HMAC with the hash algorithm as parameter cryptonite;generate the pbkdf2 key derivation function from the output cryptonitethe password parameters cryptonite the content cryptoniteprf(password,content) }~ }~ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneJ  cryptoniteParameters for Scrypt cryptoniteLCpu/Memory cost ratio. must be a power of 2 greater than 1. also known as N. cryptoniteMust satisfy r * p < 2^30 cryptoniteMust satisfy r * p < 2^30 cryptonite-the number of bytes to generate out of Scrypt cryptonite'Generate the scrypt key derivation data BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneU cryptonitePseudo Random Key cryptoniteRExtract a Pseudo Random Key using the parameter and the underlaying hash mechanism cryptonite2Create 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. cryptonite<Expand key material of specific length out of the parameters cryptoniteSalt cryptoniteInput Keying Material cryptonitePseudo random key cryptonitePseudo Random Key cryptonite5Optional context and application specific information cryptoniteOutput length in bytes cryptonite Output data BSD-style)Olivier Chron <olivier.cheron@gmail.com> experimentalunknownNoneMXaY cryptonite;Represent an ongoing KMAC state, that can be appended with  and finalized to a  with . cryptoniteORepresent a KMAC that is a phantom type with the hash used to produce the mac._The Eq instance is constant time. No Show instance is provided, to avoid printing by mistake. cryptonite?Compute a KMAC using the supplied customization string and key. cryptoniteZInitialize a new incremental KMAC context with the supplied customization string and key. cryptonite$Incrementally update a KMAC context. cryptonite9Incrementally update a KMAC context with multiple inputs. cryptonite,Finalize a KMAC context and return the KMAC.     BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneMh[ cryptonite Poly1305 Auth cryptonite(Poly1305 State. use State instead of Ctx cryptonitePoly1305 State cryptoniteinitialize a Poly1305 context cryptonite"update a context with a bytestring cryptonite+updates a context with multiples bytestring cryptonite-finalize the context into a digest bytestring cryptoniteOne-pass authorization creation   BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNonex  cryptoniteValid Nonce for ChaChaPoly1305.It can be created with  or  cryptoniteA ChaChaPoly1305 State.9The state is immutable, and only new state can be created cryptonite6Nonce smart constructor 12 bytes IV, nonce constructor cryptonite8 bytes IV, nonce constructor cryptoniteIncrement a nonce cryptonite%Initialize a new ChaChaPoly1305 StateIThe key length need to be 256 bits, and the nonce procured using either  or  cryptoniteJAppend 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  cryptonite>Finalize the Authenticated Data and return the finalized State cryptoniteNEncrypt a piece of data and returns the encrypted Data and the updated State. cryptoniteNDecrypt a piece of data and returns the decrypted Data and the updated State. cryptonite.Generate an authentication tag from the State. cryptonite4 bytes constant cryptonite 8 bytes IV   BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneF cryptoniteGMP Supported / Unsupported cryptoniteDSimple combinator in case the operation is not supported through GMP cryptonite-Compute the GCDE of a two integer through GMP cryptonite6Compute the binary logarithm of an integer through GMP cryptoniteXCompute the power modulus using extra security to remain constant time wise through GMP cryptonite%Compute the power modulus through GMP cryptonite'Inverse modulus of a number through GMP cryptonite4Get the next prime from a specific value through GMP cryptonite,Test if a number is prime using Miller Rabin cryptonite&Return the size in bytes of an integer cryptonite%Return the size in bits of an integer cryptonite*Export an integer to a memory (big-endian) cryptonite-Export an integer to a memory (little-endian) cryptonite,Import an integer from a memory (big-endian) cryptonite/Import an integer from a memory (little-endian) BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone cryptonitesqrti 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. cryptonite8Get the extended GCD of two integer using integer divModgcde a b& find (x,y,gcd(a,b)) where ax + by = d cryptonite'Check if a list of integer are all even cryptonite)Compute the binary logarithm of a integer cryptonite)Compute the number of bits for an integer cryptonite*Compute the number of bytes for an integer cryptonite4Express an integer as an odd number and a power of 2 BSD-style#Vincent Hanquez <vincent@snarc.org> Experimental ExcellentNone2M  cryptoniteDefine a point on a curve. cryptonitePoint at Infinity cryptoniteECC Private Number cryptonitePDefine common parameters in a curve definition of the form: y^2 = x^3 + ax + b. cryptonitecurve parameter a cryptonitecurve parameter b cryptonite base point cryptonite order of G cryptonitecofactor cryptonite!get the size of the curve in bits cryptonite"get the size of the curve in bytes cryptonite*Define names for known recommended curves.Z  BSD-style"Danny Navarro <j@dannynavarro.net> experimentalGoodNoneG  cryptonite+Binary Polynomial represented by an integer cryptonite-Addition over F m. This is just a synonym of . cryptoniteReduction by modulo over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited. cryptoniteMultiplication over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited. cryptoniteSquaring over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited. cryptonite.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. cryptonite,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 cryptonite 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. cryptoniteGDivision 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. cryptoniteModulus cryptoniteModulus cryptoniteModulus cryptoniteModulus cryptoniteModulus cryptoniteDividend cryptoniteDivisor cryptoniteQuotient! BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone2a cryptonite@Raised when two numbers are supposed to be coprimes but are not. cryptonitezCompute the modular exponentiation of base^exponent 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.mBefore GHC 8.4.2, powModSecInteger is missing from integer-gmp, so expSafe has the same security as expFast. cryptoniteCompute the modular exponentiation of base^exponent using the fastest algorithm without any consideration for hiding parameters.AUse this function when all the parameters are public, otherwise  should be prefered. cryptoniteexponentiation$ computes modular exponentiation as  b^e mod m using repetitive squaring. cryptoniteinverse$ computes the modular inverse as in  g^(-1) mod m. cryptonite~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 . cryptonite<Computes the Jacobi symbol (a/n). 0 "d a < n; n "e 3 and odd.The Legendre and Jacobi symbols are indistinguishable exactly when the lower argument is an odd prime, in which case they have the same value.USee algorithm 2.149 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. cryptonitebase cryptoniteexponent cryptonitemodulo cryptoniteresult cryptonitebase cryptoniteexponent cryptonitemodulo cryptoniteresult BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone.UVh cryptonite(get a runtime proof that the constraint  n is satified cryptonite(get a runtime proof that the constraint  value bound is satified cryptonite(get a runtime proof that the constraint  value bound is satified" BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone cryptoniteFFill a pointer with the big endian binary representation of an integerIf the room available ptrSzl 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 cryptonite Similar to 3, except it will pad any remaining space with zero. cryptoniteeTransform a big endian binary integer representation pointed by a pointer and a size into an integer# BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneg cryptoniteos2ip0 converts a byte string into a positive integer. cryptonitei2osp0 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) cryptonite 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. cryptonite 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).$ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone cryptoniteIFill a pointer with the little endian binary representation of an integerIf the room available ptrSzl 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 cryptonite Similar to 3, except it will pad any remaining space with zero. cryptonitehTransform a little endian binary integer representation pointed by a pointer and a size into an integer% BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonen cryptoniteos2ip0 converts a byte string into a positive integer. cryptonitei2osp0 converts a positive integer into a byte string.`The first byte is LSB (least significant byte); the last byte is the MSB (most significant byte) cryptonite 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. cryptonite 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).&NoneX$ cryptonite"An integral time value in seconds. cryptoniteqThe strength of the calculated HOTP value, namely the number of digits (between 4 and 9) in the extracted value. cryptonite9A one-time password which is a sequence of 4 to 9 digits. cryptonitefAttempt to resynchronize the server's counter value with the client, given a sequence of HOTP values. cryptoniteThe default TOTP configuration. cryptonite7Create a TOTP configuration with customized parameters. cryptonite*Calculate a totp value for the given time. cryptonitejCheck a supplied TOTP value is valid for the given time, within the window defined by the skew parameter. cryptoniteENumber of digits in the HOTP value extracted from the calculated HMAC cryptonite+Shared secret between the client and server cryptonite8Counter value synchronized between the client and server cryptoniteThe HOTP value cryptoniteThe look-ahead window parameter. Up to this many values will be calculated and checked against the value(s) submitted by the client cryptoniteThe shared secret cryptonite The current server counter value cryptonitedThe first OTP submitted by the client and a list of additional sequential OTPs (which may be empty) cryptoniteThe new counter value, synchronized with the client's current counter or Nothing if the submitted OTP values didn't match anywhere within the window cryptoniteThe T0 parameter in seconds. This is the Unix time from which to start counting steps (default 0). Must be before the current time. cryptoniteFThe time step parameter X in seconds (default 30, maximum allowed 300) cryptonite0Number of required digits in the OTP (default 6) cryptoniteThe 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. cryptoniteThe shared secret cryptonitebThe 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 ExcellentNone27b cryptonite*Define names for known recommended curves. cryptonitePDefine common parameters in a curve definition of the form: y^2 = x^3 + ax + b. cryptonitecurve parameter a cryptonitecurve parameter b  cryptonite base point! cryptonite order of G" cryptonitecofactor# cryptoniteIDefine an elliptic curve in =p. The first parameter is the Prime Number.% cryptonitezDefine an elliptic curve in =(2^m). The firt parameter is the Integer representatioin of the irreducible polynomial f(x).' cryptoniteDefine a point on a curve.) cryptonitePoint at Infinity* cryptoniteECC Private Number+ cryptoniteECC Public Point, cryptonite.Define either a binary curve or a prime curve.- cryptonite=(2^m). cryptonite=p/ cryptonite5Parameters in common between binary and prime curves.0 cryptoniteHIrreducible polynomial representing the characteristic of a CurveBinary.1 cryptonite=Prime number representing the characteristic of a CurvePrime.2 cryptonite!get the size of the curve in bits3 cryptoniteHGet the curve definition associated with a recommended known curve name.:     ! "#$%&'()*+,-./0123:,-.'()+*%&#$/201! "     3 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone=< cryptoniteThis is a strict version of and cryptoniteThis is a strict version of &&. cryptonite$Truncate and hash for DSA and ECDSA. cryptonite$Truncate a digest for DSA and ECDSA.( BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone@Q cryptonite%Represent a mask generation algorithmR cryptoniteMask generation algorithm MGF1Q cryptoniteseed cryptonitelength to generateQRQR) BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone2MXS cryptoniteRepresent RSA KeyPairRnote the RSA private key contains already an instance of public key for efficiencyU cryptoniteRepresent 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.W cryptonite,public part of a private key (size, n and e)X cryptoniteprivate exponent dY cryptonitep prime numberZ cryptoniteq prime number[ cryptonite d mod (p-1)\ cryptonite d mod (q-1)] cryptonite q^(-1) mod p^ cryptoniteRepresent a RSA public key` cryptonitesize of key in bytesa cryptonite public p*qb cryptonitepublic exponent ec cryptonite8error possible during encryption, decryption or signing.d cryptoniteNthe message to decrypt is not of the correct size (need to be == private_size)e cryptonite"the message to encrypt is too longf cryptoniteDthe message decrypted doesn't have a PKCS15 structure (0 2 .. 0 msg)g cryptonite the message's digest is too longh cryptonite-some parameters lead to breaking assumptions.i cryptonitelBlinder which is used to obfuscate the timing of the decryption primitive (used by decryption and signing).k cryptonite(get the size in bytes from a private keyl cryptoniteget n from a private keym cryptoniteget e from a private keyn cryptonitePublic key of a RSA KeyPairo cryptonitePrivate key of a RSA KeyPairSTUVWXYZ[\]^_`abcdefghijklmnocdefghij^_`abUVWXYZ[\]STnoklm* BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone_$ cryptoniteCompute 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. cryptonite!Compute the RSA encrypt primitive cryptoniteKmultiply 2 integers in Zm only performing the modulo operation if necessary BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafed cryptoniteRA handle to an entropy maker, either a system capability or a hardware generator. cryptonite%Try to open an handle for this source cryptonitebTry to gather a number of entropy bytes into a buffer. Return the number of actual bytes gathered cryptoniteClose an open handle BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeg cryptonite3Fake handle to Intel RDRand entropy CPU instruction BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeXj cryptoniteEntropy device devurandom on unix system cryptoniteEntropy device devrandom on unix system BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodSafeEXpT cryptoniteAny Entropy Backend cryptoniteAll supported backends  cryptoniteOpen a backend handle cryptonite%Gather randomness from an open handle cryptoniteAn open Entropy Backend cryptonitePointer to a buffer to write to cryptonitenumber of bytes to write cryptonite+return the number of bytes actually written+ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafet cryptoniteRefill 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 exception, BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonew  cryptonite2Get some entropy from the system source of entropy- BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone cryptonitefPool of Entropy. Contains a self-mutating pool of entropy, that is always guaranteed to contain data. cryptonite,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. cryptonite.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. cryptonite-Put a chunk of the entropy pool into a buffer cryptonite.Grab a chunk of entropy from the entropy pool.. BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone cryptoniteOA simple Monad class very similar to a State Monad with the state being a DRG. cryptonite,A Deterministic Random Generator (DRG) class cryptonite)Generate N bytes of randomness from a DRG cryptonite7A monad constraint that allows to generate random bytes cryptoniteERun a pure computation with a Deterministic Random Generator in the  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneI cryptonite]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. cryptonite#Grab one instance of the System DRG BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneM_ cryptonite%ChaCha Deterministic Random Generator  cryptonite]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.  cryptoniteInitialize a new ChaCha context from 5-tuple of words64. This interface is useful when creating a RNG out of tests generators (e.g. QuickCheck).  cryptonite40 bytes of seed cryptonitethe initial ChaCha state  / BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneMD cryptonite%Create a new Seed from system entropy cryptoniteConvert a Seed to an integer cryptoniteConvert an integer to a Seed cryptoniteConvert a binary to a seed cryptonite$Create a new DRG from system entropy cryptoniteCreate a new DRG from a seed cryptoniteCreate 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. cryptonite Generate 6len random bytes and mapped the bytes to the function f.(This is equivalent to use Control.Arrow  with  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone  cryptoniteThis 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. 0 BSD-style)Olivier Chron <olivier.cheron@gmail.com> experimentalunknownNoneM  cryptoniteAn Ed448 signature cryptoniteAn Ed448 public key cryptoniteAn Ed448 Secret key cryptonite*Try to build a public key from a bytearray cryptonite*Try to build a secret key from a bytearray cryptonite)Try to build a signature from a bytearray cryptonite%Create a public key from a secret key cryptonite!Sign a message using the key pair cryptoniteVerify a message cryptoniteGenerate a secret key cryptoniteA public key is 57 bytes cryptoniteA secret key is 57 bytes cryptoniteA signature is 114 bytes  1 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneM  cryptoniteAn Ed25519 signature cryptoniteAn Ed25519 public key cryptoniteAn Ed25519 Secret key cryptonite*Try to build a public key from a bytearray cryptonite*Try to build a secret key from a bytearray cryptonite)Try to build a signature from a bytearray cryptonite%Create a public key from a secret key cryptonite!Sign a message using the key pair cryptoniteVerify a message cryptoniteGenerate a secret key cryptoniteA public key is 32 bytes cryptoniteA secret key is 32 bytes cryptoniteA signature is 64 bytes  2 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneMd cryptonite A P256 point cryptonite A P256 scalar cryptonite%Get the base point for the P256 Curve cryptoniteLift to curve a scalar0Using the curve generator as base point compute:  scalar * G cryptoniteAdd a point to another point cryptoniteNegate a point cryptoniteMultiply a point by a scalarwarning: variable time cryptonite Similar to i, serializing the x coordinate as binary. When scalar is multiple of point order the result is all zero. cryptonitemultiply the point p with &n2 and add a lifted to curve value @n1 n1 * G + n2 * pwarning: variable time cryptonite Check if a  is valid cryptonite!Convert a point to (x,y) Integers cryptonite&Convert from (x,y) Integers to a point cryptonite*Convert a point to a binary representation cryptonite$Convert from binary to a valid point cryptonite0Convert from binary to a point, possibly invalid cryptonite(Generate a randomly generated new scalar cryptoniteThe scalar representing 0 cryptoniteCheck if the scalar is 0 cryptonite$Perform addition between two scalars a + b cryptonite'Perform subtraction between two scalars a - b cryptoniteGive the inverse of the scalar 1 / awarning: variable time cryptoniteCompare 2 Scalar cryptoniteconvert a scalar from binary cryptoniteconvert a scalar to binary cryptonite(Convert from an Integer to a P256 Scalar cryptonite(Convert from a P256 Scalar to an Integer3 BSD-style John Galt <jgalt@centromere.net> experimentalunknownNoneM  cryptoniteKA Curve448 Diffie Hellman secret related to a public key and a secret key. cryptoniteA Curve448 public key cryptoniteA Curve448 Secret key cryptonite*Try to build a public key from a bytearray cryptonite*Try to build a secret key from a bytearray cryptonite)Create a DhSecret from a bytearray object cryptoniteECompute 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. cryptonite%Create a public key from a secret key cryptoniteGenerate a secret key.  cryptonitepublic cryptonitesecret  cryptonitepublic cryptonite basepoint cryptonitesecret  4 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneFMX  cryptoniteMA Curve25519 Diffie Hellman secret related to a public key and a secret key. cryptoniteA Curve25519 public key cryptoniteA Curve25519 Secret key cryptonite*Try to build a public key from a bytearray cryptonite*Try to build a secret key from a bytearray cryptonite)Create a DhSecret from a bytearray object cryptoniteECompute 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. cryptonite%Create a public key from a secret key cryptoniteGenerate a secret key. cryptonitepublic cryptonitesecret cryptonite basepoint  5None# cryptoniteCreate 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.$ cryptoniteHCreate 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.% cryptoniteICheck 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.& cryptonite&Check a password against a bcrypt hashAs for validatePasswordV but will provide error information if the hash is invalid or an unsupported version. cryptonite%Create a key schedule for the BCrypt EKS version.QSalt must be a 128-bit byte array. Cost must be between 4 and 31 inclusive See jhttps://www.usenix.org/conference/1999-usenix-annual-technical-conference/future-adaptable-password-scheme# cryptonite~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly. cryptoniteEThe password. Should be the UTF-8 encoded bytes of the password text. cryptonite#The bcrypt hash in standard format.$ cryptonite~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly. cryptonite@The salt. Must be 16 bytes in length or an error will be raised. cryptoniteEThe password. Should be the UTF-8 encoded bytes of the password text. cryptonite#The bcrypt hash in standard format.#$%&#%&$6 BSD-style)Olivier Chron <olivier.cheron@gmail.com> experimentalunknownNoneM `' cryptoniteA point on curve edwards25519.( cryptonite2A scalar modulo prime order of curve edwards25519.) cryptoniteGenerate a random scalar.* cryptoniteCSerialize a scalar to binary, i.e. a 32-byte little-endian number.+ cryptoniteeDeserialize 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., cryptoniteAdd two scalars.- cryptoniteMultiply two scalars.. cryptonite.Multiplies a scalar with the curve base point./ cryptonite%Serialize a point to a 32-byte array.!Format is binary compatible with 1 from module Crypto.PubKey.Ed25519.0 cryptoniteUDeserialize a 32-byte array as a point, ensuring the point is valid on edwards25519.WARNING: variable time1 cryptonitebTest whether a point belongs to the prime-order subgroup generated by the base point. Result is  for the identity point. pointHasPrimeOrder p = 2 p == 6 l_minus_one p 2 cryptoniteNegate a point.3 cryptoniteAdd two points.4 cryptoniteAdd a point to itself. pointDouble p = 3 p p 5 cryptoniteMultiply a point by h = 8. pointMulByCofactor p = 6 scalar_8 p 6 cryptonite.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.7 cryptoniteMultiply the point p with s2! and add a lifted to curve value s1. pointsMulVarTime s1 s2 p = 3 (. s1) (6 s2 p) WARNING: variable time'()*+,-./01234567(')+*0/1.,-2346577 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone- > cryptonite(Top bits policy when generating a number? cryptoniteset the highest bit@ cryptoniteset the two highest bitA cryptoniteUGenerate 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 generatedB cryptonite2Generate a positive integer x, s.t. 0 <= x < rangeC cryptonite9generate a number between the inclusive bound [low,high].A cryptonitenumber of bits cryptonitetop bit policy cryptoniteforce the number to be oddB cryptoniterange>?@ABC>?@ABC8NoneB F cryptonite,Generate a valid scalar for a specific CurveG cryptonite Elliptic Curve point negation: pointNegate c p returns point q such that pointAdd c p q == PointO.H cryptoniteElliptic Curve point addition.WARNING: Vulnerable to timing attacks.I cryptoniteElliptic 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) * xrJ cryptonite2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.K cryptonite?Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks.L cryptoniteBElliptic 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.M cryptonite*Check if a point is the point at infinity.N cryptonite%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 cryptonite div and mod FGHIJKLMN FHGIJKLMN9None2QO cryptoniteECDSA Key Pair.Q cryptoniteECDSA Public Key.U cryptoniteECDSA Private Key.Y cryptonite+Represent a ECDSA signature namely R and S.[ cryptoniteECDSA r\ cryptoniteECDSA s] cryptonitePublic key of a ECDSA Key pair.^ cryptonite Private key of a ECDSA Key pair._ cryptonite;Sign digest using the private key and an explicit k number.WARNING: Vulnerable to timing attacks.` cryptonite<Sign message using the private key and an explicit k number.WARNING: Vulnerable to timing attacks.a cryptonite"Sign digest using the private key.WARNING: Vulnerable to timing attacks.b cryptonite#Sign message using the private key.WARNING: Vulnerable to timing attacks.c cryptonite%Verify a digest using the public key.d cryptonite)Verify a bytestring using the public key._ cryptonitek random number cryptonite private key cryptonitedigest to sign` cryptonitek random number cryptonite private key cryptonite hash function cryptonitemessage to sign*+OPQRSTUVXWYZ[\]^_`abcdYZ[\+QRST*UVXWOP]^`_badc:NoneUu cryptoniteGenerate Q given d.WARNING: Vulnerable to timing attacks.v cryptonite)Generate a pair of (private, public) key.WARNING: Vulnerable to timing attacks.v cryptoniteElliptic Curveuvuv; BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone2ipw cryptoniteRepresent a DSA key pairy cryptoniteRepresent a DSA private key.VOnly x need to be secret. the DSA parameters are publicly shared with the other side.{ cryptoniteDSA parameters| cryptonite DSA private X} cryptoniteRepresent a DSA public key. cryptoniteDSA parameters cryptonite DSA public Y cryptonite)Represent a DSA signature namely R and S. cryptoniteDSA r cryptoniteDSA s cryptonite,Represent DSA parameters namely P, G, and Q. cryptoniteDSA p cryptoniteDSA g cryptoniteDSA q cryptonite7DSA Private Number, usually embedded in DSA Private Key cryptonite5DSA Public Number, usually embedded in DSA Public Key cryptonitePublic key of a DSA Key pair cryptonitePrivate key of a DSA Key pair cryptoniteagenerate a private number with no specific property this number is usually called X in DSA text. cryptoniteCCalculate the public number from the parameters and the private key cryptonite<sign message using the private key and an explicit k number. cryptonite#sign message using the private key. cryptonite)verify a bytestring using the public key. cryptonitek random number cryptonite private key cryptonite hash function cryptonitemessage to signwxyz{|}~}~yz{|wx< BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone3  cryptoniteReturns 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. cryptonite\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. cryptonite|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. cryptonite;Find a prime from a starting point where the property hold. cryptonite=Find a prime from a starting point with no specific property. cryptoniteMiller 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. cryptoniteProbabilitic 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. cryptoniteeTest naively is integer is prime. while naive, we skip even number and stop iteration at i > sqrt(n) cryptonite-Test is two integer are coprime to each other cryptonite#List of the first primes till 2903. cryptonite%number of iterations of the algorithm cryptonite starting a cryptonitenumber to test for primality  = BSD-style(Carlos Rodriguez-Vega <crodveg@yahoo.es> experimentalunknownNone cryptonite8Error possible during encryption, decryption or signing. cryptonite"the message to encrypt is too long cryptonite3the message decrypted doesn't have a OAEP structure cryptonite,some parameters lead to breaking assumptions cryptoniteGenerate primes p & q cryptonitesize in bytes  cryptonitecondition prime p must satisfy cryptonitecondition prime q must satisfy cryptonitechosen distinct primes p and q> BSD-style(Carlos Rodriguez-Vega <crodveg@yahoo.es> experimentalunknownNoneP cryptoniteParameters for OAEP padding. cryptonitehash function to use cryptonitemask Gen algorithm to use cryptonite#optional label prepended to message cryptonite.Default Params with a specified hash function. cryptonitePad a message using OAEP. cryptoniteUn-pad a OAEP encoded message. cryptoniteSeed cryptoniteOAEP params to use cryptonitesize of public key in bytes cryptonite Message pad cryptoniteOAEP params to use cryptonitesize of public key in bytes cryptoniteencoded message (not encrypted)? BSD-style(Carlos Rodriguez-Vega <crodveg@yahoo.es> experimentalunknownNone29 cryptonite'Represent a Rabin-Williams private key. cryptonitep prime number cryptoniteq prime number cryptonite&Represent a Rabin-Williams public key. cryptonitesize of key in bytes cryptonite public p*q cryptonitezGenerate a pair of (private, public) key of size in bytes. Prime p is congruent 3 mod 8 and prime q is congruent 7 mod 8. cryptonite=Encrypt plaintext using public key an a predefined OAEP seed.TSee algorithm 8.11 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. cryptonite#Encrypt plaintext using public key. cryptonite%Decrypt ciphertext using private key. cryptonite2Sign message using hash algorithm and private key. cryptonite5Verify signature using hash algorithm and public key. cryptoniteEncryption primitive 1 cryptoniteEncryption primitive 2 cryptoniteDecryption primitive 1 cryptoniteDecryption primitive 2 cryptoniteSeed cryptonite OAEP padding cryptonite public key cryptonite plaintext cryptoniteOAEP padding parameters cryptonite public key cryptonite plaintext  cryptoniteOAEP padding parameters cryptonite private key cryptonite ciphertext cryptonite private key cryptonite hash function cryptonitemessage to sign cryptonite public key cryptonite hash function cryptonitemessage cryptonite signature@ BSD-style(Carlos Rodriguez-Vega <crodveg@yahoo.es> experimentalunknownNone2)  cryptonite'Represent a Modified-Rabin private key. cryptonitep prime number cryptoniteq prime number cryptonite&Represent a Modified-Rabin public key. cryptonitesize of key in bytes cryptonite public p*q cryptonitezGenerate a pair of (private, public) key of size in bytes. Prime p is congruent 3 mod 8 and prime q is congruent 7 mod 8. cryptonite2Sign message using hash algorithm and private key. cryptonite5Verify signature using hash algorithm and public key. cryptonite private key cryptonite hash function cryptonitemessage to sign cryptonite public key cryptonite hash function cryptonitemessage cryptonite signature  A BSD-style(Carlos Rodriguez-Vega <crodveg@yahoo.es> experimentalunknownNone2 cryptoniteRabin Signature. cryptoniteRepresent a Rabin private key. cryptonitep prime number cryptoniteq prime number cryptoniteRepresent a Rabin public key. cryptonitesize of key in bytes cryptonite public p*q cryptonitefGenerate a pair of (private, public) key of size in bytes. Primes p and q are both congruent 3 mod 4.TSee algorithm 8.11 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. cryptonite=Encrypt plaintext using public key an a predefined OAEP seed.TSee algorithm 8.11 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. cryptonite#Encrypt plaintext using public key. cryptonite%Decrypt ciphertext using private key.TSee algorithm 8.12 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. cryptonite;Sign message using padding, hash algorithm and private key.See  7https://en.wikipedia.org/wiki/Rabin_signature_algorithm. cryptonite2Sign message using hash algorithm and private key.See  7https://en.wikipedia.org/wiki/Rabin_signature_algorithm. cryptoniteCalculate hash of message and padding. If the padding is valid, then the result of the hash operation is returned, otherwise an error. cryptonite5Verify signature using hash algorithm and public key.See  7https://en.wikipedia.org/wiki/Rabin_signature_algorithm. cryptoniteSquare roots modulo prime p where p is congruent 3 mod 4 Value a must be a quadratic residue modulo p (i.e. jacobi symbol (a/n) = 1).TSee algorithm 3.36 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. cryptoniteSquare roots modulo n given its prime factors p and q (both congruent 3 mod 4) Value a must be a quadratic residue of both modulo p and modulo q (i.e. jacobi symbols (ap) = (aq) = 1).TSee algorithm 3.44 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al.  cryptoniteSeed cryptonite OAEP padding cryptonite public key cryptonite plaintext cryptoniteOAEP padding parameters cryptonite public key cryptonite plaintext  cryptoniteOAEP padding parameters cryptonite private key cryptonite ciphertext cryptonitepadding cryptonite private key cryptonite hash function cryptonitemessage to sign cryptonite private key cryptonite hash function cryptonitemessage to sign cryptonitepadding cryptonite private key cryptonite hash function cryptonitemessage to sign cryptonite private key cryptonite hash function cryptonitemessage cryptonite signature cryptoniteprime p cryptoniteprime p cryptoniteprime q cryptonitec such that c*p + d*q = 1 cryptonited such that c*p + d*q = 1 cryptoniten = p*qB BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone cryptonite"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. cryptonite:generate a pair of (private, public) key of size in bytes. cryptonite?Generate a blinder to use with decryption and signing operationWthe unique parameter apart from the random number generator is the public key value N. cryptonitechosen distinct primes p and q cryptonite size in bytes cryptoniteRSA public exponent e cryptonite size in bytes cryptoniteRSA public exponent e cryptoniteRSA public N parameter.UVWXYZ[\]^_`abcdefghijcdefgh^_`abUVWXYZ[\]ijC BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneL cryptonite*Parameters for PSS signature/verification. cryptoniteHash function to use cryptoniteMask Gen algorithm to use cryptonite&Length of salt. need to be <= to hLen. cryptoniteTrailer field, usually 0xbc cryptonite-Default Params with a specified hash function cryptonite$Default Params using SHA1 algorithm. cryptoniteLSign using the PSS parameters and the salt explicitely passed as parameters.6the function ignore SaltLength from the PSS Parameters cryptoniteLSign using the PSS parameters and the salt explicitely passed as parameters.6the function ignore SaltLength from the PSS Parameters cryptoniteSign using the PSS Parameters cryptoniteSign using the PSS Parameters  cryptoniteESign using the PSS Parameters and an automatically generated blinder.! cryptoniteESign using the PSS Parameters and an automatically generated blinder." cryptonite+Verify a signature using the PSS Parameters# cryptonite+Verify a signature using the PSS Parameters cryptonite Salt to use cryptoniteoptional blinder to use cryptonitePSS Parameters to use cryptoniteRSA Private Key cryptoniteMessage digest cryptonite Salt to use cryptoniteoptional blinder to use cryptonitePSS Parameters to use cryptoniteRSA Private Key cryptoniteMessage to sign cryptoniteoptional blinder to use cryptonitePSS Parameters to use cryptoniteRSA Private Key cryptoniteMessage to sign cryptoniteoptional blinder to use cryptonitePSS Parameters to use cryptoniteRSA Private Key cryptoniteMessage digest  cryptonitePSS Parameters to use cryptonite private key cryptonitemessage to sign! cryptonitePSS Parameters to use cryptonite private key cryptonite message digst" cryptonite\PSS Parameters to use to verify, this need to be identical to the parameters when signing cryptoniteRSA Public Key cryptoniteMessage to verify cryptonite Signature# cryptonite\PSS Parameters to use to verify, this need to be identical to the parameters when signing cryptoniteRSA Public Key cryptoniteDigest to verify cryptonite Signature !"# !"#D BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone5 $ cryptoniteA specialized class for hash algorithm that can product a ASN1 wrapped description the algorithm plus the content of the digest. cryptonite;Convert a Digest into an ASN1 wrapped descriptive ByteArray% cryptonite6This produce a standard PKCS1.5 padding for encryption& cryptonite0Produce a standard PKCS1.5 padding for signature' cryptonite4Try to remove a standard PKCS1.5 encryption padding.( cryptonite&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.) cryptonitePdecrypt message using the private key and by automatically generating a blinder.* cryptonite*encrypt a bytestring using the public key.ZThe message needs to be smaller than the key size - 11. The message should not be padded.+ cryptonite?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 signSafer, cryptoniteMsign message using the private key and by automatically generating a blinder.- cryptonite&verify message with the signed message cryptonitemake signature digest, used in + and -( cryptoniteoptional blinder cryptoniteRSA private key cryptonite cipher text) cryptoniteRSA private key cryptonite cipher text+ cryptoniteoptional blinder cryptonitehash algorithm cryptonite private key cryptonitemessage to sign, cryptoniteHash algorithm cryptonite private key cryptonitemessage to sign cryptoniteoptional hashing algorithm $%&'()*+,- %&'()+,*-$E BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneK 8 cryptonite)Parameters for OAEP encryption/decryption: cryptoniteHash function to use.; cryptoniteMask Gen algorithm to use.< cryptonite$Optional label prepended to message.= cryptonite-Default Params with a specified hash function> cryptonite4Encrypt a message using OAEP with a predefined seed.? cryptoniteEncrypt a message using OAEP cryptoniteun-pad a OAEP encoded message.-It doesn't apply the RSA decryption primitive@ cryptoniteDecrypt 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 decryptSaferA cryptoniteJDecrypt a ciphertext using OAEP and by automatically generating a blinder.> cryptoniteSeed cryptonite!OAEP params to use for encryption cryptonite Public key. cryptoniteMessage to encrypt? cryptonite"OAEP params to use for encryption. cryptonite Public key. cryptoniteMessage to encrypt cryptoniteOAEP params to use cryptonitesize of the key in bytes cryptoniteencoded message (not encrypted)@ cryptoniteOptional blinder cryptonite!OAEP params to use for decryption cryptonite Private key cryptonite Cipher textA cryptonite!OAEP params to use for decryption cryptonite Private key cryptonite Cipher text 89:;<=>?@A 89:;<=>?@AF BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone2M[ B cryptonite'Represent Diffie Hellman shared secret.D cryptonite*Represent Diffie Hellman private number X.F cryptonite)Represent Diffie Hellman public number Y.H cryptoniteHRepresent Diffie Hellman parameters namely P (prime), and G (generator).M cryptonitegenerate 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)N cryptonite`generate a private number with no specific property this number is usually called X in DH text.O cryptonitepcalculate the public number from the parameters and the private key this number is usually called Y in DH text.P cryptonitepcalculate the public number from the parameters and the private key this number is usually called Y in DH text.DEPRECATED use calculatePublicQ cryptonitePgenerate a shared key using our private number and the other party public numberM cryptonitenumber of bits cryptonite generatorBCDEFGHIJKLMNOPQHIJKLFGDEBCMNOPQ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneMuJ  cryptonite1ElGamal Ephemeral key. also called Temporary key. cryptoniteElGamal Signature cryptonitegenerate 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).  cryptonite~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).! cryptonitecgenerate a public number that is for the other party benefits. this number is usually called h=g^a" cryptoniteCencrypt with a specified ephemeral key do not reuse ephemeral key.# cryptoniteZencrypt a message using params and public keys will generate b (called the ephemeral key)$ cryptonitedecrypt message% cryptonite(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.& cryptonite 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.' cryptoniteverify a signature% cryptonite3random number k, between 0 and p-1 and gcd(k,p-1)=1 cryptoniteDH params (p,g) cryptoniteDH private key cryptonite"collision resistant hash algorithm cryptonitemessage to sign& cryptoniteDH params (p,g) cryptoniteDH private key cryptonite"collision resistant hash algorithm cryptonitemessage to signBDFH(!"#$%&'G BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneyk cryptoniteGenerating a private number d.l cryptoniteGenerating a public point Q.m cryptoniteUGenerating a shared key using our private number and the other party public point.*+,BCklm,+*BCklmNoneX ) cryptonite,Generate a valid scalar for a specific Curve* cryptonite Elliptic Curve point negation:  pointNegate p returns point q such that pointAdd p q == PointO.+ cryptoniteElliptic Curve point addition.WARNING: Vulnerable to timing attacks., cryptoniteElliptic 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- cryptonite2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.. cryptonite?Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks./ cryptoniteBElliptic 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.0 cryptonite*Check if a point is the point at infinity.1 cryptonite5Make 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 point2 cryptonite%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) holds3 cryptonite div and mod )4*+,-./012H BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone2HMVX&x cryptonite P256 Curvealso known as P256{ cryptoniteAdd points on a curve| cryptoniteNegate a curve point} cryptonite Scalar Multiplication on a curve cryptonite'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 . cryptonite`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  - instead of a special value or an exception. cryptonitePoint on an Elliptic Curve cryptonite#Scalar in the Elliptic Curve domain cryptoniteGenerate a new random scalar on the curve. The scalar will represent a number between 1 and the order of the curve non included cryptoniteGenerate a new random keypair cryptoniteGet the curve size in bits cryptonite.Encode a elliptic curve point into binary form cryptonite8Try to decode the binary form of an elliptic curve point cryptonite^An elliptic curve key pair composed of the private part (a scalar), and the associated point.!nopqrstuvwxyz|{}~!xyvwturspqno~z|{}I BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone\ cryptonite\Generate random a new Shared secret and the associated point to do a ECIES style encryption cryptoniteNDerive the shared secret with the receiver key and the R point of the scheme. cryptoniterepresentation of the curve cryptonitethe public key of the receiver cryptoniterepresentation of the curve cryptoniteCThe received R (supposedly, randomly generated on the encrypt side) cryptoniteThe secret key of the receiverJ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneX9 cryptoniteMSplit 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) cryptonite9Merge previously diffused data back to the original data.5 cryptonite%inplace Xor with an input dst = src  dst cryptonite!Hash algorithm to use as diffuser cryptoniteRandom generator to use cryptonite$Number of times to diffuse the data. cryptoniteoriginal data to diffuse. cryptoniteThe diffused data cryptoniteHash algorithm used as diffuser cryptonite&Number of times to un-diffuse the data cryptonite Diffused data cryptonite Original data6 cryptonite Hash function to use as diffuser cryptonite"buffer to diffuse, modify in place cryptonitelength of buffer to diffuseSafe7LLLLLLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRSSUUUUUUUUUUUUWWXXYYYYYYYYZZZZ[[[[\\]]^^^^^^^^__``aabbccddeeffffffffgggghhhhhhiijjj j j j j j j j l l llllllllllllllmmmmmm m!m"m#m$m%m&m'm(m)m*m+,-./01 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F F G H I J G F G I H K JLFGMHINJOPQRSTUVWXYZ[\]^o_o`oapbpbpcpcpdqeqeqfqfqgqgqhqhijklmnopVqrstuvwxyz{|}~iIGIIGFGKFG        !!!!!!!"""####$$$%%%%& & & & & &&&&&&&&&&&&&&&&&&& &!&"'#'$'%'&'''(')'*'+','-'.'/'0'1'2'3'4'5'6'7'8'9':';'<'='>'?'@'A'B'C'D'E'E'F'G'H'I'J'K'K'L'L'M'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)x)y)y)z){)|)})~)))))))))))))))))))))))))))))))))))))))**+,----...........//////////000000000000000000000000011111111111111111111111112M222222222222222222222222222222[2]2Y33333333333333333333344444444444444444444455556M6666666666666 6 6666]6[666Y7 7 7 777778888 888889x9x99999y9y99{99999999999999 99!999999999999:":I;x;x;y;y;#;$;;;%;&;;;;;';';(;);*;O;+;;;,;-;;;;.;;;;;/;0;1;2;; ;;!;;;;;;;;;;;;<3<4<5<6<7<8<9<:<;=====<==>=>=>>>?>@>A>>?y?y?z?|?}?{?????I?B????????????@y@y@z@|@}@{@@@@@I@@@@@@@@@@AAAyAyAzA|A}ACADAAAAAIABAAAAAAAAAAAAAAA AA!BEBIBFCGCGCHCICJCKCLCMCNCOCCCPCQCCDRDDSDDDTDDDPDDUDVDWDXDYDZD[D\D]D^E=E=E>E?E@EAEBEEETF_F_FOFOF+F+F'F'F(F)F`FF,F-FaFbF.F/F0F1F2FcFdFeFfFgFhFiFjFkFlFmFnFoFpFqFrFsFtFuFvG,G-GbHwHwHxHxHyHyHzHzH{H{H|H|H}HHH~HHHHHMHHHHWHHHHHxHxHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIJJKKKKKMNOPPPPP      ! "#$#$#%&'()*+*,-./0123UUk4m5m(6 7 8n9n:n;n<n=n>n?n@nAnBnCnDnEnFnGnHnInJnKnLnMnNnOnPnQnRnSnTnUnVnWnXnYoZo[o\o]o^ _p`parbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsstsssutvtttwuxuyuzuzv{v|vvv}v~vvvvvwwxxxxMNWDDCCBBAA@@??>>==<<;;::99887766554433221100//..--,,++**))((''&&%%$$MLKQ !!*-G3345 8<????AAADDE,a JJ&cryptonite-0.26-ERs27QA47IyJsgxtkQ54MCCrypto.Data.Padding Crypto.ErrorCrypto.Cipher.Types Crypto.HashCrypto.Hash.IOCrypto.Hash.Algorithms%Crypto.ConstructHash.MiyaguchiPreneelCrypto.Cipher.UtilsCrypto.Cipher.TripleDESCrypto.Cipher.DESCrypto.Cipher.SalsaCrypto.Cipher.XSalsaCrypto.Cipher.RC4Crypto.Cipher.ChaChaCrypto.Cipher.AESCrypto.Number.NatCrypto.MAC.KMACCrypto.Cipher.TwofishCrypto.Cipher.CAST5Crypto.Cipher.BlowfishCrypto.Cipher.CamelliaCrypto.KDF.Argon2Crypto.KDF.BCryptPBKDFCrypto.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.Number.Serialize.Internal.LECrypto.Number.Serialize.LE 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.Rabin.TypesCrypto.PubKey.Rabin.OAEPCrypto.PubKey.Rabin.RWCrypto.PubKey.Rabin.ModifiedCrypto.PubKey.Rabin.BasicCrypto.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.Error.TypesCrypto.Internal.CompatCrypto.Internal.ByteArrayCrypto.Cipher.Types.UtilsCrypto.Internal.CompatPrimCrypto.Internal.DeepSeqCrypto.Cipher.Types.BaseCrypto.Cipher.Types.StreamCrypto.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.Cipher.Types.GFCrypto.Cipher.Types.AEADCrypto.Cipher.Types.BlockCrypto.Cipher.AES.PrimitiveCrypto.Internal.NatCrypto.Hash.SHAKECrypto.Hash.Blake2Crypto.Internal.WordArrayCrypto.Cipher.Twofish.PrimitiveCrypto.Cipher.CAST5.PrimitiveCrypto.Cipher.Blowfish.Box Crypto.Cipher.Blowfish.PrimitiveCrypto.Internal.Words Crypto.Cipher.Camellia.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 $fEqFormatCryptoFailable 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 streamCombineDigestContext 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_160AEAD 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$fNFDataAES256IsDivisibleBy8 IsAtLeastIsAtMostSHAKE256SHAKE128 HashSHAKEBlake2bpBlake2spBlake2bBlake2shashhashlazyhashInit hashUpdate hashUpdates hashFinalize hashInitWithhashWith Twofish256 Twofish192 Twofish128$fBlockCipherTwofish128$fCipherTwofish128$fBlockCipherTwofish192$fCipherTwofish192$fBlockCipherTwofish256$fCipherTwofish256CAST5$fBlockCipherCAST5 $fCipherCAST5 Blowfish448 Blowfish256 Blowfish128 Blowfish64Blowfish$fBlockCipherBlowfish$fCipherBlowfish$fBlockCipherBlowfish64$fCipherBlowfish64$fBlockCipherBlowfish128$fCipherBlowfish128$fBlockCipherBlowfish256$fCipherBlowfish256$fBlockCipherBlowfish448$fCipherBlowfish448$fNFDataBlowfish$fNFDataBlowfish64$fNFDataBlowfish128$fNFDataBlowfish256$fNFDataBlowfish448 Camellia128$fBlockCipherCamellia128$fCipherCamellia128Options iterationsmemory parallelismvariantversion Parallelism MemoryCostTimeCostVersion Version10 Version13VariantArgon2dArgon2iArgon2iddefaultOptions $fEqVariant $fOrdVariant $fReadVariant $fShowVariant $fEnumVariant$fBoundedVariant $fEqVersion $fOrdVersion $fReadVersion $fShowVersion $fEnumVersion$fBoundedVersion $fEqOptions $fOrdOptions $fReadOptions $fShowOptions Parameters iterCounts outputLength hashInternal$fEqParameters$fOrdParameters$fShowParametersCMACcmacsubKeys$fEqCMAC$fByteArrayAccessCMACHMAC hmacGetDigesthmacupdateupdatesfinalize$fEqHMAC$fByteArrayAccessHMACPRFprfHMACfastPBKDF2_SHA1fastPBKDF2_SHA256fastPBKDF2_SHA512nrpPRKextract extractSkipexpand$fByteArrayAccessPRK$fEqPRKKMAC kmacGetDigestkmac$fEqKMAC$fByteArrayAccessKMACAuthCtxauthTagauth$fEqAuth$fByteArrayAccessAuth $fNFDataAuthNoncenonce12nonce8incrementNonce appendAAD finalizeAADencryptdecrypt$fByteArrayAccessNoncesqrtigcdeareEvenlog2numBitsnumBytesasPowerOf2AndOddBinaryPolynomialaddF2mmodF2mmulF2m squareF2m squareF2m'invF2mdivF2mexpSafeexpFastinverseinverseCoprimesjacobi!$fExceptionCoprimesAssertionError$fShowCoprimesAssertionErrorisDivisibleBy8isAtMost isAtLeasti2ospi2ospOfos2ipi2ospOf_ 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_ssignDigestWithsignWith signDigest verifyDigest$fReadSignature$fDataSignature generateQprivate_params private_x public_paramspublic_yParamsparams_pparams_gparams_q PublicNumbergeneratePrivatecalculatePublic$fNFDataParams $fShowParams $fReadParams $fEqParams $fDataParamsisProbablyPrime generatePrimegenerateSafePrimefindPrimeFromWith findPrimeFromprimalityTestMillerRabinprimalityTestFermatprimalityTestNaive isCoprimegeneratePrimes OAEPParamsoaepHashoaepMaskGenAlg oaepLabeldefaultOAEPParamsencryptWithSeed private_a private_b generateWithgenerateBlinder PSSParamspssHash pssMaskGenAlg pssSaltLengthpssTrailerFielddefaultPSSParamsdefaultPSSParamsSHA1signDigestWithSalt signWithSalt signSafersignDigestSaferHashAlgorithmASN1 padSignature decryptSafer$fHashAlgorithmASN1RIPEMD160$fHashAlgorithmASN1SHA512t_256$fHashAlgorithmASN1SHA512t_224$fHashAlgorithmASN1SHA512$fHashAlgorithmASN1SHA384$fHashAlgorithmASN1SHA256$fHashAlgorithmASN1SHA224$fHashAlgorithmASN1SHA1$fHashAlgorithmASN1MD5$fHashAlgorithmASN1MD2 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 deriveDecryptsplitmergeBlockunBlockbase Data.Eithereither unsafeDoIO GHC.IO.UnsafeunsafeDupablePerformIOGHC.Word byteSwap64 Data.BitspopCount%memory-0.14.18-9xbpIkcWqsAKLVYhB0lpFaData.ByteArray.BytesBytesData.ByteArray.EncodingconvertFromBase convertToBaseBaseBase16Base32Base64Base64URLUnpadded Base64OpenBSDData.ByteArray.Mapping mapAsWord64 mapAsWord128 fromW64BEtoW64LEtoW64BEData.ByteArray.ViewdropViewtakeViewviewViewData.ByteArray.MethodsconvertallanyconstEqeqzero replicate copyAndFreezecopyRetcopyappendconcatreversespandroptakesplitAtindexxorsnoccons singletonunconsunpackpacknullempty unsafeCreateallocAndFreezecreateallocData.ByteArray.ScrubbedBytes ScrubbedBytesData.ByteArray.MemViewMemViewData.ByteArray.TypesByteArrayAccesslength withByteArraycopyByteArrayToPtr ByteArrayallocRet constAllZerochunkbe32Primle32Primbyteswap32Prim convert4To32 booleanPrimdeepseq-1.4.4.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<|>somemanyxtsGFMulXTSstep c_rc4_init c_rc4_combineAESCCMAESOCBAESGCMAESgcmModeocbModeccmModeinitAES encryptECB encryptCBCgenCTR genCounter encryptCTR encryptXTS decryptECB decryptCBC decryptCTR decryptXTSgcmInit gcmAppendAADgcmAppendEncryptgcmAppendDecrypt gcmFinishocbInit ocbAppendAADocbAppendEncryptocbAppendDecrypt ocbFinishccmInit ccmAppendAAD ccmEncrypt ccmDecrypt ccmFinishMod8IsDiv8Div8byteLenintegralNatValNatcshakeInternalFinalizecshakeOutputLengthMutableArray32Array64Array32Array8array8array32array32FromAddrBEallocArray32AndFreezearray64mutableArray32mutableArray32FromAddrBEmutableArray32Freeze arrayRead8 arrayRead32 arrayRead64mutableArrayRead32mutableArrayWrite32mutableArrayWriteXor32 initTwofishTwofishKeybuildKeycopyKeySchedulecreateKeySchedule KeySchedule initBlowfishfreezeKeySchedule cipherBlockcipherBlockMutableexpandKeyWithSaltAnyexpandKeyWithSalt128 expandKeyexpandKeyWithSaltw64to32w32to64Data.Memory.ExtendedWordsWord128Camellia initCamellia expandIPT' GmpSupportedonGmpUnsupportedgmpGcdegmpLog2gmpPowModSecIntegergmpPowModInteger gmpInverse gmpNextPrimegmpTestPrimeMillerRabingmpSizeInBytes gmpSizeInBitsgmpExportIntegergmpExportIntegerLEgmpImportIntegergmpImportIntegerLEGmpUnsupportedCurveParameters curveEccA curveEccB curveEccG curveEccN curveEccHcurveSizeBytes$fCurveSEC_p112r1 CurveTypeCurvePrimeParamCurveBinaryParamcurveParameters curveTypegcdF2m GHC.MaybeNothingCoprimesAssertionErrorexponentiationand'&&! dsaTruncHashdsaTruncHashDigestmultiplication EntropySource entropyOpen entropyGather entropyCloseRDRand DevURandom DevRandom openBackend getEntropyPtrinitializeWords probabilisticdecaf_x448_derive_public_key decaf_x448ccryptonite_curve25519expensiveBlowfishContextTruedivmod firstPrimesep1ep2dp1dp2 calculateHashsqrootsqroot'hashDigestASN1 makeSignature EphemeralKeygenerateEphemeral encryptWithxorMemdiffuse