bee-san / Ares

Automated decoding of encrypted text without knowing the key or ciphers used
MIT License
539 stars 25 forks source link

Add existing encodings/ciphers from Ciphey #61

Open SkeletalDemise opened 1 year ago

SkeletalDemise commented 1 year ago

This is a list of all the currently supported encodings/ciphers in Ciphey. We need to make them in Rust for Ares to achieve feature parity.

Encodings

Ciphers

Modern day cryptography

Esoteric languages

Compression Methods

RESDXChgfore9hing commented 1 year ago

binary bytes type base 62 quick reference.https://www.codeproject.com/articles/1076295/base-encode

bee-san commented 1 year ago

binary bytes type base 62 quick reference.https://www.codeproject.com/articles/1076295/base-encode

There's a broken PR for that here :D https://github.com/bee-san/Ares/pull/137 If you're interested please feel free to try and fix it 🙏🏻 <3

gregorni commented 1 year ago

ASCII85 and Base85 are the same encoding, just different names. Maybe one of them should be removed from the list to avoid confusion.

SkeletalDemise commented 1 year ago

ASCII85 and Base85 are the same encoding, just different names.

That's false, they're different. ASCII85 refers to Adobe's variation of base85. They're separate functions in Python.

https://en.wikipedia.org/wiki/Ascii85#Adobe_version

Adobe adopted the basic btoa encoding, but with slight changes, and gave it the name Ascii85.

https://docs.python.org/3/library/base64.html

base64.a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False)
Encode the bytes-like object b using Ascii85 and return the encoded bytes.
base64.b85encode(b, pad=False)
Encode the bytes-like object b using base85 (as used in e.g. git-style binary diffs) and return the encoded bytes.

https://stackoverflow.com/questions/34969947/what-is-the-difference-between-a85encode-and-b85encode

gregorni commented 1 year ago

Oh, right, I forgot how many implementations of Base85 there are. Perhaps we should specify it's the Adobe implementation of Base85 up there, for extra clarity.

gregorni commented 1 year ago

With ciphers that require a password, like Vigenère Cipher, how is that done? Is the password just brute-forced?

SkeletalDemise commented 1 year ago

With ciphers that require a password, like Vigenère Cipher, how is that done? Is the password just brute-forced?

Yes, a Vigenere cracker needs to be implemented. Here's an example of one: https://www.guballa.de/vigenere-solver That's the best one that I know of. How it works: https://www.guballa.de/bits-and-bytes/implementierung-des-vigenere-solvers

gregorni commented 1 year ago

A lot of ciphers require you to know the key with which the message was encoded. We should write a crate for brute-forcing keys, and use that among all the cipher crates.

gregorni commented 1 year ago

For Vigenere and XOR, I found these two algorithms:

Reginald-Gillespie commented 5 months ago

Not sure if it's worth a whole issue or not but eventually instead of guessing/brute forcing the password, I think there should be a flag to provide a known password, then ares could only go over ciphers with passwords using the provided password.