Explain it in 60 seconds
Constant-time comparison
Backend Engineering · Auth and Security · Intermediate
Why should secrets like tokens or signatures be compared using constant-time comparison?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Normal comparison stops at first mismatch.
- Timing reveals how many characters match.
- Attackers guess byte by byte.
- Use hmac.compare_digest / MessageDigest.isEqual.
- Applies to tokens, HMACs, API keys.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.