Ares icon indicating copy to clipboard operation
Ares copied to clipboard

Add existing encodings/ciphers from Ciphey

Open SkeletalDemise opened this issue 2 years ago • 10 comments

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

  • [x] Base2 (Binary)
  • [ ] Base8 (Octal)
  • [ ] Base10 (Decimal)
  • [x] Base16 (Hexadecimal)
  • [x] Base32
  • [x] Base58 Bitcoin
  • [x] Base58 Flickr
  • [x] Base58 Ripple
  • [x] Base58 Monero (Not in Ciphey)
  • [ ] Base62 #137
  • [x] Base64
  • [x] Base64 URL
  • [ ] Base69
  • [ ] Base85
  • [x] Citrix CTX1 (Not in Ciphey)
  • [ ] Z85
  • [ ] ASCII Base85
  • [x] Base91
  • [x] Base65536
  • [ ] ASCII
  • [x] Reversed text
  • [x] Morse Code
  • [ ] DNA codons
  • [x] Atbash
  • [ ] Standard Galactic Alphabet (aka Minecraft Enchanting Language)
  • [ ] Leetspeak
  • [ ] Baudot ITA2
  • [x] URL encoding
  • [ ] SMS Multi-tap
  • [ ] DMTF
  • [x] A1Z26
  • [ ] Prisoner's Tap Code
  • [ ] UUencode
  • [ ] Braille (Grade 1)

Ciphers

  • [x] Caesar Cipher
  • [ ] ROT47 (up to ROT94 with the ROT47 alphabet)
  • [ ] ASCII shift (up to ROT127 with the full ASCII alphabet)
  • [ ] Vigenère Cipher
  • [ ] Affine Cipher
  • [x] Railfence Cipher (Not in Ciphey)
  • [ ] Binary Substitution Cipher (XY-Cipher)
  • [ ] Baconian Cipher (both variants)
  • [ ] Soundex
  • [ ] Transposition Cipher
  • [ ] Pig Latin

Modern day cryptography

  • [ ] Repeating-key XOR
  • [ ] Single XOR

Esoteric languages

  • [ ] Brainfuck

Compression Methods

  • [ ] GZip

SkeletalDemise avatar Nov 14 '22 08:11 SkeletalDemise

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

RESDXChgfore9hing avatar Dec 26 '22 16:12 RESDXChgfore9hing

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

bee-san avatar Dec 26 '22 20:12 bee-san

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

gregorni avatar May 28 '23 11:05 gregorni

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

SkeletalDemise avatar May 28 '23 21:05 SkeletalDemise

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 avatar May 28 '23 22:05 gregorni

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

gregorni avatar Aug 16 '23 12:08 gregorni

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

SkeletalDemise avatar Aug 17 '23 06:08 SkeletalDemise

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 avatar Aug 31 '23 16:08 gregorni

For Vigenere and XOR, I found these two algorithms:

  • https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/vigenere.rs
  • https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/xor.rs

gregorni avatar Aug 31 '23 16:08 gregorni

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.

Reginald-Gillespie avatar Apr 04 '24 14:04 Reginald-Gillespie