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

Bug report: Incorrect railfence decryption #1108

Open
Hritik14 opened this issue Sep 24, 2020 · 0 comments
Open

Bug report: Incorrect railfence decryption #1108

Hritik14 opened this issue Sep 24, 2020 · 0 comments
Labels

Comments

@Hritik14
Copy link

Describe the bug
RailFence decryption is incorrectly adding some trailing spaces (padding?) before decryption which is resulting in incorrect plaintext.

To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

  1. Go to cyberchef
  2. Input cipher text : /1E11v1 ee1smr1hoyaosF2u r/lpisdled enh
  3. Select RailFence cipher with key: 11 and
  4. Observe plain text: /1era2/sdh dluo1e11v1hs ple neirFos1E my

Expected behaviour
Plaintext should be: /EveryFriends/2a111111 should help some
It can be verified on this site.

Additional context
It can be observed on the same site that railfence of
ciphertext: /1E11v1 ee1smr1hoyaosF2u r/lpisdled enh (with 5 trailing spaces)
results in plaintext: /1era2/sdh dluo1e11v1hs ple neirFos1E my
which matches the cyberchef response.

It appears as if CyberChef is padding the input ciphertext with key - len%key i.e. 11 - 39%11 = 5 spaces characters to meet the nearest block size of 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant