Course / 10 Crypto and files / Lesson 01 of 19

Classical ciphers

Estimated time: 15 min reading · 15 min activity

A puzzle can give you a ciphertext, the transformed text, together with the rule that made it. A Caesar cipher replaces every letter by the letter a fixed distance away in the alphabet. That distance is the shift. Plaintext means the text before encryption; decrypting reverses the shift to recover it.

Use uppercase A–Z with A numbered 0 and Z numbered 25. For this lesson encryption moves forward by one and decryption moves back by one. After Z comes A; before A comes Z. This small public rule is useful for practising reversible transformations, but it does not protect real secrets.

Before you begin

Estimated time
15 min reading, 15 min activity. Setup and optional practice may take longer.
Where you work
Read the printed evidence in a desktop or mobile browser and keep notes on paper or in a text editor. No installation, recovery tool, GPU, real password, live lookup or external account is required. Any later optional tool setup is outside the estimates.
Without a lab
All evidence needed for the activity appears on this page. Copy it into notes if downloads are unavailable. Read the labeled model and predict each result; a paper trace practises the reasoning while tool operation waits for a lab. Reading needs no JavaScript. Answer checking needs JavaScript and a secure context; saving progress also needs usable browser storage.

After this lesson you can:

  • Decrypt a three-letter word with the stated shift of +1.
  • Wrap from A back to Z when the shift steps off the alphabet.
  • Describe the result as a puzzle plaintext, not as modern confidentiality.

01Example

Original hand-worked alphabet model. The activity below uses a different word.

Plaintext HI: H=7, I=8
Encrypt with +1: I=8, J=9 → IJ
Decrypt IJ with −1: H=7, I=8 → HI
Boundary example: A moved back one wraps to Z.

02The ring is the whole rule

The alphabet row is a ring because moving beyond either end returns to the other. Modulo 26 means keep the remainder after division by 26; for a negative step here, add 26 to return to positions 0–25. Number 0 moved back one therefore becomes 25.

ROT13 is the same idea with shift 13. A substitution cipher may use an arbitrary replacement alphabet, while a Vigenère cipher varies shifts with a repeated keyword. Those names do not identify a mystery message by themselves. This worksheet declares its shift, so you can apply it without guessing an algorithm.

Trace fixed +1 and its inverseModel. A teaching model drawn by hand. It shows the idea, not real tool output.

Read the full explanation below.

Hand-worked model · fixed course key 1 · A=0 … Z=25

Supplied direction and sample

Add 1 for encryption; subtract 1 for decryption. Wrap modulo 26.

Hindex 7not traced yet—
Iindex 8not traced yet—

Boundary card: A has index 0; 0 − 1 = −1, wrapped modulo 26 to 25 = Z.

Separate HI-only toy-key exploration

This varies a toy key; the authored +1 cards above stay fixed.

HI → IJ

HI → IJ · encrypt, key 1
InputIndexOperationWrapped indexOutput
H77 + 18I
I88 + 19J

Start HI with the fixed shift of 1; no letters are traced yet.

Follow the explanation

  1. Start HI with the fixed shift of 1; no letters are traced yet.
  2. Trace 1 of 2 letters in HI, adding 1 and wrapping modulo 26.
  3. Trace 2 of 2 letters in HI, adding 1 and wrapping modulo 26.

Complete fixed-key mapping tables

HI → IJ · encrypt, key 1
InputIndexOperationWrapped indexOutput
H77 + 18I
I88 + 19J
IJ → HI · decrypt, key 1
InputIndexOperationWrapped indexOutput
I88 − 17H
J99 − 18I
A → Z · decrypt, key 1
InputIndexOperationWrapped indexOutput
A00 − 125Z

Separate HI exploration examples: key 0 → HI; key 1 → IJ; key 25 → GH.

The alphabet is ASCII A–Z. This transform preserves ASCII case and leaves other characters in place. Round-trip consistency does not establish secure encryption or sender identity.

Hand-worked ASCII letter mappings, A=0 through Z=25. A separate HI-only toy-key exploration leaves the fixed cards unchanged.

03Decrypt ABU

The activity ciphertext ABU uses the same declared +1 encryption rule. Read the text alphabet if the drawing is unavailable.

Trace the supplied guided wordModel. A teaching model drawn by hand. It shows the idea, not real tool output.

Read the full explanation below.

Hand-worked model · fixed course key 1 · A=0 … Z=25

