Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

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

I am actually preparing for a cryptography exam, and I found a question asked by the professor in the class, below are the lines that I copied from the slide :

Example: Let $Ek$ be the encryption transformation of one-key cipher and $h$ be a hash function. Then $hk := Ek ◦ h$ is a keyed hash function, where $◦$ denotes the function composition.

Security: It should have good properties if both the one-key cipher and the hash function are well designed.

Write down some design requirements for the underlying hash function and one-key cipher.

I searched a lot about keyed hash functions, but I couldn't find any good article about such a design.

Can anyone help me with that?

share|improve this question
the question seems to be asking about how to design hash functions and ciphers, the text before the question does not help answer the question, and the answer would not be specific to keyed hash functions – Richie Frame Nov 27 '13 at 6:34
What does "good properties" mean? Probably, this is an attempt to construct a MAC. The hash function requirements are fairly obvious, the encryption function requirements less so (in the sense that it will likely be non-standard). – K.G. Nov 27 '13 at 8:17
Related question: Is the encryption of a hash a good MAC? – CodesInChaos Nov 28 '13 at 13:29
The hash function needs to collision resistant. The encryption is trickier. Authenticated encryption always works (but that's a bit of cheating). An unauthenticated stream cipher does not work. A raw blockcipher with same block size as the hash does work. – CodesInChaos Nov 28 '13 at 13: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.