Skip to content

Add ChaCha20 stream cipher - #7754

Merged
DenizAltunkapan merged 6 commits into
TheAlgorithms:masterfrom
hindAlsh:chacha20-stream-cipher
Nov 13, 2026
Merged

DenizAltunkapan merged 6 commits into
TheAlgorithms:masterfrom
hindAlsh:chacha20-stream-cipher

Conversation

@hindAlsh

Copy link
Copy Markdown
Contributor

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 (e9957ea) to head (22815f7).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7754      +/-   ##
============================================
+ Coverage     82.36%   82.39%   +0.02%     
- Complexity     8457     8475      +18     
============================================
  Files           844      845       +1     
  Lines         26165    26225      +60     
  Branches       5113     5122       +9     
============================================
+ Hits          21551    21608      +57     
- Misses         3827     3828       +1     
- Partials        787      789       +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.
@DenizAltunkapan
DenizAltunkapan enabled auto-merge (squash) November 13, 2026 08:24
@DenizAltunkapan
DenizAltunkapan enabled auto-merge (squash) November 13, 2026 08:24
@DenizAltunkapan
DenizAltunkapan merged commit 2f04e81 into TheAlgorithms:master Nov 13, 2026
7 checks passed
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

3 participants