This repo is an example implementation of the ChaCha20 stream cipher. Each method and variable contains comments with explanation. This algorithm was created in 2008 as a variant of Sala20 by djb (Daniel J. Bernstein) and is one of the most widely used algorithms in modern cryptographic systems.
If you want to learn more about ChaCha20, here are a few additional links:
- ChaCha20 Wiki
- Computerphile's Quick Video Explanation
- DJB's Implementations in C
- IETF's Standardized Implementation Details
These are some amazing resources which will help you understand every single details. They also contain other versions of the implementation including the original author's (DJB) and the IETF-standardized version currently in use in the internet and QUIC protocol.
The code in this repo is dependant on a private library which I do not have permission to share. Thus, the classes, methods etc. used in this code will not work. Regardless, for educational purposes, the comments and explanations provided within should help you understand the core concept behind ChaCha20.
I may, in future, decide to replace the methods and classes with my own implementations but that is currently TBD.
If this repo, helped you understand the ChaCha20 cipher. Please, give it a star! ⭐