From 3cd4b9cd4e8f477c63b6f7b00e9034931a4ea4a6 Mon Sep 17 00:00:00 2001 From: d0x471b <0x471@protonmail.com> Date: Sat, 31 Aug 2024 19:16:18 +0300 Subject: [PATCH] update documentation --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d8cebf..5670232 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,23 @@ -# Mina zkApp: Chacha20 O1js +# ChaCha20 Stream Cipher - o1js -This template uses TypeScript. +## What is ChaCha20? +ChaCha20 is a stream cipher and a descendant of Salsa20. It is widely used and recognized for its security and efficiency. -## How to build +The inputs to ChaCha20 are: +- A 256-bit key, represented as a concatenation of eight 32-bit little-endian integers. +- A 96-bit nonce, represented as a concatenation of three 32-bit little-endian integers. +- A 32-bit block count parameter, represented as a 32-bit little-endian integer. + +The output is a sequence of 64 bytes of pseudorandom data. + +More details can be found here: https://www.rfc-editor.org/rfc/rfc7539 +## How does ChaCha20 differ from AES? +- **Simpler Design**: ChaCha20 has a simpler structure compared to AES. +- **ARX Design**: ChaCha20 uses an ARX (Addition-Rotation-XOR) design, which avoids the use of S-Boxes and reduces cache footprint. +- **Efficient Key Setup**: ChaCha20 features free key setup, meaning it does not incur significant overhead during key initialization. + +## How to build ```sh npm run build ``` @@ -24,3 +38,4 @@ npm run coverage ## License [Apache-2.0](LICENSE) + \ No newline at end of file