Hmac

A keyed-hash message authentication code, or HMAC, is a type of message authentication code (MAC) calculated using a cryptographic hash function in combination with a secret key. As with any MAC, it may be used to simultaneously verify both the data integrity and the authenticity of a message. Any iterative cryptographic hash function, such as MD5 or SHA-1, may be used in the calculation of an HMAC; the resulting MAC algorithm is termed HMAC-MD5 or HMAC-SHA-1 accordingly. The cryptographic strength of the HMAC depends upon the cryptographic strength of the underlying hash function and on the size and quality of the key. An iterative hash function breaks up a message into blocks of a fixed size (L) and iterates over them with a compression function. For MD5 or SHA-1, the block size is 512 bits, L = 512. The size of the output is the same as the underlying hash function (128 or 160 bits in the case of MD5 and SHA-1), although it can be truncated if desired. HMAC is defined as
HMAC_K(m) = h(K \oplus opad \;||\; h((K \oplus ipad) \;||\; m)),
where h is an iterated hash function, K is a secret key padded to length L with extra zeros, and m the input text. "||" denotes concatenation, and "⊕" denotes exclusive or. The two constants ipad and opad, each of length L bits, are defined as ipad = 0x363636...3636 and opad = 0x5c5c5c...5c5c; that is, if L=512, ipad and opad are 64 repetitions of the bytes 0x36 and 0x5c respectively, represented in hexadecimal. The construction and analysis of HMACs was first published in 1996 by Mihir Bellare, Ran Canetti, and Hugo Krawczyk, who also wrote RFC 2104. FIPS PUB 198 generalizes and standardizes the use of HMACs. HMAC-SHA-1 and HMAC-MD5 are used within the IPsec and TLS protocols.

External links

References

  • Mihir Bellare, Ran Canetti and Hugo Krawczyk, Keying Hash Functions for Message Authentication, CRYPTO 1996, pp1–15 (PS or PDF).
  • Mihir Bellare, Ran Canetti and Hugo Krawczyk, Message authentication using hash functions: The HMAC construction, CryptoBytes 2(1), Spring 1996 (PS or PDF).

 

<< PreviousWord BrowserNext >>
kenilworth castle
konrad lorenz
k. w. jeter
kay redfield jamison
karaoke
kerala
keykode
knout
konstantin tsiolkovsky
kaos
khornerstone
kent applicative operating system
ket
kary mullis
kinsey reports
kendo
kingfisher
kesgrave
kurt waldheim
amd k6
k7
ka9q
kads
keyboard commando
keyboard plaque
keyboard send receive
key escrow
key field
key frame
kurfrstendamm
kurt schwitters
kenneth noland
karachi
kerguelen islands
kahla
kelsey grammer
kemerovo
hawaiian islands channels
kemp town
kentucky derby
keypal
keyspell
keyword
kfx