EncryptCodecencryptcodec
Simulations/Timing Attack

Server Timing Attack

Advanced

When servers compare strings with ===, response time leaks how many characters match. Exploit this timing side-channel to guess the password, then fix it with constant-time comparison.

Progress:
1
Exploit the Timing Leak
2
Apply the Fix
auth-server.js (VULNERABLE)
// Vulnerable: early return on mismatch function checkPassword(input, stored) { return input === stored; // leaks timing! }
Quick probe — try first character:
Response times (timing leak)
Submit a guess to see timing data

Challenges

1
Exploit the Timing Leak
Guess the secret password by observing response time differences.
hints
2
Apply the Fix
Select the correct constant-time comparison method to eliminate the timing leak.
hints
How to fix timing attacks
Constant-time comparison eliminates timing side channels

Frequently Asked Questions