RU EN ES 中文

Caesar Cipher

Cryptographic disk · Secure transmission

How does the cipher work?

+

The Caesar cipher is an encryption method that shifts characters.

1 Choosing the alphabet

The game supports two alphabets: Russian (А-Я, Ё) and English (A–Z). All letters are automatically converted to uppercase. Spaces are kept but not encrypted. Digits and punctuation marks are not allowed.

2 Entering the message

Alice enters the original message. Each character is checked against the chosen alphabet. Invalid characters are filtered out automatically.

3 Setting up the key

A shift (0-90) and direction (left/right) are chosen. The disk visually shows the character mapping.

4 Encryption (step by step)

For each character of the message:

  • The letter's position on the inner disk is found
  • The disk is rotated by the given shift
  • The encrypted character is read from the outer disk
  • Spaces are copied unchanged

Formula: C = (P + K) mod N, where P is the plaintext position, K is the shift, N is the alphabet size.

5 Data transmission

The key (shift) is transmitted over a secure channel, the ciphertext over an open one.

6 Decryption

Bob applies the reverse shift to the ciphertext, recovering the original message.

Formula: P = (C − K + N) mod N

Color legend: ● Plaintext, ● Ciphertext

Alice: message

Only letters of the Russian alphabet (case-insensitive)
0/50
Plaintext
Ciphertext