Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The portable C-implementation of Blake2b.
Synopsis
- name :: String
- description :: String
- type Prim = ChaCha20
- type Internals = ChaCha20Mem
- type BufferAlignment = 32
- type BufferPtr = AlignedBlockPtr BufferAlignment Prim
- additionalBlocks :: BlockCount ChaCha20
- processBlocks :: BufferPtr -> BlockCount Prim -> Internals -> IO ()
- processLast :: BufferPtr -> BYTES Int -> Internals -> IO ()
- xchacha20Setup :: Nounce XChaCha20 -> Internals -> IO ()
- copyKey :: Dest ChaCha20Mem -> Src (MemoryCell (Key ChaCha20)) -> IO ()
- runBlockProcess :: (Ptr buf -> Word64 -> Ptr a -> Ptr b -> Ptr c -> IO ()) -> BufferPtr -> BlockCount Prim -> Internals -> IO ()
Documentation
description :: String Source #
type BufferAlignment = 32 Source #
type BufferPtr = AlignedBlockPtr BufferAlignment Prim Source #
additionalBlocks :: BlockCount ChaCha20 Source #
xchacha20Setup :: Nounce XChaCha20 -> Internals -> IO () Source #
The xchacha20Setup does the following to the internal state
- Replaces the key stored in the keyCell using the hchacah20 hashing function
- Initialises the ivcell with the last two words in the xiv value.
As a result the internal state is ready to start encrypting using the xchacha20 variant.