Cifra de César
Criptografe e decifre mensagens com o deslocamento alfabético clássico.
Detalhamento do Cálculo
Sobre Cifra de César
The Caesar cipher is one of the earliest and most widely recognized monoalphabetic substitution ciphers in history. Named after Julius Caesar, who used it with a shift of three ($k = 3$) to protect sensitive military communications during the Gallic Wars, the cipher operates by shifting every letter in the plaintext by a fixed number of positions down the alphabet.
For example, with a shift of 3: "A" becomes "D", "B" becomes "E", "X" wraps around to "A", and "Z" wraps around to "C". Under this rule, the secret message "HELLO" is encrypted as "KHOOR".
Because the standard Latin alphabet contains only 26 letters, there are only 25 meaningful non-zero shift keys. Our Caesar cipher solver enables you to encrypt with any chosen shift key, decode messages with known keys, or brute-force all 25 shift possibilities simultaneously.
Como usar esta ferramenta
- Insira o texto ou valor no campo de entrada.
- Configure as opções ou direções de conversão conforme desejado.
- O resultado convertido é gerado instantaneamente em tempo real.
- Clique no botão Copiar para salvar o resultado.
Mathematical Formula for Caesar Cipher
The Caesar cipher is expressed mathematically through modular arithmetic on integers 0 through 25 (where A=0, B=1, ... Z=25):
Encryption: $E_k(x) = (x + k) \pmod{26}$
Decryption: $D_k(x) = (x - k) \pmod{26} = (x + 26 - k) \pmod{26}$
Non-alphabetic characters (such as numbers, spaces, and punctuation marks) are preserved without modification.
Caesar Cipher Examples
Historical Julius Caesar Shift (Shift = 3)
Standard military shift used in ancient Rome.
"I love you" in Caesar Cipher (Shift = 3)
Encrypting a romantic phrase with shift 3.
Decoding with Shift 3
Deciphering "KHOOR" back to "HELLO".
Caesar Cipher Alphabet Shift Map (Shift = 3)
| Plaintext Letter | Shift +3 | Plaintext Letter | Shift +3 |
|---|---|---|---|
| A–M | D–P | N–W | Q–Z |
| X | A | Y | B |
| Z | C | Space / Numbers | Preserved as-is |
Security Weakness of Caesar Cipher
- The Caesar cipher offers zero security against modern cryptanalysis because an adversary can test all 25 possible shift keys in seconds (brute-force attack).
- It preserves natural English letter frequency patterns (the letter "E" remains the most common character in the ciphertext, simply shifted).
Perguntas Frequentes
What is a Caesar cipher?
How does a Caesar cipher work?
How to do a Caesar cipher?
Is Caesar cipher symmetric or asymmetric?
How do I decode a Caesar cipher?
How do you say "I love you" in Caesar cipher?
Is the Caesar cipher easy to crack?
What is one weakness of the Caesar cipher?
How to solve a Caesar cipher without a key?
How to talk in Caesar cipher?
How to reverse a Caesar cipher?
Ferramentas Relacionadas
Rotate letters by 13 positions in the alphabet. Self-inverse symmetric substitution.
Polyalphabetic substitution cipher using a repeated secret keyword and the Vigenère tabula recta.
Monoalphabetic substitution cipher where the alphabet is mapped onto its reverse (A ↔ Z, B ↔ Y).
Mathematical substitution cipher: E(x) = (ax + b) mod 26 using coprime multiplier and shift.