Skip to main content
Added relevant tag.
Link
B-Con
  • 6.2k
  • 1
  • 31
  • 45
A bit of reformatting.
Source Link
e-sushi
  • 18.1k
  • 12
  • 85
  • 235

Just as a preface, I'm not implementing an HMAC - I just want to understand it as it is part of of my Comp Sci course.

Just as a preface: I'm not implementing a HMAC - I just want to understand it, as it is part of of my Computer Science course.

When using Hash-based message authentication codes, I understand that you need to protect the front and back of the MAC to prevent an adversary from modifying the HMAC while in transit.

HMAC (K,m) = H((K ⊕ opad) ∥ H((K ⊕ ipad) ∥ m))

HMAC (K,m) = H((K ⊕ opad) ∥ H((K ⊕ ipad) ∥ m))

As such, ana HMAC is constructed by hashing the XOR of the secret key K with the outer padding opad concatentated with the hash of the secret key K XORed with the inner padding ipad concatenated with the message. 

Can someone explain how these secret“secret keys XORed with paddingpadding” protect the HMAC from modification by an adversary (such as appending data to the end of the MAC)?

Just as a preface, I'm not implementing an HMAC - I just want to understand it as it is part of of my Comp Sci course.

When using Hash-based message authentication codes, I understand that you need to protect the front and back of the MAC to prevent an adversary from modifying the HMAC while in transit.

HMAC (K,m) = H((K ⊕ opad) ∥ H((K ⊕ ipad) ∥ m))

As such, an HMAC is constructed by hashing the XOR of the secret key K with the outer padding opad concatentated with the hash of the secret key K XORed with the inner padding ipad concatenated with the message. Can someone explain how these secret keys XORed with padding protect the HMAC from modification by an adversary (such as appending data to the end of the MAC)?

Just as a preface: I'm not implementing a HMAC - I just want to understand it, as it is part of of my Computer Science course.

When using Hash-based message authentication codes, I understand that you need to protect the front and back of the MAC to prevent an adversary from modifying the HMAC while in transit.

HMAC (K,m) = H((K ⊕ opad) ∥ H((K ⊕ ipad) ∥ m))

As such, a HMAC is constructed by hashing the XOR of the secret key K with the outer padding opad concatentated with the hash of the secret key K XORed with the inner padding ipad concatenated with the message. 

Can someone explain how these “secret keys XORed with padding” protect the HMAC from modification by an adversary (such as appending data to the end of the MAC)?

Tweeted twitter.com/#!/StackCrypto/status/418421221462925313
Source Link
user11184
user11184

How does the secret key in an HMAC prevent modification of the HMAC?

Just as a preface, I'm not implementing an HMAC - I just want to understand it as it is part of of my Comp Sci course.

When using Hash-based message authentication codes, I understand that you need to protect the front and back of the MAC to prevent an adversary from modifying the HMAC while in transit.

HMAC (K,m) = H((K ⊕ opad) ∥ H((K ⊕ ipad) ∥ m))

As such, an HMAC is constructed by hashing the XOR of the secret key K with the outer padding opad concatentated with the hash of the secret key K XORed with the inner padding ipad concatenated with the message. Can someone explain how these secret keys XORed with padding protect the HMAC from modification by an adversary (such as appending data to the end of the MAC)?