Salsa20 Hackage Documentation
Salsa20 is a widely used stream cipher designed for fast and secure encryption. This project contains a pure Haskell implementation of the Salsa20 cipher, organized into several sub-modules.
The implementation is organized into the following modules:
Quarterround
: Defines the quarterround operation used in the Salsa20 cipher.Rowround
: Implements the rowround operation, a component of the Salsa20 cipher.Columnround
: Implements the columnround operation, treating it as rowround expressions with the input transposed.Doubleround
: Defines the doubleround function as the composition of rowround and columnround. Also, provides a variantdoubleroundR
for a specified number of rounds.Hash
: Implements the Salsa20 core function and the extended hash expressions.LittleEndian
: Provives little-endian encoding related code, protocol specified Salsa20 aument and reduce list functions.Utils
: Provides utility functions used in the Salsa20 cipher.Expansion
: Implements functions for Salsa20 key expansion and matrix generation.Crypt
: Provides functions for Salsa20 encryption and decryption.
The Salsa20 cipher itself is a stream cipher that operates on 64-byte blocks, producing a keystream that is XORed with the plaintext to generate ciphertext. It is known for its efficiency and security.
For usage instructions and additional details, refer to the documentation in each module.
- Columnround Implementation of the Salsa20 stream cipher columnround expressions.
- Crypt Salsa20 encryption and decryption
- Doubleround Implementation of the Salsa20 stream cipher doubleround expressions.
- Expansion Salsa20 expansion function code
- Hash Implementation of the Salsa20 hash function using the core function and hash expressions.
- LittleEndian .
- Operators Custom operators
- Quarterround Implementation of the Salsa20 stream cipher quarterround expressions.
- Rowround Implementation of the Salsa20 stream cipher rowround expressions.
- Utils General utilities for Salsa20 cipher implementation.