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

Utils

Description

This module provides general utility functions used in the creation of the Salsa20 cipher.

Synopsis

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.

transpose :: [a] -> [a] #

Transpose a 4x4 matrix type.

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.

eitherListToStringList :: [Either Word32 String] -> [String] #

Convert a list of Either type to a list of strings.

elts :: Ord a => [a] -> Set a #

Track elements inside a list.

concat64 :: [[a]] -> [a] #

chunksof4 :: [a] -> [[a]] #

Get chunks of 4 elements from a list of 64 elements.