3 ms·
Out of curiosity I looked up HMAC on Wikipedia; as it turns out, using H(key ∥ message ∥ key) as suggested by nullmeme is "better, however various security pape
by aruggirello 13y ago
Out of curiosity I looked up HMAC on Wikipedia; as it turns out, using H(key ∥ message ∥ key) as suggested by nullmeme is "better, however various security papers have suggested vulnerabilities with this approach, even when two different keys are used."
Now I'm thinking to use plain hmac("a",t) instead of hash(combine(t,"a")) - and simply hash(combine("b",t)) instead of hash(combine(t,"b")); after all, hmac shouldn't be required to protect hb since it's never stored as is.
hmac("a",t) would look like:
hash(combine(xor("a",0x5c),hash(combine(xor("a",0x36),t))))
I could perhaps concat(m,hmac(t,m)) instead of leaving m alone when computing he.