Authentication Header
# Authentication Header

Authentication Header (ou AH) est un protocole IP de la suite IPSec, assurant l'intégrité des données transférées. Ce protocole est défini dans la RFC 4302.

À l'aide de l'AH on obtient l'authentification et l'intégrité. Le diagramme suivant décrit le formatage d'un en-tête d'authentification (Authentication Header.) Les champs sont laissés en anglais pour une meilleure compréhension vis-à-vis des RFC.

Authentication Header :

| Offsets | $Octet_{16}$ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
| - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| $Octet_{16}$ | $Bit_{10}$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
| 0 | 0 | Next Header | Next Header | Next Header | Next Header | Next Header | Next Header | Next Header | Next Header | Payload Len | Payload Len | Payload Len | Payload Len | Payload Len | Payload Len | Payload Len | Payload Len | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved | Reserved |
| 4 | 32 | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) | Security Parameters Index (SPI) |
| 8 | 64 | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number | Sequence Number |
| C | 96 | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … |
| … | … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … | Integrity Check Value (ICV) … |

## Next Header (8 bits)

    Type du prochain en-tête, identifiant le protocole de plus haut niveau.

## Payload Len (8 bits)

    Longueur de cet en-tête en pas de 4-octet moins 2 (une valeur de 0 équivaut donc à 8 octets, une valeur de 1 équivaut à 12, etc.) Dans le cas de paquets IPv6, la longueur de cet en-tête doit être un multiple de 8 octets.

## Reserved (16 bits)

    Réservé pour une utilisation future (mis à zéro en attendant.)

## Security Parameters Index (32 bits)

    Valeur arbitraire identifiant les paramètres de sécurité (SA) en fonction de l'adresse IP.

## Sequence Number (32 bits)

    Un numéro de séquence incrémenté de 1 pour chaque paquet envoyé. Ce numéro de séquence permet d'éviter les attaques par répétition (replay attacks).

## Integrity Check Value (multiple de 32 bits)

    Informations permettant de vérifier l'intégrité du paquet. De taille variable, sa fin doit néanmoins s'aligner (padding) sur une limite de 4-octet pour l'IPv4 et 8-octet pour l'IPv6.
