Message authentication check: Difference between revisions
From Hackepedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
C = hash(K_a | message) | C = hash(K_a | message) | ||
[[ | [[ipsec]] uses the HMAC methods, which actually calculate: | ||
C = hash('55555555', hash(K_a | message | 'uuuuuuuuu')) | C = hash('55555555', hash(K_a | message | 'uuuuuuuuu')) | ||
this usage makes HMAC-MD5 and HMAC-SHA1 immune to recently discovered birthday | this usage makes HMAC-MD5 and HMAC-SHA1 immune to recently discovered birthday | ||
attacks on MD5 and SHA1. | attacks on MD5 and SHA1. |
Revision as of 10:02, 30 October 2005
A message authentication check, or MAC is a cryptographic check that a message is from a given origin.
Most MACs are constructed from keyed one way hash functions. The method is for the sender and receiver to agree on a symmetric key, and to then calculate:
C = hash(K_a | message)
ipsec uses the HMAC methods, which actually calculate:
C = hash('55555555', hash(K_a | message | 'uuuuuuuuu'))
this usage makes HMAC-MD5 and HMAC-SHA1 immune to recently discovered birthday attacks on MD5 and SHA1.