Software Securityhome
Fix a findingSearch
Glossary

Timing attack

A side-channel attack that infers secrets from how long operations take, such as a comparison that returns at the first wrong byte of a MAC, token or password hash (CWE-208). Compare secrets with a constant-time function such as hmac.compare_digest, crypto.timingSafeEqual or MessageDigest.isEqual.

Also called
timing side channel
Defined in
MITRE CWE-208

Covered in

Practice: Webhook signature and replay lab: Repair a webhook handler that pays twice · Insecure randomness lab: Generate unguessable API keys

Find your next answer

Type to search. Search runs in your browser.

Searches run in your browser, but the host can infer them from the index files they load. The address shows your search so you can bookmark or share it.