3 ms·
We're comparing one-time fixed-length code. Is it necessary?
by rplnt 11y ago
We're comparing one-time fixed-length code. Is it necessary?
- mikeash 11y agoProbably not. Ideally you'd implement this endpoint to invalidate the code after a few failures, so a timing attack would be impossible to carry out. But it's a good idea to use one anyway, in case it turns out that you're wrong, or that other code is also broken somehow. It costs almost nothing to do so.