Skip to content
العربية

Cryptography (Crypto)

Cryptography challenges in CTF: from classical ciphers to mistakes in using modern encryption.

Estimated time
30 min
Level
Intermediate
Your progress in this track0%

Before this lesson

Cryptography challenges in CTF are about recovering an original text or a key from encrypted data, usually by exploiting a mistake in how the encryption was used rather than in the algorithm itself. Challenges start with simple classical ciphers (shift and substitution) and build up to common mistakes in modern encryption: reusing a key, predictable inputs, or an incorrect implementation. The link to the encoding lesson is essential: the first step is always telling apart what is an encoding you reverse at once and what is encryption that needs analysis. This lesson introduces the way of thinking about this kind of challenge and its first tools.

Labs

  • A message in two layers

    EasyDownload

    Turn the message back into its original text and extract the flag.

  • Repeating-key XOR

    MediumDownload

    Recover the key from the known phrase, then decrypt the whole note and extract the flag.

  • Keystream reuse

    HardDownload

    Exploit the keystream reuse to recover the private order and extract the flag.

  • Close RSA primes

    HardDownload

    Factor n, derive the private key, and decrypt c to read the flag.