Copyright | (c) Alfredo Garcia 2023 |
---|---|
License | MIT |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides general utility functions used in the creation of the Salsa20 cipher.
Synopsis
- modMatrix :: [Word32] -> [Word32] -> [Word32]
- numberListToStringList :: [Word32] -> [String]
- transpose :: [a] -> [a]
- modMatrixDisplay :: [String] -> [String] -> [String]
- modMatrixKeelung :: [UInt 32] -> [UInt 32] -> [UInt 32]
- eitherListToNumberList :: [Either Word32 String] -> [Word32]
- eitherListToStringList :: [Either Word32 String] -> [String]
- elts :: Ord a => [a] -> Set a
- concat64 :: [[a]] -> [a]
- chunksof4 :: [a] -> [[a]]
Documentation
modMatrix :: [Word32] -> [Word32] -> [Word32] #
Given two matrices, do modulo addition on each of the elements.
numberListToStringList :: [Word32] -> [String] #
Convert a list of numbers to a list of strings. This is always possible.
modMatrixDisplay :: [String] -> [String] -> [String] #
Given two matrices, display the modulo addition on each of the elements.
modMatrixKeelung :: [UInt 32] -> [UInt 32] -> [UInt 32] #
Given two matrices, do modulo addition on each of the elements using Keelung types.
eitherListToNumberList :: [Either Word32 String] -> [Word32] #
Convert a list of Either
type to an list of numbers.