Apex › Cryptography

Timing attacks

Why comparing a secret with == is a vulnerability. A naive compare leaks the matching-prefix length through its running time — watch the byte-by-byte attack walk the secret out of it, and watch constant-time compare give the attacker nothing.

More in Cryptography