Hacker News new | ask | show | jobs
by sqrt2 4496 days ago
A MAC of a message m can only be computed with the knowledge of a key K. Specifically, with a cryptographic hash function h,

  HMAC(K, m) = h(K + a || h(K + b || m)),
where + is addition mod 2 (xor), || is concatenation and a and b are constants. (This construction takes into account possible length extension attacks on h.)

Given that h is secure, knowledge of any reasonable number of pairs (m, HMAC(K, m)) does not allow you to recover K, and without K, you cannot compute HMAC(K, m) for known m, i.e. enumerate all the possible MACs for serial numbers.