Cryptography (Crypto)
Cryptography challenges in CTF: from classical ciphers to mistakes in using modern encryption.
- Track
- CTF challenges
- Estimated time
- 30 min
- Level
- Intermediate
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
SolvedEasyDownload
Turn the message back into its original text and extract the flag.
Enter the labLockedRepeating-key XOR
SolvedMediumDownload
Recover the key from the known phrase, then decrypt the whole note and extract the flag.
Enter the labLockedKeystream reuse
SolvedHardDownload
Exploit the keystream reuse to recover the private order and extract the flag.
Enter the labLockedClose RSA primes
SolvedHardDownload
Factor n, derive the private key, and decrypt c to read the flag.
Enter the labLocked
