hiCTF 2026Cryptography
Cipher Cascade
Four-layer reversible encoding
- Competition
hiCTF 2026
- Category
- CryptographyEasy · estimated
- Analysis status
- Flag extracted locally
- Document
- Original PDF
01Challenge analysis
The problem
The ciphertext was built from multiple basic encoding layers. The important step was to undo transformations in the opposite order from their application.
02Exploit or recovery path
How I solved it
- 01
I recognized the first transformation as a reversal and reversed the provided text.
- 02
I Base64-decoded the resulting string to recover the next intermediate representation.
- 03
I hex-decoded the next layer into text.
- 04
I applied ROT13 to the final string and obtained the flag.
03Code evidence
Reproduction
import base64import codecsdef unwind(ciphertext): stage1 = ciphertext[::-1] stage2 = base64.b64decode(stage1) stage3 = bytes.fromhex(stage2.decode()) return codecs.decode(stage3.decode(), 'rot_13')# print(unwind(original_ciphertext))Result
RECOVERED FLAG
hiCTF{l4y3r_by_l4y3r_unw1nd}
Flag extracted locally
- Local Verification
- The extracted plaintext matched the expected hiCTF flag format; platform acceptance not recorded.