Break the weak ciphers CRIB
The workbench for the ciphers that are actually breakable: the XOR malware hides its config behind, the Caesar in a CTF puzzle. It ranks the guesses by how English they read, so the answer rises up.
Ciphertext
How it works
Why English wins
The trick to breaking XOR without knowing the key is that you do not need to recognise the right answer yourself: you let letter frequency do it. Real English is mostly a handful of letters and spaces, and almost never contains unprintable bytes, so out of 256 candidates the true plaintext scores far above the noise. That single idea, scoring by how English-like the bytes are, is what turns 256 guesses, or a whole recovered key column by column, into one answer at the top of the list.
Questions people ask about CRIB
Why can repeating-key XOR be broken?
Because the key repeats. With a key of length K, bytes K apart were XORed with the same key byte, so XORing two such ciphertext bytes cancels the key and leaves the XOR of two plaintext bytes. English letters differ from each other in fewer bits than random bytes do, so the Hamming distance (the count of differing bits) between blocks K apart is lowest at the true key length.
Once K is known, every K-th byte forms a column encrypted with one key byte, which is single-byte XOR and falls to letter frequency. CRIB tries lengths from 2 to 40 (and no more than a quarter of the ciphertext’s length), shows the four with the lowest normalised distance, takes the smallest length the others are multiples of, and shortens a key found twice over, so SECRETSECRET is reported as SECRET.
How do I break a single-byte XOR?
Paste the ciphertext and press Break single-byte XOR. All 256 keys are tried and each result is scored by how much it reads like English: common letters and spaces score well, and a byte that cannot be printed costs a great deal, because real text almost never contains one. The six best keys are shown with their scores and the start of each decryption.
The key is given in hex and, when it is a printable character, as that character too.
Why does it get the answer wrong?
Usually because the plaintext is not English text. The score is built on English letter frequencies and punishes unprintable bytes, so a decrypted configuration full of binary fields, or text in another language, can lose to a wrong key. Too little ciphertext does the same to repeating-key XOR: each column needs enough bytes for its letter counts to mean something, and with only a few some key bytes come out wrong.
Binary data has a weakness of its own. A run of zero bytes XORed with a key is the key itself, so a repeating pattern in the ciphertext is often the key in plain sight. Try it with XOR with a key you have.
What input does it accept?
Hex, base64 or raw text, pasted into the box. On auto-detect, input made only of hex digits in an even number is read as hex (spaces are ignored), valid base64 as base64, and anything else as text. Set the format by hand when a guess would be wrong: a short word such as decade is also valid hex.
Raw text is read one character to one byte, keeping only the low byte of each character, so ciphertext containing characters beyond Latin-1 should be pasted as hex or base64.
What is the difference between Caesar, ROT13 and ROT47?
A Caesar cipher shifts each letter a fixed number of places round the alphabet. ROT13 is the shift of 13, which undoes itself because 13 is half of 26. ROT47 rotates every printable ASCII character from ! to ~ by 47 places, so digits and punctuation change as well, and it too undoes itself.
Caesar / ROT brute shows all 26 shifts, the most English-looking first, with upper and lower case kept and anything that is not A to Z left alone, and ROT47 below them.
Can it break AES or other modern encryption?
No. These attacks work because XOR with a short key and a Caesar shift leave the structure of the plaintext showing through. A modern cipher such as AES leaves none: its output looks like random bytes whatever the key, so none of the 256 single-byte keys reads as English and no key length stands out from the others.
A quick test of which you have: single-byte XOR only relabels byte values, so the ciphertext keeps exactly the byte entropy of its plaintext. Data that sits at the top of the scale in Entropy is compressed or properly encrypted.
Doing this often? OBSCURA Umbra edits a folder of code where it is and runs JavaScript, TypeScript and Python over it in a sandbox. Everything is US$5 a month or US$48 a year.