Free module
Attacks on cryptography
Learn why correct cryptography fails when misused: ECB, padding oracles, nonce reuse, length extension, timing leaks and weak randomness, and the fixes.
The lessons
Each lesson is free and interactive. Press Start lab to run its commands in a live lab and to sit its quizzes and tasks, with no account needed.
1 · Container lab
Why ECB mode leaks patterns
I can show why ECB mode leaks patterns and replace it with AES-GCM.
Read the lesson2 · Container lab
Padding oracles and honest error messages
I can explain how a padding oracle leaks a message and close it with one error and an AEAD.
Read the lesson3 · Container lab
Never reuse a nonce
I can show what a reused nonce leaks and make sure every message gets a fresh one.
Read the lesson4 · Container lab
Length extension and why HMAC exists
I can explain a length extension attack and sign messages with HMAC instead.
Read the lesson5 · Container lab
Timing attacks on comparisons
I can show how a timing leak reveals a secret and compare secrets in constant time.
Read the lesson6 · Container lab
Weak randomness and a crypto review
I can show why the random module is predictable and make secrets with the secrets module.
Read the lesson
Worked in a real lab
Every lesson of this module is worked in a lab started for you alone. The labs it uses:
Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.