Caesar's cipher
At the old market notice board the Crow leaves his messages: one is written with a cipher that shifts the letters, another one "in a mirror". Decipher both and find the vault code.
Lab 3 of 6 in the Encodings & secrets path. If you get stuck you have 3 hints, from the vaguest to the most precise: they cost 0, 40 and 150 XP.
What you learn
Objectives complete themselves while you work in the terminal; each one is worth experience points:
- Read the README (50 XP)
- Study the notes on the cipher (50 XP)
- Decipher the notice board with tr (ROT13) (150 XP)
- Flip the mirror text with rev (150 XP)
Topics: codici, rot13, cifrari.
Commands you will use
The terminal is simulated and understands about forty Linux commands. In this lab you will mostly need these:
cat: prints the contents of a file: the most direct way to read configurations, notes and logs.tr: replaces characters with others: with the right rules it applies or undoes ROT13.rev: reverses each line character by character, like a mirror.
The simulated environment
You work in a simulated Linux shell, in the home folder of the user runner: invented files and folders, no network target.
The defensive lesson
Once the lab is solved, the write-up explains what went wrong and how to protect yourself:
ROT13 and the Caesar cipher are "ciphers" in name only: the rule is public, there is no secret key and at most 25 attempts break them. Writing a text backwards is even less. Security cannot rest on keeping the method hidden (Kerckhoffs's principle): you need public, solid algorithms such as AES, with a long random secret key.
Before and after this lab
To unlock it you must have solved:
- Hexadecimal (Encodings & secrets, easy)
After this lab you can move on to:
- Layer upon layer (Encodings & secrets, medium)
The Encodings & secrets path
Encodings & secrets teaches a distinction that saves a lot of data: encoding is not encrypting. Base64, hexadecimal, ROT13 and mirrored text change how information looks but do not protect it, because anyone can turn it back into plain text without a key. In the labs you recognise these formats by their look, peel them off one layer at a time even when they are stacked, extract readable text from a compiled program and understand why real protection needs real encryption, salted hashes and a secrets manager.