This project implements the Salsa20/12 encryption algorithm, a lightweight and secure stream cipher used for encrypting data. The algorithm is a variant of Salsa20, designed for fast and efficient encryption while maintaining strong security properties.
The provided Python script (salsa2012.py) contains the implementation of quarter rounds, row rounds, and column rounds, which form the core of the Salsa20/12 encryption function.
- Python โ Core implementation language.
- NumPy โ Optimized numerical computations for encryption operations.
- Struct & Bitwise Operations โ Used for efficient data transformations.
โ
Implements Salsa20/12 Encryption Algorithm
โ
Fast and Secure Stream Cipher
โ
Lightweight & Efficient for Data Encryption
โ
Python-Based Implementation
โ
Supports 128-bit and 256-bit Encryption Keys
๐ Salsa20-Encryption/
โโโ salsa2012.py # Python script implementing Salsa20/12 encryption
โโโ README.md # Project documentation
1๏ธโฃ Initialize the Salsa20/12 state
2๏ธโฃ Perform quarter-round transformations
3๏ธโฃ Apply row and column rounds for mixing data
4๏ธโฃ Generate keystream for encrypting plaintext
5๏ธโฃ Encrypt or decrypt data using XOR with keystream
python salsa2012.py --encrypt --input plaintext.txt --output encrypted.bin --key "your-secret-key"python salsa2012.py --decrypt --input encrypted.bin --output decrypted.txt --key "your-secret-key"This will securely encrypt and decrypt data using Salsa20/12.
- Salsa20/12 is resistant to known cryptanalysis attacks.
- The 12-round variant is a trade-off between speed and security.
- Always use a unique nonce to prevent repetition in encryption.
๐น Expand to Full Salsa20 Implementation (20 Rounds)
๐น Integrate ChaCha20 Encryption
๐น Support for File Encryption & Secure Key Management
๐น Performance Optimizations for Large Data Sets
Author: Siddartha Reddy Boreddy
๐ SUNY Binghamton
โ๏ธ Email: [email protected]