Copyright | (c) Alfredo Garcia 2023 |
---|---|
License | MIT |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides the implementation of the quarterround function, a core element in the Salsa20 stream cipher.
The quarterround function manipulates a 1x4 matrix, performing a series of modular arithmetic and bitwise operations,
including addition (Mod
), rotation (Rotl
), and bitwise XOR (Boolean
).
These operations are expressed as an F-Algebra, allowing the construction and evaluation of quarterround expressions.
The module offers functionalities to:
- Compute numeric values resulting from quarterround expressions.
- Generate string representations of quarterround expressions.
- Perform Keelung specific computations using the `UInt 32` type.
Synopsis
- quarterroundCompute :: [Word32] -> [Word32]
- quarterroundDisplay :: [String] -> [String]
- quarterroundKeelung :: [UInt 32] -> Comp [UInt 32]
Documentation
quarterroundCompute :: [Word32] -> [Word32] #
The quarterround expression computed.
quarterroundDisplay :: [String] -> [String] #
The quarterround expression as a string.
quarterroundKeelung :: [UInt 32] -> Comp [UInt 32] #
The quarterround expression as a Keelung computation.