Skip to content

Add rc4 cipher #12687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

QuantumSoham
Copy link

Summary

Added an RC4 (Rivest Cipher 4) stream cipher algorithm under ciphers/ directory.

  • Implements KSA and PRGA phases.
  • Encrypts and decrypts using XOR.
  • Fully type hinted and documented.
  • Includes docstrings with doctests.
  • CLI support via argparse.

All style and type checks (pre-commit, ruff, mypy) have passed.

Issue

No linked issue. (New Algorithm)

@algorithms-keeper algorithms-keeper bot added tests are failing Do not merge until tests pass labels Apr 27, 2025
@Charuvarthan
Copy link

Should this be tested using doctest?

@QuantumSoham
Copy link
Author

Should this be tested using doctest?

no not doctest
run using
python rc4.py encrypt Key Plaintext
or python rc4.py decrypt Key bbf316e8d940af0ad3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants