260 words
1 minute
πŸ” PicoGym - Caesar

πŸ“‚ Download challenge file.

Description: Decrypt this message.
Difficulty: Medium
Author: NSanjay C/Daniel Tunitis

Summary#

This challenge introduces the concept of Caesar cipher. You’re given an encoded flag file named data.enc and need to decrypt it to reveal the hidden flag.

You can solve it using online tools like Caesar cipher decoder or by manually testing shifts.


Analysis#

First we identify the file type:

Terminal window
$ file data.enc
data.enc: ASCII text

It’s plain ASCII text, so let’s open it. The file contains:

picoCTF{hwtxxnslymjwzgnhtswlvhsgdv}

The flag clearly starts with the known prefix picoCTF{}, but the inner text hwtxxnslymjwzgnhtswlvhsgdv is encrypted.

This strongly suggests the Caesar cipher, a classic encryption method where each letter in the plaintext is shifted by a fixed number of positions in the alphabet.

What Is the Caesar Cipher?#

The Caesar cipher is one of the oldest and simplest encryption techniques. It works by shifting each letter of the alphabet by a fixed number (called the key or offset).

For example, with a shift of 3:

  • A β†’ D
  • B β†’ E
  • C β†’ F
  • … and so on.

Decryption simply reverses this process by shifting in the opposite direction.


Now, let’s decode the ciphertext. Using a Caesar cipher decoder, I tried different shifts (0–25) until I found the one that gives readable text.

After testing a few offsets, we find that a shift of 5 correctly decrypts the message:

picoCTF{crossingtherubiconrgqcnbyq}
⚑ Raikiri

πŸŽ‰ Flag pwned! The ciphertext has been decoded successfully.

caesar

πŸ’‘ TL;DR / Lesson Learned

The Caesar cipher works by shifting letters by a fixed offset, a foundational concept in classical cryptography.
It’s no longer used in modern security because it can be easily decoded, though it was once used in early military communications.