Debian Codegraph @

rfc2402.html

raw
1 <pre>Network Working Group S. Kent
2 Request for Comments: 2402 BBN Corp
3 Obsoletes: <a href="./rfc1826">1826</a> R. Atkinson
4 Category: Standards Track @Home Network
5 November 1998
6
7
8 <span class="h1">IP Authentication Header</span>
9
10 Status of this Memo
11
12 This document specifies an Internet standards track protocol for the
13 Internet community, and requests discussion and suggestions for
14 improvements. Please refer to the current edition of the "Internet
15 Official Protocol Standards" (STD 1) for the standardization state
16 and status of this protocol. Distribution of this memo is unlimited.
17
18 Copyright Notice
19
20 Copyright (C) The Internet Society (1998). All Rights Reserved.
21
22 Table of Contents
23
24 <a href="#section-1">1</a>. Introduction......................................................<a href="#page-2">2</a>
25 <a href="#section-2">2</a>. Authentication Header Format......................................<a href="#page-3">3</a>
26 <a href="#section-2.1">2.1</a> Next Header...................................................<a href="#page-4">4</a>
27 <a href="#section-2.2">2.2</a> Payload Length................................................<a href="#page-4">4</a>
28 <a href="#section-2.3">2.3</a> Reserved......................................................<a href="#page-4">4</a>
29 <a href="#section-2.4">2.4</a> Security Parameters Index (SPI)...............................<a href="#page-4">4</a>
30 <a href="#section-2.5">2.5</a> Sequence Number...............................................<a href="#page-5">5</a>
31 <a href="#section-2.6">2.6</a> Authentication Data ..........................................<a href="#page-5">5</a>
32 <a href="#section-3">3</a>. Authentication Header Processing..................................<a href="#page-5">5</a>
33 <a href="#section-3.1">3.1</a> Authentication Header Location...............................<a href="#page-5">5</a>
34 <a href="#section-3.2">3.2</a> Authentication Algorithms....................................<a href="#page-7">7</a>
35 <a href="#section-3.3">3.3</a> Outbound Packet Processing...................................<a href="#page-8">8</a>
36 <a href="#section-3.3.1">3.3.1</a> Security Association Lookup.............................<a href="#page-8">8</a>
37 <a href="#section-3.3.2">3.3.2</a> Sequence Number Generation..............................<a href="#page-8">8</a>
38 <a href="#section-3.3.3">3.3.3</a> Integrity Check Value Calculation.......................<a href="#page-9">9</a>
39 <a href="#section-3.3.3.1">3.3.3.1</a> Handling Mutable Fields............................<a href="#page-9">9</a>
40 <a href="#section-3.3.3.1.1">3.3.3.1.1</a> ICV Computation for IPv4.....................<a href="#page-10">10</a>
41 <a href="#section-3.3.3.1.1.1">3.3.3.1.1.1</a> Base Header Fields.......................<a href="#page-10">10</a>
42 <a href="#section-3.3.3.1.1.2">3.3.3.1.1.2</a> Options..................................<a href="#page-11">11</a>
43 <a href="#section-3.3.3.1.2">3.3.3.1.2</a> ICV Computation for IPv6.....................<a href="#page-11">11</a>
44 <a href="#section-3.3.3.1.2.1">3.3.3.1.2.1</a> Base Header Fields.......................<a href="#page-11">11</a>
45 <a href="#section-3.3.3.1.2.2">3.3.3.1.2.2</a> Extension Headers Containing Options.....<a href="#page-11">11</a>
46 3.3.3.1.2.3 Extension Headers Not Containing Options.11
47 <a href="#section-3.3.3.2">3.3.3.2</a> Padding...........................................<a href="#page-12">12</a>
48 <a href="#section-3.3.3.2.1">3.3.3.2.1</a> Authentication Data Padding..................<a href="#page-12">12</a>
49
50
51
52 <span class="grey">Kent &amp; Atkinson Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
55
56
57 <a href="#section-3.3.3.2.2">3.3.3.2.2</a> Implicit Packet Padding......................<a href="#page-12">12</a>
58 <a href="#section-3.3.4">3.3.4</a> Fragmentation..........................................<a href="#page-12">12</a>
59 <a href="#section-3.4">3.4</a> Inbound Packet Processing...................................<a href="#page-13">13</a>
60 <a href="#section-3.4.1">3.4.1</a> Reassembly.............................................<a href="#page-13">13</a>
61 <a href="#section-3.4.2">3.4.2</a> Security Association Lookup............................<a href="#page-13">13</a>
62 <a href="#section-3.4.3">3.4.3</a> Sequence Number Verification...........................<a href="#page-13">13</a>
63 <a href="#section-3.4.4">3.4.4</a> Integrity Check Value Verification.....................<a href="#page-15">15</a>
64 <a href="#section-4">4</a>. Auditing.........................................................<a href="#page-15">15</a>
65 <a href="#section-5">5</a>. Conformance Requirements.........................................<a href="#page-16">16</a>
66 <a href="#section-6">6</a>. Security Considerations..........................................<a href="#page-16">16</a>
67 <a href="#section-7">7</a>. Differences from <a href="./rfc1826">RFC 1826</a>........................................<a href="#page-16">16</a>
68 Acknowledgements....................................................<a href="#page-17">17</a>
69 <a href="#appendix-A">Appendix A</a> -- Mutability of IP Options/Extension Headers............<a href="#page-18">18</a>
70 A1. IPv4 Options.................................................<a href="#page-18">18</a>
71 A2. IPv6 Extension Headers.......................................<a href="#page-19">19</a>
72 References..........................................................<a href="#page-20">20</a>
73 Disclaimer..........................................................<a href="#page-21">21</a>
74 Author Information..................................................<a href="#page-22">22</a>
75 Full Copyright Statement............................................<a href="#page-22">22</a>
76
77 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
78
79 The IP Authentication Header (AH) is used to provide connectionless
80 integrity and data origin authentication for IP datagrams (hereafter
81 referred to as just "authentication"), and to provide protection
82 against replays. This latter, optional service may be selected, by
83 the receiver, when a Security Association is established. (Although
84 the default calls for the sender to increment the Sequence Number
85 used for anti-replay, the service is effective only if the receiver
86 checks the Sequence Number.) AH provides authentication for as much
87 of the IP header as possible, as well as for upper level protocol
88 data. However, some IP header fields may change in transit and the
89 value of these fields, when the packet arrives at the receiver, may
90 not be predictable by the sender. The values of such fields cannot
91 be protected by AH. Thus the protection provided to the IP header by
92 AH is somewhat piecemeal.
93
94 AH may be applied alone, in combination with the IP Encapsulating
95 Security Payload (ESP) [<a href="#ref-KA97b" title="&quot;IP Encapsulating Security Payload (ESP)&quot;">KA97b</a>], or in a nested fashion through the
96 use of tunnel mode (see "Security Architecture for the Internet
97 Protocol" [<a href="#ref-KA97a" title="&quot;Security Architecture for the Internet Protocol&quot;">KA97a</a>], hereafter referred to as the Security Architecture
98 document). Security services can be provided between a pair of
99 communicating hosts, between a pair of communicating security
100 gateways, or between a security gateway and a host. ESP may be used
101 to provide the same security services, and it also provides a
102 confidentiality (encryption) service. The primary difference between
103 the authentication provided by ESP and AH is the extent of the
104 coverage. Specifically, ESP does not protect any IP header fields
105
106
107
108 <span class="grey">Kent &amp; Atkinson Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
111
112
113 unless those fields are encapsulated by ESP (tunnel mode). For more
114 details on how to use AH and ESP in various network environments, see
115 the Security Architecture document [<a href="#ref-KA97a" title="&quot;Security Architecture for the Internet Protocol&quot;">KA97a</a>].
116
117 It is assumed that the reader is familiar with the terms and concepts
118 described in the Security Architecture document. In particular, the
119 reader should be familiar with the definitions of security services
120 offered by AH and ESP, the concept of Security Associations, the ways
121 in which AH can be used in conjunction with ESP, and the different
122 key management options available for AH and ESP. (With regard to the
123 last topic, the current key management options required for both AH
124 and ESP are manual keying and automated keying via IKE [<a href="#ref-HC98" title="&quot;The Internet Key Exchange (IKE)&quot;">HC98</a>].)
125
126 The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
127 SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
128 document, are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="#ref-Bra97" title="&quot;Key words for use in RFCs to Indicate Requirement Level&quot;">Bra97</a>].
129
130 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Authentication Header Format</span>
131
132 The protocol header (IPv4, IPv6, or Extension) immediately preceding
133 the AH header will contain the value 51 in its Protocol (IPv4) or
134 Next Header (IPv6, Extension) field [<a href="#ref-STD-2" title="&quot;Assigned Numbers&quot;">STD-2</a>].
135
136 0 1 2 3
137 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
138 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
139 | Next Header | Payload Len | RESERVED |
140 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
141 | Security Parameters Index (SPI) |
142 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
143 | Sequence Number Field |
144 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
145 | |
146 + Authentication Data (variable) |
147 | |
148 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
149
150 The following subsections define the fields that comprise the AH
151 format. All the fields described here are mandatory, i.e., they are
152 always present in the AH format and are included in the Integrity
153 Check Value (ICV) computation (see Sections <a href="#section-2.6">2.6</a> and <a href="#section-3.3.3">3.3.3</a>).
154
155
156
157
158
159
160
161
162
163
164 <span class="grey">Kent &amp; Atkinson Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
167
168
169 <span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a> Next Header</span>
170
171 The Next Header is an 8-bit field that identifies the type of the
172 next payload after the Authentication Header. The value of this
173 field is chosen from the set of IP Protocol Numbers defined in the
174 most recent "Assigned Numbers" [<a href="#ref-STD-2" title="&quot;Assigned Numbers&quot;">STD-2</a>] RFC from the Internet Assigned
175 Numbers Authority (IANA).
176
177 <span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a> Payload Length</span>
178
179 This 8-bit field specifies the length of AH in 32-bit words (4-byte
180 units), minus "2". (All IPv6 extension headers, as per <a href="./rfc1883">RFC 1883</a>,
181 encode the "Hdr Ext Len" field by first subtracting 1 (64-bit word)
182 from the header length (measured in 64-bit words). AH is an IPv6
183 extension header. However, since its length is measured in 32-bit
184 words, the "Payload Length" is calculated by subtracting 2 (32 bit
185 words).) In the "standard" case of a 96-bit authentication value
186 plus the 3 32-bit word fixed portion, this length field will be "4".
187 A "null" authentication algorithm may be used only for debugging
188 purposes. Its use would result in a "1" value for this field for
189 IPv4 or a "2" for IPv6, as there would be no corresponding
190 Authentication Data field (see <a href="#section-3.3.3.2.1">Section 3.3.3.2.1</a> on "Authentication
191 Data Padding").
192
193 <span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a> Reserved</span>
194
195 This 16-bit field is reserved for future use. It MUST be set to
196 "zero." (Note that the value is included in the Authentication Data
197 calculation, but is otherwise ignored by the recipient.)
198
199 <span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a> Security Parameters Index (SPI)</span>
200
201 The SPI is an arbitrary 32-bit value that, in combination with the
202 destination IP address and security protocol (AH), uniquely
203 identifies the Security Association for this datagram. The set of
204 SPI values in the range 1 through 255 are reserved by the Internet
205 Assigned Numbers Authority (IANA) for future use; a reserved SPI
206 value will not normally be assigned by IANA unless the use of the
207 assigned SPI value is specified in an RFC. It is ordinarily selected
208 by the destination system upon establishment of an SA (see the
209 Security Architecture document for more details).
210
211 The SPI value of zero (0) is reserved for local, implementation-
212 specific use and MUST NOT be sent on the wire. For example, a key
213 management implementation MAY use the zero SPI value to mean "No
214 Security Association Exists" during the period when the IPsec
215 implementation has requested that its key management entity establish
216 a new SA, but the SA has not yet been established.
217
218
219
220 <span class="grey">Kent &amp; Atkinson Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
223
224
225 <span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a> Sequence Number</span>
226
227 This unsigned 32-bit field contains a monotonically increasing
228 counter value (sequence number). It is mandatory and is always
229 present even if the receiver does not elect to enable the anti-replay
230 service for a specific SA. Processing of the Sequence Number field
231 is at the discretion of the receiver, i.e., the sender MUST always
232 transmit this field, but the receiver need not act upon it (see the
233 discussion of Sequence Number Verification in the "Inbound Packet
234 Processing" section below).
235
236 The sender's counter and the receiver's counter are initialized to 0
237 when an SA is established. (The first packet sent using a given SA
238 will have a Sequence Number of 1; see <a href="#section-3.3.2">Section 3.3.2</a> for more details
239 on how the Sequence Number is generated.) If anti-replay is enabled
240 (the default), the transmitted Sequence Number must never be allowed
241 to cycle. Thus, the sender's counter and the receiver's counter MUST
242 be reset (by establishing a new SA and thus a new key) prior to the
243 transmission of the 2^32nd packet on an SA.
244
245 <span class="h3"><a class="selflink" id="section-2.6" href="#section-2.6">2.6</a> Authentication Data</span>
246
247 This is a variable-length field that contains the Integrity Check
248 Value (ICV) for this packet. The field must be an integral multiple
249 of 32 bits in length. The details of the ICV computation are
250 described in <a href="#section-3.3.2">Section 3.3.2</a> below. This field may include explicit
251 padding. This padding is included to ensure that the length of the
252 AH header is an integral multiple of 32 bits (IPv4) or 64 bits
253 (IPv6). All implementations MUST support such padding. Details of
254 how to compute the required padding length are provided below. The
255 authentication algorithm specification MUST specify the length of the
256 ICV and the comparison rules and processing steps for validation.
257
258 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Authentication Header Processing</span>
259
260 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a> Authentication Header Location</span>
261
262 Like ESP, AH may be employed in two ways: transport mode or tunnel
263 mode. The former mode is applicable only to host implementations and
264 provides protection for upper layer protocols, in addition to
265 selected IP header fields. (In this mode, note that for "bump-in-
266 the-stack" or "bump-in-the-wire" implementations, as defined in the
267 Security Architecture document, inbound and outbound IP fragments may
268 require an IPsec implementation to perform extra IP
269 reassembly/fragmentation in order to both conform to this
270 specification and provide transparent IPsec support. Special care is
271 required to perform such operations within these implementations when
272 multiple interfaces are in use.)
273
274
275
276 <span class="grey">Kent &amp; Atkinson Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
279
280
281 In transport mode, AH is inserted after the IP header and before an
282 upper layer protocol, e.g., TCP, UDP, ICMP, etc. or before any other
283 IPsec headers that have already been inserted. In the context of
284 IPv4, this calls for placing AH after the IP header (and any options
285 that it contains), but before the upper layer protocol. (Note that
286 the term "transport" mode should not be misconstrued as restricting
287 its use to TCP and UDP. For example, an ICMP message MAY be sent
288 using either "transport" mode or "tunnel" mode.) The following
289 diagram illustrates AH transport mode positioning for a typical IPv4
290 packet, on a "before and after" basis.
291
292 BEFORE APPLYING AH
293 ----------------------------
294 IPv4 |orig IP hdr | | |
295 |(any options)| TCP | Data |
296 ----------------------------
297
298 AFTER APPLYING AH
299 ---------------------------------
300 IPv4 |orig IP hdr | | | |
301 |(any options)| AH | TCP | Data |
302 ---------------------------------
303 |&lt;------- authenticated -------&gt;|
304 except for mutable fields
305
306 In the IPv6 context, AH is viewed as an end-to-end payload, and thus
307 should appear after hop-by-hop, routing, and fragmentation extension
308 headers. The destination options extension header(s) could appear
309 either before or after the AH header depending on the semantics
310 desired. The following diagram illustrates AH transport mode
311 positioning for a typical IPv6 packet.
312
313 BEFORE APPLYING AH
314 ---------------------------------------
315 IPv6 | | ext hdrs | | |
316 | orig IP hdr |if present| TCP | Data |
317 ---------------------------------------
318
319 AFTER APPLYING AH
320 ------------------------------------------------------------
321 IPv6 | |hop-by-hop, dest*, | | dest | | |
322 |orig IP hdr |routing, fragment. | AH | opt* | TCP | Data |
323 ------------------------------------------------------------
324 |&lt;---- authenticated except for mutable fields -----------&gt;|
325
326 * = if present, could be before AH, after AH, or both
327
328
329
330
331
332 <span class="grey">Kent &amp; Atkinson Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
335
336
337 ESP and AH headers can be combined in a variety of modes. The IPsec
338 Architecture document describes the combinations of security
339 associations that must be supported.
340
341 Tunnel mode AH may be employed in either hosts or security gateways
342 (or in so-called "bump-in-the-stack" or "bump-in-the-wire"
343 implementations, as defined in the Security Architecture document).
344 When AH is implemented in a security gateway (to protect transit
345 traffic), tunnel mode must be used. In tunnel mode, the "inner" IP
346 header carries the ultimate source and destination addresses, while
347 an "outer" IP header may contain distinct IP addresses, e.g.,
348 addresses of security gateways. In tunnel mode, AH protects the
349 entire inner IP packet, including the entire inner IP header. The
350 position of AH in tunnel mode, relative to the outer IP header, is
351 the same as for AH in transport mode. The following diagram
352 illustrates AH tunnel mode positioning for typical IPv4 and IPv6
353 packets.
354
355 ------------------------------------------------
356 IPv4 | new IP hdr* | | orig IP hdr* | | |
357 |(any options)| AH | (any options) |TCP | Data |
358 ------------------------------------------------
359 |&lt;- authenticated except for mutable fields --&gt;|
360 | in the new IP hdr |
361
362 --------------------------------------------------------------
363 IPv6 | | ext hdrs*| | | ext hdrs*| | |
364 |new IP hdr*|if present| AH |orig IP hdr*|if present|TCP|Data|
365 --------------------------------------------------------------
366 |&lt;-- authenticated except for mutable fields in new IP hdr -&gt;|
367
368 * = construction of outer IP hdr/extensions and modification
369 of inner IP hdr/extensions is discussed below.
370
371 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a> Authentication Algorithms</span>
372
373 The authentication algorithm employed for the ICV computation is
374 specified by the SA. For point-to-point communication, suitable
375 authentication algorithms include keyed Message Authentication Codes
376 (MACs) based on symmetric encryption algorithms (e.g., DES) or on
377 one-way hash functions (e.g., MD5 or SHA-1). For multicast
378 communication, one-way hash algorithms combined with asymmetric
379 signature algorithms are appropriate, though performance and space
380 considerations currently preclude use of such algorithms. The
381 mandatory-to-implement authentication algorithms are described in
382 <a href="#section-5">Section 5</a> "Conformance Requirements". Other algorithms MAY be
383 supported.
384
385
386
387
388 <span class="grey">Kent &amp; Atkinson Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
391
392
393 <span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a> Outbound Packet Processing</span>
394
395 In transport mode, the sender inserts the AH header after the IP
396 header and before an upper layer protocol header, as described above.
397 In tunnel mode, the outer and inner IP header/extensions can be
398 inter-related in a variety of ways. The construction of the outer IP
399 header/extensions during the encapsulation process is described in
400 the Security Architecture document.
401
402 If there is more than one IPsec header/extension required, the order
403 of the application of the security headers MUST be defined by
404 security policy. For simplicity of processing, each IPsec header
405 SHOULD ignore the existence (i.e., not zero the contents or try to
406 predict the contents) of IPsec headers to be applied later. (While a
407 native IP or bump-in-the-stack implementation could predict the
408 contents of later IPsec headers that it applies itself, it won't be
409 possible for it to predict any IPsec headers added by a bump-in-the-
410 wire implementation between the host and the network.)
411
412 <span class="h4"><a class="selflink" id="section-3.3.1" href="#section-3.3.1">3.3.1</a> Security Association Lookup</span>
413
414 AH is applied to an outbound packet only after an IPsec
415 implementation determines that the packet is associated with an SA
416 that calls for AH processing. The process of determining what, if
417 any, IPsec processing is applied to outbound traffic is described in
418 the Security Architecture document.
419
420 <span class="h4"><a class="selflink" id="section-3.3.2" href="#section-3.3.2">3.3.2</a> Sequence Number Generation</span>
421
422 The sender's counter is initialized to 0 when an SA is established.
423 The sender increments the Sequence Number for this SA and inserts the
424 new value into the Sequence Number Field. Thus the first packet sent
425 using a given SA will have a Sequence Number of 1.
426
427 If anti-replay is enabled (the default), the sender checks to ensure
428 that the counter has not cycled before inserting the new value in the
429 Sequence Number field. In other words, the sender MUST NOT send a
430 packet on an SA if doing so would cause the Sequence Number to cycle.
431 An attempt to transmit a packet that would result in Sequence Number
432 overflow is an auditable event. (Note that this approach to Sequence
433 Number management does not require use of modular arithmetic.)
434
435 The sender assumes anti-replay is enabled as a default, unless
436 otherwise notified by the receiver (see 3.4.3). Thus, if the counter
437 has cycled, the sender will set up a new SA and key (unless the SA
438 was configured with manual key management).
439
440
441
442
443
444 <span class="grey">Kent &amp; Atkinson Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
447
448
449 If anti-replay is disabled, the sender does not need to monitor or
450 reset the counter, e.g., in the case of manual key management (see
451 <a href="#section-5">Section 5</a>.) However, the sender still increments the counter and when
452 it reaches the maximum value, the counter rolls over back to zero.
453
454 <span class="h4"><a class="selflink" id="section-3.3.3" href="#section-3.3.3">3.3.3</a> Integrity Check Value Calculation</span>
455
456 The AH ICV is computed over:
457 o IP header fields that are either immutable in transit or
458 that are predictable in value upon arrival at the endpoint
459 for the AH SA
460 o the AH header (Next Header, Payload Len, Reserved, SPI,
461 Sequence Number, and the Authentication Data (which is set
462 to zero for this computation), and explicit padding bytes
463 (if any))
464 o the upper level protocol data, which is assumed to be
465 immutable in transit
466
467 <span class="h5"><a class="selflink" id="section-3.3.3.1" href="#section-3.3.3.1">3.3.3.1</a> Handling Mutable Fields</span>
468
469 If a field may be modified during transit, the value of the field is
470 set to zero for purposes of the ICV computation. If a field is
471 mutable, but its value at the (IPsec) receiver is predictable, then
472 that value is inserted into the field for purposes of the ICV
473 calculation. The Authentication Data field is also set to zero in
474 preparation for this computation. Note that by replacing each
475 field's value with zero, rather than omitting the field, alignment is
476 preserved for the ICV calculation. Also, the zero-fill approach
477 ensures that the length of the fields that are so handled cannot be
478 changed during transit, even though their contents are not explicitly
479 covered by the ICV.
480
481 As a new extension header or IPv4 option is created, it will be
482 defined in its own RFC and SHOULD include (in the Security
483 Considerations section) directions for how it should be handled when
484 calculating the AH ICV. If the IP (v4 or v6) implementation
485 encounters an extension header that it does not recognize, it will
486 discard the packet and send an ICMP message. IPsec will never see
487 the packet. If the IPsec implementation encounters an IPv4 option
488 that it does not recognize, it should zero the whole option, using
489 the second byte of the option as the length. IPv6 options (in
490 Destination extension headers or Hop by Hop extension header) contain
491 a flag indicating mutability, which determines appropriate processing
492 for such options.
493
494
495
496
497
498
499
500 <span class="grey">Kent &amp; Atkinson Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
503
504
505 <span class="h6"><a class="selflink" id="section-3.3.3.1.1" href="#section-3.3.3.1.1">3.3.3.1.1</a> ICV Computation for IPv4</span>
506
507 <span class="h6"><a class="selflink" id="section-3.3.3.1.1.1" href="#section-3.3.3.1.1.1">3.3.3.1.1.1</a> Base Header Fields</span>
508
509 The IPv4 base header fields are classified as follows:
510
511 Immutable
512 Version
513 Internet Header Length
514 Total Length
515 Identification
516 Protocol (This should be the value for AH.)
517 Source Address
518 Destination Address (without loose or strict source routing)
519
520 Mutable but predictable
521 Destination Address (with loose or strict source routing)
522
523 Mutable (zeroed prior to ICV calculation)
524 Type of Service (TOS)
525 Flags
526 Fragment Offset
527 Time to Live (TTL)
528 Header Checksum
529
530 TOS -- This field is excluded because some routers are known to
531 change the value of this field, even though the IP
532 specification does not consider TOS to be a mutable header
533 field.
534
535 Flags -- This field is excluded since an intermediate router might
536 set the DF bit, even if the source did not select it.
537
538 Fragment Offset -- Since AH is applied only to non-fragmented IP
539 packets, the Offset Field must always be zero, and thus it
540 is excluded (even though it is predictable).
541
542 TTL -- This is changed en-route as a normal course of processing
543 by routers, and thus its value at the receiver is not
544 predictable by the sender.
545
546 Header Checksum -- This will change if any of these other fields
547 changes, and thus its value upon reception cannot be
548 predicted by the sender.
549
550
551
552
553
554
555
556 <span class="grey">Kent &amp; Atkinson Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
559
560
561 <span class="h6"><a class="selflink" id="section-3.3.3.1.1.2" href="#section-3.3.3.1.1.2">3.3.3.1.1.2</a> Options</span>
562
563 For IPv4 (unlike IPv6), there is no mechanism for tagging options as
564 mutable in transit. Hence the IPv4 options are explicitly listed in
565 <a href="#appendix-A">Appendix A</a> and classified as immutable, mutable but predictable, or
566 mutable. For IPv4, the entire option is viewed as a unit; so even
567 though the type and length fields within most options are immutable
568 in transit, if an option is classified as mutable, the entire option
569 is zeroed for ICV computation purposes.
570
571 <span class="h6"><a class="selflink" id="section-3.3.3.1.2" href="#section-3.3.3.1.2">3.3.3.1.2</a> ICV Computation for IPv6</span>
572
573 <span class="h6"><a class="selflink" id="section-3.3.3.1.2.1" href="#section-3.3.3.1.2.1">3.3.3.1.2.1</a> Base Header Fields</span>
574
575 The IPv6 base header fields are classified as follows:
576
577 Immutable
578 Version
579 Payload Length
580 Next Header (This should be the value for AH.)
581 Source Address
582 Destination Address (without Routing Extension Header)
583
584 Mutable but predictable
585 Destination Address (with Routing Extension Header)
586
587 Mutable (zeroed prior to ICV calculation)
588 Class
589 Flow Label
590 Hop Limit
591
592 <span class="h6"><a class="selflink" id="section-3.3.3.1.2.2" href="#section-3.3.3.1.2.2">3.3.3.1.2.2</a> Extension Headers Containing Options</span>
593
594 IPv6 options in the Hop-by-Hop and Destination Extension Headers
595 contain a bit that indicates whether the option might change
596 (unpredictably) during transit. For any option for which contents
597 may change en-route, the entire "Option Data" field must be treated
598 as zero-valued octets when computing or verifying the ICV. The
599 Option Type and Opt Data Len are included in the ICV calculation.
600 All options for which the bit indicates immutability are included in
601 the ICV calculation. See the IPv6 specification [<a href="#ref-DH95" title="&quot;Internet Protocol version 6 (IPv6) Specification&quot;">DH95</a>] for more
602 information.
603
604 <span class="h6"><a class="selflink" id="section-3.3.3.1.2.3" href="#section-3.3.3.1.2.3">3.3.3.1.2.3</a> Extension Headers Not Containing Options</span>
605
606 The IPv6 extension headers that do not contain options are explicitly
607 listed in <a href="#appendix-A">Appendix A</a> and classified as immutable, mutable but
608 predictable, or mutable.
609
610
611
612 <span class="grey">Kent &amp; Atkinson Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
615
616
617 <span class="h5"><a class="selflink" id="section-3.3.3.2" href="#section-3.3.3.2">3.3.3.2</a> Padding</span>
618
619 <span class="h6"><a class="selflink" id="section-3.3.3.2.1" href="#section-3.3.3.2.1">3.3.3.2.1</a> Authentication Data Padding</span>
620
621 As mentioned in <a href="#section-2.6">section 2.6</a>, the Authentication Data field explicitly
622 includes padding to ensure that the AH header is a multiple of 32
623 bits (IPv4) or 64 bits (IPv6). If padding is required, its length is
624 determined by two factors:
625
626 - the length of the ICV
627 - the IP protocol version (v4 or v6)
628
629 For example, if the output of the selected algorithm is 96-bits, no
630 padding is required for either IPv4 or for IPv6. However, if a
631 different length ICV is generated, due to use of a different
632 algorithm, then padding may be required depending on the length and
633 IP protocol version. The content of the padding field is arbitrarily
634 selected by the sender. (The padding is arbitrary, but need not be
635 random to achieve security.) These padding bytes are included in the
636 Authentication Data calculation, counted as part of the Payload
637 Length, and transmitted at the end of the Authentication Data field
638 to enable the receiver to perform the ICV calculation.
639
640 <span class="h6"><a class="selflink" id="section-3.3.3.2.2" href="#section-3.3.3.2.2">3.3.3.2.2</a> Implicit Packet Padding</span>
641
642 For some authentication algorithms, the byte string over which the
643 ICV computation is performed must be a multiple of a blocksize
644 specified by the algorithm. If the IP packet length (including AH)
645 does not match the blocksize requirements for the algorithm, implicit
646 padding MUST be appended to the end of the packet, prior to ICV
647 computation. The padding octets MUST have a value of zero. The
648 blocksize (and hence the length of the padding) is specified by the
649 algorithm specification. This padding is not transmitted with the
650 packet. Note that MD5 and SHA-1 are viewed as having a 1-byte
651 blocksize because of their internal padding conventions.
652
653 <span class="h4"><a class="selflink" id="section-3.3.4" href="#section-3.3.4">3.3.4</a> Fragmentation</span>
654
655 If required, IP fragmentation occurs after AH processing within an
656 IPsec implementation. Thus, transport mode AH is applied only to
657 whole IP datagrams (not to IP fragments). An IP packet to which AH
658 has been applied may itself be fragmented by routers en route, and
659 such fragments must be reassembled prior to AH processing at a
660 receiver. In tunnel mode, AH is applied to an IP packet, the payload
661 of which may be a fragmented IP packet. For example, a security
662 gateway or a "bump-in-the-stack" or "bump-in-the-wire" IPsec
663 implementation (see the Security Architecture document for details)
664 may apply tunnel mode AH to such fragments.
665
666
667
668 <span class="grey">Kent &amp; Atkinson Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
671
672
673 <span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a> Inbound Packet Processing</span>
674
675 If there is more than one IPsec header/extension present, the
676 processing for each one ignores (does not zero, does not use) any
677 IPsec headers applied subsequent to the header being processed.
678
679 <span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a> Reassembly</span>
680
681 If required, reassembly is performed prior to AH processing. If a
682 packet offered to AH for processing appears to be an IP fragment,
683 i.e., the OFFSET field is non-zero or the MORE FRAGMENTS flag is set,
684 the receiver MUST discard the packet; this is an auditable event. The
685 audit log entry for this event SHOULD include the SPI value,
686 date/time, Source Address, Destination Address, and (in IPv6) the
687 Flow ID.
688
689 NOTE: For packet reassembly, the current IPv4 spec does NOT require
690 either the zero'ing of the OFFSET field or the clearing of the MORE
691 FRAGMENTS flag. In order for a reassembled packet to be processed by
692 IPsec (as opposed to discarded as an apparent fragment), the IP code
693 must do these two things after it reassembles a packet.
694
695 <span class="h4"><a class="selflink" id="section-3.4.2" href="#section-3.4.2">3.4.2</a> Security Association Lookup</span>
696
697 Upon receipt of a packet containing an IP Authentication Header, the
698 receiver determines the appropriate (unidirectional) SA, based on the
699 destination IP address, security protocol (AH), and the SPI. (This
700 process is described in more detail in the Security Architecture
701 document.) The SA indicates whether the Sequence Number field will
702 be checked, specifies the algorithm(s) employed for ICV computation,
703 and indicates the key(s) required to validate the ICV.
704
705 If no valid Security Association exists for this session (e.g., the
706 receiver has no key), the receiver MUST discard the packet; this is
707 an auditable event. The audit log entry for this event SHOULD
708 include the SPI value, date/time, Source Address, Destination
709 Address, and (in IPv6) the Flow ID.
710
711 <span class="h4"><a class="selflink" id="section-3.4.3" href="#section-3.4.3">3.4.3</a> Sequence Number Verification</span>
712
713 All AH implementations MUST support the anti-replay service, though
714 its use may be enabled or disabled by the receiver on a per-SA basis.
715 (Note that there are no provisions for managing transmitted Sequence
716 Number values among multiple senders directing traffic to a single SA
717 (irrespective of whether the destination address is unicast,
718 broadcast, or multicast). Thus the anti-replay service SHOULD NOT be
719 used in a multi-sender environment that employs a single SA.)
720
721
722
723
724 <span class="grey">Kent &amp; Atkinson Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
727
728
729 If the receiver does not enable anti-replay for an SA, no inbound
730 checks are performed on the Sequence Number. However, from the
731 perspective of the sender, the default is to assume that anti-replay
732 is enabled at the receiver. To avoid having the sender do
733 unnecessary sequence number monitoring and SA setup (see <a href="#section-3.3.2">section</a>
734 <a href="#section-3.3.2">3.3.2</a>), if an SA establishment protocol such as IKE is employed, the
735 receiver SHOULD notify the sender, during SA establishment, if the
736 receiver will not provide anti-replay protection.
737
738 If the receiver has enabled the anti-replay service for this SA, the
739 receiver packet counter for the SA MUST be initialized to zero when
740 the SA is established. For each received packet, the receiver MUST
741 verify that the packet contains a Sequence Number that does not
742 duplicate the Sequence Number of any other packets received during
743 the life of this SA. This SHOULD be the first AH check applied to a
744 packet after it has been matched to an SA, to speed rejection of
745 duplicate packets.
746
747 Duplicates are rejected through the use of a sliding receive window.
748 (How the window is implemented is a local matter, but the following
749 text describes the functionality that the implementation must
750 exhibit.) A MINIMUM window size of 32 MUST be supported; but a
751 window size of 64 is preferred and SHOULD be employed as the default.
752 Another window size (larger than the MINIMUM) MAY be chosen by the
753 receiver. (The receiver does NOT notify the sender of the window
754 size.)
755
756 The "right" edge of the window represents the highest, validated
757 Sequence Number value received on this SA. Packets that contain
758 Sequence Numbers lower than the "left" edge of the window are
759 rejected. Packets falling within the window are checked against a
760 list of received packets within the window. An efficient means for
761 performing this check, based on the use of a bit mask, is described
762 in the Security Architecture document.
763
764 If the received packet falls within the window and is new, or if the
765 packet is to the right of the window, then the receiver proceeds to
766 ICV verification. If the ICV validation fails, the receiver MUST
767 discard the received IP datagram as invalid; this is an auditable
768 event. The audit log entry for this event SHOULD include the SPI
769 value, date/time, Source Address, Destination Address, the Sequence
770 Number, and (in IPv6) the Flow ID. The receive window is updated
771 only if the ICV verification succeeds.
772
773
774
775
776
777
778
779
780 <span class="grey">Kent &amp; Atkinson Standards Track [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
783
784
785 DISCUSSION:
786
787 Note that if the packet is either inside the window and new, or is
788 outside the window on the "right" side, the receiver MUST
789 authenticate the packet before updating the Sequence Number window
790 data.
791
792 <span class="h4"><a class="selflink" id="section-3.4.4" href="#section-3.4.4">3.4.4</a> Integrity Check Value Verification</span>
793
794 The receiver computes the ICV over the appropriate fields of the
795 packet, using the specified authentication algorithm, and verifies
796 that it is the same as the ICV included in the Authentication Data
797 field of the packet. Details of the computation are provided below.
798
799 If the computed and received ICV's match, then the datagram is valid,
800 and it is accepted. If the test fails, then the receiver MUST
801 discard the received IP datagram as invalid; this is an auditable
802 event. The audit log entry SHOULD include the SPI value, date/time
803 received, Source Address, Destination Address, and (in IPv6) the Flow
804 ID.
805
806 DISCUSSION:
807
808 Begin by saving the ICV value and replacing it (but not any
809 Authentication Data padding) with zero. Zero all other fields
810 that may have been modified during transit. (See <a href="#section-3.3.3.1">section 3.3.3.1</a>
811 for a discussion of which fields are zeroed before performing the
812 ICV calculation.) Check the overall length of the packet, and if
813 it requires implicit padding based on the requirements of the
814 authentication algorithm, append zero-filled bytes to the end of
815 the packet as required. Perform the ICV computation and compare
816 the result with the saved value, using the comparison rules
817 defined by the algorithm specification. (For example, if a
818 digital signature and one-way hash are used for the ICV
819 computation, the matching process is more complex.)
820
821 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Auditing</span>
822
823 Not all systems that implement AH will implement auditing. However,
824 if AH is incorporated into a system that supports auditing, then the
825 AH implementation MUST also support auditing and MUST allow a system
826 administrator to enable or disable auditing for AH. For the most
827 part, the granularity of auditing is a local matter. However,
828 several auditable events are identified in this specification and for
829 each of these events a minimum set of information that SHOULD be
830 included in an audit log is defined. Additional information also MAY
831 be included in the audit log for each of these events, and additional
832 events, not explicitly called out in this specification, also MAY
833
834
835
836 <span class="grey">Kent &amp; Atkinson Standards Track [Page 15]</span></pre>
837 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
838 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
839
840
841 result in audit log entries. There is no requirement for the
842 receiver to transmit any message to the purported sender in response
843 to the detection of an auditable event, because of the potential to
844 induce denial of service via such action.
845
846 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Conformance Requirements</span>
847
848 Implementations that claim conformance or compliance with this
849 specification MUST fully implement the AH syntax and processing
850 described here and MUST comply with all requirements of the Security
851 Architecture document. If the key used to compute an ICV is manually
852 distributed, correct provision of the anti-replay service would
853 require correct maintenance of the counter state at the sender, until
854 the key is replaced, and there likely would be no automated recovery
855 provision if counter overflow were imminent. Thus a compliant
856 implementation SHOULD NOT provide this service in conjunction with
857 SAs that are manually keyed. A compliant AH implementation MUST
858 support the following mandatory-to-implement algorithms:
859
860 - HMAC with MD5 [<a href="#ref-MG97a" title="&quot;The Use of HMAC-MD5-96 within ESP and AH&quot;">MG97a</a>]
861 - HMAC with SHA-1 [<a href="#ref-MG97b" title="&quot;The Use of HMAC-SHA-1-96 within ESP and AH&quot;">MG97b</a>]
862
863 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
864
865 Security is central to the design of this protocol, and these
866 security considerations permeate the specification. Additional
867 security-relevant aspects of using the IPsec protocol are discussed
868 in the Security Architecture document.
869
870 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Differences from <a href="./rfc1826">RFC 1826</a></span>
871
872 This specification of AH differs from <a href="./rfc1826">RFC 1826</a> [<a href="#ref-ATK95" title="&quot;The IP Authentication Header&quot;">ATK95</a>] in several
873 important respects, but the fundamental features of AH remain intact.
874 One goal of the revision of <a href="./rfc1826">RFC 1826</a> was to provide a complete
875 framework for AH, with ancillary RFCs required only for algorithm
876 specification. For example, the anti-replay service is now an
877 integral, mandatory part of AH, not a feature of a transform defined
878 in another RFC. Carriage of a sequence number to support this
879 service is now required at all times. The default algorithms
880 required for interoperability have been changed to HMAC with MD5 or
881 SHA-1 (vs. keyed MD5), for security reasons. The list of IPv4 header
882 fields excluded from the ICV computation has been expanded to include
883 the OFFSET and FLAGS fields.
884
885 Another motivation for revision was to provide additional detail and
886 clarification of subtle points. This specification provides
887 rationale for exclusion of selected IPv4 header fields from AH
888 coverage and provides examples on positioning of AH in both the IPv4
889
890
891
892 <span class="grey">Kent &amp; Atkinson Standards Track [Page 16]</span></pre>
893 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
894 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
895
896
897 and v6 contexts. Auditing requirements have been clarified in this
898 version of the specification. Tunnel mode AH was mentioned only in
899 passing in <a href="./rfc1826">RFC 1826</a>, but now is a mandatory feature of AH.
900 Discussion of interactions with key management and with security
901 labels have been moved to the Security Architecture document.
902
903 Acknowledgements
904
905 For over 3 years, this document has evolved through multiple versions
906 and iterations. During this time, many people have contributed
907 significant ideas and energy to the process and the documents
908 themselves. The authors would like to thank Karen Seo for providing
909 extensive help in the review, editing, background research, and
910 coordination for this version of the specification. The authors
911 would also like to thank the members of the IPsec and IPng working
912 groups, with special mention of the efforts of (in alphabetic order):
913 Steve Bellovin, Steve Deering, Francis Dupont, Phil Karn, Frank
914 Kastenholz, Perry Metzger, David Mihelcic, Hilarie Orman, Norman
915 Shulman, William Simpson, and Nina Yuan.
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948 <span class="grey">Kent &amp; Atkinson Standards Track [Page 17]</span></pre>
949 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
950 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
951
952
953 Appendix A -- Mutability of IP Options/Extension Headers
954
955 A1. IPv4 Options
956
957 This table shows how the IPv4 options are classified with regard to
958 "mutability". Where two references are provided, the second one
959 supercedes the first. This table is based in part on information
960 provided in <a href="./rfc1700">RFC1700</a>, "ASSIGNED NUMBERS", (October 1994).
961
962 Opt.
963 Copy Class # Name Reference
964 ---- ----- --- ------------------------ ---------
965 IMMUTABLE -- included in ICV calculation
966 0 0 0 End of Options List [<a href="./rfc791">RFC791</a>]
967 0 0 1 No Operation [<a href="./rfc791">RFC791</a>]
968 1 0 2 Security [RFC1108(historic but in use)]
969 1 0 5 Extended Security [RFC1108(historic but in use)]
970 1 0 6 Commercial Security [expired I-D, now US MIL STD]
971 1 0 20 Router Alert [<a href="./rfc2113">RFC2113</a>]
972 1 0 21 Sender Directed Multi- [<a href="./rfc1770">RFC1770</a>]
973 Destination Delivery
974 MUTABLE -- zeroed
975 1 0 3 Loose Source Route [<a href="./rfc791">RFC791</a>]
976 0 2 4 Time Stamp [<a href="./rfc791">RFC791</a>]
977 0 0 7 Record Route [<a href="./rfc791">RFC791</a>]
978 1 0 9 Strict Source Route [<a href="./rfc791">RFC791</a>]
979 0 2 18 Traceroute [<a href="./rfc1393">RFC1393</a>]
980
981 EXPERIMENTAL, SUPERCEDED -- zeroed
982 1 0 8 Stream ID [RFC791, <a href="./rfc1122">RFC1122</a> (Host Req)]
983 0 0 11 MTU Probe [RFC1063, <a href="./rfc1191">RFC1191</a> (PMTU)]
984 0 0 12 MTU Reply [RFC1063, <a href="./rfc1191">RFC1191</a> (PMTU)]
985 1 0 17 Extended Internet Proto [RFC1385, <a href="./rfc1883">RFC1883</a> (IPv6)]
986 0 0 10 Experimental Measurement [ZSu]
987 1 2 13 Experimental Flow Control [Finn]
988 1 0 14 Experimental Access Ctl [Estrin]
989 0 0 15 ??? [VerSteeg]
990 1 0 16 IMI Traffic Descriptor [Lee]
991 1 0 19 Address Extension [Ullmann IPv7]
992
993 NOTE: Use of the Router Alert option is potentially incompatible with
994 use of IPsec. Although the option is immutable, its use implies that
995 each router along a packet's path will "process" the packet and
996 consequently might change the packet. This would happen on a hop by
997 hop basis as the packet goes from router to router. Prior to being
998 processed by the application to which the option contents are
999 directed, e.g., RSVP/IGMP, the packet should encounter AH processing.
1000
1001
1002
1003
1004 <span class="grey">Kent &amp; Atkinson Standards Track [Page 18]</span></pre>
1005 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
1006 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
1007
1008
1009 However, AH processing would require that each router along the path
1010 is a member of a multicast-SA defined by the SPI. This might pose
1011 problems for packets that are not strictly source routed, and it
1012 requires multicast support techniques not currently available.
1013
1014 NOTE: Addition or removal of any security labels (BSO, ESO, CIPSO) by
1015 systems along a packet's path conflicts with the classification of
1016 these IP Options as immutable and is incompatible with the use of
1017 IPsec.
1018
1019 NOTE: End of Options List options SHOULD be repeated as necessary to
1020 ensure that the IP header ends on a 4 byte boundary in order to
1021 ensure that there are no unspecified bytes which could be used for a
1022 covert channel.
1023
1024 A2. IPv6 Extension Headers
1025
1026 This table shows how the IPv6 Extension Headers are classified with
1027 regard to "mutability".
1028
1029 Option/Extension Name Reference
1030 ----------------------------------- ---------
1031 MUTABLE BUT PREDICTABLE -- included in ICV calculation
1032 Routing (Type 0) [<a href="./rfc1883">RFC1883</a>]
1033
1034 BIT INDICATES IF OPTION IS MUTABLE (CHANGES UNPREDICTABLY DURING TRANSIT)
1035 Hop by Hop options [<a href="./rfc1883">RFC1883</a>]
1036 Destination options [<a href="./rfc1883">RFC1883</a>]
1037
1038 NOT APPLICABLE
1039 Fragmentation [<a href="./rfc1883">RFC1883</a>]
1040
1041 Options -- IPv6 options in the Hop-by-Hop and Destination
1042 Extension Headers contain a bit that indicates whether the
1043 option might change (unpredictably) during transit. For
1044 any option for which contents may change en-route, the
1045 entire "Option Data" field must be treated as zero-valued
1046 octets when computing or verifying the ICV. The Option
1047 Type and Opt Data Len are included in the ICV calculation.
1048 All options for which the bit indicates immutability are
1049 included in the ICV calculation. See the IPv6
1050 specification [<a href="#ref-DH95" title="&quot;Internet Protocol version 6 (IPv6) Specification&quot;">DH95</a>] for more information.
1051
1052 Routing (Type 0) -- The IPv6 Routing Header "Type 0" will
1053 rearrange the address fields within the packet during
1054 transit from source to destination. However, the contents
1055 of the packet as it will appear at the receiver are known
1056 to the sender and to all intermediate hops. Hence, the
1057
1058
1059
1060 <span class="grey">Kent &amp; Atkinson Standards Track [Page 19]</span></pre>
1061 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
1062 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
1063
1064
1065 IPv6 Routing Header "Type 0" is included in the
1066 Authentication Data calculation as mutable but predictable.
1067 The sender must order the field so that it appears as it
1068 will at the receiver, prior to performing the ICV
1069 computation.
1070
1071 Fragmentation -- Fragmentation occurs after outbound IPsec
1072 processing (<a href="#section-3.3">section 3.3</a>) and reassembly occurs before
1073 inbound IPsec processing (<a href="#section-3.4">section 3.4</a>). So the
1074 Fragmentation Extension Header, if it exists, is not seen
1075 by IPsec.
1076
1077 Note that on the receive side, the IP implementation could
1078 leave a Fragmentation Extension Header in place when it
1079 does re-assembly. If this happens, then when AH receives
1080 the packet, before doing ICV processing, AH MUST "remove"
1081 (or skip over) this header and change the previous header's
1082 "Next Header" field to be the "Next Header" field in the
1083 Fragmentation Extension Header.
1084
1085 Note that on the send side, the IP implementation could
1086 give the IPsec code a packet with a Fragmentation Extension
1087 Header with Offset of 0 (first fragment) and a More
1088 Fragments Flag of 0 (last fragment). If this happens, then
1089 before doing ICV processing, AH MUST first "remove" (or
1090 skip over) this header and change the previous header's
1091 "Next Header" field to be the "Next Header" field in the
1092 Fragmentation Extension Header.
1093
1094 References
1095
1096 [<a id="ref-ATK95">ATK95</a>] Atkinson, R., "The IP Authentication Header", <a href="./rfc1826">RFC 1826</a>,
1097 August 1995.
1098
1099 [<a id="ref-Bra97">Bra97</a>] Bradner, S., "Key words for use in RFCs to Indicate
1100 Requirement Level", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
1101
1102 [<a id="ref-DH95">DH95</a>] Deering, S., and B. Hinden, "Internet Protocol version 6
1103 (IPv6) Specification", <a href="./rfc1883">RFC 1883</a>, December 1995.
1104
1105 [<a id="ref-HC98">HC98</a>] Harkins, D., and D. Carrel, "The Internet Key Exchange
1106 (IKE)", <a href="./rfc2409">RFC 2409</a>, November 1998.
1107
1108 [<a id="ref-KA97a">KA97a</a>] Kent, S., and R. Atkinson, "Security Architecture for the
1109 Internet Protocol", <a href="./rfc2401">RFC 2401</a>, November 1998.
1110
1111 [<a id="ref-KA97b">KA97b</a>] Kent, S., and R. Atkinson, "IP Encapsulating Security
1112 Payload (ESP)", <a href="./rfc2406">RFC 2406</a>, November 1998.
1113
1114
1115
1116 <span class="grey">Kent &amp; Atkinson Standards Track [Page 20]</span></pre>
1117 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
1118 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
1119
1120
1121 [<a id="ref-MG97a">MG97a</a>] Madson, C., and R. Glenn, "The Use of HMAC-MD5-96 within
1122 ESP and AH", <a href="./rfc2403">RFC 2403</a>, November 1998.
1123
1124 [<a id="ref-MG97b">MG97b</a>] Madson, C., and R. Glenn, "The Use of HMAC-SHA-1-96 within
1125 ESP and AH", <a href="./rfc2404">RFC 2404</a>, November 1998.
1126
1127 [<a id="ref-STD-2">STD-2</a>] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, <a href="./rfc1700">RFC</a>
1128 <a href="./rfc1700">1700</a>, October 1994. See also:
1129 <a href="http://www.iana.org/numbers.html">http://www.iana.org/numbers.html</a>
1130
1131 Disclaimer
1132
1133 The views and specification here are those of the authors and are not
1134 necessarily those of their employers. The authors and their
1135 employers specifically disclaim responsibility for any problems
1136 arising from correct or incorrect implementation or use of this
1137 specification.
1138
1139 Author Information
1140
1141 Stephen Kent
1142 BBN Corporation
1143 70 Fawcett Street
1144 Cambridge, MA 02140
1145 USA
1146
1147 Phone: +1 (617) 873-3988
1148 EMail: [email protected]
1149
1150
1151 Randall Atkinson
1152 @Home Network
1153 425 Broadway,
1154 Redwood City, CA 94063
1155 USA
1156
1157 Phone: +1 (415) 569-5000
1158 EMail: [email protected]
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172 <span class="grey">Kent &amp; Atkinson Standards Track [Page 21]</span></pre>
1173 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
1174 <span class="grey"><a href="./rfc2402">RFC 2402</a> IP Authentication Header November 1998</span>
1175
1176
1177 Copyright (C) The Internet Society (1998). All Rights Reserved.
1178
1179 This document and translations of it may be copied and furnished to
1180 others, and derivative works that comment on or otherwise explain it
1181 or assist in its implementation may be prepared, copied, published
1182 and distributed, in whole or in part, without restriction of any
1183 kind, provided that the above copyright notice and this paragraph are
1184 included on all such copies and derivative works. However, this
1185 document itself may not be modified in any way, such as by removing
1186 the copyright notice or references to the Internet Society or other
1187 Internet organizations, except as needed for the purpose of
1188 developing Internet standards in which case the procedures for
1189 copyrights defined in the Internet Standards process must be
1190 followed, or as required to translate it into languages other than
1191 English.
1192
1193 The limited permissions granted above are perpetual and will not be
1194 revoked by the Internet Society or its successors or assigns.
1195
1196 This document and the information contained herein is provided on an
1197 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1198 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1199 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1200 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1201 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228 Kent &amp; Atkinson Standards Track [Page 22]
1229 </pre>