Why HMAC better than just hash function?

Aug 21, 2008 1 Replies

There is well known method of message authentication method, when in addition to message used HMAC(secret, message_text). Where HMAC is algorithm described in wikipedia.



Bruce Schneier in book named "Applied Cryptography", in section



18.14, writes that MAC in form H(K1, H(K2, M)), for example, is more preferable than just H(K, M), because in second case message can be made longer by cracker. And in the book is reference to other book "1265. B. Preneel, personal communication, 1995." which is inaccessible for me.

I not understood, in my case, where all messages has *fixed*



*length*, why adding HMAC to message is better than just adding hash of key mixed with message? May be somebody points me to other sources of information.

You will have better luck if you ask the above question in sci.crypt instead of comp.arch.embedded.

Guy Macon

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required