bee-san/Ares

Add existing encodings/ciphers from Ciphey

SkeletalDemise opened this issue · 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

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

Ciphers

  • 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
  • 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

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

There's a broken PR for that here :D #137 If you're interested please feel free to try and fix it 🙏🏻 <3

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

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

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.

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

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

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.