Advanced › Module 4 › Lesson 1
Caesar Vigenere
Caesar and Vigenère literacy names classical substitution ciphers — practice breaks on YOUR $CRYPTO_LAB plaintext CTF only.
Visual · t28_caesar_vigenere
Classic cipher literacy. $CRYPTO_LAB only. Original Cyberlium.
Opening
Shift by three or repeat a keyword — history lessons and CTF fun on text YOU wrote, not stranger private messages.
Caesar cipher shifts letters by fixed offset (ROT13 is offset 13). Vigenère uses repeating keyword to vary shift per letter — stronger than Caesar but breakable with Kasiski and index-of-coincidence on long enough samples. Both teach frequency intuition before modern crypto. Cyberlium practices Caesar/Vigenère on YOUR $CRYPTO_LAB CTF toys — passages you author, course crackmes with training labels — never decrypt private communications you do not own. Next: XOR CTF.
1. Caesar and Vigenère (named)
Caesar: monoalphabetic shift — 25 keys brute-forceable. Vigenère: polyalphabetic with keyword — key length found via repeated ciphertext patterns, then column-wise frequency attack.
On $CRYPTO_LAB, encrypt one paragraph YOU wrote with Caesar shift 7 and note how freq analysis would start — decrypt your own toy only.
Command guide
Try these commands — Caesar and Vigenère (named)
═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)
Classical ciphers — https://cryptopals.com/ (Set 1 challenges YOU choose) CWE-327 — https://cwe.mitre.org/data/definitions/327.html NIST crypto — https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install python3
macOS:
Command — copy this
brew install python3
Windows: Download https://python.org/downloads/
═══ LINUX / macOS ═══
Command — copy this
export CRYPTO_LAB=${CRYPTO_LAB:-$HOME/cyberlium-lab/t28-crypto}
python3 - <<'PY'
text = 'CYBERLIUM LAB PLAINTEXT ONLY'
shift = 3
caesar = ''.join(chr((ord(c)-65+shift)%26+65) if 'A'<=c<='Z' else c for c in text)
print(f'Plain: {text}')
print(f'Caesar: {caesar} (shift={shift}, YOUR string only)')
PYCommand — copy this
grep SCOPE "$CRYPTO_LAB/notes/no-live-attacks.txt"
Primary tools to practice this lesson: python3, grep. Reference sites: Classical ciphers (https://cryptopals.com/); CWE-327 (https://cwe.mitre.org/data/definitions/327.html); NIST crypto (https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.
2. Why classic ciphers still matter
History explains why modern crypto replaced substitution. CTF builds pattern recognition and Python string skills. Incident reports rarely cite Caesar — but XOR and encoding mistakes echo same thinking.
Defenders never deploy classical ciphers for real secrets — literacy only.
3. CTF scope boundary
Forbidden: breaking classmate notes, private chats, or scraped ciphertext without authorization. Allowed: classic CTF card — cipher type, YOUR sample filename, shift/key used, flag phrase you planted.
Ship: Caesar/Vigenère CTF card for $CRYPTO_LAB. Next: XOR CTF.
4. What you ship: Caesar/Vigenère CTF card for $CRYPTO_LAB
Cipher type, YOUR sample file, key/shift, planted flag. $CRYPTO_LAB named. NO stranger messages. chmod 600.
5. What you record before the next lesson
Date. Classic CTF card. $CRYPTO_LAB named. File t28-m04-l01-caesar-vigenere.txt chmod 600.
6. Wrong vs right: prod crypto oracles vs CTF toys
Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.
Wrong
Decrypt found notebook Caesar without owner consent. Deploy Vigenère for real passwords.
Right
Write Caesar/Vigenère CTF card for YOUR $CRYPTO_LAB plaintext toy. Next: XOR CTF.
Mission: build YOUR classic cipher toy
1) Author one paragraph plaintext. 2) Encrypt with Caesar or Vigenère. 3) Plant a flag phrase. 4) chmod 600.
Stuck? Ask Cyberlium AI Mentor
Label samples 'MY CTF TOY' — scope clarity beats ambiguous ciphertext files.
Knowledge Check
APPLY: Caesar/Vigenère on Cyberlium means:
Multiple choice
Knowledge Check
APPLY: True or False: Vigenère is breakable with frequency methods on long enough samples.
True or False
Knowledge Check
APPLY: Classic cipher CTF requires:
Multiple choice