ABU → ZAT: decrypt −1

Add 1 for encryption; subtract 1 for decryption. Wrap modulo 26.

Aindex 0not traced yet—
Bindex 1not traced yet—
Uindex 20not traced yet—

Boundary card: A has index 0; 0 − 1 = −1, wrapped modulo 26 to 25 = Z.

Start ABU with the fixed shift of 1; no letters are traced yet.

Follow the explanation

  1. Start ABU with the fixed shift of 1; no letters are traced yet.
  2. Trace 1 of 3 letters in ABU, subtracting 1 and wrapping modulo 26.
  3. Trace 2 of 3 letters in ABU, subtracting 1 and wrapping modulo 26.
  4. Trace 3 of 3 letters in ABU, subtracting 1 and wrapping modulo 26.

Complete fixed-key mapping tables

ABU → ZAT · decrypt, key 1
InputIndexOperationWrapped indexOutput
A00 − 125Z
B11 − 10A
U2020 − 119T
A → Z · decrypt, key 1
InputIndexOperationWrapped indexOutput
A00 − 125Z

The alphabet is ASCII A–Z. This transform preserves ASCII case and leaves other characters in place. Round-trip consistency does not establish secure encryption or sender identity.

Subtract one per letter with wrap: the first A uses 0 − 1 wrapped to 25. This model is not secure encryption or proof of identity.
Label: original alphabet rule. Hand shifts. No program was run.

Alphabet, A=0 through Z=25:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Encrypt: add the shift, then wrap with modulo 26.
Decrypt: subtract the shift, then wrap with modulo 26.
The stated shift on these cards is +1.
A steps back to Z. Z steps forward to A.

Worked encrypt: HI -> IJ.
H=7 becomes 8=I. I=8 becomes 9=J.
Worked decrypt: IJ -> HI.

Activity decrypt, shift +1: ABU.
A steps back to Z. B steps back to A. U steps back to T.
Predicted plaintext: ZAT.

Download the shift cards

A text ring for the same positions. Read left to right, then wrap.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|                                         |
+------------------- wrap ----------------+

Forward one from Z is A.
Back one from A is Z.

Download the text alphabet ring

A shift wraps around the alphabet
A shift wraps around the alphabetModel. A teaching model drawn by hand. It shows the idea, not real tool output.Read the letters A through Z in order. Moving forward after Z returns to A; moving backward before A returns to Z. The row illustrates the wraparound rule used by the shift model, rather than a secure encryption system.

The alphabet as a ring

  1. Write three positions for A, B and U. Decide the direction before moving a letter: you are decrypting.
  2. Move each letter back one; when A crosses the beginning, wrap to Z. Keep the original order of the letters.
  3. Compare your prediction with ZAT. Explain the first letter’s wrap rather than judging the result by whether it is an English word.
  4. Stop after that word. The later checkpoint uses independent ciphertext; do not replace its evidence with this activity result.

04Optional challenge

For about ten optional minutes, reverse a shift of 13 on URYYB. Write the five letter moves and verify by shifting your result forward 13. A successful round trip checks consistency with the chosen rule, not modern security or the sender’s identity.

05Fresh cases for the checks

Use these fictional cases for the checks below. They have different inputs from the worked examples. Read them here or make notes; no installation or external service is needed.

Shift card A: independent wordOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.

Alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ, wrapping at both ends.
Encryption moves every letter forward by 1. Ciphertext: EPH.
Decrypt by reversing that declared rule. Keep letter order.

Boundary card B: separate ciphertextOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.

Same A–Z alphabet; encryption shift +1.
Ciphertext: BAC.
Do not replace this input with the word on Shift card A.

Round-trip card C: separate plaintextOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.

Alphabet A–Z, wrapping after Z. Encryption shift +1.
Plaintext: YZA. Apply encryption once; this is a separate round-trip practice input.

06Explain the evidence and its limit

Optional self-check: show the letter moves for a declared shift and a reverse pass, then state one limit of the result.

Review it: distinguish plaintext from ciphertext, retain wraparound, keep letter order and avoid calling a tiny public shift modern protection.

07Common mistakes

If ABU becomes BCV, the shift went forward. Mark encrypt versus decrypt above the alphabet before trying again.

If the first letter disappears, apply wraparound: the position before A is Z.

If readable output seems to prove the cipher, separate a plausible interpretation from a provenance record that actually names the rule.

References