Skip to content
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

Case Preservation Issue in Chepy's Atbash Implementation (pycipher dependency) #36

Closed
x9xhack opened this issue Dec 29, 2024 · 0 comments

Comments

@x9xhack
Copy link

x9xhack commented Dec 29, 2024

Describe the bug:
Chepy uses pycipher to implement the Atbash cipher, but the cipher does not preserve the case of the input text during encryption. When mixed-case strings are provided, the result is always converted to uppercase, which is not the desired behavior. This issue is related to a limitation in pycipher (see pycipher issue #20 where it does not maintain the original case of the text.

Chepy should either update its implementation to preserve case or create a workaround to handle case preservation properly. Since pycipher appears to be no longer maintained, a custom solution might be needed to address this issue.

To Reproduce:

  1. Use the atbash_encode function in Chepy on a mixed-case string like "zbCc;oo?|c;oAp9P%".
  2. Observe that the result is converted to uppercase ("AYXX;LL?|X;LZK9K%"), ignoring the case of the input.

Expected behavior:
Chepy should preserve the case of the input text when using the Atbash cipher. Uppercase letters should remain uppercase, and lowercase letters should remain lowercase after encryption.

Screenshots:
image
image

Desktop (please complete the following information):

  • OS: Linux
  • Python Version: 3.11
  • Chepy Version: 7.3.0

Additional context:
It seems that the issue is inherited from the pycipher library's implementation, which currently doesn't handle case preservation. Since pycipher is likely no longer maintained, it would be helpful for Chepy to consider updating its cipher implementation to handle case preservation or switch to an alternative solution.

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

No branches or pull requests

1 participant