Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
@CodesInChaos, would you mind formulating a proper answer using the information from the provided links? – SEJPM Jun 26 '15 at 11:57
@SEJPM I don't have any plans for writing an answer to this question. – CodesInChaos Jun 26 '15 at 12:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.