Security Fundamentals · Cryptography basics
Constant-time comparison
Also known as: Timing-safe comparison
Compares secret values without varying execution with the position of the first differing byte. Use a vetted comparison function and follow its input-length requirements. Surrounding code can still introduce timing leaks.