h$      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                  ! Safe-Inferred$None raaz-Check whether the cpu supports sse extension.raaz.Check whether the cpu supports sse2 extension.raaz.Check whether the cpu supports sse3 extension.raaz0Check whether the cpu supports sse4_1 extension.raaz1Check whether the cpu supports sse-4.2 extension.raaz-Check whether the cpu supports avx extension.raaz.Check whether the cpu supports avx2 extension. Safe-Inferred>kraazA monadic arrow field.raazA field where the underlying arrow is the (->). This is normally what we call a field. raazA field on the space is a function from the points in the space to some value. Here we define it for a general arrow. raazThe twisted functor is essentially a generalisation of semi-direct product to applicative functors. raazThe generalisation of distributivity to applicative functors. This generalisation is what allows us to capture applicative functors like parsers. For an applicative functor, and a monoid acting uniformly on it, we say that the action is distributive if the following laws are satisfied: m <<.>> (pure a) = pure a -- pure values are stoic m <<.>> (a <*> b) = (m <<.>> a) <*> (m <<.>> b) -- dist raazThe semidirect product Space E Monoid. For monoids acting on monoidal spaces distributively the semi-direct product is itself a monoid. It turns out that data serialisers can essentially seen as a semidirect product.raazA left-monoid action on a monoidal-space, i.e. the space on which the monoid acts is itself a monoid, is  distributive if it satisfies the law: 'a <.> p <> q = (a <.> p) <> (a <.> q).)The above law implies that every element m is a monoid homomorphism.raazUniform action of a monoid on a functor. The laws that should be satisfied are: 1 <<.>> fx = fx (a <> b) <<.>> fx = a . (b <<.>> fx) m <<.>> fmap f u = fmap f (m <<.>> u) -- acts uniformlyraaz A monoid m acting on the left of a space. Think of a left action as a multiplication with the monoid. It should satisfy the law: 1 <.> p = p -- identity a <> b <.> p = a <.> b <.> p -- successive displacementsraaz?An alternate symbol for <> more useful in the additive context.raazFrom the an element of semi-direct product Space E Monoid return the point.raazFrom the an element of semi-direct product Space E Monoid return the monoid element.raaz!Get the underlying functor value.raaz Get the underlying monoid value.raaz;Compute the value of a field at a given point in the space.raaz Lift a monadic action to FieldM.raaz3Runs a monadic field at a given point in the space.raaz:The action on the space translates to the action on field.    555" Safe-Inferred-/>"raazA type w0 forced to be aligned to the alignment boundary alg#raazThe underlying unAligned value.$raaz#Align the value to 16-byte boundary%raaz#Align the value to 32-byte boundary&raaz#Align the value to 64-byte boundary"#$%&#NoneP'raaz$The destination of a copy operation.&Note to Developers of Raaz: Since the ' type inherits the Storable instance of the base type, one can use this type in foreign functions.(raazThe source of a copy operation.)raazsmart constructor for source*raaz#smart constructor for destionation.'()*$ Safe-Inferred-+raazThis class captures all types that have some sort of description attached to it.,raaz%Short name that describes the object.-raazLonger description+,-%None?*.raazThe result of a comparison. This is an opaque type and the monoid instance essentially takes AND of two comparisons in a timing safe way./raazAll types that support timing safe equality are instances of this class.1raaz9Check whether two values are equal using the timing safe 00 function. Use this function when defining the % instance for a Sensitive data type.raazVector of Results.raazMVector for Results../01&None>0J"2raaz-Types to measure alignment in units of bytes.3raazType safe length unit that measures offsets in multiples of word length. This length unit can be used if one wants to make sure that all offsets are word aligned.4raaz+Type safe lengths/offsets in units of bits.6raaz,Type safe lengths/offsets in units of bytes.8raazIn cryptographic settings, we need to measure pointer offsets and buffer sizes. The smallest of length/offset that we have is bytes measured using the type 6. In various other circumstances, it would be more natural to measure these in multiples of bytes. For example, when allocating buffer to use encrypt using a block cipher it makes sense to measure the buffer size in multiples of block of the cipher. Explicit conversion between these length units, while allocating or moving pointers, involves a lot of low level scaling that is also error prone. To avoid these errors due to unit conversions, we distinguish between different length units at the type level. This type class capturing all such types, i.e. types that stand of length units. Allocation functions and pointer arithmetic are generalised to these length units.All instances of a 8" are required to be instances of  where the monoid operation gives these types the natural size/offset addition semantics: i.e. shifting a pointer by offset a  b is same as shifting it by a and then by b.9raaz"Express the length units in bytes.:raaz3The pointer type used by all cryptographic library.;raaz!Express the length units in bits.<raazExpress length unit src in terms of length unit dest rounding upwards.=raaz+Often we want to allocate a buffer of size l. We also want to make sure that the buffer starts at an alignment boundary a. However, the standard word allocation functions might return a pointer that is not aligned as desired. The atLeastAligned l a returns a length n such the length n1 is big enough to ensure that there is at least l length of valid buffer starting at the next pointer aligned at boundary a . If the alignment required in a0 then allocating @l + a - 1 should do the trick.>raazExpress length unit src in terms of length unit dest rounding downwards.?raazA length unit u/ is usually a multiple of bytes. The function ? is like  : the value byteQuotRem bytes is a tuple (x,r), where x is bytes expressed in the unit u with r being the reminder.@raazFunction similar to ? but returns only the quotient.AraazFunction similar to ? but works with bits instead.BraazFunction similar to A but returns only the quotient.Craaz.The default alignment to use is word boundary.Draaz'Compute the size of a storable element.EraazSize of the buffer to be allocated to store an element of type a so as to guarantee that there exist enough space to store the element after aligning the pointer. If the size of the element is s and its alignment is a- then this quantity is essentially equal to  s + a - 1'. All units measured in word alignment.Fraaz,Compute the alignment for a storable object.Graaz-Align a pointer to the appropriate alignment.Hraaz.Move the given pointer with a specific offset.IraazCompute the next aligned pointer starting from the given pointer location.Jraaz0Peek the element from the next aligned location.Kraaz0Poke the element from the next aligned location.LraazA less general version of M7 where the pointer passed is aligned to word boundary.MraazThe expression allocaAligned a l action% allocates a local buffer of length l and alignment a$ and passes it on to the IO action action. No explicit freeing of the memory is required as the memory is allocated locally and freed once the action finishes. It is better to use this function than , as it does type safe scaling and alignment.NraazA less general version of O6 where the pointer passed is aligned to word boundaryOraazThis function allocates a chunk of "secure" memory of a given size and runs the action. The memory (1) exists for the duration of the action (2) will not be swapped during that time and (3) will be wiped clean and deallocated when the action terminates either directly or indirectly via errors. While this is mostly secure, there can be strange situations in multi-threaded application where the memory is not wiped out. For example if you run a crypto-sensitive action inside a child thread and the main thread gets exists, then the child thread is killed (due to the demonic nature of haskell threads) immediately and might not give it chance to wipe the memory clean. This is a problem inherent to how the bracket( combinator works inside a child thread.'TODO: File this insecurity in the wiki.Praaz:Creates a memory of given size. It is better to use over  as it uses typesafe length.Qraaz A version of , which works for any type safe length units.RraazCopy between pointers.SraazMove between pointers.Traaz6Sets the given number of Bytes to the specified value.raaz,The most interesting monoidal action for us.Lraaz buffer lengthraazthe action to runMraazthe alignment of the bufferraazsize of the bufferraazthe action to runPraaz buffer lengthRraaz destinationraazsrcraazNumber of Bytes to copySraaz destinationraazsourceraazNumber of Bytes to copyTraazTargetraazValue byte to setraazNumber of bytes to set#23456789:;<=>?@ABCDEFGHIJKLMNOPQRST'None 3>@Uraaz$Big endian version of the word type wVraaz'Little endian version of the word type wWraazThis class captures types which provides an endian agnostic way of loading from and storing to data buffers. Any multi-byte type that is meant to be serialised to the outside world should be an instance of this class. When defining the Y, X, Z member functions, care should be taken to ensure proper endian conversion.Xraaz The action  store ptr w stores w at the location pointed by ptr. Endianness of the type w is taken care of when storing. For example, irrespective of the endianness of the machine, #store ptr (0x01020304 :: BE Word32) will store the bytes 0x01, 0x02, 0x03, 0x04 respectively at locations ptr, ptr +1, ptr+2 and ptr+3. On the other hand $store ptr (0x01020304 :: LE Word32) would store 0x04, 0x03, 0x02, 0x01 at the above locations.Yraaz The action load ptr loads the value stored at the ptr. Like store, it takes care of the endianness of the data type. For example, if ptr) points to a buffer containing the bytes 0x01, 0x02, 0x03, 0x042, irrespective of the endianness of the machine, load ptr :: IO (BE Word32) will load the vale  0x01020304 of type  BE Word32 and load ptr :: IO (LE Word32) will load  0x04030201 of type  LE Word32.Zraaz The action adjustEndian ptr n7 adjusts the encoding of bytes stored at the location ptr to conform with the endianness of the underlying data type. For example, assume that ptr* points to a buffer containing the bytes 0x01 0x02 0x03 0x04,, and we are on a big endian machine, then (adjustEndian (ptr :: Ptr (LE Word32)) 1 will result in ptr pointing to the sequence 0x04 0x03 0x02 0x01. On the other hand if we were on a little endian machine, the sequence should remain the same. In particular, the following equalities should hold. 9 store ptr w = poke ptr w >> adjustEndian ptr 1 Similarly the value loaded by load ptr* should be same as the value returned by adjustEndian ptr 1 >> peak ptr>, although the former does not change the contents stored at ptr where as the latter might does modify the contents pointed by ptr= if the endianness of the machine and the time do not agree. The action )adjustEndian ptr n >> adjustEndian ptr n  should be equivalent to  return ().[raazStore the given value at an offset from the crypto pointer. The offset is given in type safe units.\raazStore the given value as the n8-th element of the array pointed by the crypto pointer.]raaz Load the n4-th value of an array pointed by the crypto pointer.^raazLoad from a given offset. The offset is given in type safe units._raaz For the type w , the action copyFromBytes dest src n copies n-elements from src to dest. Copy performed by this combinator accounts for the endianness of the data in dest and is therefore not a mere copy of  n * sizeOf(w)( bytes. This action does not modify the src pointer in any way.`raaz Similar to  copyFromBytes but the transfer is done in the other direction. The copy takes care of performing the appropriate endian encoding.araaz%Convert to the little endian variant.braaz#Convert to the big endian variants.Xraaz the location.raazvalue to storeZraazbuffer pointers,raazhow many w's are present,[raaz the pointerraaz.the absolute offset in type safe length units.raazvalue to store\raaz.the pointer to the first element of the arrayraazthe index of the arrayraazthe value to store]raaz.the pointer to the first element of the arrayraazthe index of the array^raaz the pointerraaz the offset_raazHow many items.UVWXYZ[\]^_`ab(None?Ecraaz A typesafe length for Bytestringdraaz A type safe version of replicateeraazCopy the bytestring to the crypto buffer. This operation leads to undefined behaviour if the crypto pointer points to an area smaller than the size of the byte string.fraaz Similar to e but takes an additional input n which is the number of bytes (expressed in type safe length units) to transfer. This operation leads to undefined behaviour if either the bytestring is shorter than n7 or the crypto pointer points to an area smaller than n.graaz3Works directly on the pointer associated with the . This function should only read and not modify the contents of the pointer.hraaz(Get the value from the bytestring using .iraaz The action  create l act creates a length l9 bytestring where the contents are filled using the the act to fill the buffer.jraazThe IO action createFrom n cptr" creates a bytestring by copying n bytes from the pointer cptr.eraaz The source.raazThe destination.fraazlength of data to be copiedraazThe source byte stringraaz The buffercdefghijNoneEcdefghijcdhijgefNoneMC kraaz;An applicative parser type for reading data from a pointer.lraazSkip over some data.mraaz/A parser that fails with a given error message.nraaz,Return the bytes that this parser will read.oraaz+Runs a parser on a byte string. It returns  if the byte string is smaller than what the parser would consume.praaz7Run the parser without checking the length constraints.qraazParses a value which is an instance of Storable. Beware that this parser expects that the value is stored in machine endian. Mostly it is useful in defining the  function in a complicated  instance.rraazParse a crypto value. Endian safety is take into account here. This is what you would need when you parse packets from an external source. You can also use this to define the Y function in a complicated W instance.sraaz-Parses a strict bytestring of a given length.traaz Similar to parseStorableVector but is expected to be slightly faster. It does not check whether the length parameter is non-negative and hence is unsafe. Use it only if you can prove that the length parameter is non-negative.uraaz Similar to  parseVector but is expected to be slightly faster. It does not check whether the length parameter is non-negative and hence is unsafe. Use it only if you can prove that the length parameter is non-negative.vraaz Similar to w but parses according to the host endian. This function is essentially used to define storable instances of complicated data. It is unlikely to be of use when parsing externally serialised data as one would want to keep track of the endianness of the data.wraazParses a vector of elements. It takes care of the correct endian conversion. This is the function to use while parsing external data. klmnopqrstuvw knmoprqwvutsl)None9>?WxraazA binary format is a representation of binary data often in printable form. We distinguish between various binary formats at the type level and each supported format corresponds to an instance of the the class x. The y and z! are required to satisfy the laws $decodeFormat . encodeByteString = idFor type safety, the formats themselves are opaque types and hence it is not possible to obtain the underlying binary data directly. We require binary formats to be instances of the class {, with the combinators | and } of the {3 class performing the actual encoding and decoding. Instances of x! are required to be instances of  and so that the encoded format can be easily printed. They are also required to be instances of  so that they can be easily represented in Haskell source using the OverloadedStrings extension. However, be careful when using this due to the fact that invalid encodings can lead to runtime errors.yraazEncode binary data into the format. The return type gurantees that any binary data can indeed be encoded into a format.zraazDecode the format to its associated binary representation. Notice that this function always succeeds: we assume that elements of the type fmt3 are valid encodings and hence the return type is  instead of  ByteString.{raazThe type class { captures all the types that can be encoded into a stream of bytes. For a user defined type say Foo, defining an instance {) is all that is required to make use of encode and decode for any of the supported encoding formats (i.e. instances of the class x)..Minimum complete definition for this class is | and }. Instances of W have default definitions for both these functions and hence a trivial instance declaration is sufficient for such types. newtype Foo = Foo (LE Word64) deriving (Storable, EndianStore) instance EndianStore Foo where ... instance Encodable Foo In particular, all the endian encoded versions of Haskell's word, i.e types like V Word32, V Word64 etc, are instances of {,. Note that the corresponding plain type is not an instance of { because encoding of say ; without specifying whether the endianness is meaningless.|raazConvert stuff to bytestring}raaz5Try parsing back a value. Returns nothing on failure.~raazUnsafe version of }raaz?Bytestring itself is an encoding format (namely binary format).xyz{|}~*NoneXeraazThe type corresponding to the standard padded base-64 binary encoding.raazIgnores spaces and newlines.+NoneZraazThe type corresponding to base-16 or hexadecimal encoding. The  encoding has a special place in this library: most cryptographic types use  encoding for their  and  instance. The combinators  and 4 are exposed mainly to make these definitions easy.raazBase16 variant of . Useful in definition of 2 instances as well as in cases where the default 0 instance does not parse from a base16 encoding.raazBase16 variant of .raazIgnores spaces and : (colon).None[raazEncode in a given format.raazDecode from a given format. It results in Nothing if there is a parse error.raazThe unsafe version of .raaz%Translate from one format to another.xyz{|}~{|}~xyzNone>?mraazA read io-action.raazThe  is the type that captures the act of reading from a buffer and possibly doing some action on the bytes read. Although inaccurate, it is helpful to think of elements of  as action that on an input buffer transfers data from it to some unspecified source. glue <> ftr where the write glue writes as many bytes w5 so that the total length is aligned to the boundary n.raazThe write action prependWrite w n wr is wr pre-pended with the byte w1 so that the total length ends at a multiple of n.raazThe write action padWrite w n wr is wr padded with the byte w1 so that the total length ends at a multiple of n.raazWrites a strict bytestring.raaz4A write action that just skips over the given bytes.raazThe expression  bytesToRead r gives the total number of bytes that would be read from the input buffer if the action r is performed.raaz The action unsafeRead r ptr results in reading  bytesToRead r# bytes from the buffer pointed by ptr. This action is unsafe as it will not (and cannot) check if the action reads beyond what is legally stored at ptr.raaz The action readBytes sz dptr gives a read action, which if run on an input buffer, will transfers sz' to the destination buffer pointed by dptr. Note that it is the responsibility of the user to make sure that dptr has enough space to receive sz8 units of data if and when the read action is executed.raaz The action readInto n dptr gives a read action which if run on an input buffer, will transfers n elements of type a into the buffer pointed by dptr!. In particular, the read action readInto n dptr is the same as ,readBytes (fromIntegral n :: BYTES Int) dptr when the type a is .raaz.The pointer for the buffer to be written into.raazThe bytes to use in the glueraaz The length boundary to align to.raazThe header writeraazThe footer writeraazthe byte to pre-pend with.raaz"the length to align the message toraaz"the message that needs pre-pendingraazthe padding byte to useraazthe length to align message toraazthe message that needs paddingraaz.The pointer for the buffer to be written into.raazhow much to read.raazbuffer to read the bytes intoraazhow many elements to read.raaz buffer to read the elements into,None-/>q: raazFunction that returns the dimension of the tuple. The dimension is calculated without inspecting the tuple and hence the term  (undefined :: Tuple 5 Int) will evaluate to 5.>The constaint on the dimension of the tuple (since base 4.7.0)raazTuples that encode their length in their types. For tuples, we call the length its dimension.raaz3This combinator returns the dimension of the tuple.raaz0Construct a tuple by repeating a monadic action.raazConstruct a tuple out of the list. This function is unsafe and will result in run time error if the list is not of the correct dimension.raazComputes the initial fragment of a tuple. No length needs to be given as it is infered from the types.raazThe  diagonal a( gives a tuple, all of whose entries is a.raazA zipwith function for tuplesraaz!Equality checking is timing safe.Noneqh"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWZXY[\]^_`ab/01.WXYZ_`VUab[\^]:896745;DA?B@<=>2C3FGHEIJKMOLNPTSRQ"#$%&'()*+,-None -?zQ raazType safe message length in units of blocks of the primitive. When dealing with buffer lengths for a primitive, it is often better to use the type safe units . Functions in the raaz package that take lengths usually allow any type safe length as long as they can be converted to bytes. This can avoid a lot of tedious and error prone length calculations.raazSome primitives like ciphers have an encryption/decryption key. This type family captures the key associated with a primitive if it has any.raaz3Primitives that have a recommended implementations.raaz1The recommended implementation for the primitive.raazThe type class that captures an abstract block cryptographic primitive. Bulk cryptographic primitives like hashes, ciphers etc often acts on blocks of data. The size of the block is captured by the member .As a library, raaz believes in providing multiple implementations for a given primitive. The associated type , captures implementations of the primitive.For use in production code, the library recommends a particular implementation using the  class. By default this is the implementation used when no explicit implementation is specified.raazAssociated type that captures an implementation of this primitive.raazThe block size.raazImplementation of block primitives work on buffers. Often for optimal performance, and in some case for safety, we need restrictions on the size and alignment of the buffer pointer. This type class captures such restrictions.raaz.The alignment expected for the buffer pointer.raazAllocate a buffer a particular implementation of a primitive prim. algorithm algo. It ensures that the memory passed is aligned according to the demands of the implementation.raazThe expression n  p specifies the message lengths in units of the block length of the primitive p. This expression is sometimes required to make the type checker happy.  -NonezraazTypical size of L1 cache. Used for selecting buffer size etc in crypto operations. None '(>kraaz2A memory location to store a value of type having  instance.raazA memory type that can extract bytes into a buffer. The extraction will perform a direct copy and hence the chances of the extracted value ending up in the swap space is minimised.raazA memory type that can be initialised from a pointer buffer. The initialisation performs a direct copy from the input buffer and hence the chances of the initialisation value ending up in the swap is minimised.raazMemories from which pure values can be extracted. Once a pure value is extracted,raazMemories that can be initialised with a pure value. The pure value resides in the Haskell heap and hence can potentially be swapped. Therefore, this class should be avoided if compromising the initialisation value can be dangerous. Consider using InitialiseableFromBufferraaz$A memory element that holds nothing.raazAny cryptographic primitives use memory to store stuff. This class abstracts all types that hold some memory. Cryptographic application often requires securing the memory from being swapped out (think of memory used to store private keys or passwords). This abstraction supports memory securing. If your platform supports memory locking, then securing a memory will prevent the memory from being swapped to the disk. Once secured the memory location is overwritten by nonsense before being freed.&While some basic memory elements like  are exposed from the library, often we require compound memory objects built out of simpler ones. The  instance of the  can be made use of in such situation to simplify such instance declaration as illustrated in the instance declaration for a pair of memory elements. instance (Memory ma, Memory mb) => Memory (ma, mb) where memoryAlloc = (,) <$> memoryAlloc <*> memoryAlloc unsafeToPointer (ma, _) = unsafeToPointer maraaz%Returns an allocator for this memory.raaz-Returns the pointer to the underlying buffer.raaz'A memory allocator for the memory type mem. The  instance of Alloc can be used to build allocations for complicated memory elements from simpler ones.raazA class that captures abstract "memory threads". A memory thread can either be run  or ?. Pure IO actions can be run inside a memory thread using the runIO-. However, the IO action that is being run must not directly or indirectly run a secure7 action ever. In particular, the following code is bad. 3-- BAD EXAMPLE: DO NOT USE. runIO $ securely $ foo ,On the other hand the following code is fine ' runIO $ insecurely $ someMemoryAction As to why this is dangerous, it has got to do with the fact that mlock and munlock! do not nest correctly. A single munlock can unlock multiple calls of mlock% on the same page. Whether a given IO action unlocks memory is difficult to keep track of; for all you know, it might be a FFI call that does an  memunlock9. Hence, currently there is no easy way to enforce this.raazRun a memory action with the internal memory allocated from a locked memory buffer. This memory buffer will never be swapped out by the operating system and will be wiped clean before releasing.Memory locking is an expensive operation and usually there would be a limit to how much locked memory can be allocated. Nonetheless, actions that work with sensitive information like passwords should use this to run an memory action.raazRun a memory action with the internal memory used by the action being allocated from unlocked memory. Use this function when you work with data that is not sensitive to security considerations (for example, when you want to verify checksums of files).raazLift an actual memory thread.raazCombinator that allows us to run a memory action on a sub-memory element. A sub-memory of submem of a memory element mem is given by a projection proj : mem -> submem. The action onSubMemory proj lifts the a memory thread on the sub element to the compound element.raazAn action of type  mem a is an action that uses internally a single memory object of type mem and returns a result of type a. All the actions are performed on a single memory element and hence the side effects persist. It is analogues to the ST monad.raaz/Run a given memory action in the memory thread.raaz.Perform an IO action inside the memory thread.raazAn IO allocator can be lifted to the memory thread level as follows.raaz7Get the underlying memory element of the memory thread.raazAllocates a buffer of size l' and returns the pointer to it pointer.raazCopy data from a given memory location to the other. The first argument is destionation and the second argument is source to match with the convention followed in memcpy.raazApply the given function to the value in the cell. For a function  f :: b -> a, the action modify f first extracts a value of type b# from the memory element, applies f1 to it and puts the result back into the memory. modify f = do b <- extract initialise $ f braazWork with the underlying pointer of the memory cell. Useful while working with ffi functions.raaz6Get the pointer associated with the given memory cell.raazWARNING:$ do not lift a secure memory action.raaz DestinationraazSource None? raazA byte source src is pure if filling from it does not have any other side effect on the state of the byte source. Formally, two different fills form the same source should fill the buffer with the same bytes. This additional constraint on the source helps to purify certain crypto computations like computing the hash or mac of the source. Usualy sources like  etc are pure byte sources. A file handle is a byte source that is not a pure source.raazAbstract byte sources. A bytesource is something that you can use to fill a buffer.WARNING:" The source is required to return  in the boundary case where it has exactly the number of bytes requested. In other words, if the source returns  Remaining on any particular request, there should be at least 1 additional byte left on the source for the next request. Cryptographic block primitives have do certain special processing for the last block and it is required to know whether the last block has been read or not.raazFills a buffer from the source.raaz2This type captures the result of a fill operation.raazThere is still bytes left.raaz*source exhausted with so much bytes read.raaz#Combinator to handle a fill result.raaz=A version of fillBytes that takes type safe lengths as input.raaz:Process data from a source in chunks of a particular size.raaz__WARNING:_ The  may block.raaz Buffer sizeraazThe source to fill.raazBuffer pointerraazstuff to do when filledraazstuff to do when exhaustedraazthe fill result to process   None"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWZXY[\]^_`abcdefghijxyz{~|} None->?raaz3Class that captures stream ciphers. An instance of  should be an instance of -, with the following additional constraints. ;The encryption and decryption should be the same algorithm.=Encryption/decryption can be applied to a messages of length l even if l# is not a multiple of block length.'The encryption of a prefix of a length l of a message m should be the same as the l( length prefix of the encryption of m.It is the duty of the implementer of the cipher to ensure that the above conditions are true before declaring an instance of a stream cipher.raazClass capturing ciphers. The implementation of this class should give an encryption and decryption algorithm for messages of length which is a multiple of the block size. Needless to say, the encryption and decryption should be inverses of each other for such messages.raazSome implementation of a block cipher. This type is existentially quantifies over the memory used in the implementation.raaz%The implementation of a block cipher.raaz)The underlying block encryption function.raaz)The underlying block decryption function.raazBlock cipher modes.raazCipher-block chainingraazCounterraaz Constructs a  value out of a stream transformation function. Useful in building a Cipher instance of a stream cipher.raazEncrypt the given . This function is unsafe because it only works correctly when the input  is of length which is a multiple of the block length of the cipher.raazTransforms a given bytestring using a stream cipher. We use the transform instead of encrypt/decrypt because for stream ciphers these operations are same.raazTransform a given bytestring using the recommended implementation of a stream cipher.raazEncrypt using the recommended implementation. This function is unsafe because it only works correctly when the input  is of length which is a multiple of the block length of the cipher.raazDecrypts the given . This function is unsafe because it only works correctly when the input  is of length which is a multiple of the block length of the cipher.raazDecrypt using the recommended implementation. This function is unsafe because it only works correctly when the input  is of length which is a multiple of the block length of the cipher.raaznameraaz descriptionraazstream transformerraazbuffer starting alignmentraazThe cipher to useraazThe implementation to useraazThe key to useraazThe string to encrypt.raaz The cipherraazThe key to useraazThe string to encryptraazThe cipher to useraazThe implementation to useraazThe key to useraazThe string to encrypt.raaz The cipherraazThe key to useraazThe string to encrypt.None />Draazchacha20 memoryraaz-The type associated with the ChaCha20 cipher.raaz The key type.raazThe counter type for chacha20raazThe IV for the chacha20raazThe chacha20 stream cipher. The word typeraazThe key for ChaCha20.None/>raaz1The portable c implementation of chacha20 cipher.raaz"The chacha20 randomness generator./None>raazThe chacha stream cipher is also used as the prg for generating random bytes. Such a prg needs to keep an auxilary buffer type so that one can generate random bytes not just of block size but smaller. This memory type is essentially for maintaining such a buffer.raazGet the actual location where the data is to be stored. Ensures that the pointer is aligned to the randomBufferAlignment restriction.raazThe size of the buffer in blocks of ChaCha20. While the implementations should handle any multiple of blocks, often implementations naturally handle some multiple of blocks, for example the Vector256 implementation handles 2-chacha blocks. Set this quantity to the maximum supported by all implementations. None]raazThe chacha20 stream cipher.0None4raazGet random bytes from the system. Do not over use this function as it is meant to be used by a PRG. This function reads bytes from 'dev urandom'.None#$->?traazComputing cryptographic hashes usually involves chunking the message into blocks and compressing one block at a time. Usually this compression makes use of the hash of the previous block and the length of the message seen so far to compressing the current block. Most implementations therefore need to keep track of only hash and the length of the message seen so. This memory can be used in such situations.raazCell to store the hashraazCell to store the lengthraaz*Type class capturing a cryptographic hash.raazCryptographic hashes can be computed for messages that are not a multiple of the block size. This combinator computes the maximum size of padding that can be attached to a message.raazSome implementation of a given hash. The existentially quantification allows us freedom to choose the best memory type suitable for each implementations.raazThe constraints that a memory used by a hash implementation should satisfy.raazThe Hash implementation. Implementations should ensure the following.  The action compress impl ptr blks should only read till the blks1 offset starting at ptr and never write any data. The action padFinal impl ptr byts should touch at most Fbyts/blocksizeF + padBlocks blocks starting at ptr. It should not write anything till the byts) offset but may write stuff beyond that.An easy to remember this rule is to remember that computing hash of a payload should not modify the payload.raazcompress the blocks,raaz pad and process the final bytes,raazCertain hashes are essentially bit-truncated versions of other hashes. For example, SHA224 is obtained from SHA256 by dropping the last 32-bits. This combinator can be used build an implementation of truncated hash from the implementation of its parent hash.raaz-Compute the hash of a pure byte source like, .raazCompute the hash of file.raaz*Compute the hash of a generic byte source.raaz Similar to 5 but the user can specify the implementation to use.raazSimilar to hashFile' but the user can specify the implementation to use.raaz Similar to  hashSource5 but the user can specify the implementation to use.raazGives a memory action that completes the hashing procedure with the rest of the source. Useful to compute the hash of a source with some prefix (like in the HMAC procedure).raaz0Extract the length of the message hashed so far.raaz,Update the message length by a given amount.raazMessageraazFile to be hashedraazMessageraazImplementationraazthe message as a byte source.raazImplementationraazFile to be hashed1None #$/>?raaz+Memory element for BLAKE2s implementations.raaz+Memory element for BLAKE2b implementations.raazThe BLAKE2s hash type.raazThe BLAKE2b hash type.raazThe BLAKE2 type.raaz%The generic blake2 padding algorithm.raazCreate a hash implementation form BLAKE2b given a compression function and the last block function.raazCreate a hash implementation form BLAKE2s given a compression function and the last block function.raaz#the primitive (BLAKE2b or BLAKE2s).raazlength of the messageraazNameraaz DescriptionraazNameraaz DescriptionNone&raaz)The portable C implementation of BLAKE2b.raaz)The portable C implementation of BLAKE2s.2None>raaz'Recommended implementation for balke2s.raaz'Recommended implementation for blake2b.Noneraaz+Compute the blake2b hash of an instance of . Use this for computing the sha1 hash of a strict or lazy byte string.raaz#Compute the blake2b hash of a file.raaz2Compute the blake2b hash of a general byte source.3None-?+raazThe type alias for the raw compressor function. The compressor function does not need to know the length of the message so far and hence this is not supposed to update lengths.raaz&The length encoding that uses 64-bits.raaz'The length encoding that uses 128-bits.raazCreates an implementation for a sha hash given the compressor and the length writer.raazThe buffer to compressraaz The number of blocks to compressraaz#The cell memory containing the hashraazNameraaz Description4None />raazThe cryptographic hash SHA1.Noneraaz&The portable C implementation of SHA1.5None/raaz$Recommended implementation for SHA1.6None />raaz1Sha224 hash value which consist of 7 32bit words.7None />raazThe Sha256 hash value.None raaz(The portable C implementation of SHA256.raazThe Hash implementation, i.e.  associated with the portable C implementation for the hash SHA256. This can be used to define an implementation of truncated hashes like SHA224.Noneiraaz(The portable C implementation of SHA224.8None¼raaz&Recommended implementation for SHA224.9None raaz&Recommended implementation for SHA256.:None />]raazThe Sha384 hash value.;None />raazThe Sha512 hash value. Used in implementation of Sha384 as well.Noneraaz(The portable C implementation of SHA512.raazThe Hash implementation, i.e.  associated with the portable C implementation for the hash SHA512. This can be used to implement truncated implementation like SHA384.NoneLraaz(The portable C implementation of SHA384.<Noneşraaz&Recommended implementation for SHA384.=Noneraaz$Recommend implementation for SHA512.>None?raaz,Memory for strong the internal memory state.raazReseed the prg.raazThe function to generate random bytes. Fills from existing bytes and continues if not enough bytes are obtained.NoneP raaz Instances of  which can be randomly generated. It might appear that all instances of the class  should be be instances of this class, after all we know the size of the element, why not write that many random bytes. In fact, this module provides an  which does that. However, we do not give a blanket definition for all storables because for certain refinements of a given type, like for example, Word8's modulo 10,  introduces unacceptable skews.raaz7Fill the buffer with so many random elements of type a.raaz>The monad for generating cryptographically secure random data.raaz)A batch of actions on the memory element mem that uses some randomness.raazReseed from the system entropy pool. There is never a need to explicitly seed your generator. The insecurely and securely calls makes sure that your generator is seed before starting. Furthermore, the generator also reseeds after every few GB of random bytes that it generates. Generating random data from the system entropy is usually an order of magnitude slower than using a fast stream cipher. Reseeding often can slow your program considerably without any additional security advantage.raaz/Fill the given input pointer with random bytes.raazThis is a helper function that has been exported to simplify the definition of a  instance for  types. However, there is a reason why we do not give a blanket instance for all instances  and why this function is unsafe? This function generates a random element of type a by generating n random bytes where n! is the size of the elements of a&. For instances that range the entire n byte space this is fine. However, if the type is actually a refinement of such a type, (consider a  modulo 10 for example) this function generates an unacceptable skew in the distribution. Hence this function is prefixed unsafe.raazGenerate a random element from an instance of a RandomStorable element.raaz7Randomise the contents of a memory cell. Equivalent to  >>= liftMT . initialise= but ensures that no data is transferred to unlocked memory.raazGenerate a random byteString.raaznumber of elements to fillraazThe buffer to fill  ?None->?DraazThe HMAC associated to a hash value. The HMAC type is essentially the underlying hash type wrapped inside a newtype. Therefore, the & instance for HMAC is essentially the  instance for the underlying hash. It is safe against timing attack provided the underlying hash comparison is safe under timing attack.raaz-Compute the hash of a pure byte source like, .raazCompute the hmac of file.raaz*Compute the hmac of a generic byte source.raaz-Compute the hmac of a pure byte source like, .raazCompute the hmac of file.raazCompute the hmac of a generic ByteSource using a given implementation.raaz$Base16 representation of the string.raazMessageraazKey to use for mac-ingraazFile to be hashedraazkey to use for mac-ing.raazMessageraazMessageraazFile to be hashed Noneraaz*Compute the sha512 hash of an instance of . Use this for computing the sha512 hash of a strict or lazy byte string.raaz"Compute the sha512 hash of a file.raaz1Compute the sha512 hash of a general byte source.raaz:Compute the message authentication code using hmac-sha512.raaz3Compute the message authentication code for a file.raazCompute the message authetication code for a generic byte source.raaz Key to useraaz)pure source whose hmac is to be computedraaz Key to useraaz!File whose hmac is to be computedNone[raaz*Compute the sha384 hash of an instance of . Use this for computing the sha384 hash of a strict or lazy byte string.raaz"Compute the sha384 hash of a file.raaz1Compute the sha384 hash of a general byte source.raaz:Compute the message authentication code using hmac-sha384.raaz3Compute the message authentication code for a file.raazCompute the message authetication code for a generic byte source.raaz Key to useraaz)pure source whose hmac is to be computedraaz Key to useraaz!File whose hmac is to be computedNoneraaz*Compute the sha256 hash of an instance of . Use this for computing the sha256 hash of a strict or lazy byte string.raaz"Compute the sha256 hash of a file.raaz1Compute the sha256 hash of a general byte source.raaz:Compute the message authentication code using hmac-sha256.raaz3Compute the message authentication code for a file.raazCompute the message authetication code for a generic byte source.raaz Key to useraaz)pure source whose hmac is to be computedraaz Key to useraaz!File whose hmac is to be computedNone{raaz*Compute the sha224 hash of an instance of . Use this for computing the sha224 hash of a strict or lazy byte string.raaz"Compute the sha224 hash of a file.raaz1Compute the sha224 hash of a general byte source.raaz:Compute the message authentication code using hmac-sha224.raaz3Compute the message authentication code for a file.raazCompute the message authetication code for a generic byte source.raaz Key to useraaz)pure source whose hmac is to be computedraaz Key to useraaz!File whose hmac is to be computedNoneqraaz(Compute the sha1 hash of an instance of . Use this for computing the sha1 hash of a strict or lazy byte string.raaz Compute the sha1 hash of a file.raaz/Compute the sha1 hash of a general byte source.raaz8Compute the message authentication code using hmac-sha1.raaz3Compute the message authentication code for a file.raazCompute the message authetication code for a generic byte source.None)@None />raazExtended key for aes256raazExtended key for aes192raazExtended key for aes128raazThe IV used by the CBC mode.raazKey used for AES-128raazKey used for AES-128raazKey used for AES-128raazThe type associated with AES ciphers. Raaz provides AES variants with key lengths 128, 192 and 256. The key types for the above ciphers in cbc mode are given by the types (, IV), (, IV) (, IV) respectively.raaz128-bit aes cipher in  mode.raaz128-bit aes cipher in  mode.raaz128-bit aes cipher in  mode.raaz#Smart constructors for AES 128 ctr.raaz#The 256-bit aes cipher in cbc mode.raaz#The 192-bit aes cipher in cbc mode.raaz#The 128-bit aes cipher in cbc mode.raazShows in base 16raazExpects in base 16raazShows in base 16raazExpects in base 16raazShows in base 16raazExpects in base 16raazKey is (,) pair.raazKey is (,) pair.raazKey is (,) pair.raazShown as a its base16 encoding.raazExpects in base16. None/>'raaz;Implementation of 128-bit AES in CBC mode using Portable C.raaz;Implementation of 192-bit AES in CBC mode using Portable C.raaz;Implementation of 256-bit AES in CBC mode using Portable C.ANone/>raaz)Recommended implementation of AES-256 cbcraaz)Recommended implementation of AES-192 cbcraaz)Recommended implementation of AES-128 cbcNone  BNoneR NoneraazRaaz library version number."#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWZXY[\]^_`abcdefghijxyz{~|}CDEFGHIJKLMMNOOPQRSTUVWXYZ[\]^_`ab"c"d"e"f"g#h#i#j#k$l$m$n%o%p%q%r&s&t&u&u&v&v&w&x&y&z&{&|&}&~&&&&&&&&&&&&&&&&&&&&&''''''''''''''(((((((()))))))*+++,,,,,,,,-                                                                                           .... 11467:;????@@@@@@@@@ !!!!!!!!#h##i#%%&)*+,...........///0111111223333456789:;<=>>>>>>>??????@@@@@@@@@@@@@@@@@@AAA!raaz-0.2.3-3mox0vOCCXrBTCNCDGs2dKRaaz.Core.CpuSupportsRaaz.Core.MonoidalActionRaaz.Core.TypesRaaz.Core.UtilRaaz.Core.Parse.ApplicativeRaaz.Core.EncodeRaaz.Core.TransferRaaz.Core.Primitives Raaz.CoreRaaz.Core.MemoryRaaz.Core.ByteSourceRaaz.Cipher.InternalRaaz.Cipher.ChaCha20-Raaz.Cipher.ChaCha20.Implementation.CPortableRaaz.Hash.InternalRaaz.Hash.Blake2)Raaz.Hash.Blake2.Implementation.CPortableRaaz.Hash.Sha1'Raaz.Hash.Sha1.Implementation.CPortableRaaz.Hash.Sha224Raaz.Hash.Sha256)Raaz.Hash.Sha256.Implementation.CPortable)Raaz.Hash.Sha224.Implementation.CPortableRaaz.Hash.Sha384Raaz.Hash.Sha512)Raaz.Hash.Sha512.Implementation.CPortable)Raaz.Hash.Sha384.Implementation.CPortable Raaz.Random Raaz.HashRaaz.Cipher.AES,Raaz.Cipher.AES.CBC.Implementation.CPortableRaaz Paths_raazRaaz.Core.Types.AlignedRaaz.Core.Types.CopyingRaaz.Core.Types.DescribeRaaz.Core.Types.EqualityRaaz.Core.Types.PointerRaaz.Core.Types.EndianRaaz.Core.Util.ByteStringRaaz.Core.Encode.InternalRaaz.Core.Encode.Base64Raaz.Core.Encode.Base16Raaz.Core.Types.TupleRaaz.Core.ConstantsRaaz.Cipher.ChaCha20.Internal#Raaz.Cipher.ChaCha20.Recommendation Raaz.EntropyRaaz.Hash.Blake2.InternalRaaz.Hash.Blake2.RecommendationRaaz.Hash.Sha.UtilRaaz.Hash.Sha1.InternalRaaz.Hash.Sha1.RecommendationRaaz.Hash.Sha224.InternalRaaz.Hash.Sha256.InternalRaaz.Hash.Sha224.RecommendationRaaz.Hash.Sha256.RecommendationRaaz.Hash.Sha384.InternalRaaz.Hash.Sha512.InternalRaaz.Hash.Sha384.RecommendationRaaz.Hash.Sha512.RecommendationRaaz.Random.ChaCha20PRGRaaz.Hash.Internal.HMACRaaz.Cipher.AES.InternalRaaz.Cipher.AES.Recommendation Raaz.Cipherssesse2sse3sse4_1sse4_2avxavx2FieldMFieldFieldATwistRF DistributiveFSemiR DistributiveLActionF<<.>>LAction<.><++> semiRSpace semiRMonoidtwistFunctorValuetwistMonoidValue computeField liftToFieldM runFieldM$fLActionFmWrappedArrow $fMonoidSemiR$fSemigroupSemiR$fDistributiveFmWrappedArrow$fApplicativeTwistRF$fFunctorTwistRFAligned unAlignedaligned16Bytesaligned32Bytesaligned64BytesDestSrcsource destination Describablename descriptionResultEqualityeq=== AlignmentALIGNBITSBYTES LengthUnitinBytesPointerinBitsatLeastatLeastAlignedatMost bytesQuotRem bytesQuot bitsQuotRembitsQuot wordAlignmentsizeOf alignedSizeOf alignmentalignPtrmovePtrnextAlignedPtr peekAligned pokeAligned allocaBuffer allocaAligned allocaSecureallocaSecureAligned mallocBufferhFillBufmemcpymemmovememsetBELE EndianStorestoreload adjustEndianstoreAt storeAtIndex loadFromIndexloadFrom copyFromBytes copyToBytes littleEndian bigEndianlength replicateunsafeCopyToPointerunsafeNCopyToPointerwithByteStringfromByteStringStorablecreate createFromParserskip parseError parseWidth runParserunsafeRunParser parseStorableparseparseByteStringunsafeParseStorableVectorunsafeParseVectorparseStorableVector parseVectorFormatencodeByteString decodeFormat Encodable toByteStringfromByteStringunsafeFromByteStringBase64Base16 fromBase16 showBase16encodedecode unsafeDecode translateReadIOReadMWriteIOWriteM bytesToWrite unsafeWrite writeStorablewrite writeFromwriteStorableVector writeVector writeBytes glueWrites prependWritepadWritewriteByteString skipWrite bytesToRead unsafeRead readBytesreadInto$fMonoidTransferM$fSemigroupTransferM$fDistributiveBYTES->$fLActionBYTES->$fEncodableWriteM$fIsStringWriteM$fSemigroupReadM $fMonoidReadM$fSemigroupWriteM$fMonoidWriteM DimensionTuple dimensionrepeatMunsafeFromListinitialdiagonalzipWithBLOCKSKeyRecommendation recommended PrimitiveImplementation blockSizeBlockAlgorithmbufferStartAlignmentallocBufferForblocksOf$fLengthUnitBLOCKS$fMonoidBLOCKS$fSemigroupBLOCKS $fShowBLOCKS $fEqBLOCKS $fOrdBLOCKS $fEnumBLOCKSl1Cache MemoryCellExtractableToBuffer extractorInitialisableFromBuffer initialiser Extractableextract Initialisable initialise VoidMemoryMemory memoryAllocunsafeToPointerAlloc MemoryThreadsecurely insecurelyliftMT onSubMemoryMTexecutedoIOliftPointerAction getMemory pointerAlloc copyMemorymodifywithCellPointergetCellPointer $fMonadIOMT $fMonadMT$fApplicativeMT $fFunctorMT $fMemory(,,,) $fMemory(,,) $fMemory(,)$fMemoryThreadMT$fMemoryVoidMemory$fExtractableToBufferMemoryCell#$fInitialisableFromBufferMemoryCell$fExtractableMemoryCella$fInitialisableMemoryCella$fMemoryMemoryCellPureByteSource ByteSource fillBytes FillResult Remaining ExhaustedwithFillResultfill processChunks$fFunctorFillResult$fByteSource[]$fByteSourceMaybe$fByteSourceByteString$fByteSourceByteString0$fByteSourceHandle$fPureByteSourceMaybe$fPureByteSource[]$fPureByteSourceByteString$fPureByteSourceByteString0$fShowFillResult$fEqFillResult StreamCipherCipher SomeCipherICipherI cipherINamecipherIDescription encryptBlocks decryptBlockscipherStartAlignment CipherModeCBCCTR makeCipherIunsafeEncrypt' transform' transform unsafeEncryptunsafeDecrypt' unsafeDecrypt$fDescribableCipherI$fBlockAlgorithmCipherI$fBlockAlgorithmSomeCipherI$fDescribableSomeCipherI$fShowCipherMode$fEqCipherModeChaCha20KEYCounterIVimplementationchacha20Randomchacha20 HashMemoryhashCellmessageLengthCellHashadditionalPadBlocks SomeHashIHashMHashI hashINamehashIDescriptioncompress compressFinalcompressStartAlignment truncatedIhashhashFile hashSourcehash' hashFile' hashSource'completeHashing extractLength updateLength$fDescribableHashI$fBlockAlgorithmHashI$fBlockAlgorithmSomeHashI$fDescribableSomeHashI$fExtractableHashMemoryh$fInitialisableHashMemoryh$fMemoryHashMemoryBLAKE2sBLAKE2bimplementation2bimplementation2sblake2b blake2bFile blake2bSourceSHA1SHA224SHA256 cPortable$fExtractableSHA224MemorySHA224$fInitialisableSHA224Memory()$fMemorySHA224MemorySHA384SHA512$fExtractableSHA384MemorySHA384$fInitialisableSHA384Memory()$fMemorySHA384MemoryRandomStorablefillRandomElementsRandMRTreseedfillRandomBytesunsafeFillRandomElementsrandom randomiseCellrandomByteString$fMemoryThreadRT$fRandomStorableTuple$fRandomStorableBE$fRandomStorableLE$fRandomStorableIV$fRandomStorableKEY$fRandomStorableInt$fRandomStorableInt64$fRandomStorableInt32$fRandomStorableInt16$fRandomStorableInt8$fRandomStorableWord$fRandomStorableWord64$fRandomStorableWord32$fRandomStorableWord16$fRandomStorableWord8 $fFunctorRT$fApplicativeRT $fMonadRT $fMonadIORTHMAChmachmacFile hmacSourcesha512 sha512File sha512Source hmacSha512hmacSha512FilehmacSha512Sourcesha384 sha384File sha384Source hmacSha384hmacSha384FilehmacSha384Sourcesha256 sha256File sha256Source hmacSha256hmacSha256FilehmacSha256Sourcesha224 sha224File sha224Source hmacSha224hmacSha224FilehmacSha224Sourcesha1sha1File sha1SourcehmacSha1 hmacSha1FilehmacSha1SourceKEY256KEY192KEY128AES aes128cbc aes192cbc aes256cbc aes128ctr aes128cbcI aes192cbcI aes256cbcI$fInitialisableM128(,) $fMemoryM128$fInitialisableM192(,) $fMemoryM192$fInitialisableM256(,) $fMemoryM256version getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameunDestunSrcghc-prim GHC.ClassesEqD:R:VectorResult0D:R:MVectorsResult0baseGHC.BaseMonoidmappendGHC.RealquotRemForeign.Marshal.AllocallocaBytesAligned mallocBytesGHC.IO.Handle.TexthGetBuf $fLActionuPtrbytestring-0.10.10.0Data.ByteString.Internal ByteStringForeign.Storablepeek GHC.MaybeNothingStorableGHC.ShowShow Data.StringIsStringMaybeGHC.WordWord32$fFormatByteString$fIsStringBase64 fromStringshow$fIsStringBase16<>Word8 $fEqTuple Applicative ChaCha20MemWORDD:R:KeyChaCha20keyCellivCell counterCell ChaCha20Key RandomBufgetBufferPointerrandomBufferSize getEntropy Blake2sMem Blake2bMemBLAKE2 blake2Padblake2bImplementationblake2sImplementation$fRecommendationBLAKE2$fRecommendationBLAKE20 Compressor length64Writelength128WriteshaImplementation$fRecommendationSHA1$fRecommendationSHA224$fRecommendationSHA256$fRecommendationSHA384$fRecommendationSHA512 RandomStatereseedMTfillRandomBytesMT chacha20State auxBufferremainingByteshmac' hmacFile' hmacSource'$fIsStringHMACKeyunHMACEKEY256EKEY192EKEY128$fPrimitiveAES$fPrimitiveAES0$fPrimitiveAES1 $fShowKEY128$fIsStringKEY128 $fShowKEY192$fIsStringKEY192 $fShowKEY256$fIsStringKEY256 D:R:KeyAES D:R:KeyAES0 D:R:KeyAES1$fShowIV $fIsStringIV$fRecommendationAES$fRecommendationAES0$fRecommendationAES1