TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Please, don't use equality operator when comparing password hashes

3 pointsby logronoideover 3 years ago

2 comments

yorwbaover 3 years ago
This article seems confused. To successfully execute a timing attack against the hash equality comparison, an attacker would need to be able to generate passwords hashing to arbitrary chosen prefixes, which means that your hash function is super broken.
评论 #28415888 未加载
评论 #28416116 未加载
version_fiveover 3 years ago
Out of curiosity, if you were to write a constant time comparison that always compares every byte, will some compilers just optimize that away and replace it with something that returns false on the first unequal byte?