HMAC

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Jun 21 7:31
Editor
Edited
Edited
2024 Apr 19 4:25
Refs

Hash-based Message Authentication Code (RFC2104/1997)

MAC used with any cryptographic hash function
Method of creating an authentication code (MAC) using a hash (like SHA) value

How to use Hash function for MAC

  • If someone knows the hash value of the message, they can change message and calculate a new hash value.
When using a message or key directly for hashing, it is easy to be attacked, so to solve these problem, the key is used twice in the message and hash function.
  • opad and ipad are constants but need to be different
  • HMAC provides stronger security guarantees than what MAC requires. HMAC doesn't reveal any information about the message because of the key
 
 
 
 
 

Recommendations