Skip to content

Add ChaCha20 stream cipher - #7754

Open
hindAlsh wants to merge 5 commits into
TheAlgorithms:masterfrom
hindAlsh:chacha20-stream-cipher
Open

hindAlsh wants to merge 5 commits into
TheAlgorithms:masterfrom
hindAlsh:chacha20-stream-cipher

Conversation

@hindAlsh

Copy link
Copy Markdown

Summary

  • Implement RFC 8439 ChaCha20 encryption and decryption.
  • Add tests for RFC vectors, partial and multiple blocks, input validation, and counter boundaries.

Closes #7753

This implementation is intended for educational purposes and should not be used as a replacement for a vetted cryptographic library in production.
@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.39%. Comparing base (07c7ea3) to head (fcd6ce1).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7754      +/-   ##
============================================
+ Coverage     82.34%   82.39%   +0.04%     
- Complexity     8452     8472      +20     
============================================
  Files           843      844       +1     
  Lines         26158    26218      +60     
  Branches       5110     5119       +9     
============================================
+ Hits          21541    21603      +62     
  Misses         3828     3828              
+ Partials        789      787       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Refactored nonce and expected byte array initialization for clarity. Updated test methods to improve readability by reducing line breaks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Implement ChaCha20 stream cipher

2 participants