salsa20-0.1.0.0
Copyright(c) Alfredo Garcia 2023
LicenseMIT
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Quarterround

Description

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

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.