Keyed-Hash Message Authentication Code

Keyed-Hash Message Authentication Code

Un HMAC, de l'anglais keyed-hash message authentication code (code d'authentification d'une empreinte cryptographique de message avec clé), est un type de code d'authentification de message (CAM), ou MAC en anglais (Message Authentication Code), calculé en utilisant une fonction de hachage cryptographique en combinaison avec une clé secrète. Comme avec n'importe quel CAM, il peut être utilisé pour vérifier simultanément l'intégrité de données et l'authenticité d'un message. N'importe quelle fonction itérative de hachage, comme MD5 ou SHA-1, peut être utilisée dans le calcul d'un HMAC ; le nom de l'algorithme résultant est HMAC-MD5 ou HMAC-SHA-1. La qualité cryptographique du HMAC dépend de la qualité cryptographique de la fonction de hachage et de la taille et la qualité de la clé.

Une fonction itérative de hachage découpe un message en blocs de taille fixe et itère dessus avec une fonction de compression. Par exemple, MD5 et SHA-1 opèrent sur des blocs de 512 bits. La taille de la sortie HMAC est la même que celle de la fonction de hachage (128 ou 160 bits dans les cas du MD5 et SHA-1), bien qu'elle puisse être tronquée si nécessaire.

Sommaire

Construction

La fonction HMAC est définie comme suit :

\operatorname{HMAC}_K(m) = h\Bigg((K \oplus opad) \;||\; h\Big((K \oplus ipad) \;||\; m\Big)\Bigg)

avec :

  • h : une fonction de hachage itérative,
  • K : la clé secrète complétée avec des zéros pour qu'elle atteigne la taille de bloc de la fonction h
  • m : le message à authentifier,
  • "||" désigne une concaténation et "\oplus" un ou exclusif,
  • ipad et opad, chacune de la taille d'un bloc, sont définies par : ipad = 0x363636...3636 et opad = 0x5c5c5c...5c5c. Donc, si la taille de bloc de la fonction de hachage est 512, ipad et opad sont 64 répétitions des octets, respectivement, 0x36 et 0x5c.

La construction et l'analyse des HMACs ont été publiées pour la première fois en 1996 par Mihir Bellare, Ran Canetti, et Hugo Krawczyk (qui a écrit la RFC 2104). FIPS PUB 198 généralise et standardise l'utilisation des HMACs. HMAC-SHA-1 et HMAC-MD5 sont utilisés dans les protocoles IPsec et TLS.

Liens externes

Lien interne

Références

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

Wikimedia Foundation. 2010.

Contenu soumis à la licence CC-BY-SA. Source : Article Keyed-Hash Message Authentication Code de Wikipédia en français (auteurs)

Игры ⚽ Поможем сделать НИР

Regardez d'autres dictionnaires:

  • Keyed-Hash Message Authentication Code — Ein Keyed Hash Message Authentication Code (HMAC) ist eine Art Message Authentication Code (MAC), dessen Konstruktion auf einer kryptografischen Hash Funktion basiert. HMACs werden beispielsweise in den Protokollen TLS oder IPsec verwendet. Der… …   Deutsch Wikipedia

  • Message authentication code — In cryptography, a message authentication code (often MAC) is a short piece of information used to authenticate a message. A MAC algorithm, sometimes called a keyed (cryptographic) hash function, accepts as input a secret key and an arbitrary… …   Wikipedia

  • Cryptographic hash function — A cryptographic hash function (specifically, SHA 1) at work. Note that even small changes in the source input (here in the word over ) drastically change the resulting output, by the so called avalanche effect. A cryptographic hash function is a… …   Wikipedia

  • Digest access authentication — HTTP Persistence · Compression · HTTPS Request methods OPTIONS · GET · HEAD · POST · PUT · DELETE · TRACE · CONNECT Header fields Cookie · ETag · Location · Referer DNT · …   Wikipedia

  • HMAC — Keyed Hash Message Authentication Code Un HMAC, de l anglais keyed hash message authentication code (code d authentification d une empreinte cryptographique de message avec clé), est un type de code d authentification de message (CAM), ou MAC en… …   Wikipédia en Français

  • HMAC — Ein keyed hash message authentication code, (HMAC) ist eine Art Message Authentication Code (MAC), der basierend auf einer kryptografischen Hash Funktion berechnet wird. HMACs werden in vielen modernen Protokollen wie beispielsweise TLS oder… …   Deutsch Wikipedia

  • HMAC — SHA 1 HMAC Generation. In cryptography, HMAC (Hash based Message Authentication Code) is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret key. As with …   Wikipedia

  • Block cipher modes of operation — This article is about cryptography. For method of operating , see modus operandi. In cryptography, modes of operation is the procedure of enabling the repeated and secure use of a block cipher under a single key.[1][2] A block cipher by itself… …   Wikipedia

  • Outline of cryptography — See also: Index of cryptography articles The following outline is provided as an overview of and topical guide to cryptography: Cryptography (or cryptology) – practice and study of hiding information. Modern cryptography intersects the… …   Wikipedia

  • Topics in cryptography — This article is intended to be an analytic glossary , or alternatively, an organized collection of annotated pointers.Classical ciphers*Autokey cipher *Permutation cipher*Polyalphabetic substitution **Vigenère cipher*Polygraphic substitution… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”