gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis
https://gchq.github.io/CyberChef
Apache License 2.0
28.97k stars 3.25k forks source link

Operation request: Add custom alphabet support to Atbash and Affine ciphers #73

Open n1474335 opened 7 years ago

n1474335 commented 7 years ago

Summary

Add the ability to specify different alphabets for use with the Affine and Atbash cipher operations.

Possible solutions

The editableOption argument type could be useful. See 'To Base64' for an example of how this works. You could specify a few default alphabets (Latin, Hebrew etc.) whilst still allowing users to enter a custom alphabet of their choosing.

mattnotmitt commented 7 years ago

I still have a branch open on my fork of this repo. I've tried and I just can't get it to be reproducible for some reason - if someone wants to take a look, please, do go ahead.

tlwr commented 7 years ago

Haven't pulled down your fork and experimented but my intuition is that representing alphabets as strings:

"אבגדהוזחטיכלמנסעפצקרשת"`

might make things more difficult / unpredictable when each letter is multiple Unicode bytes but instead store each "letter" (as opposed to the individual bytes) as an element in an array:

["ש" ,"ת"...]

Disclaimer: I have absolutely no knowledge of any alphabets other than the latinate English one.

mattnotmitt commented 7 years ago

The language being written right to left is causing me a whole world of trouble, now that I've had time to work on it again. I can't even seem to make an array of it display properly without killing my terminals or editors.

seefood commented 7 years ago

Want help from an Israeli with the knowhow of getting VIM to edit right-to-left and all? Drop me a note with the branch in question and I'll take a look. Alternatively, use a terminal (non-GUI) editor and you should be fine.