Skip to main content
3 of 5
clarify title
otus
  • 32.4k
  • 5
  • 73
  • 167

Why does HMAC use two different keys?

Suppose $H$ is a hash function; why is $H(k||H(k||m))$ not secure?

See this HMAC definition. In there, indeed two keys are used and the mac algorithm is $H(k_1 ||H(k_2 ||m))$ . Why don't we use $H(k||H(k||m))$, which has only one key?

abdolahS
  • 439
  • 5
  • 11