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.

What is HMAC Authentication why is it useful?

21 pointsby wolfeidauover 12 years ago

3 comments

antirezover 12 years ago
Beware of playback attacks, that is, an attacker sniffing the request can reused it as it is even if he does not know the shared secret.<p>To mitigate the playback attack it is possible to use a challenge-request protocol where the server sends to the client a large random number that the client needs to add to the HMAC input (and that invalidates after receiving the request so that no further requests can be made using the same random number).
评论 #4678032 未加载
评论 #4677455 未加载
michaelmiorover 12 years ago
I don't understand why this is a downside<p>"Cryptography is hard, a single character difference will result in a completely different value."<p>HMAC is designed to guarantee the integrity of the message. If a single character difference didn't result in a completely different value, the whole method would be completely flawed.
评论 #4676818 未加载
评论 #4678015 未加载
评论 #4677582 未加载
jemeshsuover 12 years ago
How does one implement a browser single-app JS client (Backbone, Angular etc) to access server API with HMAC authentication? The secret key will be exposed clearly in the JavaScript client.
评论 #4676973 未加载
评论 #4676875 未加载