How it works
The Caesar Cipher is a type of substitution cipher where each letter in the plaintext is replaced by a letter a fixed number of positions down the alphabet. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. The alphabet wraps around, so a shift of 1 on Z results in A.
Mathematical Representation
The encryption algorithm can be expressed using modular arithmetic. If we assign each letter a number (A=0, B=1, ..., Z=25), the encryption of a letter x with a shift n is:
En(x)=(x+n)mod26
To decrypt a ciphertext letter, the formula is simply reversed:
Dn(x)=(x−n)mod26
How This Tool Processes Text
- Character Evaluation: The tool reads your input character by character.
- Shift Application: For every standard letter (A-Z or a-z), it applies your chosen shift value. The shift wraps around the 26-letter alphabet seamlessly.
- Configuration Filters: Depending on your settings, the tool can independently shift numbers (0-9) using modulo 10 arithmetic, and it can either preserve or strip out foreign characters, punctuation, and spaces.
- Brute-Force Analysis (Optional): When using the solver mode, the tool generates all 26 possible permutations. It then compares the letter frequencies of each result against standard English language distributions. The result with the lowest variance (best fit) is highlighted as the most probable plaintext.