Misc Codes

Misc Codes

Tools

  • DCode - Website

    Support many crypto algorithms, but also some interesting tools.

  • CyberChef - Website

    Online tool to encrypt/decrypt, encode/decode, analyze, and perform many other operations on data.

  • Ciphey - GitHub

    Automated cryptanalysis tool. It can detect the type of cipher used and try to decrypt it.

    Requires python version strickly less than 3.10.

    Will be replaced in the future by Ares

Misc Codes

Here is a list of misc codes. The goal of this section is to help recognize them and provide tools to decode them.

One time pad based codes

  • One time pad - Wikipedia - Many time pad

    Encrypt each character with a pre-shared key. The key must be as long as the message. The key must be random and never reused.

    This can be done using XOR :

    • Encryption: c = m ^ k
    • Decryption: m = c ^ k

    If the key is repeated, it is a type of Vigenere cipher. This template helps to crack repeated XOR keys. xortools can also be used for this. This is called Many time pad

  • Many time pad on images/data

    When structured data is xored with a key, it is possible to find information about the plaintext using multiple ciphertexts.

    This stackexchange question can help understand how the re-use of a One time pad can be dangerous on structured data.

  • Vigenere Cipher - Wikipedia

    Shift cipher using a key. The key is repeated to match the length of the message.

    TypeContent
    MessageHELLO WORLD
    KeyABCDE FABCD
    Cipher (sum)%26HFNLP XQEMK

    This can be cracked using this online tool.

  • Gronsfeld Cipher - Website

    Variant of the Vigenere cipher using a key of numbers instead of letters.

Substitution Ciphers

Substitution ciphers are ciphers where each letter is replaced by another letter. The key is the translation table. They are vulnerable to frequency analysis. This online tool can be used to decipher them (translated to the latin alphabet if needed).

  • Keyboard Shift - Website

    ROT but using the keyboard layout.

  • Caesar Cipher - Website

    Shift cipher using the alphabet. Different alphabets can also be used. Vulnerable to frequency analysis.

  • Atbash Cipher - Wikipedia

    Shift cipher using the alphabet in reverse order.

  • Symbol Substitution Cipher - Website

    Regular letters can be replaced with symbols. Those are often references to video games or films. You can either translate it to any regular letters and use a substitution cipher solver, or find it’s translation table and use it.

    The most common ones are:

    NameDescription
    Daggers CipherSwords/daggers
    Hylian Language (Twilight Princess)Lot of vertical lines
    Hylian Language (Breath of the Wild)Similar to uppercase Latin
    Sheikah Language (Breathe of the Wild)Lines in a square
    Standard Galactic AlphabetVertical and horizontal lines
  • Phone-Keypad

    Letters can be encoded with numbers using a phone keypad.

    1 _ , @2 A B C3 D E F
    4 G H I5 J K L6 M N O
    7 P Q R S8 T U V9 W X Y Z
    * _0 +# _
  • Beaufourt Cipher - Website

    Substitute letters to their index in the alphabet.

  • Polybius Square Cipher - Wikipedia

    Substitution cipher using a 5x5 grid. Each letter is presented by its coordinates on the grid, often written as a two-digit number.

    Can be cracked using simple frequency analysis. The main difficulty is to change the format of the ciphertext to make it easier to analyze.

Transposition Ciphers

  • Transposition Cipher - Wikipedia

    Reorder the letters of the message. The key is the order of the letters.

    Example: HELLO WORLD with key 1,9,2,4,3,11,5,7,6,8,10 becomes HLOLWROLED .

    This online tool can be used to decipher it.

Other

  • Bacon Cipher - Wikipedia

    Recognizable when the ciphertext only contains two symbols (e.g.: A and B) and the length of the ciphertext is a multiple of 5. Example: aabbbaabaaababbababbabbba babbaabbbabaaabababbaaabb.

    Each group of 5 symbols is a letter. It can be deciphered using this online tool.

  • LC4 - Article

    Encryption algorithm designed to be computed by hand. This repository provides an implementation of it.

  • Railfence Cipher - Wikipedia

    Transposition cipher using a key. The key is the number of rails.

    example: Hello world! with 3 rails -> Horel ol!lwd

    H . . . o . . . r . . .
    . e . l . _ . o . l . !
    . . l . . . w . . . d .

    This repository provides an implementation of it.

  • Playfair Cipher - Wikipedia

    Encrypt messages by bigrams (pairs of letters). This online tool can help to crack it.

  • International Code of Signals - Wikipedia

    Using flags to transmit messages. Often used on boats.

  • EFF/DICE - Website

    Generate passphrases from dice rolls. Each set of 5 dice rolls are translated to a word.

  • Base64 , Base32, Base85, Base91

    NameCharsetexample
    Base64A-Za-z0-9+/SGVsbG8gV29ybGQh
    Base32A-Z2-7JBSWY3DPEBLW64TMMQ======
    Base85A-Za-z0-9!#$%&()*+-;<=>?@^_9jqo^F*bKt7!8'or``]8%F<+qT*
    Base91A-Za-z0-9!#$%&()*+,./:;<=>?@[]^_fPNKd)T1E8K\*+9MH/@RPE.

    Usually decoded with python’s base64 lib, or the base64 -d command.

  • Base65535 - GitHub

    Each symbol (number) is encoded on 2 bytes. Consequently, when decoded to unicode, most symbols are very uncommon and also chinese characters.

  • Base41 - GitHub

    Just another data representation.

  • Enigma - Wikipedia

    Machine used by the Germans during World War II to encrypt messages. Still takes a lot of time to crack today, but some tricks can be used to speed up the process.

    404CTF WU