Description
A monoalphabetic cipher includes its key at the top of the file. Once you map each ciphertext letter back through the key, the hidden flag drops out immediately.
Setup
Open the file; its first line contains the substitution key (e.g., ZGSOCXPQUYHMILERVTBWNAFJDK).
Extract the ciphertext (the characters between picoCTF{ and the closing brace) and run a simple script to map each letter back to the plain alphabet.
python3 - <<'PY'
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
key = "ZGSOCXPQUYHMILERVTBWNAFJDK"
enc = "5NG5717N710L_3A0MN710L_357GX9XX"
flag = "picoCTF{" + ''.join(alphabet[key.index(c)] if c.isalpha() else c for c in enc) + "}"
print(flag)
PY
Solution
- Step 1Derive the mappingBecause the key lists ciphertext letters in order of plaintext A–Z, you simply look up each encrypted character’s index in the key and pull the corresponding letter from the alphabet.
- Step 2Assemble the flagHandle underscores/digits literally, wrap the decoded string with picoCTF{…}, and you have the final flag.
Flag
picoCTF{5UB5717U710N_3V0LU710N_357...}
This challenge is intentionally straightforward, so no frequency analysis is required once the key is provided.