Caesar
Caesar
Platform: taipanbyte | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-02-14 | Status: Solved Techniques: caesar_shift, known_plaintext_attack
Summary
Task: Decrypt a Caesar-cipher encoded flag. Solution: Use known-plaintext attack with the TB{ flag prefix to determine shift value of +8, then apply the shift to all alphabetic characters while preserving digits and special characters.
Caesar — taipanbyte CTF
Description
Попробуй расшифровать это:
LT{ymqk_lz1k_1k_f0l_k3j1gmk}
Flag format: TB{...}
Analysis
- The ciphertext
LT{ymqk_lz1k_1k_f0l_k3j1gmk}has the structureXX{...}matching the flag formatTB{...} - Known-plaintext attack using the flag prefix:
Lshould beT: shift = ord('T') - ord('L') = 84 - 76 = +8Tshould beB: shift = (ord('B') - ord('T')) % 26 = (66 - 84) % 26 = +8 (confirmed)
- Non-alphabetic characters (
{,},_, digits1,0,3) are preserved — classic Caesar cipher behavior - This is a standard Caesar cipher with shift +8
Solution
Key Insight
The flag format TB{...} gives us a known plaintext prefix. Comparing LT (ciphertext) with TB (expected plaintext) immediately reveals the shift value of +8. Since Caesar cipher uses a fixed shift for all characters, this single observation is enough to decrypt the entire message.
Manual Verification
Checking a few characters with shift +8:
L+ 8 =TT+ 8 =By+ 8 =gm+ 8 =uq+ 8 =yk+ 8 =s
So ymqk -> guys — makes sense!
Solve Script
python read-only • copy allowed#!/usr/bin/env python3 text = 'LT{ymqk_lz1k_1k_f0l_k3j1gmk}' shift = 8 result = '' for c in text: if c.isalpha(): base = ord('A') if c.isupper() else ord('a') result += chr((ord(c) - base + shift) % 26 + base) else: result += c print(result) # TB{REDACTED}
Output
TB{REDACTED}
Lessons Learned
- Always use the known flag format as a crib for known-plaintext attacks
- Caesar cipher is the simplest substitution cipher — just a fixed shift of the alphabet
- Two known plaintext-ciphertext character pairs are enough to confirm Caesar (vs. other ciphers)
- Leet speak (digits replacing letters like
1fori,0foro,3fore) is unaffected by Caesar shift since only alphabetic characters are rotated