Hacking challenges › Cryptography

Learning route · 7 challenges

# Cryptography

Encoding isn't encrypting, encrypting isn't hashing. Classical ciphers, XOR, hashes and why passwords are stored with salt.

⚠ For educational purposes only. A simulation for strictly educational purposes. Everything happens in your browser against made-up machines: it doesn't connect to any real system. Using these techniques against computers or networks without their owner's written permission is a crime (articles 197 bis and 264 of the Spanish Criminal Code). Learn in order to defend.

The basics before you start

01Encoding doesn't protect

Base64 or hex only change how the data is written: anyone can decode them without a key. If you see letters, numbers, + and / with an = at the end, think base64.

02Classical ciphers

Caesar shifts each letter; Vigenère uses a word as the key. They fall to frequency analysis or to trying every key. They're useful for understanding the idea of a key.

03XOR

The basis of many modern ciphers: it mixes each byte with the key. If the key is short and repeats, or you can guess it from the message format, it breaks.

04Hashes

A hash boils data down to a fingerprint that can't be reversed, but can be guessed: you try words until the fingerprint matches. That's why passwords are stored with slow, salted algorithms (bcrypt, Argon2).

Challenges, from easiest to hardest

▮▯▯▯ Easy10 pts · 6 minBase64 on the wallSomeone has painted some strange text on a wall in Lavapiés. It looks like a secret code, but it isn't: it's just another way of writing.You learn What base64 is, how to spot it (letters, numbers, + and / with an = at the end) and why encoding isn't encrypting.Enter →🩸 no first blood yet▮▮▯▯ Medium20 pts · 10 minOnion layersAn intercepted KOI message comes wrapped in several layers of encoding. Peel them off in the right order.You learn Spotting hex and base64, undoing them with xxd -r -p and base64 -d, and chaining them with |.Enter →🩸 no first blood yet▮▯▯▯ Easy10 pts · 8 minCaesar on the metroA message with its letters shifted turns up in a metro carriage. It's a cipher more than two thousand years old: break it by trying every key.You learn The Caesar cipher, why it has so few possible keys and how it's broken by brute force (trying them all).Enter →🩸 no first blood yet▮▮▯▯ Medium20 pts · 15 minPostcards from FROGFROG left three postcards and a message encrypted with Vigenère. The key isn't written down anywhere… but the postcards keep repeating it without saying so.You learn The Vigenère cipher (Caesar with a word as the key) and how context can give a key away.Enter →🩸 no first blood yet▮▮▮▯ Hard35 pts · 20 minGuessable fingerprintsYou've got hold of the password hashes of four KOI employees. A hash can't be undone… but it can be guessed. Except one.You learn What a hash is, identifying MD5, SHA-1 and SHA-256 by their length, cracking them with a wordlist (john) and why bcrypt holds out.Enter →🩸 no first blood yet▮▮▮▯ Hard35 pts · 20 minXOR and known plaintextThe Fog encrypts its messages with XOR and a short key that repeats. You don't have the key, but you know how the message starts. That's all you need.You learn How XOR works, why a short, repeating key is weak, and the known-plaintext attack.Enter →🩸 no first blood yet▮▮▮▮ Elite50 pts · 35 minMatryoshkaA file from KOI's Hive holds layers within layers: a hash, a zip, a photo and an encrypted message. Each one gives you the key to the next.You learn Chaining techniques: cracking a hash, deducing a derived password, pulling a key out of the metadata and undoing Vigenère over base64.Enter →🩸 no first blood yet

FAQ

What do you learn on the Hacklab's Cryptography route?

Encoding isn't encrypting, and encrypting isn't hashing. Classical ciphers, XOR, hashes and why passwords are stored with salt. Concepts: encoding doesn't protect, classical ciphers, xor, hashes.

How many challenges are on the Cryptography route?

7 challenges ordered from easy to elite. Complete them all to earn the route badge.

More questions about Cyberpunks España →