Cryptography for Hackers

Encoding, hashing, XOR, symmetric crypto โ€” how it works and how it breaks. Break real artifacts in your lab.

20 lessons ยท CHF 9.90 one-time

20 lessons ยท knowledge checks ยท final exam ยท verifiable certificate ยท in-browser Live-Lab

Buy now ยท CHF 9.90 Open in the course reader

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is an encoding: a public, keyless mapping into a safe alphabet. Anyone can decode it with base64 -d, so a Base64-encoded password or API secret should be treated as plaintext.

What is the difference between hashing and encryption?

Encryption is reversible with the right key and protects confidentiality. Hashing is one-way, uses no key and produces a fixed-length digest, so it is used for integrity checks and password verification rather than for hiding data you need back.

How can I tell which hash algorithm produced a string?

Start with the length of the hex string: 32 characters suggests MD5, 40 suggests SHA-1, 64 suggests SHA-256 and 128 suggests SHA-512. Length is a strong hint, not proof, so confirm with context such as the application or file format.

If a hash cannot be reversed, how are password hashes cracked?

Attackers guess candidate passwords, hash each guess and compare it with the stored digest. Fast, unsalted hashes such as plain MD5 make this practical for weak passwords, which is why password storage should use Argon2id, scrypt or bcrypt with unique salts.

Why does OpenSSL ciphertext in Base64 start with U2FsdGVkX1?

openssl enc writes the ASCII header Salted__ followed by an 8-byte salt before the ciphertext. Salted__ in Base64 begins with U2FsdGVkX1, so the prefix identifies password-based OpenSSL encryption, where the password is usually the weak point rather than AES.

Why is the salt stored in clear text next to a password hash?

A salt does not need to be secret. Its job is to make identical passwords produce different stored values and to make precomputed tables useless, so an attacker must attack every entry separately. Formats such as $6$salt$hash or OpenSSL's Salted__ header therefore store it openly.

Get the full course

One-time purchase, no subscription. Pay as a guest โ€” no account needed.

Buy now ยท CHF 9.90 Open in the course reader

Course syllabus

Lessons unlock after a single one-time purchase โ€” no subscription. Pricing & FAQ โ†’ ยท All course overviews โ†’