You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem comes when the cipher is padded with spaces. The decode algorithm then places the pads into the decoded text. The easiest way to fix this may be to make the pad symbols some escaped flag character that is removed later (like \n used in the example at https://www.geeksforgeeks.org/rail-fence-cipher-encryption-decryption). It can be done arithmetically, but I think it might get too complicated.
Desktop (if relevant, please complete the following information):
CyberChef version: 9.21.0
The text was updated successfully, but these errors were encountered:
Describe the bug
From #948 (comment)
when decoding with rail fence, padding during decoding operation should be dropped.
To Reproduce
Expected behaviour
Symmetric encoding and decoding should return the same string. It works on other sites, just not cyberchef.
Debugging/How to fix
https://github.com/Flavsditz/CyberChef/blob/master/src/core/operations/RailFenceCipherDecode.mjs#L46
The problem comes when the
cipher
is padded with spaces. The decode algorithm then places the pads into the decoded text. The easiest way to fix this may be to make the pad symbols some escaped flag character that is removed later (like\n
used in the example at https://www.geeksforgeeks.org/rail-fence-cipher-encryption-decryption). It can be done arithmetically, but I think it might get too complicated.Desktop (if relevant, please complete the following information):
The text was updated successfully, but these errors were encountered: