9      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=> ? @ 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({(|(}(~)))))))))))))))))))))*********************+++++++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------...... . . . . ................... .!.".#.$.%.&/'/(0)0*1+1,1-1.1/101112132425262728292:2;2<2=2>2?2@2A2B2C2D2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2S2T2U2V2W2X3Y3Z3[4\4]4^5_5`5a5b5c5d5e5f5g5h6i6j6k6l6m6n6o6p6q6r6s6t6u6v6w6x6y6z6{6|7}7~77777777778889999::::::::::::::::::::;;;;;;;;;;;;;;;t< BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeRA handle to an entropy maker, either a system capability or a hardware generator.%try to open an handle for this sourcebtry to gather a number of entropy bytes into a buffer. return the number of actual bytes gatheredClose an open handle= BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeTEntropy device devurandom on unix system Entropy device devrandom on unix system  > BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe3fake handle to Intel RDRand entropy cpu instruction? BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodSafeATAny Entropy BackendAll supported backends Open a backend handle%Gather randomness from an open handleAn 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> experimentalGoodSafeThis is a strict version of andThis is a strict version of &&.A BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneB GMP Supported / UnsupportedDSimple combinator in case the operation is not supported through GMP-Compute the GCDE of a two integer through GMP6Compute the binary logarithm of an integer through GMPXCompute the power modulus using extra security to remain constant time wise through GMP%Compute the power modulus through GMP'Inverse modulus of a number through GMP4Get the next prime from a specific value through GMP,Test if a number is prime using Miller Rabin&Return the size in bytes of an integer%Return the size in bits of an integerExport an integer to a memoryImport an integer from a memory  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> experimentalGoodNone0@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.Wexponentiation 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. baseexponantmoduloresult baseexponantmoduloresult      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 integerB BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeSplit a  into the highest and lowest Reconstruct a  from two C BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeA type witness for a as phantom typeDSafe *,DQRE BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeF BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe,      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{|}~G 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.H 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.  I BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneB!Array of mutable Word32"Array of Word64#Array of Word32$Array 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 Word64(GCreate a Mutable Array of Word32 of specific size from a list of Word32)4Create a Mutable Array of BE Word32 aliasing an Addr*Afreeze a Mutable Array of Word32 into a immutable Array of Word32+Read a Word8 from an Array,Read a Word32 from an Array-Read a Word64 from an Array.,Read a Word32 from a Mutable Array of Word32/-Write a Word32 from a Mutable Array of Word320dWrite into the Mutable Array of Word32 by combining through xor the current value and the new value. x[i] = x[i] xor value!1"2#3$4%&'()*+,-./0!"#$%&'()*+,-./0!1"2#3$4%&'()*+,-./0J BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNone856789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl 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 primitivemKmultiply 2 integers in Zm only performing the modulo operation if necessarynopmnopm  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.q-Put a chunk of the entropy pool into a buffer.Grab a chunk of entropy from the entropy pool.rsqrsq  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  tu tu  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 v`, 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 oddrangeK 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 DRGwxyzwxyzL 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 {|} {|{|}M BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0&Whirlpool cryptographic hash algorithm~~N BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0"Tiger cryptographic hash algorithmO BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone00Skein512 (512 bits) cryptographic hash algorithm0Skein512 (384 bits) cryptographic hash algorithm0Skein512 (256 bits) cryptographic hash algorithm0Skein512 (224 bits) cryptographic hash algorithm P BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone00Skein256 (256 bits) cryptographic hash algorithm0Skein256 (224 bits) cryptographic hash algorithm Q BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone *,0DQRTSHAKE256 (256 bits) extendable output function. Supports an arbitrary digest size (multiple of 8 bits), to be specified as a type parameter of kind .Note: outputs from  n and  mb for the same input are correlated (one being a prefix of the other). Results are unrelated to  results.SHAKE128 (128 bits) extendable output function. Supports an arbitrary digest size (multiple of 8 bits), to be specified as a type parameter of kind .Note: outputs from  n and  mb for the same input are correlated (one being a prefix of the other). Results are unrelated to  results.  R BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0/SHA512t (256 bits) cryptographic hash algorithm/SHA512t (224 bits) cryptographic hash algorithm S BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0#SHA512 cryptographic hash algorithmT BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0#SHA384 cryptographic hash algorithmU BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0,SHA3 (512 bits) cryptographic hash algorithm,SHA3 (384 bits) cryptographic hash algorithm,SHA3 (256 bits) cryptographic hash algorithm,SHA3 (224 bits) cryptographic hash algorithm V BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0#SHA256 cryptographic hash algorithmW BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0#SHA224 cryptographic hash algorithmX BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0!SHA1 cryptographic hash algorithmY BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0&RIPEMD160 cryptographic hash algorithmZ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0 MD5 cryptographic hash algorithm[ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0 MD4 cryptographic hash algorithm\ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0 MD2 cryptographic hash algorithm] BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0.Keccak (512 bits) cryptographic hash algorithm.Keccak (384 bits) cryptographic hash algorithm.Keccak (256 bits) cryptographic hash algorithm.Keccak (224 bits) cryptographic hash algorithm  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 place 4Finalize a mutable hash context and compute a digest :Reset the mutable context to the initial state of the hash        ^ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0 0Blake2sp (256 bits) cryptographic hash algorithm0Blake2sp (224 bits) cryptographic hash algorithm       _ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0/Blake2s (256 bits) cryptographic hash algorithm/Blake2s (224 bits) cryptographic hash algorithm/Blake2s (160 bits) cryptographic hash algorithm  ` BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone00Blake2bp (512 bits) cryptographic hash algorithma BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone0/Blake2b (512 bits) cryptographic hash algorithm/Blake2b (384 bits) cryptographic hash algorithm/Blake2b (256 bits) cryptographic hash algorithm/Blake2b (224 bits) cryptographic hash algorithm /Blake2b (160 bits) cryptographic hash algorithm !  !  ! BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneQ   !Q   ! 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 algorithm%Hrun 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 algorithm)Run the "8 function but takes an explicit hash algorithm parameter*ATry 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. "#$%&'()*^   !"#$%&'()* *()$&%'"# "#$%&'()* BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneI+;Represent an ongoing HMAC state, that can be appended with 2 and finalize to an HMAC with  hmacFinalize-ORepresent an HMAC that is a phantom type with the hash used to produce the mac.!The Eq instance is constant time.01compute a MAC using the supplied hashing function1)Initialize a new incremental HMAC context2#Incrementally update a HMAC context39Increamentally update a HMAC context with multiple inputs4,Finalize a HMAC context and return the HMAC. +,-./0 Secret keyMessage to MAC1 Secret key2Current HMAC contextMessage to append to the MACUpdated HMAC context3Current HMAC contextMessages to append to the MACUpdated HMAC context45 +,-./01234 0-./+,1234+,-./012345 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone7Pseudo Random Key8RExtract a Pseudo Random Key using the parameter and the underlaying hash mechanism92Create 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 parameters78SaltInput Keying MaterialPseudo random key9:Pseudo Random Key5Optional context and application specific informationOutput length in bytes Output data;789:789:789:; BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone=Parameters for PBKDF2?Nthe number of user-defined iterations for the algorithms. e.g. WPA2 uses 4000.@-the number of bytes to generate out of PBKDF2AThe PRF used for PBKDF2B>PRF for PBKDF2 using HMAC with the hash algorithm as parameterC;generate the pbkdf2 key derivation function from the output =>?@Athe password parameters the contentprf(password,content)BCDEF =>@?ABCDEF AB=>?@CDEF =>?@ABCDEF BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneGParameters for ScryptILCpu/Memory cost ratio. must be a power of 2 greater than 1. also known as N.JMust satisfy r * p < 2^30KMust satisfy r * p < 2^30L-the number of bytes to generate out of ScryptM'Generate the scrypt key derivation dataGHIJKLMGHJIKLMGHIJKLMGHIJKLMNoneTU"An integral time value in seconds.VqThe strength of the calculated HOTP value, namely the number of digits (between 4 and 9) in the extracted value.]9A one-time password which is a sequence of 4 to 9 digits._fAttempt to resynchronize the server's counter value with the client, given a sequence of HOTP values.`The default TOTP configuration.a7Create a TOTP configuration with customized parameters.b*Calculate a totp value for the given time.cjCheck a supplied TOTP value is valid for the given time, within the window defined by the skew parameter.NOPQRSTUVWXYZ[\]^ENumber of digits in the HOTP value extracted from the calculated HMAC+Shared secret between the client and server8Counter value synchronized between the client and serverThe HOTP value_The look-ahead window parameter. Up to this many values will be calculated and checked against the value(s) submitted by the clientThe shared secret The current server counter valuedThe first OTP submitted by the client and a list of additional sequential OTPs (which may be empty)The new counter value, synchronized with the client's current counter or Nothing if the submitted OTP values didn't match anywhere within the window`aThe T0 parameter in seconds. This is the Unix time from which to start counting steps (default 0). Must be before the current time.FThe time step parameter X in seconds (default 30, maximum allowed 300)0Number of required digits in the OTP (default 6)The number of time steps to check either side of the current value to allow for clock skew between client and server and or delay in submitting the value. The default is two time steps.bThe shared secretbThe time for which the OTP should be calculated. This is usually the current time as returned by "Data.Time.Clock.POSIX.getPOSIXTimecNOPQRSTUVWXYZ[\]^_`abc]VWXYZ[\U^_bcTNOPQRS`a NOPQRSTUVWXYZ[\]^_`abc BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone0hRepresent a DSA key pairjRepresent a DSA private key.VOnly x need to be secret. the DSA parameters are publicly shared with the other side.lDSA parametersm DSA private XnRepresent a DSA public key.pDSA parametersq DSA public Yr)Represent a DSA signature namely R and S.tDSA ruDSA sv,Represent DSA parameters namely P, G, and Q.xDSA pyDSA gzDSA q{7DSA Private Number, usually embedded in DSA Private Key|5DSA Public Number, usually embedded in DSA Public Key}Public key of a DSA Key pair~Private key of a DSA Key pairagenerate a private number with no specific property this number is usually called X in DSA text.CCalculate the public number from the parameters and the private key<sign message using the private key and an explicit k number.#sign message using the private key.)verify a bytestring using the public key.!hijklmnopqrstuvwxyz{|}~k random number private key hash functionmessage to signhijklmnopqrstuvwxyz{|}~vwxyzrstunopqjklm|{hi}~hijklmnopqrstuvwxyz{|}~ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone%Represent a mask generation algorithmMask generation algorithm MGF1seedlength to generateb BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodSafe0BA simple Either like type to represent a computation that can fail2 possibles values are:H : The computation succeeded, and contains the result of the computationJ : The computation failed, and contains the cryptographic error associatedDEnumeration of all possible errors that can be found in this library^Throw an CryptoError as exception on CryptoFailed result, otherwise return the computed valueSame as $ but throw the error asynchronously.Simple ( like combinator for CryptoFailable type'Transform a CryptoFailable to an Either%Transform a CryptoFailable to a Maybe   BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentSafe BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone RParameters that can be adjusted to change the runtime performance of the hashing.Which variant of Argon2 to use.Which version of Argon2 to use.DThe memory cost, which defines the memory usage, given in kibibytes.max cd (8 * hashParallelism) <=  hashMemory <= ceThe time cost, which defines the amount of computation realized and therefore the execution time, given in number of iterations.cf <= hashIterations <= cgWhich version of Argon2 to usexWhich variant of Argon2 to use. You should choose the variant that is most applicable to your intention to hash inputs.Argon2i 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.Argon2d is faster and uses data-depending memory access, which makes it suitable for cryptocurrencies and applications with no threats from side-channel timing attacks.Argon2id 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 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 creation    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            h BSD-style#Vincent Hanquez <vincent@snarc.org> Experimental ExcellentNone0 Define a point on a curve.Point at InfinityECC Private NumberPDefine common parameters in a curve definition of the form: y^2 = x^3 + ax + b.curve parameter acurve parameter b base point order of Gcofactor!get the size of the curve in bits"get the size of the curve in bytes*Define names for known recommended curves. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Z !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 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.%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 data Hash function to use as diffuser"buffer to diffuse, modify in placelength of buffer to diffusei BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone=Chunk some input byte array into @sz byte list of byte array.j BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone)Compute the gfmul with the XTS polynomialblock size need to be 128 bits."FIXME: add support for big endian.k BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneAIT  Symmetric cipher class. &Initialize a cipher context from a key  Cipher name Yreturn the size of the key required for this cipher. Some cipher accept any size for key  AEAD Mode%Authentication Tag for AE cipher mode7Offset inside an XTS data unit, measured in block size.)Different specifier for key size in bytesin the range [min,max]one of the specified valuesa specific size               l BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneSymmetric stream cipher classCombine using the stream cipherm BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNoneAOT8Authenticated Encryption with Associated Data algorithms!AEAD Implementation'1Append 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 tag+Simple AEAD encryption,Simple AEAD decryption !"#$%&'()*+A new AEAD Context#Optional Authentication data headerOptional Plaintext Tag length!Authentication tag and ciphertext,A new AEAD Context#Optional Authentication data header CiphertextThe authentication tag Plaintext !"#$%&'()*+, !"#$%&'()*+,n BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone$<=AOT-0class of block cipher with a 128 bits block size.encrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block only/decrypt using the XTS mode.ainput need to be a multiple of the blocksize, and the cipher need to process 128 bits block only0Symmetric block cipher class17Return the size of block required for this block cipher2Encrypt blocks6the input string need to be multiple of the block size3Decrypt blocks6the input string need to be multiple of the block size4encrypt using the CBC mode.,input need to be a multiple of the blocksize5decrypt using the CBC mode.,input need to be a multiple of the blocksize6encrypt using the CFB mode.,input need to be a multiple of the blocksize7decrypt using the CFB mode.,input need to be a multiple of the blocksize8combine 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 size9Initialize a new AEAD State:When Nothing is returns, it means the mode is not handled. XTS callback: an IV parametrized by the cipher;)Create an IV for a specified block cipher<:Create an IV that is effectively representing the number 0=Increment an IV by a number.&Assume the IV is in Big Endian format.-./01234567892Usually represent the Data Unit (e.g. disk sector)+Offset in the data unit in number of blocksDataProcessed Data:;<=! !"#$%&'()*-./0123456789:;<=-./0 123456789:;<= BSD-style#Vincent Hanquez <vincent@snarc.org>Stable ExcellentNone05      !"#$%&'()*+,-./0123456789:;<=5    0123456789-./ !"#$%& '()*+,:;<=  BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneI?KCompute 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 tagA>?@@?>>?@A! BSD-style"Kei Hibino <ex8k.hibino@gmail.com> experimentalunknownNoneICAuthentication codeD'compute a MAC using the supplied cipherEmake sub-keys used in CMACCDkey to compute CMAC with input message output tagEkey to compute CMAC withsub-keys to compute CMAC width in byte(irreducible binary polynomial definitionresult bit patternFCDEDCECDEFoNone" BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneIH Salsa contextJ\Initialize a new Salsa context with the number of rounds, the key and the nonce associated.KpCombine the salsa output and an arbitrary message with a xor, and return the combined output and the new state.L9Generate a number of bytes from the Salsa output directlyHIJnumber of rounds (8,12,20)the key (128 or 256 bits)the nonce (64 or 96 bits)the initial Salsa stateKthe current Salsa state$the source to xor with the generatorLthe current Salsa statethe length of data to generateHIJKLJKLHIHIJKL# BSD-style-Brandon Hamilton <brandon.hamilton@gmail.com>stablegoodNoneN]Initialize a new XSalsa context with the number of rounds, the key and the nonce associated.Nnumber of rounds (8,12,20)the key (256 bits)the nonce (192 bits)the initial XSalsa stateHKLNNKLHN$ BSD-style#Vincent Hanquez <vincent@snarc.org>stableGoodNoneIOThe encryption state for RC4%C Call for initializing the encryptorPRC4 context initialization.gseed the context with an initial key. the key size need to be adequate otherwise security takes a hit.QPgenerate the next len bytes of the rc4 stream without combining it to anything.R3RC4 xor combination of the rc4 stream with an inputOPointer to the permutationPointer to the clear textLength of the clear text Output buffer The rc4 keyThe key length The contextPThe key%The RC4 context with the key mixed inQR rc4 contextinputnew rc4 context, and the outputOPQRPRQOOPQRp 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???NoneUL3DES where the first and third keys are equal, used in alternative directionVI3DES where the first and third keys are equal, used in the same directionW83DES with 3 different keys used in alternative directionX93DES with 3 different keys used all in the same directionUVW X!"#YZ[\]^_`UVWXXWVUUVW X!"#YZ[\]^_`& BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNonee DES Contexte$%fgeee$%fg' BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneIi<ChaCha context for DRG purpose (see Crypto.Random.ChaChaDRG)jChaCha contextk]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.lInitialize simple ChaCha StatemqCombine the chacha output and an arbitrary message with a xor, and return the combined output and the new state.n:Generate a number of bytes from the ChaCha output directlyo similar to n but assume certains valuesi&j'()*+,knumber of rounds (8,12,20)the key (128 or 256 bits)the nonce (64 or 96 bits)the initial ChaCha statela 40 bytes long seedmthe current ChaCha state$the source to xor with the generatornthe current ChaCha statethe length of data to generateoijklmnokmnjloi i&j'()*+,klmno( BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone rValid Nonce for ChaChaPoly1305.It can be created with u or tsA ChaChaPoly1305 State.9The state is immutable, and only new state can be createdt6Nonce smart constructor 12 bytes IV, nonce constructoru8 bytes IV, nonce constructorvIncrement a noncew%Initialize a new ChaChaPoly1305 StateIThe key length need to be 256 bits, and the nonce procured using either u or txJAppend 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 yy>Finalize the Authenticated Data and return the finalized StatezNEncrypt a piece of data and returns the encrypted Data and the updated State.{NDecrypt a piece of data and returns the decrypted Data and the updated State.|.Generate an authentication tag from the State.r-.s/0tu4 bytes constant 8 bytes IVv1w2xyz{|} rstuvwxyz{| srtuvwxyz{|r-.s/0tuv1w2xyz{|}q BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneI~%ChaCha Deterministic Random Generator3]Initialize a new ChaCha context with the number of rounds, the key and the nonce associated.4Initialize a new ChaCha context from 5-tuple of words64. This interface is useful when creating a RNG out of tests generators (e.g. QuickCheck).~5340 bytes of seedthe initial ChaCha state467~34~53467 BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneI%Create a new Seed from system entropyConvert a Seed to an integerConvert an integer to a Seed$Create a new DRG from system entropyCreate a new DRG from a seedCreate a new DRG from 5 Word64._This is a convenient interface to create deterministic interface for quickcheck style testing._It can also be used in other contexts provided the input has been properly randomly generated. Generate 6len random bytes and mapped the bytes to the function f.(This is equivalent to use Control.Arrow  with  89~~ 89rNoneT :,Generate a valid scalar for a specific Curve; Elliptic Curve point negation:  pointNegate p returns point q such that pointAdd p q == PointO.<Elliptic Curve point addition.WARNING: Vulnerable to timing attacks.=Elliptic Curve point doubling.WARNING: Vulnerable to timing attacks.This perform the following calculation: > lambda = (3 * xp ^ 2 + a) / 2 yp > xr = lambda ^ 2 - 2 xp > yr = lambda (xp - xr) - ypWith binary curve: > xp == 0 => P = O > otherwise => > s = xp + (yp / xp) > xr = s ^ 2 + s + a > yr = xp ^ 2 + (s+1) * xr>2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.??Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks.@BElliptic curve double-scalar multiplication (uses Shamir's trick). qpointAddTwoMuls n1 p1 n2 p2 == pointAdd (pointMul n1 p1) (pointMul n2 p2)WARNING: Vulnerable to timing attacks.A*Check if a point is the point at infinity.B5Make 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 pointC%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) holdsD div and mod :E;<=>?@ABCD :E<=>?@ABC :E;<=>?@ABCD) BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneBIT MA Curve25519 Diffie Hellman secret related to a public key and a secret key.A Curve25519 public keyA Curve25519 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Create a DhSecret from a bytearray objectDCompute the Diffie Hellman secret from a public key and a secret key%Create a public key from a secret keyGenerate a secret key. FGHIpublicsecret basepoint   FGHI* BSD-style John Galt <jgalt@centromere.net> experimentalunknownNoneBI KA Curve448 Diffie Hellman secret related to a public key and a secret key.A Curve448 public keyA Curve448 Secret key*Try to build a public key from a bytearray*Try to build a secret key from a bytearray)Create a DhSecret from a bytearray objectDCompute the Diffie Hellman secret from a public key and a secret key%Create a public key from a secret keyGenerate a secret key.JKLMpublicsecret basepointN   JKLMNs BSD-style John Galt <jgalt@centromere.net> experimentalunknownNoneBI + BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneI A P256 point A P256 scalar%Get the base point for the P256 CurveLift to curve a scalar0Using the curve generator as base point compute:  scalar * GAdd a point to another pointMultiply a point by a scalarwarning: variable time Similar to (, serializing the x coordinate as binarymultiply the point p with &n2 and add a lifted to curve value @n1 n1 * G + n2 * pwarning: variable time Check if a  is valid!Convert a point to (x,y) Integers&Convert from (x,y) Integers to a point*Convert a point to a binary representationConvert from binary to a point(Generate a randomly generated new scalarThe scalar representing 0Check if the scalar is 0$Perform addition between two scalars a + b'Perform subtraction between two scalars a - bGive the inverse of the scalar 1 / awarning: variable timeCompare 2 Scalarconvert a scalar from binaryconvert a scalar to binary(Convert from an Integer to a P256 Scalar(Convert from a P256 Scalar to an Integer>OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst<OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst, BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneDIRT  P256 Curvealso known as P256Add points on a curve Scalar Multiplication on a curve'Generate a Diffie hellman secret value.UThis is generally just the .x coordinate of the resulting point, that is not hashed.use $ to keep the result in Point format.Point on an Elliptic Curve#Scalar in the Elliptic Curve domainGenerate a new random scalar on the curve. The scalar will represent a number between 1 and the order of the curve non includedGenerate a new random keypairGet the curve size in bits.Encode a elliptic curve point into binary form8Try to decode the binary form of an elliptic curve point^An elliptic curve key pair composed of the private part (a scalar), and the associated point.-uvwuvw-None ,Generate a valid scalar for a specific Curvex Elliptic Curve point negation: pointNegate c p returns point q such that pointAdd c p q == PointO.Elliptic Curve point addition.WARNING: Vulnerable to timing attacks.Elliptic Curve point doubling.WARNING: Vulnerable to timing attacks.This perform the following calculation: > lambda = (3 * xp ^ 2 + a) / 2 yp > xr = lambda ^ 2 - 2 xp > yr = lambda (xp - xr) - ypWith binary curve: > xp == 0 => P = O > otherwise => > s = xp + (yp / xp) > xr = s ^ 2 + s + a > yr = xp ^ 2 + (s+1) * xr2Elliptic curve point multiplication using the baseWARNING: Vulnerable to timing attacks.?Elliptic curve point multiplication (double and add algorithm).WARNING: Vulnerable to timing attacks.BElliptic curve double-scalar multiplication (uses Shamir's trick). }pointAddTwoMuls c n1 p1 n2 p2 == pointAdd c (pointMul c n1 p1) (pointMul c n2 p2)WARNING: Vulnerable to timing attacks.*Check if a point is the point at infinity.%check if a point is on specific curveThis perform three checks:x is not out of rangey is not out of range the equation y^2 = x^3 + a*x + b (mod p) holdsy div and mod xy xy.None0 ECDSA Key Pair.ECDSA 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.zTruncate and hash.     k random number private key hash functionmessage to signzKL      LK          z/None&Generate Q given d.WARNING: Vulnerable to timing attacks.')Generate a pair of (private, public) key.WARNING: Vulnerable to timing attacks.&'Elliptic Curve&'&'&'0 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone(\Generate random a new Shared secret and the associated point to do a ECIES style encryption)NDerive the shared secret with the receiver key and the R point of the scheme.(representation of the curvethe public key of the receiver)representation of the curveCThe received R (supposedly, randomly generated on the encrypt side)The secret key of the receiver()()()t BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone{This create a random number generator out of thin air with the system entropy; don't generally use as the IO is not exposed this can have unexpected random for.This is useful for probabilistic algorithm like Miller Rabin probably prime algorithm, given appropriate choice of the heuristic0Generally, it's advise not to use this function.{{{1 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone *returns if the number is probably prime. first a list of small primes are implicitely tested for divisibility, then a fermat primality test is used with arbitrary numbers and then the Miller Rabin algorithm is used with an accuracy of 30 recursions+^generate a prime number of the required bitsize (i.e. in the range [2^(b-1)+2^(b-2), 2^b)).6May throw a CryptoError_PrimeSizeInvalid if the requested size is less than 5 bits, as the smallest prime meeting these conditions is 29. This function requires that the two highest bits are set, so that when multiplied with another prime to create a key, it is guaranteed to be of the proper size.,|generate a prime number of the form 2p+1 where p is also prime. it is also knowed as a Sophie Germaine prime or safe prime.The number of safe prime is significantly smaller to the number of prime, as such it shouldn't be used if this number is supposed to be kept safe.May throw a CryptoError_PrimeSizeInvalid if the requested size is less than 6 bits, as the smallest safe prime with the two highest bits set is 59.-;find a prime from a starting point where the property hold..=find a prime from a starting point with no specific property./Miller Rabin algorithm return if the number is probably prime or composite. the tries parameter is the number of recursion, that determines the accuracy of the test.0Probabilitic 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.1eTest naively is integer is prime. while naive, we skip even number and stop iteration at i > sqrt(n)2-Test is two integer are coprime to each other|$list of the first primes till 2903.. *+,-./0%number of iterations of the algorithm starting anumber to test for primality12|} *+,-./012 +,*.-/102 *+,-./012|}2 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone0I 3'Represent Diffie Hellman shared secret.5*Represent Diffie Hellman private number X.7)Represent Diffie Hellman public number Y.9HRepresent 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.Apcalculate the public number from the parameters and the private key this number is usually called Y in DH text.DEPRECATED use calculatePublicBPgenerate a shared key using our private number and the other party public number3456789:;<=>number of bits generator?@AB3456789:;<=>?@AB9:;<=785634>?@AB 3456789:;<=>?@AB3 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneXGenerating a private number d.YGenerating a public point Q.ZUGenerating a shared key using our private number and the other party public point.XYZKLM34XYZMLK34XYZXYZu 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 sign3579~ ~4 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 e]RSA public N parameter.tuvwxyz{|}~[\]}~tuvwxyz{|[\][\]5 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone ^)Parameters for OAEP encryption/decryption`Hash function to use.aMask Gen algorithm to use.b$Optional label prepended to message.c-Default Params with a specified hash functiond4Encrypt a message using OAEP with a predefined seed.eEncrypt a message using OAEPun-pad a OAEP encoded message.-It doesn't apply the RSA decryption primitivefDecrypt 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 decryptSafergJDecrypt a ciphertext using OAEP and by automatically generating a blinder. ^_`abcdSeed!OAEP params to use for encryption Public key.Message to encrypte"OAEP params to use for encryption. Public key.Message to encryptOAEP params to usesize of the key in bytesencoded message (not encrypted)fOptional blinder!OAEP params to use for decryption Private key Cipher textg!OAEP params to use for decryption Private key Cipher text ^_`abcdefg ^_`abcdefg^_`abcdefg6 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone hA 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 ByteArrayi6This produce a standard PKCS1.5 padding for encryptionj0Produce a standard PKCS1.5 padding for signaturek4Try to remove a standard PKCS1.5 encryption padding.l&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 decryptSafermPdecrypt message using the private key and by automatically generating a blinder.n*encrypt a bytestring using the public key.6the message needs to be smaller than the key size - 11o?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 signSaferpMsign message using the private key and by automatically generating a blinder.q&verify message with the signed messagemake signature digest, used in o and qhijkloptional blinderRSA private key cipher textmRSA private key cipher textnooptional blinderhash algorithm private keymessage to signpHash algorithm private keymessage to signqoptional hashing algorithmrstuvwxyz{ hijklmnopq ijklmopnqhhijklmnopqrstuvwxyz{7 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 |}~ |}~|}~v 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 contextThe key to useThe data to encryptThe key to useThe data to decrypt8 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone&Camellia block cipher with 128 bit keyw BSD-style experimentalGoodNoneBLCreate a key schedule mutable array of the pbox followed by all the sboxes.x BSD-style experimentalGoodNonevariable keyed blowfish stateEncrypt blocks&Input need to be a multiple of 8 bytesDecrypt 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. The key scheduleFirst word of the saltSecond word of the saltThe key 9NoneCreate a bcrypt hash for a password with a provided cost value. Typically used to create a hash when a new user account is registered or when a user changes their password.{Each increment of the cost approximately doubles the time taken. The 16 bytes of random salt will be generated internally.HCreate a bcrypt hash for a password with a provided cost value and salt.OCost value under 4 will be automatically adjusted back to 10 for safety reason.ICheck a password against a stored bcrypt hash when authenticating a user.Returns False^ if the password doesn't match the hash, or if the hash is invalid or an unsupported version.&Check a password against a bcrypt hashAs for validatePasswordV but will provide error information if the hash is invalid or an unsupported version.~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly.EThe password. Should be the UTF-8 encoded bytes of the password text.#The bcrypt hash in standard format.~The cost parameter. Should be between 4 and 31 (inclusive). Values which lie outside this range will be adjusted accordingly.@The salt. Must be 16 bytes in length or an error will be raised.EThe password. Should be the UTF-8 encoded bytes of the password text.#The bcrypt hash in standard format.: 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 statey BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNone$I AESOCB State AESGCM StateAES Context (pre-processed key))Create an AES AEAD implementation for GCM)Create an AES AEAD implementation for OCB#Initialize a new context with a keyRKey needs to be of length 16, 24 or 32 bytes. Any other values will return failure(encrypt using Electronic Code Book (ECB))encrypt using Cipher Block Chaining (CBC)vgenerate a counter mode pad. this is generally xor-ed to an input to make the standard counter mode block operations.if the length requested is not a multiple of the block cipher size, more data will be returned, so that the returned bytearray is a multiple of the block cipher size.vgenerate a counter mode pad. this is generally xor-ed to an input to make the standard counter mode block operations.if the length requested is not a multiple of the block cipher size, more data will be returned, so that the returned bytearray is a multiple of the block cipher size. Similiar to - but also return the next IV for continuation encrypt using Counter mode (CTR)<in CTR mode encryption and decryption is the same operation.encrypt using XTSdthe first key is the normal block encryption key the second key is used for the initial block tweak(decrypt using Electronic Code Book (ECB))decrypt using Cipher block chaining (CBC)!decrypt using Counter mode (CTR).<in CTR mode encryption and decryption is the same operation.decrypt using XTSinitialize a gcm contextGappend data which is only going to be authenticated to the GCM context.Uneeds to happen after initialization and before appending encryption/decryption data.4append data to encrypt and append to the GCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.4append data to decrypt and append to the GCM contextthe bytearray needs to be a multiple of AES block size, unless it's the last call to this function. needs to happen after AAD appending, or after initialization if no AAD data.!Generate the Tag from GCM contextinitialize an ocb contextGappend data which is going to just be authenticated to the OCB context.Tneed to happen after initialization and before appending encryption/decryption data.4append data to encrypt and append to the OCB contextthe bytearray needs to be a multiple of the AES block size, unless it's the last call to this function. need to happen after AAD appending, or after initialization if no AAD data.4append data to decrypt and append to the OCB contextthe bytearray needs to be a multiple of the AES block size, unless it's the last call to this function. need to happen after AAD appending, or after initialization if no AAD data.!Generate the Tag from OCB contextA AES Context Initial vector of AES block size plaintext ciphertext Cipher Key.usually a 128 bit integer.length of bytes required. AES ContextIinitial vector of AES block size (usually representing a 128 bit integer)plaintext inputciphertext outputAES cipher and tweak context:a 128 bits IV, typically a sector or a block offset in XTSLnumber of rounds to skip, also seen a 16 byte offset in the sector or block.input to encryptoutput encrypted AES Context6initial vector, usually representing a 128 bit integerciphertext inputplaintext outputAES cipher and tweak context:a 128 bits IV, typically a sector or a block offset in XTSLnumber of rounds to skip, also seen a 16 byte offset in the sector or block.input to decryptoutput decrypted    >    ; BSD-style#Vincent Hanquez <vincent@snarc.org>stablegoodNoneIAES with 256 bit keyAES with 192 bit keyAES with 128 bit key   ?z?{?|}~                  ! " # $ % & ' ( ) * + , - .K/K0L1L2L3L4L5L6L7L8L9M:M:N;N;O<O<O=O=O>O>O?O?P@P@PAPAQBQBQCQCRDRDRERESFSFTGTGUHUHUIUIUJUJUKUKVLVLWMWMXNXNYOYOZPZP[Q[Q\R\R]S]S]T]T]U]U]V]VWXYZ[\]^^^^^_^__`_`_a_a_b_b`c`cadadaeaeafafagagahahijklmnopq22rrstuvwxyz{|}~     bbbbbbbbbbbbbbbbbbbbbbbbbbbiuvwx      kkkk k!k"k#k$k%k&k'k'k(k)k*k+k,k-l.l/m0m0m1m2m3m3m4m5m6m7m8m9m:m;m<m=n>n?n@nAnBnCnDnEnFnGnHnInJnKnLnMnN O P Q R S!T!U!V!W!X"""u"Y""Z#u$$u$$Y$$Z%[%\%]%^%_%`%a%b%c%d%e%f%g%h%i%j&k&l&m&n'o''u'p'Y''q'Z'r(s((t(u(v(u(w(x(y(z(x({q|}~))) ) ) ))) ))))))) ))))))*** * * *** ******* ******+++++++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------........................ . . .... . ....//00111111111222222222222*222222222222222222222222233344455555555y5z566666z66y6666666666666777 7 7 7 7 777778889999:::::::::: :!:":#:$:%:&:':(:):*;+;,;-;.;/;0;1;2;3;4;5;6;7;8;9<:<;<<<==>=?=>=?=@=A=B=C=D=E=F=G=H=I>J>J>K>L>M>N>O?P?z@Q@RASATAUAVAWAXAYAZA[A\A]A^A_ASA`abacBdefgefhBijkljklCmCmDnDoDpqrsqrteuveuweuxeuyeuzeu{|}~efefeeeeeeeeeeeeeeeeeefefefeeeueueueueueueueueueeuGGGGGHeIIIIIIIIIIIIIIIIIIIIjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj         |}K/KKKL1L2LMMM M N N N NOOOOOOOPPPPP|}QQQQQ Q!Q"Q#R$R%R&R'R(S)S*S+S,T-T.T/T0U1UUU2U3U4U5V6V7V8V9W:W;W<W=X>X?X@XAYBYCYDYEZFZGZHZI[J[K[L[M\N\O\P\Q]R]S]T]U]V]W]XW^Y^Z^[^\^]_^___`_a_b_c`Y`Z`[`daeafagahaiajakal{mnopqrsteuvbwbxbybzb{|}~ hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhijknnKnnnn n n n n nn   !!!T!!!!!!!!!"""# $!$$"p#pypzp$p%p&p'p(p)p*p+p#p,p-p.p/p0p1p2p3p4p5p6p7p8p9p:p;p<p=p>p?p@pApBpCpDpEpF%[%\%]%^%G%H&k&I'o''J'K'L'M'N(O(P((Q(R(SquqTq|qqU}VrrWrrrrrrrrrXr))) )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+{+|+}+~+,,,-W-X.t11uuuuuuuyuzuuuuu56667vvvyvzvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv8wx2xyxzxxxxxxxxx9999:::::yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy;+;,;-;&cryptonite-0.22-Bkmtpxnzy0e2o9946AJnoQCrypto.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.Scrypt Crypto.OTPCrypto.PubKey.DSACrypto.PubKey.MaskGenFunction Crypto.ErrorCrypto.KDF.Argon2Crypto.MAC.Poly1305Crypto.PubKey.Ed25519Crypto.Data.PaddingCrypto.Data.AFISCrypto.Cipher.Types%Crypto.ConstructHash.MiyaguchiPreneelCrypto.MAC.CMACCrypto.Cipher.SalsaCrypto.Cipher.XSalsaCrypto.Cipher.RC4Crypto.Cipher.TripleDESCrypto.Cipher.DESCrypto.Cipher.ChaChaCrypto.Cipher.ChaChaPoly1305Crypto.PubKey.Curve25519Crypto.PubKey.Curve448Crypto.PubKey.ECC.P256 Crypto.ECCCrypto.PubKey.ECC.PrimCrypto.PubKey.ECC.ECDSACrypto.PubKey.ECC.GenerateCrypto.PubKey.ECIESCrypto.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.ProxyCrypto.Internal.NatCrypto.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.SHAKECrypto.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.TypesFFIARGON2_MIN_MEMORYARGON2_MAX_MEMORYARGON2_MIN_TIMEARGON2_MAX_TIMECrypto.ECC.Simple.TypesCrypto.Cipher.Types.UtilsCrypto.Cipher.Types.GFCrypto.Cipher.Types.BaseCrypto.Cipher.Types.StreamCrypto.Cipher.Types.AEADCrypto.Cipher.Types.BlockCrypto.TutorialCrypto.Cipher.DES.PrimitiveCrypto.Random.ChaChaDRGCrypto.ECC.Simple.PrimCrypto.PubKey.Ed448Crypto.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_224SHAKE256SHAKE128 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_160hashhashlazyhashInit hashUpdate hashUpdates hashFinalize hashInitWithhashWithdigestFromByteStringHMAC hmacGetDigesthmac initializeupdateupdatesfinalize$fEqHMAC$fByteArrayAccessHMACPRKextract extractSkipexpand$fByteArrayAccessPRK$fEqPRK Parameters iterCounts outputLengthPRFprfHMACgeneratefastPBKDF2_SHA1fastPBKDF2_SHA256fastPBKDF2_SHA512nrp ClockSkewNoSkewOneStepTwoSteps ThreeSteps FourSteps TOTPParamsOTPTime OTPDigitsOTP4OTP5OTP6OTP7OTP8OTP9OTPhotp resynchronizedefaultTOTPParams mkTOTPParamstotp totpVerify$fShowOTPDigits$fEnumClockSkew$fShowClockSkew$fShowTOTPParamsprivate_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_EcScalarOutOfBoundsCryptoError_PointSizeInvalidCryptoError_PointFormatInvalid"CryptoError_PointFormatUnsupported#CryptoError_PointCoordinatesInvalidCryptoError_MacKeyInvalid(CryptoError_AuthenticationTagSizeInvalidCryptoError_PrimeSizeInvalidCryptoError_SaltTooSmall CryptoError_OutputLengthTooSmallCryptoError_OutputLengthTooBigthrowCryptoErrorIOthrowCryptoErroronCryptoFailureeitherCryptoErrormaybeCryptoErrorOptions iterationsmemory parallelismvariantversion Parallelism MemoryCostTimeCostVersion Version10 Version13VariantArgon2dArgon2iArgon2iddefaultOptions $fEqVariant $fOrdVariant $fReadVariant $fShowVariant $fEnumVariant$fBoundedVariant $fEqVersion $fOrdVersion $fReadVersion $fShowVersion $fEnumVersion$fBoundedVersion $fEqOptions $fOrdOptions $fReadOptions $fShowOptionsAuthCtxStateauthTagauth$fEqAuth$fByteArrayAccessState$fByteArrayAccessAuth $fNFDataAuth SecretKey publicKey secretKey signaturetoPublic $fEqSecretKey$fByteArrayAccessSecretKey$fNFDataSecretKey$fByteArrayAccessPublicKey$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$fByteArrayAccessSeedDhSecretdhSecretdhgenerateSecretKey$fShowSecretKey$fShowDhSecret $fEqDhSecret$fByteArrayAccessDhSecret$fNFDataDhSecretScalar pointBasetoPointpointAddpointMulpointDhpointsMulVarTime pointIsValidpointToIntegerspointFromIntegers pointToBinarypointFromBinaryscalarGenerate scalarZero scalarIsZero scalarAdd scalarSub scalarInv scalarCmpscalarFromBinaryscalarToBinaryscalarFromIntegerscalarToInteger $fShowScalar $fEqScalar$fByteArrayAccessScalar Curve_X448 Curve_X25519 Curve_P521R1 Curve_P384R1 Curve_P256R1EllipticCurveArith pointSmulEllipticCurveDHecdh EllipticCurvecurveGenerateScalarcurveGenerateKeyPair encodePoint decodePoint SharedSecretkeypairGetPublickeypairGetPrivate$fEllipticCurveDHCurve_X448$fEllipticCurveCurve_X448$fEllipticCurveDHCurve_X25519$fEllipticCurveCurve_X25519$fEllipticCurveDHCurve_P521R1 $fEllipticCurveArithCurve_P521R1$fEllipticCurveCurve_P521R1$fEllipticCurveDHCurve_P384R1 $fEllipticCurveArithCurve_P384R1$fEllipticCurveCurve_P384R1$fEllipticCurveDHCurve_P256R1 $fEllipticCurveArithCurve_P256R1$fEllipticCurveCurve_P256R1$fEqSharedSecret$fByteArrayAccessSharedSecret pointDouble pointBaseMulpointAddTwoMulsisPointAtInfinity isPointValid public_curvepublic_q private_curve generateQ deriveEncrypt deriveDecryptisProbablyPrime 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.14.1-2zYO5UcujuQ8oEi6uZqbHoData.Memory.ExtendedWordsWord128ProxyIsDivisibleBy8Mod8IsDiv8deepseq-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_224Nat c_sha3_outputc_sha3_finalize_shake c_sha3_update c_sha3_initshakeFinalizeOutputbyteLen$fHashAlgorithmSHAKE256$fHashAlgorithmSHAKE128c_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$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$fHashAlgorithmBlake2s_160$fHashAlgorithmBlake2bp_512c_blake2b_finalizec_blake2b_updatec_blake2b_init$fHashAlgorithmBlake2b_512$fHashAlgorithmBlake2b_384$fHashAlgorithmBlake2b_256$fHashAlgorithmBlake2b_224$fHashAlgorithmBlake2b_160 PRK_NoExpand#c_cryptonite_fastpbkdf2_hmac_sha512#c_cryptonite_fastpbkdf2_hmac_sha256!c_cryptonite_fastpbkdf2_hmac_sha1ccryptonite_scrypt_smixTP digitsPower timeToCounter Data.Eithereither$fMonadCryptoFailable$fApplicativeCryptoFailable$fFunctorCryptoFailable$fEqCryptoFailable$fExceptionCryptoErrorCVersionCVariantHashOutSaltPass argon2_hash saltMinLengthoutputMinLengthoutputMaxLength cOfVersion cOfVariant csizeOfIntc_poly1305_finalizec_poly1305_updatec_poly1305_initccryptonite_ed25519_signccryptonite_ed25519_sign_openccryptonite_ed25519_publickey publicKeySize secretKeySize signatureSizeCurveParameters curveEccA curveEccB curveEccG curveEccN curveEccHcurveSizeBytes$fCurveSEC_p112r1 CurveTypeCurvePrimeParamCurveBinaryParamcurveParameters curveTypetypeSEC_p112r1paramSEC_p112r1typeSEC_p112r2paramSEC_p112r2typeSEC_p128r1paramSEC_p128r1typeSEC_p128r2paramSEC_p128r2typeSEC_p160k1paramSEC_p160k1typeSEC_p160r1paramSEC_p160r1typeSEC_p160r2paramSEC_p160r2typeSEC_p192k1paramSEC_p192k1typeSEC_p192r1paramSEC_p192r1typeSEC_p224k1paramSEC_p224k1typeSEC_p224r1paramSEC_p224r1typeSEC_p256k1paramSEC_p256k1typeSEC_p256r1paramSEC_p256r1typeSEC_p384r1paramSEC_p384r1typeSEC_p521r1paramSEC_p521r1typeSEC_t113r1paramSEC_t113r1typeSEC_t113r2paramSEC_t113r2typeSEC_t131r1paramSEC_t131r1typeSEC_t131r2paramSEC_t131r2typeSEC_t163k1paramSEC_t163k1typeSEC_t163r1paramSEC_t163r1typeSEC_t163r2paramSEC_t163r2typeSEC_t193r1paramSEC_t193r1typeSEC_t193r2paramSEC_t193r2typeSEC_t233k1paramSEC_t233k1typeSEC_t233r1paramSEC_t233r1typeSEC_t239k1paramSEC_t239k1typeSEC_t283k1paramSEC_t283k1typeSEC_t283r1paramSEC_t283r1typeSEC_t409k1paramSEC_t409k1typeSEC_t409r1paramSEC_t409r1typeSEC_t571k1paramSEC_t571k1typeSEC_t571r1paramSEC_t571r1$fCurveSEC_t571r1$fCurveSEC_t571k1$fCurveSEC_t409r1$fCurveSEC_t409k1$fCurveSEC_t283r1$fCurveSEC_t283k1$fCurveSEC_t239k1$fCurveSEC_t233r1$fCurveSEC_t233k1$fCurveSEC_t193r2$fCurveSEC_t193r1$fCurveSEC_t163r2$fCurveSEC_t163r1$fCurveSEC_t163k1$fCurveSEC_t131r2$fCurveSEC_t131r1$fCurveSEC_t113r2$fCurveSEC_t113r1$fCurveSEC_p521r1$fCurveSEC_p384r1$fCurveSEC_p256r1$fCurveSEC_p256k1$fCurveSEC_p224r1$fCurveSEC_p224k1$fCurveSEC_p192r1$fCurveSEC_p192k1$fCurveSEC_p160r2$fCurveSEC_p160r1$fCurveSEC_p160k1$fCurveSEC_p128r2$fCurveSEC_p128r1$fCurveSEC_p112r2xorMemdiffusechunkxtsGFMul $fEqAuthTagXTScbcEncryptGenericcbcDecryptGenericcfbEncryptGenericcfbDecryptGenericctrCombineGenericxtsEncryptGenericxtsDecryptGeneric xtsGeneric$fEqIV$fByteArrayAccessIVstepMPbxor IPolynomialQ cmacChunkssubKeyshiftL1shiftL1W cipherIPT iPolynomial expandIPT expandIPT'ccryptonite_salsa_generateccryptonite_salsa_combineccryptonite_salsa_initccryptonite_xsalsa_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 seedLength pointNegatedivmodccryptonite_curve25519ccryptonite_ed448 x448_bytesP256XP256Y 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 withPointpxToPywithNewScalarFreeze withTempPointwithTempScalar withScalarwithScalarZero allocTempallocTempScrubbed encodeECPoint decodeECPointtHash 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 $fCipherAESvalidateKeySize