b%      !"#$%&'()*+,-./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'LMNOPQRSTUV(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*{*|*}*~*****************************++,,,,,,,,,-------------------------------------...///00000000001111111111111111111122222222222233344445555555 5 5 5 5 5555555556666666666 6!6"6#6$6h7 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe%RA handle to an entropy maker, either a system capability or a hardware generator.&%try to open an handle for this source'btry to gather a number of entropy bytes into a buffer. return the number of actual bytes gathered(Close an open handle%&'(%&'(%&'(8 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeT)Entropy device devurandom on unix system *Entropy device devrandom on unix system )+*,-./0123456)* )+*,-./01234569 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe73fake handle to Intel RDRand entropy cpu instruction789:;<=7789:;<=: BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodSafeATAny Entropy BackendAll supported backends >Open a backend handle%Gather randomness from an open handle?>An open Entropy BackendPointer to a buffer to write tonumber of bytes to write+return the number of bytes actually written?> BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeRefill the entropy in a bufferGcall each entropy backend in turn until the buffer has been replenish.YIf the buffer cannot be refill after 3 loopings, this will raise an User Error exception; BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe@This is a strict version of andAThis is a strict version of &&.@A@A@A< BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneB BGMP Supported / UnsupportedCDSimple combinator in case the operation is not supported through GMPD-Compute the GCDE of a two integer through GMPE6Compute the binary logarithm of an integer through GMPFXCompute the power modulus using extra security to remain constant time wise through GMPG%Compute the power modulus through GMPH'Inverse modulus of a number through GMPI4Get the next prime from a specific value through GMPJ,Test if a number is prime using Miller RabinK&Return the size in bytes of an integerL%Return the size in bits of an integerMExport an integer to a memoryNImport an integer from a memoryBOPCDEFGHIJKLMNBOPCDEFGHIJKLMN BOPCDEFGHIJKLMN BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonesqrti returns two integer (l,b) so that l <= sqrt i <= b the implementation is quite naive, use an approximation for the first number and use a dichotomy algorithm to compute the bound relatively efficiently.8get the extended GCD of two integer using integer divModgcde a b& find (x,y,gcd(a,b)) where ax + by = d'check if a list of integer are all even)Compute the binary logarithm of a integer)Compute the number of bits for an integer *Compute the number of bytes for an integer     BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone0Q@Raised when two numbers are supposed to be coprimes but are not. zCompute the modular exponentiation of base^exponant using algorithms design to avoid side channels and timing measurementPModulo need to be odd otherwise the normal fast modular exponentiation is used.When used with integer-simple, this function is not different from expFast, and thus provide the same unstudied and dubious timing and side channels claims.with GHC 7.10, the powModSecInteger is missing from integer-gmp (which is now integer-gmp2), so is has the same security as old ghc version. Compute the modular exponentiation of base^exponant using the fastest algorithm without any consideration for hiding parameters.AUse this function when all the parameters are public, otherwise   should be prefered.RWexponentiation computes modular exponentiation as b^e mod m using repetitive squaring. 7inverse computes the modular inverse as in g^(-1) mod m |Compute the modular inverse of 2 coprime numbers. This is equivalent to inverse except that the result is known to exists.^if the numbers are not defined as coprime, this function will raise a CoprimesAssertionError.QS baseexponantmoduloresult baseexponantmoduloresultR   QS R  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneFfill a pointer with the big endian binary representation of an integerif the room available @ptrSz is less than the number of bytes needed, 0 is returned. Likewise if a parameter is invalid, 0 is returned.#returns the number of bytes written Similar to 3, except it will pad any remaining space with zero.etransform a big endian binary integer representation pointed by a pointer and a size into an integerTT= BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeUSplit a V into the highest and lowest WXReconstruct a V from two WUXYZUXUX> BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe[\? BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe,]^_`abcdeWVfghijklmnopqrstuvwxyz{|}~[\ BSD-style"Danny Navarro <j@dannynavarro.net> experimentalGoodNone +Binary Polynomial represented by an integer-Addition over F m. This is just a synonym of .Reduction by modulo over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.Multiplication over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.Squaring over F m.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited..Squaring over F m without reduction by modulo.The implementation utilizes the fact that for binary polynomial S(x) we have S(x)^2 = S(x^2). In other words, insert a zero bit between every bits of argument: 1101 -> 1010001.kThis function is undefined for negative arguments, because their bit representation is platform-dependent.,Extended GCD algorithm for polynomials. For a and b returns  (g, u, v) such that a * u + b * v == g. Reference: thttps://en.wikipedia.org/wiki/Polynomial_greatest_common_divisor#B.C3.A9zout.27s_identity_and_extended_GCD_algorithm Modular inversion over F m. If n doesn't have an inverse,  is returned.This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited.GDivision over F m. If the dividend doesn't have an inverse it returns .This function is undefined for negative arguments, because their bit representation is platform-dependent. Zero modulus is also prohibited. ModulusModulusModulusModulusModulusDividendDivisorQuotient  BSD-style#Vincent Hanquez <vincent@snarc.org> Experimental ExcellentNone0*Define names for known recommended curves.=PDefine common parameters in a curve definition of the form: y^2 = x^3 + ax + b.?curve parameter a@curve parameter bA base pointB order of GCcofactorDIDefine an elliptic curve in =p. The first parameter is the Prime Number.FzDefine an elliptic curve in =(2^m). The firt parameter is the Integer representatioin of the irreducible polynomial f(x).HDefine a point on a curve.JPoint at InfinityKECC Private NumberLECC Public PointM.Define either a binary curve or a prime curve.N=(2^m)O=pP5Parameters in common between binary and prime curves.QHIrreducible polynomial representing the characteristic of a CurveBinary.R=Prime number representing the characteristic of a CurvePrime.S!get the size of the curve in bitsTHGet the curve definition associated with a recommended known curve name.< !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV: !"#$%&'()*+,-./0123456789:;<=>BA?@CDEFGHIJKLMNOPQRST:MNOHIJLKFGDEPSQR=>?@ABC !"#$%&'()*+,-./0123456789:;<T! !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone0IrRepresent RSA KeyPairRnote the RSA private key contains already an instance of public key for efficiencytRepresent 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.v,public part of a private key (size, n and e)wprivate exponant dxp prime numberyq prime numberz d mod (p-1){ d mod (q-1)| q^(-1) mod p}Represent a RSA public keysize of key in bytes public p*qpublic exponant e8error possible during encryption, decryption or signing.Nthe message to decrypt is not of the correct size (need to be == private_size)"the message to encrypt is too longDthe message decrypted doesn't have a PKCS15 structure (0 2 .. 0 msg) the message's digest is too long-some parameters lead to breaking assumptions.lBlinder which is used to obfuscate the timing of the decryption primitive (used by decryption and signing).(get the size in bytes from a private keyget n from a private keyget e from a private keyPublic key of a RSA KeyPairPrivate key of a RSA KeyPairrstuvwxyz{|}~rstuvwxyz{|}~}~tuvwxyz{|rs rstuvwxyz{|}~@ BSD-style#Vincent Hanquez <vincent@snarc.org>stableCompatNoneB$byteswap Word# to or from Big Endian0on a big endian machine, this function is a nop.'byteswap Word# to or from Little Endian3on a little endian machine, this function is a nop.VSimple compatibility for byteswap the lower 32 bits of a Word# at the primitive level<combine 4 word8 [a,b,c,d] to a word32 representing [a,b,c,d]pSimple wrapper to handle pre 7.8 and future, where most comparaison functions don't returns a boolean anymore.A BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneperform io for hashes that do allocation and ffi. unsafeDupablePerformIO 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.wB BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneBArray of mutable Word32Array of Word64Array of Word32Array of Word8*Create an array of Word8 aliasing an Addr#@Create an Array of Word32 of specific size from a list of Word32@Create an Array of Word64 of specific size from a list of Word64GCreate a Mutable Array of Word32 of specific size from a list of Word324Create a Mutable Array of BE Word32 aliasing an AddrAfreeze a Mutable Array of Word32 into a immutable Array of Word32Read a Word8 from an ArrayRead a Word32 from an ArrayRead a Word64 from an Array,Read a Word32 from a Mutable Array of Word32-Write a Word32 from a Mutable Array of Word32dWrite into the Mutable Array of Word32 by combining through xor the current value and the new value. x[i] = x[i] xor valueC BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNone8 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone4os2ip converts a byte string into a positive integer4i2osp converts a positive integer into a byte stringXfirst byte is MSB (most significant byte), last byte is the LSB (least significant byte)[just like i2osp, but take an extra parameter for size. if the number is too big to fit in len bytes, ? is returned otherwise the number is padded with 0 to fit the len required.|just like i2ospOf except that it doesn't expect a failure: i.e. an integer larger than the number of output bytes requestedhfor 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> experimentalGoodNoneCompute the RSA decrypt primitive. if the p and q numbers are available, then dpFast is used otherwise, we use dpSlow which only need d and n.!Compute the RSA encrypt primitiveKmultiply 2 integers in Zm only performing the modulo operation if necessary  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone2Get some entropy from the system source of entropy  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNonefPool of Entropy. Contains a self-mutating pool of entropy, that is always guaranteed to contain data.,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..Create a new entropy pool with a default size.gWhile you can create as many entropy pools as you want, the pool can be shared between multiples RNGs.-Put a chunk of the entropy pool into a buffer.Grab a chunk of entropy from the entropy pool.  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneOA simple Monad class very similar to a State Monad with the state being a DRG.,A Deterministic Random Generator (DRG) class)Generate N bytes of randomness from a DRG7A monad constraint that allows to generate random bytesERun a pure computation with a Deterministic Random Generator in the     BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone(Top bits policy when generating a numberset the highest bitset the two highest bitUGenerate a number for a specific size of bits, and optionaly set bottom and top bitsIf the top bit policy is T, then nothing is done on the highest bit (it's whatever the random generator set).If @generateOdd is set to `, then the number generated is guaranteed to be odd. Otherwise it will be whatever is generated2Generate a positive integer x, s.t. 0 <= x < range9generate a number between the inclusive bound [low,high].number of bitstop bit policyforce the number to be oddrangeD BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone]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.#Grab one instance of the System DRGE BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneI .Represent a digest for a given hash algorithm./Represent a context for a given hash algorithm.&Class representing hashing algorithms.The interface presented here is update in place and lowlevel. the Hash module takes care of hidding the mutable interface properly.&Get the block size of a hash algorithm'Get the digest size of a hash algorithm5Get the size of the context used for a hash algorithmEInitialize a context pointer to the initial state of a hash algorithm%Update the context with some raw dataEFinalize the context and set the digest raw memory to the right value  F BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone&Whirlpool cryptographic hash algorithmG BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone"Tiger cryptographic hash algorithmH BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0Skein512 (512 bits) cryptographic hash algorithm0Skein512 (384 bits) cryptographic hash algorithm0Skein512 (256 bits) cryptographic hash algorithm0Skein512 (224 bits) cryptographic hash algorithm I BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0Skein256 (256 bits) cryptographic hash algorithm0Skein256 (224 bits) cryptographic hash algorithm J BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone/SHA512t (256 bits) cryptographic hash algorithm/SHA512t (224 bits) cryptographic hash algorithm K BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone#SHA512 cryptographic hash algorithmL BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone#SHA384 cryptographic hash algorithm        M BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone,SHA3 (512 bits) cryptographic hash algorithm,SHA3 (384 bits) cryptographic hash algorithm,SHA3 (256 bits) cryptographic hash algorithm,SHA3 (224 bits) cryptographic hash algorithm   N BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone#SHA256 cryptographic hash algorithmO BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone#SHA224 cryptographic hash algorithmP BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone!SHA1 cryptographic hash algorithmQ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone&RIPEMD160 cryptographic hash algorithm !"# !"#R BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone MD5 cryptographic hash algorithm$%&'$%&'S BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone MD4 cryptographic hash algorithm()*+()*+T BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone MD2 cryptographic hash algorithm,-./,-./U BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.Keccak (512 bits) cryptographic hash algorithm.Keccak (384 bits) cryptographic hash algorithm.Keccak (256 bits) cryptographic hash algorithm.Keccak (224 bits) cryptographic hash algorithm0123456 0123456 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneIA Mutable hash context"Create a new mutable hash context.Jthe algorithm used is automatically determined from the return constraint."Create a new mutable hash context.0The algorithm is explicitely passed as parameter&Update a mutable hash context in place4Finalize a mutable hash context and compute a digest:Reset the mutable context to the initial state of the hash7  7V BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0Blake2sp (256 bits) cryptographic hash algorithm 0Blake2sp (224 bits) cryptographic hash algorithm    89:;<      89:;<W BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone /Blake2s (256 bits) cryptographic hash algorithm/Blake2s (224 bits) cryptographic hash algorithm   =>?@A    =>?@AX BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0Blake2bp (512 bits) cryptographic hash algorithmBCDEBCDEY BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone/Blake2b (512 bits) cryptographic hash algorithmFGHIFGHI BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneC     C      BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone 'Hash a strict bytestring into a digest.%Hash a lazy bytestring into a digest.0Initialize a new context for this hash algorithmHrun hashUpdates on one single bytestring and return the updated context.`Update the context with a list of strict bytestring, and return a new context with the updates.'Finalize a context and return a digest.7Initialize a new context for a specified hash algorithmRun the 8 function but takes an explicit hash algorithm parameterATry to transform a bytearray into a Digest of specific algorithm.[If the digest is not the right size for the algorithm specified, then Nothing is returned. P        BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneI;Represent an ongoing HMAC state, that can be appended with $ and finalize to an HMAC with  hmacFinalizeORepresent an HMAC that is a phantom type with the hash used to produce the mac.!The Eq instance is constant time."1compute a MAC using the supplied hashing function#)Initialize a new incremental HMAC context$#Incrementally update a HMAC context%9Increamentally update a HMAC context with multiple inputs&,Finalize a HMAC context and return the HMAC.  !" Secret keyMessage to MAC# Secret key$Current HMAC contextMessage to append to the MACUpdated HMAC context%Current HMAC contextMessages to append to the MACUpdated HMAC context&'  !"#$%& " !#$%& !"#$%&' BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone)Pseudo Random Key*RExtract a Pseudo Random Key using the parameter and the underlaying hash mechanism+2Create a PRK directly from the input key material.Only use when guaranteed to have a good quality and random data to use directly as key. This effectively skip a HMAC with key=salt and data=key.,<Expand key material of specific length out of the parameters)JK*SaltInput Keying MaterialPseudo random key+,Pseudo Random Key5Optional context and application specific informationOutput length in bytes Output data)*+,)*+,)JK*+, BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone.Parameters for PBKDF20Nthe number of user-defined iterations for the algorithms. e.g. WPA2 uses 4000.1-the number of bytes to generate out of PBKDF22The PRF used for PBKDF23>PRF for PBKDF2 using HMAC with the hash algorithm as parameter4;generate the pbkdf2 key derivation function from the output./012the password parameters the contentprf(password,content)34./1023423./014./01234 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone5Parameters for Scrypt7LCpu/Memory cost ratio. must be a power of 2 greater than 1. also known as N.8Must satisfy r * p < 2^309Must satisfy r * p < 2^30:-the number of bytes to generate out of Scrypt;'Generate the scrypt key derivation data56789:L;56879:;56789:;56789:L; BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone0<Represent a DSA key pair>Represent a DSA private key.VOnly x need to be secret. the DSA parameters are publicly shared with the other side.@DSA parametersA DSA private XBRepresent a DSA public key.DDSA parametersE DSA public YF)Represent a DSA signature namely R and S.HDSA rIDSA sJ,Represent DSA parameters namely P, G, and Q.LDSA pMDSA gNDSA qO7DSA Private Number, usually embedded in DSA Private KeyP5DSA Public Number, usually embedded in DSA Public KeyQPublic key of a DSA Key pairRPrivate key of a DSA Key pairSagenerate a private number with no specific property this number is usually called X in DSA text.TCCalculate the public number from the parameters and the private keyU<sign message using the private key and an explicit k number.V#sign message using the private key.W)verify a bytestring using the public key.!<=>?@ABCDEFGHIJKLMNOPQRSTUk random number private key hash functionmessage to signVWXYZ[\<=>?@ABCDEFGHIJKLMNOPQRSTUVWJKLMNFGHIBCDE>?@APOSTVUW<=QR<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneq%Represent a mask generation algorithmrMask generation algorithm MGF1qseedlength to generaterqrqrqrZ BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodSafe0sBA simple Either like type to represent a computation that can fail2 possibles values are:tH : The computation succeeded, and contains the result of the computationuJ : The computation failed, and contains the cryptographic error associatedvDEnumeration of all possible errors that can be found in this library^Throw an CryptoError as exception on CryptoFailed result, otherwise return the computed valueSame as $ but throw the error asynchronously.Simple M( like combinator for CryptoFailable type'Transform a CryptoFailable to an Either%Transform a CryptoFailable to a Maybestuvwxyz{|}~NOPQRSstuvwxyz{|}~ stuv wxyz{|}~NOPQRS BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentSafestuvwxyz{|}~vwxyz{|}~stu BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneI Poly1305 Auth(Poly1305 State. use State instead of CtxPoly1305 Stateinitialize a Poly1305 context"update a context with a bytestring+updates a context with multiples bytestring-finalize the context into a digest bytestringOne-pass authorization creationTUVW   TUVW BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneBIMA Curve25519 Diffie Hellman secret related to a public key and a secret key.A Curve25519 public keyA Curve25519 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Create a DhSecret from a bytearray objectDCompute the Diffie Hellman secret from a public key and a secret key%Create a public key from a secret key XYZ[publicsecret basepoint XYZ[ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneI An Ed25519 signatureAn Ed25519 public keyAn Ed25519 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Try to build a signature from a bytearray%Create a public key from a secret key!Sign a message using the key pairVerify a message\]^_`abcd  \]^_`abcd BSD-style John Galt <jgalt@centromere.net> experimentalunknownNoneBIHA Ed448 Diffie Hellman secret related to a public key and a secret key.A Ed448 public keyA Ed448 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Create a DhSecret from a bytearray objectDCompute the Diffie Hellman secret from a public key and a secret key%Create a public key from a secret key efghpublicsecret basepointi efghi BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneFormat of padding%PKCS5: PKCS7 with hardcoded size of 8)PKCS7 with padding size between 1 and 255zero padding with block sizeApply some pad to a bytearray,Try to remove some padding from a bytearray. BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneTMSplit data to diffused data, using a random generator and an hash algorithm.the diffused data will consist of random data for (expandTimes-1) then the last block will be xor of the accumulated random data diffused by the hash algorithm. ---------orig - ---------#--------- ---------- --------------"rand1 - - rand2 - - orig ^ acc -#--------- ---------- --------------9where acc is : acc(n+1) = hash (n ++ rand(n)) ^ acc(n)9Merge previously diffused data back to the original data.j%inplace Xor with an input dst = src  dst!Hash algorithm to use as diffuserRandom generator to use$Number of times to diffuse the data.original data to diffuse.The diffused dataHash algorithm used as diffuser&Number of times to un-diffuse the data Diffused data Original datajk Hash function to use as diffuser"buffer to diffuse, modify in placelength of buffer to diffusejk[ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNonel=Chunk some input byte array into @sz byte list of byte array.lll\ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNonem)Compute the gfmul with the XTS polynomialblock size need to be 128 bits."FIXME: add support for big endian.mmm] BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneAIT Symmetric cipher class.&Initialize a cipher context from a key Cipher nameYreturn the size of the key required for this cipher. Some cipher accept any size for key AEAD Mode%Authentication Tag for AE cipher mode7Offset inside an XTS data unit, measured in block size.)Different specifier for key size in bytesin the range [min,max]one of the specified valuesa specific sizenn^ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneSymmetric stream cipher classCombine using the stream cipher_ BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneAOT8Authenticated Encryption with Associated Data algorithmsAEAD Implementation1Append some header information to an AEAD context-Encrypt some data and update the AEAD context-Decrypt some data and update the AEAD context;Finalize the AEAD context and return the authentication tagSimple AEAD encryptionSimple AEAD decryptionA new AEAD Context#Optional Authentication data headerOptional Plaintext Tag length!Authentication tag and ciphertextA new AEAD Context#Optional Authentication data header CiphertextThe authentication tag Plaintext` BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone$<=AOT0class of block cipher with a 128 bits block sizeencrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block onlydecrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block onlySymmetric block cipher class7Return the size of block required for this block cipherEncrypt blocks6the input string need to be multiple of the block sizeDecrypt blocks6the input string need to be multiple of the block sizeencrypt using the CBC mode.,input need to be a multiple of the blocksizedecrypt using the CBC mode.,input need to be a multiple of the blocksizeencrypt using the CFB mode.,input need to be a multiple of the blocksizedecrypt using the CFB mode.,input need to be a multiple of the blocksizecombine using the CTR mode.hCTR mode produce a stream of randomized data that is combined (by XOR operation) with the input stream.1encryption and decryption are the same operation.input can be of any size Initialize a new AEAD State:When Nothing is returns, it means the mode is not handled.o XTS callback  an IV parametrized by the cipher )Create an IV for a specified block cipher :Create an IV that is effectively representing the number 0 Increment an IV by a number.&Assume the IV is in Big Endian format. o2Usually represent the Data Unit (e.g. disk sector)+Offset in the data unit in number of blocksDataProcessed Data p   qrstuvwxyz! o p     o p   qrstuvwxyz BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone05     5       BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneIKCompute Miyaguchi-Preneel one way compress using the supplied block cipher.{Compute Miyaguchi-Preneel one way compress using the infered block cipher. Only safe when KEY-SIZE equals to BLOCK-SIZE. Simple usage "mp' msg :: MiyaguchiPreneel AES128{%computation step of Miyaguchi-Preneel|Skey build function to compute Miyaguchi-Preneel. care about block-size and key-size input message output tag input message output tag{}|{}! BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneIAuthentication code'compute a MAC using the supplied ciphermake sub-keys used in CMAC~key to compute CMAC with input message output tagkey to compute CMAC withsub-keys to compute CMAC width in byte(irreducible binary polynomial definitionresult bit pattern~" BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneI Salsa context\Initialize a new Salsa context with the number of rounds, the key and the nonce associated.pCombine the salsa output and an arbitrary message with a xor, and return the combined output and the new state.9Generate a number of bytes from the Salsa output directlynumber of rounds (8,12,20)the key (128 or 256 bits)the nonce (64 or 96 bits)the initial Salsa statethe current Salsa state$the source to xor with the generatorthe current Salsa statethe length of data to generate# BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneIThe encryption state for RC4%C Call for initializing the encryptorRC4 context initialization.gseed the context with an initial key. the key size need to be adequate otherwise security takes a hit.Pgenerate the next len bytes of the rc4 stream without combining it to anything. 3RC4 xor combination of the rc4 stream with an inputPointer to the permutationPointer to the clear textLength of the clear text Output buffer The rc4 keyThe key length The contextThe key%The RC4 context with the key mixed in  rc4 contextinputnew rc4 context, and the output   a BSD-styleSafe9;a DES block (64 bits)Basic DES encryption which takes a key and a block of plaintext and returns the encrypted block of ciphertext according to the standard.Basic DES decryption which takes a key and a block of ciphertext and returns the decrypted block of plaintext according to the standard.'%$ BSD-style experimental???None#L3DES where the first and third keys are equal, used in alternative direction$I3DES where the first and third keys are equal, used in the same direction%83DES with 3 different keys used in alternative direction&93DES with 3 different keys used all in the same direction#$%&'()*+,-.#$%&&%$##$%&'()*+,-.% BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone3 DES Context34533345& BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneI7<ChaCha context for DRG purpose (see Crypto.Random.ChaChaDRG)8ChaCha context9]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.:Initialize simple ChaCha State;qCombine the chacha output and an arbitrary message with a xor, and return the combined output and the new state.<:Generate a number of bytes from the ChaCha output directly= similar to < but assume certains values789number of rounds (8,12,20)the key (128 or 256 bits)the nonce (64 or 96 bits)the initial ChaCha state:a 40 bytes long seed;the current ChaCha state$the source to xor with the generator<the current ChaCha statethe length of data to generate=789:;<=9;<8:=7 789:;<=' BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone @Valid Nonce for ChaChaPoly1305.It can be created with C or BAA ChaChaPoly1305 State.9The state is immutable, and only new state can be createdB6Nonce smart constructor 12 bytes IV, nonce constructorC8 bytes IV, nonce constructorDIncrement a nonceE%Initialize a new ChaChaPoly1305 StateIThe key length need to be 256 bits, and the nonce procured using either C or BFJAppend 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 GG>Finalize the Authenticated Data and return the finalized StateHNEncrypt a piece of data and returns the encrypted Data and the updated State.INDecrypt a piece of data and returns the decrypted Data and the updated State.J.Generate an authentication tag from the State.@ABC4 bytes constant 8 bytes IVDEFGHIJK @ABCDEFGHIJ A@BCDEFGHIJ@ABCDEFGHIJKb BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneIL%ChaCha Deterministic Random Generator]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.Initialize a new ChaCha context from 5-tuple of words64. This interface is useful when creating a RNG out of tests generators (e.g. QuickCheck).L40 bytes of seedthe initial ChaCha stateLL BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneIN%Create a new Seed from system entropyOConvert a Seed to an integerPConvert an integer to a SeedQ$Create a new DRG from system entropyRCreate a new DRG from a seedSCreate 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.T Generate 6len random bytes and mapped the bytes to the function f.(This is equivalent to use Control.Arrow q with  MNOPQRSTLMNOPQRSTLMNPOQRST MNOPQRST( BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneIV A P256 pointW A P256 scalarX%Get the base point for the P256 CurveYLift to curve a scalar0Using the curve generator as base point compute:  scalar * GZAdd a point to another point[Multiply a point by a scalarwarning: variable time\multiply the point p with &n2 and add a lifted to curve value @n1 n1 * G + n2 * pwarning: variable time] Check if a V is valid^!Convert a point to (x,y) Integers_&Convert from (x,y) Integers to a point`*Convert a point to a binary representationaConvert from binary to a pointb(Generate a randomly generated new scalarcThe scalar representing 0dCheck if the scalar is 0e$Perform addition between two scalars a + bf'Perform subtraction between two scalars a - bgGive the inverse of the scalar 1 / awarning: variable timehCompare 2 Scalariconvert a scalar from binaryjconvert a scalar to binaryk(Convert from an Integer to a P256 Scalarl(Convert from a P256 Scalar to an Integer<VWXYZ[\]^_`abcdefghijklVWXYZ[\]^_`abcdefghijklWVXZ[\]Y^_`abcdefghijkl:VWXYZ[\]^_`abcdefghijkl)None q,Generate a valid scalar for a specific Curve Elliptic Curve point negation: pointNegate c p returns point q such that pointAdd c p q == PointO.rElliptic Curve point addition.WARNING: Vulnerable to timing attacks.sElliptic 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) * xrt2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.u?Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks.v*Check if a point is the point at infinity.w%check if a point is on specific curveThis perform three checks:x is not out of rangey is not out of range the equation y^2 = x^3 + a*x + b (mod p) holds div and mod qrstuvwqrstuvwqrstuvw qrstuvw*None0 xECDSA Key Pair.zECDSA Public Key.~ECDSA Private Key.+Represent a ECDSA signature namely R and S.ECDSA rECDSA sPublic key of a ECDSA Key pair. Private key of a ECDSA Key pair.<Sign message using the private key and an explicit k number.WARNING: Vulnerable to timing attacks.#Sign message using the private key.WARNING: Vulnerable to timing attacks.)Verify a bytestring using the public key.Truncate and hash.xyz{|}~k random number private key hash functionmessage to signKLxyz{|}~Lz{|}K~xy xyz{|}~+NoneGenerate Q given d.WARNING: Vulnerable to timing attacks.)Generate a pair of (private, public) key.WARNING: Vulnerable to timing attacks.Elliptic Curvec BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneThis 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 heuristic0Generally, it's advise not to use this function., BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone returns if the number is probably prime. first a list of small primes are implicitely tested for divisibility, then a fermat primality test is used with arbitrary numbers and then the Miller Rabin algorithm is used with an accuracy of 30 recursions/generate a prime number of the required bitsize|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.;find a prime from a starting point where the property hold.=find a prime from a starting point with no specific property.Miller Rabin algorithm return if the number is probably prime or composite. the tries parameter is the number of recursion, that determines the accuracy of the test.Probabilitic Test using Fermat primility test. Beware of Carmichael numbers that are Fermat liars, i.e. this test is useless for them. always combines with some other test.eTest naively is integer is prime. while naive, we skip even number and stop iteration at i > sqrt(n)-Test is two integer are coprime to each other$list of the first primes till 2903.. %number of iterations of the algorithm starting anumber to test for primality   - BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone0I 'Represent Diffie Hellman shared secret.*Represent Diffie Hellman private number X.)Represent Diffie Hellman public number Y.HRepresent Diffie Hellman parameters namely P (prime), and G (generator).generate params from a specific generator (2 or 5 are common values) we generate a safe prime (a prime number of the form 2p+1 where p is also prime)`generate a private number with no specific property this number is usually called X in DH text.pcalculate the public number from the parameters and the private key this number is usually called Y in DH text.pcalculate the public number from the parameters and the private key this number is usually called Y in DH text.DEPRECATED use calculatePublicPgenerate a shared key using our private number and the other party public numbernumber of bits generator . BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneGenerating a private number d.Generating a public point Q.UGenerating a shared key using our private number and the other party public point.KLMMLKd BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneI 1ElGamal Ephemeral key. also called Temporary key.ElGamal Signaturegenerate a private number with no specific property this number is usually called a and need to be between 0 and q (order of the group G).~generate an ephemeral key which is a number with no specific property, and need to be between 0 and q (order of the group G).cgenerate a public number that is for the other party benefits. this number is usually called h=g^aCencrypt with a specified ephemeral key do not reuse ephemeral key.Zencrypt a message using params and public keys will generate b (called the ephemeral key)decrypt message(sign a message with an explicit k number7if k is not appropriate, then no signature is returned.with some appropriate value of k, the signature generation can fail, and no signature is returned. User of this function need to retry with a different k value. sign messageThis function will generate a random number, however as the signature might fail, the function will automatically retry until a proper signature has been created. verify a signature   3random number k, between 0 and p-1 and gcd(k,p-1)=1DH params (p,g)DH private key"collision resistant hash algorithmmessage to signDH params (p,g)DH private key"collision resistant hash algorithmmessage to sign       / BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone"Generate a key pair given p and q.*p and q need to be distinct prime numbers.e need to be coprime to phi=(p-1)*(q-1). If that's not the case, the function will not return a key pair. A small hamming weight results in better performance.e=0x10001 is a popular choiceFe=3 is popular as well, but proven to not be as secure for some cases.:generate a pair of (private, public) key of size in bytes.?Generate a blinder to use with decryption and signing operationWthe unique parameter apart from the random number generator is the public key value N.chosen distinct primes p and q size in bytesRSA public exponant e size in bytesRSA public exponant eRSA public N parameter.tuvwxyz{|}~}~tuvwxyz{|0 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone )Parameters for OAEP encryption/decryptionHash function to use.Mask Gen algorithm to use.$Optional label prepended to message.-Default Params with a specified hash function4Encrypt a message using OAEP with a predefined seed.Encrypt a message using OAEP un-pad a OAEP encoded message.-It doesn't apply the RSA decryption primitiveDecrypt a ciphertext using OAEPWhen the signature is not in a context where an attacker could gain information from the timing of the operation, the blinder can be set to None.2If unsure always set a blinder or use decryptSaferJDecrypt a ciphertext using OAEP and by automatically generating a blinder. Seed!OAEP params to use for encryption Public key.Message to encrypt"OAEP params to use for encryption. Public key.Message to encrypt OAEP params to usesize of the key in bytesencoded message (not encrypted)Optional blinder!OAEP params to use for decryption Private key Cipher text!OAEP params to use for decryption Private key Cipher text   1 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone A specialized class for hash algorithm that can product a ASN1 wrapped description the algorithm plus the content of the digest. ;Convert a Digest into an ASN1 wrapped descriptive ByteArray6This produce a standard PKCS1.5 padding for encryption0Produce a standard PKCS1.5 padding for signature4Try to remove a standard PKCS1.5 encryption padding.&decrypt message using the private key.When the decryption is not in a context where an attacker could gain information from the timing of the operation, the blinder can be set to None.2If unsure always set a blinder or use decryptSaferPdecrypt message using the private key and by automatically generating a blinder.*encrypt a bytestring using the public key.6the message needs to be smaller than the key size - 11?sign message using private key, a hash and its ASN1 descriptionWhen the signature is not in a context where an attacker could gain information from the timing of the operation, the blinder can be set to None./If unsure always set a blinder or use signSaferMsign message using the private key and by automatically generating a blinder.&verify message with the signed messagemake signature digest, used in  and  optional blinderRSA private key cipher textRSA private key cipher textoptional blinderhash algorithm private keymessage to signHash algorithm private keymessage to signoptional hashing algorithm   2 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone *Parameters for PSS signature/verification.Hash function to useMask Gen algorithm to use&Length of salt. need to be <= to hLen.Trailer field, usually 0xbc-Default Params with a specified hash function$Default Params using SHA1 algorithm.LSign using the PSS parameters and the salt explicitely passed as parameters.6the function ignore SaltLength from the PSS ParametersSign using the PSS ParametersESign using the PSS Parameters and an automatically generated blinder.+Verify a signature using the PSS Parameters  Salt to useoptional blinder to usePSS Parameters to useRSA Private KeyMessage to signoptional blinder to usePSS Parameters to useRSA Private KeyMessage to signPSS Parameters to use private keymessage to sign\PSS Parameters to use to verify, this need to be identical to the parameters when signingRSA Public KeyMessage to verify Signature  e BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneBCamellia contextInitialize a 128-bit key`Return the initialized key or a error message if the given keyseed was not 16-bytes in length.1Encrypts the given ByteString using the given Key1Decrypts the given ByteString using the given Key% !"#$%&'()*+&The key to create the camellia context,-./012345The key to useThe data to encryptThe key to useThe data to decrypt !"#$%&'()*+,-./0123453 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone&Camellia block cipher with 128 bit key66f BSD-style experimentalGoodNoneB7LCreate a key schedule mutable array of the pbox followed by all the sboxes.777g BSD-style experimentalGoodNone8variable keyed blowfish state9Encrypt blocks&Input need to be a multiple of 8 bytes:Decrypt blocks&Input need to be a multiple of 8 bytes;-Initialize a new Blowfish context from a key.'key needs to be between 0 and 448 bits.<8The BCrypt "expensive key schedule" version of blowfish.DSalt must be 128 bits Cost must be between 4 and 31 inclusive See jhttps://www.usenix.org/conference/1999-usenix-annual-technical-conference/future-adaptable-password-scheme=>Create a key schedule for either plain Blowfish or the BCrypt EKSo version For the expensive version, the salt and cost factor are supplied. Salt must be a 128-bit byte array.KThe standard case is just a single key expansion with the salt set to zero. 8>9:?@;<A=BThe key scheduleFirst word of the saltSecond word of the saltThe keyC89:;< 8>9:?@;<A=BC4NoneCreate a bcrypt hash for a password with a provided cost value. Typically used to create a hash when a new user account is registered or when a user changes their password.{Each increment of the cost approximately doubles the time taken. The 16 bytes of random salt will be generated internally.HCreate a bcrypt hash for a password with a provided cost value and salt.OCost value under 4 will be automatically adjusted back to 10 for safety reason.ICheck a password against a stored bcrypt hash when authenticating a user.Returns False^ if the password doesn't match the hash, or if the hash is invalid or an unsupported version.&Check a password against a bcrypt hashAs for validatePasswordV but will provide error information if the hash is invalid or an unsupported version.DE~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly.EThe password. Should be the UTF-8 encoded bytes of the password text.#The bcrypt hash in standard format.~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly.@The salt. Must be 16 bytes in length or an error will be raised.EThe password. Should be the UTF-8 encoded bytes of the password text.#The bcrypt hash in standard format.FGDEFG5 BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneI448 bit keyed blowfish state256 bit keyed blowfish state128 bit keyed blowfish state64 bit keyed blowfish statevariable keyed blowfish stateHIJKL     HIJKL     h BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone$IM AESOCB StateN AESGCM StateOAES Context (pre-processed key)P)Create an AES AEAD implementation for GCMQ)Create an AES AEAD implementation for OCBR#Initialize a new context with a keyRKey needs to be of length 16, 24 or 32 bytes. Any other values will return failureS(encrypt using Electronic Code Book (ECB)T)encrypt using Cipher Block Chaining (CBC)Uvgenerate 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.Vvgenerate 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 U- but also return the next IV for continuationW encrypt using Counter mode (CTR)<in CTR mode encryption and decryption is the same operation.Xencrypt using XTSdthe first key is the normal block encryption key the second key is used for the initial block tweakY(decrypt using Electronic Code Book (ECB)Z)decrypt using Cipher block chaining (CBC)[!decrypt using Counter mode (CTR).<in CTR mode encryption and decryption is the same operation.\decrypt using XTS]initialize a gcm context^Gappend data which is only going to be authenticated to the GCM context.Uneeds to happen after initialization and before appending encryption/decryption data._4append data to encrypt and append to the GCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.`4append data to decrypt and append to the GCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.a!Generate the Tag from GCM contextbinitialize an ocb contextcGappend data which is going to just be authenticated to the OCB context.Tneed to happen after initialization and before appending encryption/decryption data.d4append 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.e4append 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.f!Generate the Tag from OCB contextAMgNhOijklmnopqrstuvwxyz{|}PQ~RST AES Context Initial vector of AES block size plaintext ciphertextU Cipher Key.usually a 128 bit integer.length of bytes required.VW AES ContextIinitial vector of AES block size (usually representing a 128 bit integer)plaintext inputciphertext outputXAES cipher and tweak context:a 128 bits IV, typically a sector or a block offset in XTSLnumber of rounds to skip, also seen a 16 byte offset in the sector or block.input to encryptoutput encryptedYZ[ AES Context6initial vector, usually representing a 128 bit integerciphertext inputplaintext output\AES cipher and tweak context:a 128 bits IV, typically a sector or a block offset in XTSLnumber of rounds to skip, also seen a 16 byte offset in the sector or block.input to decryptoutput decrypted]^_`abcdefMNOPQRSTUVWXYZ[\]b>MgNhOijklmnopqrstuvwxyz{|}PQ~RSTUVWXYZ[\]^_`abcdef6 BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneIAES with 256 bit keyAES with 192 bit keyAES with 128 bit key !  !:i:j:klmnopqrstuvwxyz{|}~{yz                          DDE E!E"E#E$E%E&E'E(F)F)G*G*H+H+H,H,H-H-H.H.I/I/I0I0J1J1J2J2K3K3L4L4M5M5M6M6M7M7M8M8N9N9O:O:P;P;Q<Q<R=R=S>S>T?T?U@U@UAUAUBUBUCUCDEFGHIJVKVKVLVLWMWMWNWNXOXOYPYPQRSTUVWXY!!ZZ[\]^_`abcdefghhijklmhhnopjmqrstuuvwxxyz{|}~ZZZZZZZZZZZZZZZZZZ]^_`u]]]]]]]]]]]]]]]]]]^^________________`````````````````     !!!!!""]""m"##]#m###$$$$$$$ $ $ $ $ $$$$$%%%%&&&]&&&m&&&'''''']'' '!'"'`'#b$%&'()*+,-((.(/(0(1(2(3(4(5(6(7(8(9(:(;(<(=(>(?(@(A(B(C(D(E(()9)1)F)G)2)H)I*****J*K***L**u*u*v*w*********************+M+m,N,O,P,Q,R,S,T,U,V-W-W---|-|-x-x-y-z-X--}-~-Y-Z-----[-\-]-^-_-`-a-b-c-d-e-f-g-h-i-j-k.}.~.Z/l/m/m0n0n0o0p0q0r0s0!0"0t1u11v11"1t1!11w11x1y1z1{1|1}1~11122222222222w23334444555555555555555555556666666666666667777888888888888889999999::i;;<<<<<<<<<<<<<<<==     @@@ @!@"A#$B%B&B'B(B)B*B+B,B-B.B/B0B1B2B3B4B%B&B'B(5678797:7;7<7=7>7?@A@B@C@D@EFGFGHIHJHKHLMNMOMPMQMRMSMTMUMVMWMXMYMZM[M\M]M^MM_M`MaMbMcMdMeMMfMgMhMijklmlnlolplq r s t u v  w  xyDDzDmD{E E!E|F}F~FFGGGGHHHHHHHIIIIIJJJJJKKKKLLLLMMMMMMMNNNNOOOOPPPPQQQQRRRRSSSSTTTTUUUUUUUDVVVVVWWWWWXXXXYYYYcZZZZZZu[\]````````````   !!!!!!!!!!!! "" " " # ##aa!a"aaaaaaaaaaaaaaaaaa a!a"a#a$a%a&a'a(a)a*a+a,a-a.a/a0a1a2$$$$$3$4%%5&&&6&7&8&9&:';'<''='>'?b]b@b$bmbA%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*hci,j,kdldud}dmdYdnd!d"ddddldu01o1p1q2resete!e"eseuevewexeyeze{e|e}e~eeeeeeeeeeeeeeeeeeeeee3fg!g!g"ggggggggg444455555hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh666&cryptonite-0.18-DAU2DBdPIokI50v1i4WhJbCrypto.Random.Entropy.UnsafeCrypto.Number.BasicCrypto.Number.ModArithmetic Crypto.Number.Serialize.InternalCrypto.Number.F2mCrypto.PubKey.ECC.TypesCrypto.PubKey.RSA.TypesCrypto.Number.SerializeCrypto.PubKey.RSA.PrimCrypto.Random.EntropyCrypto.Random.EntropyPoolCrypto.Random.TypesCrypto.Number.Generate Crypto.Random Crypto.HashCrypto.Hash.IOCrypto.Hash.AlgorithmsCrypto.MAC.HMACCrypto.KDF.HKDFCrypto.KDF.PBKDF2Crypto.KDF.ScryptCrypto.PubKey.DSACrypto.PubKey.MaskGenFunction Crypto.ErrorCrypto.MAC.Poly1305Crypto.PubKey.Curve25519Crypto.PubKey.Ed25519Crypto.PubKey.Ed448Crypto.Data.PaddingCrypto.Data.AFISCrypto.Cipher.Types%Crypto.ConstructHash.MiyaguchiPreneelCrypto.MAC.CMACCrypto.Cipher.SalsaCrypto.Cipher.RC4Crypto.Cipher.TripleDESCrypto.Cipher.DESCrypto.Cipher.ChaChaCrypto.Cipher.ChaChaPoly1305Crypto.PubKey.ECC.P256Crypto.PubKey.ECC.PrimCrypto.PubKey.ECC.ECDSACrypto.PubKey.ECC.GenerateCrypto.Number.PrimeCrypto.PubKey.DHCrypto.PubKey.ECC.DHCrypto.PubKey.RSACrypto.PubKey.RSA.OAEPCrypto.PubKey.RSA.PKCS15Crypto.PubKey.RSA.PSSCrypto.Cipher.CamelliaCrypto.KDF.BCryptCrypto.Cipher.BlowfishCrypto.Cipher.AESCrypto.Random.Entropy.SourceCrypto.Random.Entropy.UnixCrypto.Random.Entropy.RDRandCrypto.Random.Entropy.BackendCrypto.PubKey.InternalCrypto.Number.CompatCrypto.Internal.WordsCrypto.Internal.DeepSeqCrypto.Internal.ImportsCrypto.Internal.CompatPrimCrypto.Internal.CompatCrypto.Internal.WordArrayCrypto.Internal.ByteArrayCrypto.Random.SystemDRGCrypto.Hash.TypesCrypto.Hash.WhirlpoolCrypto.Hash.TigerCrypto.Hash.Skein512Crypto.Hash.Skein256Crypto.Hash.SHA512tCrypto.Hash.SHA512Crypto.Hash.SHA384Crypto.Hash.SHA3Crypto.Hash.SHA256Crypto.Hash.SHA224Crypto.Hash.SHA1Crypto.Hash.RIPEMD160Crypto.Hash.MD5Crypto.Hash.MD4Crypto.Hash.MD2Crypto.Hash.KeccakCrypto.Hash.Blake2spCrypto.Hash.Blake2sCrypto.Hash.Blake2bpCrypto.Hash.Blake2bCrypto.Error.TypesCrypto.Cipher.Types.UtilsCrypto.Cipher.Types.GFCrypto.Cipher.Types.BaseCrypto.Cipher.Types.StreamCrypto.Cipher.Types.AEADCrypto.Cipher.Types.BlockCrypto.Cipher.DES.PrimitiveCrypto.Random.ChaChaDRGCrypto.Random.ProbabilisticCrypto.PubKey.ElGamal Crypto.Cipher.Camellia.PrimitiveCrypto.Cipher.Blowfish.Box Crypto.Cipher.Blowfish.PrimitiveCrypto.Cipher.AES.PrimitiveEntropyBackendsupportedBackends gatherBackend replenishsqrtigcdeareEvenlog2numBitsnumBytesexpSafeexpFastinverseinverseCoprimes!$fExceptionCoprimesAssertionError$fShowCoprimesAssertionErrori2ospi2ospOfos2ipBinaryPolynomialaddF2mmodF2mmulF2m squareF2m squareF2m'invF2mdivF2m 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$fNFDataCurveBinary $fNFDataPoint $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$fDataCurveNameKeyPair PrivateKey private_pub private_d private_p private_q private_dP private_dQ private_qinv PublicKey public_sizepublic_npublic_eErrorMessageSizeIncorrectMessageTooLongMessageNotRecognizedSignatureTooLongInvalidParametersBlinder private_size private_n private_e toPublicKey toPrivateKey$fNFDataPrivateKey$fNFDataPublicKey $fShowBlinder $fEqBlinder $fShowError $fEqError$fShowPublicKey$fReadPublicKey $fEqPublicKey$fDataPublicKey$fShowPrivateKey$fReadPrivateKey$fEqPrivateKey$fDataPrivateKey $fShowKeyPair $fReadKeyPair $fEqKeyPair $fDataKeyPair$fNFDataKeyPairi2ospOf_dpep getEntropy EntropyPoolcreateEntropyPoolWithcreateEntropyPoolgetEntropyFromMonadPseudoRandomDRGrandomBytesGenerate MonadRandomgetRandomByteswithDRG$fMonadRandomMonadPseudoRandom$fMonadMonadPseudoRandom$fApplicativeMonadPseudoRandom$fFunctorMonadPseudoRandom$fMonadRandomIO GenTopPolicy SetHighest SetTwoHighestgenerateParams generateMaxgenerateBetween$fShowGenTopPolicy$fEqGenTopPolicy SystemDRG getSystemDRGDigestContext HashAlgorithm 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 Blake2bp_512 Blake2b_512hashhashlazyhashInit hashUpdate hashUpdates hashFinalize hashInitWithhashWithdigestFromByteStringHMAC hmacGetDigesthmac initializeupdateupdatesfinalize$fEqHMAC$fByteArrayAccessHMACPRKextract extractSkipexpand$fEqPRK Parameters iterCounts outputLengthPRFprfHMACgeneratenrpprivate_params private_x public_paramspublic_y Signaturesign_rsign_sParamsparams_pparams_gparams_q PublicNumbergeneratePrivatecalculatePublicsignWithsignverify$fNFDataSignature$fNFDataParams $fShowParams $fReadParams $fEqParams $fDataParams$fShowSignature$fReadSignature $fEqSignature$fDataSignatureMaskGenAlgorithmmgf1CryptoFailable CryptoPassed CryptoFailed CryptoErrorCryptoError_KeySizeInvalidCryptoError_IvSizeInvalid CryptoError_AEADModeNotSupported CryptoError_SecretKeySizeInvalid%CryptoError_SecretKeyStructureInvalid CryptoError_PublicKeySizeInvalid#CryptoError_SharedSecretSizeInvalidCryptoError_MacKeyInvalid(CryptoError_AuthenticationTagSizeInvalidthrowCryptoErrorIOthrowCryptoErroronCryptoFailureeitherCryptoErrormaybeCryptoErrorAuthCtxStateauthTagauth$fEqAuth$fByteArrayAccessState$fByteArrayAccessAuth $fNFDataAuthDhSecret SecretKey publicKey secretKeydhSecretdhtoPublic$fShowSecretKey $fEqSecretKey$fByteArrayAccessSecretKey$fNFDataSecretKey$fByteArrayAccessPublicKey$fShowDhSecret $fEqDhSecret$fByteArrayAccessDhSecret$fNFDataDhSecret signature$fByteArrayAccessSignatureFormatPKCS5PKCS7ZEROpadunpad $fShowFormat $fEqFormatsplitmergeCipher cipherInit cipherName cipherKeySizeAEADModeAEAD_OCBAEAD_CCMAEAD_EAXAEAD_CWCAEAD_GCMAuthTag unAuthTagDataUnitOffsetKeySizeSpecifier KeySizeRange KeySizeEnum KeySizeFixed StreamCipher streamCombineAEAD aeadModeImpl aeadState AEADModeImplaeadImplAppendHeaderaeadImplEncryptaeadImplDecryptaeadImplFinalizeaeadAppendHeader aeadEncrypt aeadDecrypt aeadFinalizeaeadSimpleEncryptaeadSimpleDecryptBlockCipher128 xtsEncrypt xtsDecrypt BlockCipher blockSize ecbEncrypt ecbDecrypt cbcEncrypt cbcDecrypt cfbEncrypt cfbDecrypt ctrCombineaeadInitIVmakeIVnullIVivAddMiyaguchiPreneelcompute'compute$fEqMiyaguchiPreneel!$fByteArrayAccessMiyaguchiPreneelCMACcmacsubKeys$fEqCMAC$fByteArrayAccessCMACcombine $fNFDataStateDES_EDE2DES_EEE2DES_EDE3DES_EEE3$fBlockCipherDES_EDE2$fBlockCipherDES_EEE2$fBlockCipherDES_EDE3$fBlockCipherDES_EEE3$fCipherDES_EEE2$fCipherDES_EDE2$fCipherDES_EDE3$fCipherDES_EEE3 $fEqDES_EEE3 $fEqDES_EDE3 $fEqDES_EEE2 $fEqDES_EDE2DES$fBlockCipherDES $fCipherDES$fEqDES StateSimpleinitializeSimplegenerateSimple$fNFDataStateSimpleNoncenonce12nonce8incrementNonce appendAAD finalizeAADencryptdecrypt$fByteArrayAccessNonce ChaChaDRGSeedseedNew seedToIntegerseedFromIntegerdrgNew drgNewSeed drgNewTestwithRandomBytes$fByteArrayAccessSeedScalar pointBasetoPointpointAddpointMulpointsMulVarTime pointIsValidpointToIntegerspointFromIntegers pointToBinarypointFromBinaryscalarGenerate scalarZero scalarIsZero scalarAdd scalarSub scalarInv scalarCmpscalarFromBinaryscalarToBinaryscalarFromIntegerscalarToInteger $fEqScalar$fByteArrayAccessScalar pointDouble pointBaseMulisPointAtInfinity isPointValid public_curvepublic_q private_curve generateQisProbablyPrime generatePrimegenerateSafePrimefindPrimeFromWith findPrimeFromprimalityTestMillerRabinprimalityTestFermatprimalityTestNaive isCoprime SharedKey params_bitsgeneratePublic getShared$fShowPublicNumber$fReadPublicNumber$fEqPublicNumber$fEnumPublicNumber$fRealPublicNumber$fNumPublicNumber$fOrdPublicNumber$fShowPrivateNumber$fReadPrivateNumber$fEqPrivateNumber$fEnumPrivateNumber$fRealPrivateNumber$fNumPrivateNumber$fOrdPrivateNumber$fShowSharedKey $fEqSharedKey$fByteArrayAccessSharedKey generateWithgenerateBlinder OAEPParamsoaepHashoaepMaskGenAlg oaepLabeldefaultOAEPParamsencryptWithSeed decryptSaferHashAlgorithmASN1 padSignature signSafer$fHashAlgorithmASN1RIPEMD160$fHashAlgorithmASN1SHA512t_256$fHashAlgorithmASN1SHA512t_224$fHashAlgorithmASN1SHA512$fHashAlgorithmASN1SHA384$fHashAlgorithmASN1SHA256$fHashAlgorithmASN1SHA224$fHashAlgorithmASN1SHA1$fHashAlgorithmASN1MD5$fHashAlgorithmASN1MD2 PSSParamspssHash pssMaskGenAlg pssSaltLengthpssTrailerFielddefaultPSSParamsdefaultPSSParamsSHA1 signWithSalt Camellia128$fBlockCipherCamellia128$fCipherCamellia128 hashPasswordbcryptvalidatePasswordvalidatePasswordEither Blowfish448 Blowfish256 Blowfish128 Blowfish64Blowfish$fBlockCipherBlowfish448$fCipherBlowfish448$fBlockCipherBlowfish256$fCipherBlowfish256$fBlockCipherBlowfish128$fCipherBlowfish128$fBlockCipherBlowfish64$fCipherBlowfish64$fBlockCipherBlowfish$fCipherBlowfish$fNFDataBlowfish$fNFDataBlowfish64$fNFDataBlowfish128$fNFDataBlowfish256$fNFDataBlowfish448AES256AES192AES128$fBlockCipher128AES256$fBlockCipherAES256$fBlockCipher128AES192$fBlockCipherAES192$fBlockCipher128AES128$fBlockCipherAES128$fCipherAES256$fCipherAES192$fCipherAES128$fNFDataAES128$fNFDataAES192$fNFDataAES256 EntropySource entropyOpen entropyGather entropyClose DevURandom DevRandom DeviceNameHtestOpenopenDevwithDevcloseDevgatherDevEntropygatherDevEntropyNonBlock$fEntropySourceDevURandom$fEntropySourceDevRandomRDRandc_get_rand_bytesc_cpu_has_rdrand rdrandGrabrdrandGetBytes$fEntropySourceRDRand openBackendand'&&! GmpSupportedonGmpUnsupportedgmpGcdegmpLog2gmpPowModSecIntegergmpPowModInteger gmpInverse gmpNextPrimegmpTestPrimeMillerRabingmpSizeInBytes gmpSizeInBitsgmpExportIntegergmpImportIntegerGmpUnsupportedCoprimesAssertionErrorexponentiationfillPtrw64to32baseGHC.WordWord64Word32w32to64!memory-0.13-9YH63fsEcp4AuUH5L0KHpData.Memory.ExtendedWordsWord128deepseq-1.4.2.0Control.DeepSeqNFDatarnfGHC.Base<$ Applicativepure<*>*><*ghc-prim GHC.TypesWordWord8Word16Data.TraversableforMControl.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipList Control.ArrowfirstsecondData.Functor.ConstConstgetConst Data.FoldableforM_ byteSwap64 byteSwap32 byteSwap16 Data.Functorvoid<$>liftA3liftA2liftA<**> Alternativeempty<|>somemany Data.BitsxorgcdF2mNothingbe32Primle32Primbyteswap32Prim convert4To32 booleanPrim unsafeDoIOpopCountMutableArray32Array64Array32Array8array8array32array64mutableArray32mutableArray32FromAddrBEmutableArray32Freeze arrayRead8 arrayRead32 arrayRead64mutableArrayRead32mutableArrayWrite32mutableArrayWriteXor32Data.ByteArray.BytesBytesData.ByteArray.EncodingconvertFromBase convertToBaseBaseBase16Base32Base64Base64URLUnpadded Base64OpenBSDData.ByteArray.Mapping mapAsWord64 mapAsWord128 fromW64BEtoW64LEtoW64BEData.ByteArray.MemViewMemViewData.ByteArray.ViewdropViewtakeViewviewViewData.ByteArray.MethodsconvertallanyconstEqeqzero replicate copyAndFreezecopyRetcopyappendconcatspandroptakesplitAtindexsnoccons singletonunconsunpackpacknull unsafeCreateallocAndFreezecreateallocData.ByteArray.ScrubbedBytes ScrubbedBytesData.ByteArray.TypesByteArrayAccesslength withByteArray ByteArrayallocRetmultiplicationdpSlowdpFastdpFastNoBlinder getEntropyPtrdefaultPoolSizerunPseudoRandomTruesystemChunkSize$fDRGSystemDRG $fShowDigestc_whirlpool_finalizec_whirlpool_updatec_whirlpool_init$fHashAlgorithmWhirlpoolc_tiger_finalizec_tiger_update c_tiger_init$fHashAlgorithmTigerc_skein512_finalizec_skein512_updatec_skein512_init$fHashAlgorithmSkein512_512$fHashAlgorithmSkein512_384$fHashAlgorithmSkein512_256$fHashAlgorithmSkein512_224c_skein256_finalizec_skein256_updatec_skein256_init$fHashAlgorithmSkein256_256$fHashAlgorithmSkein256_224c_sha512t_finalizec_sha512t_updatec_sha512t_init$fHashAlgorithmSHA512t_256$fHashAlgorithmSHA512t_224c_sha512_finalizec_sha512_update c_sha512_init$fHashAlgorithmSHA512c_sha384_finalizec_sha384_update c_sha384_init$fHashAlgorithmSHA384c_sha3_finalize c_sha3_update c_sha3_init$fHashAlgorithmSHA3_512$fHashAlgorithmSHA3_384$fHashAlgorithmSHA3_256$fHashAlgorithmSHA3_224c_sha256_finalizec_sha256_update c_sha256_init$fHashAlgorithmSHA256c_sha224_finalizec_sha224_update c_sha224_init$fHashAlgorithmSHA224c_sha1_finalize c_sha1_update c_sha1_init$fHashAlgorithmSHA1c_ripemd160_finalizec_ripemd160_updatec_ripemd160_init$fHashAlgorithmRIPEMD160c_md5_finalize c_md5_update c_md5_init$fHashAlgorithmMD5c_md4_finalize c_md4_update c_md4_init$fHashAlgorithmMD4c_md2_finalize c_md2_update c_md2_init$fHashAlgorithmMD2c_keccak_finalizec_keccak_update c_keccak_init$fHashAlgorithmKeccak_512$fHashAlgorithmKeccak_384$fHashAlgorithmKeccak_256$fHashAlgorithmKeccak_224c_blake2sp_finalizec_blake2sp_updatec_blake2sp_init$fHashAlgorithmBlake2sp_256$fHashAlgorithmBlake2sp_224c_blake2s_finalizec_blake2s_updatec_blake2s_init$fHashAlgorithmBlake2s_256$fHashAlgorithmBlake2s_224$fHashAlgorithmBlake2bp_512c_blake2b_finalizec_blake2b_updatec_blake2b_init$fHashAlgorithmBlake2b_512 PRK_NoExpandccryptonite_scrypt_smix Data.Eithereither$fMonadCryptoFailable$fApplicativeCryptoFailable$fFunctorCryptoFailable$fEqCryptoFailable$fShowCryptoFailable$fExceptionCryptoErrorc_poly1305_finalizec_poly1305_updatec_poly1305_initccryptonite_curve25519ccryptonite_ed25519_signccryptonite_ed25519_sign_openccryptonite_ed25519_publickey publicKeySize secretKeySize signatureSizeccryptonite_ed448 x448_bytesxorMemdiffusechunkxtsGFMul $fEqAuthTagXTScbcEncryptGenericcbcDecryptGenericcfbEncryptGenericcfbDecryptGenericctrCombineGenericxtsEncryptGenericxtsDecryptGeneric xtsGeneric$fEqIV$fByteArrayAccessIVstepMPbxor IPolynomialQ cmacChunkssubKeyshiftL1shiftL1W cipherIPT iPolynomial expandIPT expandIPT'ccryptonite_salsa_generateccryptonite_salsa_combineccryptonite_salsa_init c_rc4_init c_rc4_combineBlockBits64Bits56Bits48Bits32Bits6Bits4KeyRotationunBlockdesXor desRotatebitifyunbitifyinitial_permutationkey_transformationdes_encdes_decdo_desdes_workdo_roundget_keycompression_permutationexpansion_permutations_boxs_box_1s_box_2s_box_3s_box_4s_box_5s_box_6s_box_7s_box_8p_box final_permtakeDropinit3DESinit2DESinitDESccryptonite_chacha_randomccryptonite_chacha_generateccryptonite_chacha_combineccryptonite_chacha_initccryptonite_chacha_init_coreNonce8Nonce12pad16incrementNonce' initialize'initializeWords$fDRGChaChaDRG seedLengthP256XP256Y P256Scalar P256Digitccryptonite_p256_from_binccryptonite_p256_to_binccryptonite_p256_is_valid_point#ccryptonite_p256_points_mul_vartimeccryptonite_p256e_point_addccryptonite_p256_basepoint_mulccryptonite_p256_modinv_vartimeccryptonite_p256_modmulccryptonite_p256_modccryptonite_p256_cmpccryptonite_p256_subccryptonite_p256_add_dccryptonite_p256_addccryptonite_p256_clearccryptonite_p256_is_zeroccryptonite_p256_initccryptonite_SECP256r1_bccryptonite_SECP256r1_pccryptonite_SECP256r1_n scalarSize pointSizescalarNeedReducing withNewPoint withPointpxToPywithNewScalarFreezewithTempScalar withScalarwithScalarZero allocTempallocTempScrubbed pointNegatedivmodtHash probabilistic firstPrimesdivides EphemeralKeygenerateEphemeral encryptWithhashDigestASN1 makeSignatureaddDigestPrefixnormalizeToKeySizeCamellia initCamelliakkwkeModeDecryptEncrypt w64tow128w64tow8w8tow64sboxsbox1sbox2sbox3sbox4sigma1sigma2sigma3sigma4sigma5sigma6rotl128 setKeyInterimfeistelflflinvgetKeyKgetKeyKegetKeyKw doBlockRounddoBlock encryptBlock decryptBlockcreateKeySchedule initBlowfish eksBlowfishmakeKeyScheduleBFdecryptContextcipher coreCrypto expandKey$fNFDataContext BCryptHashBCHrawHashparseBCryptHashAESOCBAESGCMAESgcmModeocbModeinitAES encryptECB encryptCBCgenCTR genCounter encryptCTR encryptXTS decryptECB decryptCBC decryptCTR decryptXTSgcmInit gcmAppendAADgcmAppendEncryptgcmAppendDecrypt gcmFinishocbInit ocbAppendAADocbAppendEncryptocbAppendDecrypt ocbFinishc_aes_ocb_finishc_aes_ocb_decryptc_aes_ocb_encrypt c_aes_ocb_aadc_aes_ocb_initc_aes_gcm_finishc_aes_gcm_decryptc_aes_gcm_encrypt c_aes_gcm_aadc_aes_gcm_initc_aes_encrypt_ctrc_aes_gen_ctr_cont c_aes_gen_ctrc_aes_decrypt_xtsc_aes_encrypt_xtsc_aes_decrypt_cbcc_aes_encrypt_cbcc_aes_decrypt_ecbc_aes_encrypt_ecb c_aes_initsizeGCMsizeOCBkeyToPtrivToPtr ivCopyPtr withKeyAndIV withKey2AndIVwithGCMKeyAndCopySt withNewGCMStwithOCBKeyAndCopyStdoECBdoCBCdoXTS$fBlockCipher128AES$fBlockCipherAES $fCipherAES