HMAC in client side JavaScript and identity spoofing -
cryptojs has functions create hmac message , secret key.
how can secure considering secret key must stored in plain sight in javascript source deployed on client ?
anyone can take key , issue similar requests server under identity of original client of api. isn't "identity" problem hmac supposed solve ?
all in all, not understand purpose of hmac in client side js since key can't kept secret.
is there use case computing hmac in javascript ?
javascript has webrtc 2 clients can communicate peer-to-peer, scenario clients can generate , use own "secret".
there cases client -> server usable well. if server "dynamically" serving javascript insert "secret" based on clients current session/login. assuming using https (if not there man in middle slurping "secret") it's not unreasonable assume communication server signed specific "secret" (even on unsecured http) belongs client.
Comments
Post a Comment