view Side-By-Side changes
Network Working GroupRandall AtkinsonStephen Kent, BBN Corp Internet Draftcisco Systems draft-ietf-ipsec-auth-header-00.txt 4 June 1996Randall Atkinson, @Home Network draft-ietf-ipsec-auth-header-01.txt July 21 1997 IP Authentication HeaderSTATUS OF THIS MEMOStatus of This Memo This document is an Internet Draft. Internet Drafts are working documents of the Internet Engineering Task Force (IETF), its Areas, and itsworking groups.Working Groups. Note that other groups may also distribute working documents as Internet Drafts. Internet Drafts are draft documents valid for a maximum of 6 months. Internet Drafts may be updated, replaced, or obsoleted by other documents at any time. It is not appropriate to use Internet Drafts as reference material or to cite them other than as a "working draft" or "work in progress". Please check the I-D abstract listing contained in each Internet Draft directory to learn the current status of this or any other Internet Draft. This particular Internet Draft is a product of the IETF'sIPng andIPsec WorkingGroups.Group. It is intended that a future version of this draft will be submitted for consideration as a standards-track document. Distribution of this document is unlimited.0. ABSTRACT This document describes a mechanism for providing cryptographic authentication for IPv4 and IPv6 datagrams. AnKent, Atkinson [Page 1] Internet Draft IP Authentication Header(AH) is inserted after the IP header being authenticated and before the other information being authenticated.21 July, 1997 Table of Contents 1.INTRODUCTION TheIntroduction......................................................3 2. Authentication Headeris a mechanism for providing strong integrity, authentication, and replay protection for IP datagrams. Confidentiality, and protection from traffic analysis are not provided by theFormat......................................4 2.1 Next Header...................................................4 2.2 Payload Length................................................4 2.3 Reserved......................................................5 2.4 Security Parameters Index (SPI)...............................5 2.5 Sequence Number...............................................5 2.6 AuthenticationHeader. Users desiring confidentiality should consider using the IP EncapsulatingData ..........................................5 3. Authentication Header Processing..................................6 3.1 Authentication Header Location...............................6 3.2 Outbound Packet Processing...................................8 3.2.1 SecurityProtocol (ESP) either in lieu of or in conjunction with theAssociation Lookup.............................8 3.2.2 Sequence Number Generation..............................8 3.2.3 Integrity Check Value Calculation.......................9 3.2.3.1 Handling Mutable Fields............................9 3.2.3.1.1 ICV Computation for IPv4......................9 3.2.3.1.1.1 Base Header Fields........................9 3.2.3.1.1.2 Options..................................10 3.2.3.1.2 ICV Computation for IPv6.....................10 3.2.3.1.2.1 Base Header Fields.......................10 3.2.3.1.2.2 Extension Headers -- Options.............11 3.2.3.1.2.3 Extension Headers -- non-Options.........11 3.2.3.2 Padding...........................................11 3.2.3.2.1 AuthenticationHeader. [Atk95b] This document assumes the reader hasData Padding..................11 3.2.3.2.2 Implicit Packet Padding......................12 3.2.3.3 Authentication Algorithms.........................12 3.2.4 Fragmentation..........................................12 3.3 Inbound Packet Processing...................................13 3.3.1 Reassembly.............................................13 3.3.2 Security Association Lookup............................13 3.3.3 Sequence Number Verification...........................13 3.3.4 Integrity Check Value Verification.....................14 4. Auditing.........................................................15 5. Conformance Requirements.........................................15 6. Security Considerations..........................................16 7. Differences from RFC 1826........................................16 Acknowledgements....................................................17 Appendix A -- Mutability of IP Options/Extension Headers............18 1. IPv4 Options..................................................18 2. IPv6 Extension Headers........................................19 References..........................................................21 Disclaimer..........................................................22 Author Information..................................................22 Kent, Atkinson [Page1]2] Internet Draft IP Authentication Header4 June 1996 previously read the related IP Security Architecture document which defines the overall security architecture for IP and provides important background information for this specification. [Atk95a] 1.1 Overview21 July, 1997 1. Introduction The IP Authentication Headerseeks(AH) is used to providesecurity by addingconnectionless integrity and data origin authenticationinformation to anfor IPdatagram.datagrams (hereafter referred to as just "authentication"), and to provide protection against replays. Thisauthentication informationlatter, optional service may be selected, by the receiver, when a Security Association iscalculated using allestablished. AH provides authentication for as much of the IP header as possible, as well as for upper level protocol data. However, some IP header fields may change in transit and theIP datagram (including not onlyvalue of these fields, when theIP Header but also other headers andpacket arrives at theuser data) which doreceiver, may notchange in transit. Fields or options which need to change in transit (e.g "hop count", "time to live", "ident", "fragment offset", or "routing pointer") are considered tobezero forpredictable by thecalculationtransmitter. The values of such fields cannot be protected by AH. Thus theauthentication data. This provides significantly more security thanprotection provided to the IP header by AH iscurrently present in IPv4 and mightsomewhat piecemeal. AH may besufficientapplied alone, in combination with the IP Encapsulating Security Payload (ESP) [KA97b], or in a nested fashion through the use of tunnel mode (see "Security Architecture for theneedsInternet Protocol" [KA97a], hereafter referred to as the Security Architecture document). Security services can be provided between a pair ofmany users. Usecommunicating hosts, between a pair ofthis specification will increasecommunicating security gateways, or between a security gateway and a host. ESP may be used to provide theIP protocol processing costs in participating end systemssame security services, andwillit alsoincrease the communications latency.provides a confidentiality (encryption) service. Theincreased latency is primarily due to the calculation ofprimary difference between the authenticationdataprovided bythe senderESP and AH is thecalculation and comparisonextent of theauthentication data by the receiver for eachcoverage. Specifically, ESP does not protect any IPdatagram containing an Authentication Header. The impact will vary with authentication algorithm used and other factors. In order for the Authentication Headerheader fields unless those fields are encapsulated by ESP (tunnel mode). For more details on how towork properly without changing the entire Internet infrastructure,use AH and ESP in various network environments, see theauthentication dataSecurity Architecture document [KA97a]. It iscarried in its own payload. Systemsassumed thataren't participating in the authentication ignoretheAuthentication Data. When used with IPv6, the Authentication Headerreader isplaced afterfamiliar with theFragmentationterms andEnd-to-End headers and before the transport-layer headers. The informationconcepts described in theother IP headers is used to routeSecurity Architecture document. In particular, thedatagram from origin to destination. When usedreader should be familiar withIPv4,theAuthentication Header immediately follows an IPv4 header. If a symmetric authentication algorithm is useddefinitions of security services offered by AH andintermediate authentication is desired, thenESP, thenodes performing such intermediate authentication would need toconcept of Security Associations, the ways in which AH can beprovidedused in conjunction with ESP, and theappropriate keys. Possession of those keys would permit any one of those systems to forge traffic claiming to be from the legitimate senderdifferent key management options available for AH and ESP. (With regard to thelegitimate receiver or to modifylast topic, thecontents of otherwise legitimate traffic. In some environments such intermediate authentication might be desirable. [BCCH94] If an asymmetric authentication algorithm is usedcurrent key management options required for both AH andthe routersESP areaware of the appropriate public keys and authentication algorithm, then the routers possessing the authentication public key could authenticate the traffic being handled without being able to forge or modify otherwise legitimate traffic. Also, Path MTU Discovery MUST be usedmanual keying andthe "Don't Fragment" bit must be set when intermediateautomated keying via Oakley/ISAKMP.) Kent, Atkinson [Page2]3] Internet Draft IP Authentication Header4 June 1996 authentication of the21 July, 1997 2. Authentication Headeris desired and IPv4 isFormat The protocol header (IPv4, IPv6, or Extension) immediately preceding the AH header will contain the value 51 inuse because with this method it is not possible to authenticate a fragment of a packet. [MD90] [Kno93] 1.2 Requirements Terminology In this document,its Protocol (IPv4) or Next Header (IPv6, Extension) field [STD-2]. 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Payload Len | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Security Parameters Index (SPI) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number Field | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Authentication Data (variable) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The following subsections define thewordsfields thatare used to definecomprise thesignificance of each particular requirementAH format. All the fields described here areusually capitalised. These words are: - MUST This word ormandatory, i.e., they are always present in theadjective "REQUIRED" means thatAH format and are included in theitemICV computation. 2.1 Next Header The Next Header is anabsolute requirement8-bit field that identifies the type of thespecification. - SHOULD This word ornext payload after theadjective "RECOMMENDED" means that there might exist valid reasons in particular circumstances to ignoreAuthentication Header. The value of thisitem, butfield is chosen from thefull implications should be understood andset of IP Protocol Numbers defined in thecase carefully weighed before taking a different course. - MAY This word ormost recent "Assigned Numbers" [STD-2] RFC from theadjective "OPTIONAL" means that this item is truly optional. One vendor might choose to includeInternet Assigned Numbers Authority (IANA). 2.2 Payload Length This 8-bit field specifies theitem because a particular marketplace requires it or because it enhanceslength of AH, in 32-bit words (4-byte units), minus "2," i.e., theproduct, for example; another vendor may omitfixed portion (as defined in thesame item. 2. SECURITY ASSOCIATION MANAGEMENT Security association management is an important partoriginal AH spec) of AH is not counted. (Since theIP security architecture. ItSequence Number field isimportant foralways present, the fixed portion of AHto be able to work with multiple security association management protocols (e.g. unicast vs. multicast). Also, thereisa long history innow three 32-bit words. However, the "minus 2" length adjustment has been retained for backwards compatibility.) In thepublic literature"standard" case ofsubtle flaws in key management algorithms and protocols. Hence,a 96-bit authentication value plus the 3 32-bit word fixed portion, this length field will be "4". A "null" authentication algorithm may be used only for debugging purposes. Its use would result in a "1" value for this field, as there would be no corresponding Authentication Data field. Kent, Atkinson [Page 4] Internet Draft IP Authentication Headertries21 July, 1997 2.3 Reserved This 16-bit field is reserved for future use. It MUST be set todecouple the security association management mechanisms from the security protocol mechanisms. The only coupling between"zero." (Note that thekey management protocol andvalue is included in thesecurity protocolAuthentication Data calculation, but iswithotherwise ignored by the recipient.) 2.4 Security Parameters Index(SPI), which(SPI) The SPI isdescribedan arbitrary 32-bit value that uniquely identifies the Security Association for this datagram, relative to the destination IP address contained inmore detail below. This decoupling permits several differentthe IP header with which this securitymanagement mechanismsheader is associated, and relative tobe used. More importantly, it permits the security or key management protocol to be changed or corrected without unduly impactingthe security protocolimplementations.employed. Thesecurity management mechanism is used to negotiate a numberset ofparameters for each "Security Association", including not only the Atkinson [Page 3] Internet Draft IP Authentication Header 4 June 1996 keys but also other information (e.g.SPI values in theauthentication algorithm and mode) usedrange 1 through 255 are reserved by thecommunicating parties. The security management mechanism creates and maintainsInternet Assigned Numbers Authority (IANA) for future use; alogical table containingreserved SPI value will not normally be assigned by IANA unless theseveral parameters for each current security association. An implementationuse of theIP Authentication Header will need to read that logical tableassigned SPI value is specified in an RFC. It is ordinarily selected by the destination system upon establishment ofsecurity parameters to determine how to process each datagram containinganAuthentication Header (e.g. to determine which algorithm/mode and key to use in authentication).SA (see the SecurityAssociationsArchitecture document for more details). (A zero value may be used for local debugging purposes, but no AH packets should be transmitted with a zero SPI value.) 2.5 Sequence Number This unsigned 32-bit field contains a monotonically increasing counter value (sequence number). The sender's counter and the receiver's counter areunidirectional. A bidirectional communications session will normally have one Security Association in each direction. For example,initialized to 0 when an SA is established. (The first packet sent using aTCP session exists between two systems A and B, theregiven SA willnormallyhave a Sequence Number of 1; see Section 3.2.2 for more details on how the Sequence Number is generated.) The transmitted Sequence Number must never beone Security Association from Aallowed toBcycle. Thus the sender's counter and the receiver's counter MUST be reset (by establishing a new SA and thus aseparate second Security Assocation from Bnew key) prior toA. Thethe transmission of 2^32nd packet on an SA. This field is always present, even if the receiverassignsdoes not elect to enable theSPI valueanti-replay service for a specific SA, in order to ensure 8-byte alignment for the IPv6 environment, when theSecurity Association with that sender. The other parametersdefault integrity algorithms are employed. Processing of theSecurity Association are determined in a manner specified bySequence Number field is at thesecurity management mechanism. Section 4discretion of the receiver, i.e., the sender MUST always transmit thisdocument describes in detailfield, but theprocessreceiver need not act upon it (see the discussion ofselectingSequence Number Verification in the "Inbound Processing" section below). 2.6 Authentication Data This is aSecurity Association for an outgoing packet and identifyingvariable-length field that contains theSecurity AssocationIntegrity Check Value (ICV) foran incomingthis packet. TheIP Security Architecture document describes key managementfield must be an integral multiple of 32 bits inmore detail. It includes specificationlength. The details of thekey management requirements for implementations of this protocol, and is incorporated here by reference. [Atk95a] 3. AUTHENTICATION HEADER SYNTAX TheICV computation are Kent, Atkinson [Page 5] Internet Draft IP Authentication Header(AH)21 July, 1997 described in Section 3.2.3 below. This field mayappear after any other headers which are examined at each hop, and before any other headers which are not examined atinclude explicit padding. This padding is included to ensure that the length of the AH header is anintermediate hop. The IPv4integral multiple of 32 bits (IPv4) orIPv6 header immediately preceding64 bits (IPv6). All implementations MUST support such padding. Details of how to compute the required padding length are provided below. 3. Authentication Headerwill contain the value 51 in its NextProcessing 3.1 Authentication Header(or Protocol) field. [STD-2] Note thatLocation Like ESP, AHuses daisy-chained optional headers even for IPv4 just as IPv6 daisy- chains all optional headers.may be employed in two ways: transport mode or tunnel mode. Thefollowing header combinations are NOT valid at any time: 1. [IP][AH][AH][upper-layer protocol] 2. [IP][ESP][AH][upper-layer protocol] Regarding case 1, one shouldformer mode is applicable onlyhave a single AH present in such a packet. Regarding case 2, one instead uses an ESP transform (e.g. [Hugh96]) that provides strong integrityto host implementations andauthentication protectionsprovides protection for upper layer protocols, in addition toconfidentiality. Example high-level diagrams of validselected IPdatagrams withheader fields. (In this mode, note that for "bump-in- the-stack" or "bump-in-the-wire" implementations, as defined in theAuthentication Header follow. +-------------+--------------------+-------------+--------+----------------+ Atkinson [Page 4] Internet DraftSecurity Architecture document, inbound and outbound IPAuthentication Header 4 June 1996 | IPv6 Headerfragments may require an IPsec implementation to perform extra IP reassembly/fragmentation in order to both conform to this specification and provide transparent IPsec support. Special care is required to perform such operations within these implementations when multiple interfaces are in use.) In transport mode, AH is inserted after the IP header and before an upper layer protocol, e.g., TCP, UDP, ICMP, etc. or before any other IPsec headers that have already been inserted, e.g., ESP. In the context of IPv4, this calls for placing AH after the IP header (and any options that it contains), but before the upper layer protocol. (Note that the term "transport" mode should not be misconstrued as restricting its use to TCP and UDP. For example, an ICMP message MAY be sent using either "transport" mode or "tunnel" mode.) The following diagram illustrates AH transport mode positioning for a typical IPv4 packet, on a "before and after" basis. BEFORE APPLYING AH ---------------------------- IPv4 |orig IP hdr |Hop-by-Hop/Routing|Auth Header|Others|(any options)| TCP | Data |Upper Protocol---------------------------- AFTER APPLYING AH --------------------------------- IPv4 |orig IP hdr | | | | |(any options)| AH | TCP | Data |+-------------+--------------------+-------------+--------+----------------+ Figure 1:--------------------------------- |<------- authenticated ------->| except for mutable fields In the IPv6Examplecontext, AH is viewed as an end-to-end payload, and thus Kent, Atkinson [Page5]6] Internet Draft IP Authentication Header4 June 1996 When used with IPv6, the Authentication Header normally appears21 July, 1997 should appear afterthe IPv6 Hop-by-Hop Header and the Fragmentation Headerhop-by-hop, routing, andjust before the IPv6 Destination Options Header. If neither the Hop-by-Hop Header nor the Fragmentation Header are present in the packet, the Authentication Header might not directly follow such (in that case, non-existent)fragmentation extension headers. TheAuthentication Header does always fall in that logical position within the IP packet. Fragmentation always occurs after AH processing and reassembly occursdestination options extension header(s) could appear either before or after the AHprocessing, so ifheader depending on theFragmentation Header exists insemantics desired. The following diagram illustrates AH transport mode positioning for apacket the Authentication Header MUST NOT precede the Fragmentation Header. +-------------+--------------+-------------------------------+typical IPv6 packet. BEFORE APPLYING AH --------------------------------------- IPv6 |IPv4 Header|Auth Headerext hdrs |Upper Protocol (e.g TCP, UDP)|+-------------+--------------+-------------------------------+ Figure 2: IPv4 Example When used with IPv4, the Authentication Header MUST immediately follow| | orig IP hdr |if present| TCP | Data | --------------------------------------- AFTER APPLYING AH ------------------------------------------------------------ IPv6 | |hxh,rtg,frag| dest | | dest | | | |orig IP hdr |if present**| opt* | AH | opt* | TCP | Data | ------------------------------------------------------------ |<---- authenticated except for mutable fields ----------->| * = if present, could be before AH, after AH, or both ** = hop by hop, routing, fragmentation headers Tunnel mode AH may be employed in either hosts or security gateways (or in so-called "bump-in-the-stack" or "bump-in-the-wire" implementations, as defined in theIPv4 header, unless an in-line IP-layer key management techniqueSecurity Architecture document). When AH is implemented inuse for that packet.a security gateway (to protect subscriber transit traffic), tunnel mode must be used. In tunnel mode, thelatter case, the Authentication Header MUST always follow that inline IP-layer key management header. It is NOT valid in any other location. 3.1 Authentication Header Syntax The authentication data is"inner" IP header carries theoutputultimate source and destination addresses, while an "outer" IP header may contain distinct IP addresses, e.g., addresses of security gateways. In tunnel mode, AH protects theauthentication algorithm calculated over theentire inner IP packet, including the entire inner IPdatagram as described in more detail later in this document.header. Theauthentication calculation must treat the Authentication Data field itself and all fields that are normally modifiedposition of AH intransit (e.g. TTL or Hop Limit)tunnel mode, relative to the outer IP header, is the same asif those fields contained all zeros. All other Authentication Header fields are includedfor AH inthe authentication calculation normally.transport mode. The following diagram illustrates AH tunnel mode positioning for typical IPv4 and IPv6 packets. Kent, Atkinson [Page 7] Internet Draft IP Authentication Headerhas the following syntax: +---------------+---------------+---------------+---------------+21 July, 1997 ------------------------------------------------ IPv4 |Next Headernew IP hdr* |Length|RESERVEDorig IP hdr* |+---------------+---------------+---------------+---------------+|Security Parameters Index|+---------------+---------------+---------------+---------------+|(any options)| AH | (any options) |TCP |+ AuthenticationData(variable number of 32-bit words)| ------------------------------------------------ |<-- authenticated except for mutable fields ->| -------------------------------------------------------------- IPv6 | |+---------------+---------------+---------------+---------------+ 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Atkinson [Page 6] Internet Draftext hdrs*| | | ext hdrs*| | | |new IPAuthentication Header 4 June 1996 Figure 3: Authentication Header syntax 3.2 Fieldshdr*|if present| AH |orig IP hdr*|if present|TCP|Data| -------------------------------------------------------------- |<-------- authenticated except for mutable fields --------->| * = construction of outer IP hdr/extensions and modification of inner IP hdr/extensions is discussed below. 3.2 Outbound Packet Processing In transport mode, theAuthentication Header NEXT HEADER 8 bits wide. Identifiestransmitter inserts thenext payloadAH header after theAuthentication Header. The values in this field are the set ofIPProtocol Numbersheader and before an upper layer protocol header, asdefined in the most recent RFC fromdescribed above. In tunnel mode, theInternet Assigned Numbers Authority (IANA) describing "Assigned Numbers" [STD-2]. PAYLOAD LENGTH 8 bits wide.outer and inner IP header/extensions can be inter-related in a variety of ways. Thelengthconstruction of theAuthentication Data field in 32-bit words. Minimum valueouter IP header/extensions during the encapsulation process is0 words, whichdescribed in the Security Architecture document. 3.2.1 Security Association Lookup AH is applied to an outbound packet onlyused inafter an IPsec implementation determines that thedegenerate case of a "null" authentication algorithm. RESERVED 16 bits wide. Reservedpacket is associated with an SA that calls forfuture use. MUST be set to all zeros when sent.AH processing. Thevalueprocess of determining what, if any, IPsec processing isincludedapplied to outbound traffic is described in theAuthentication Data calculation, butSecurity Architecture document. 3.2.2 Sequence Number Generation The sender's counter isotherwise ignored by the recipient. SECURITY PARAMETERS INDEX (SPI) An arbitrary 32-bit value identifyinginitialized to 0 when an SA is established. The transmitter increments thesecurity associationSequence Number for thisdatagram. The Security Parameters Index value 0 is reservedSA, checks toindicateensure that"no security association exists". The set of Security Parameters Index values intherange 1 through 255 are reserved tocounter has not cycled, and inserts theInternet Assigned Numbers Authority (IANA) for future use. A reserved SPInew value into the Sequence Number Field. Thus the first packet sent using a given SA will have a Sequence Number of 1. A transmitter MUST notnormally be assigned by IANA unlesssend a packet on an SA if doing so would cause theuse ofsequence number to cycle. An attempt to transmit a packet thatparticular assigned SPI value is openly specifiedwould result in sequence number overflow is anRFC. AUTHENTICATION DATA This length ofauditable event. (Note that thisfield is variable, but is always an integral number of 32-bit words. Many implementations require padding to other alignments, such as 64-bits, in orderapproach toimprove performance. All implementations MUST support such padding, which is specified by the Destination on a per SPI basis. The value of the padding field is arbitrarily selected by the sender and is included in the Authentication Data calculation. An implementation willSequence Number management does not require usethe combination of Destination Address and SPI to locate the Security Association which specifies the field's size and use. The field retains the same format for all datagramsofany given SPI and Destination Address pair.modular arithmetic.) Kent, Atkinson [Page7]8] Internet Draft IP Authentication Header4 June 199621 July, 1997 3.2.3 Integrity Check Value Calculation 3.2.3.1 Handling Mutable Fields TheAuthentication Data fillsAH ICV is computed over IP header fields that are either immutable in transit or that are predictable in value upon arrival at thefield beginning immediately afterendpoint for theSPI field.AH SA. The ICV also encompasses the upper level protocol data, which is assumed to be immutable in transit. If a field may be modified during transit, the value of the field islonger than necessaryset tostorezero for purposes of theactual authentication data,ICV computation. If a field is mutable, but its value at the (IPsec) receiver is predictable, then that value is inserted into theunused bit positions are filled with unspecified, implementation-dependent values. Refer to each Authentication Transform specificationfield formore information regarding the contentspurposes ofthis field. 3.3 Sensitivity Labeling Asthe ICV calculation. The Authentication Data field also isdiscussed in greater detailset to zero inthe IP Security Architecture document, IPv6 will normally use implicit Security Labelspreparation for this computation. Note that by replacing each field's value with zero, rather than omitting theexplicit labelsfield, alignment is preserved for the ICV calculation. Also, the zero-fill approach ensures that the length of the fields that arecurrently used with IPv4. [Ken91] [Atk95a] In some situations, users MAY choose to carry explicit labels (for example, IPSO labels as defined by RFC-1108 mightso handled cannot beused with IPv4) in addition to using the implicit labels providedchanged during transit, even though their contents are not explicitly covered by theAuthentication Header. Explicit label options couldICV. As a new extension header or IPv4 option is created, it will be definedfor use with IPv6 (e.g. usingin its own RFC and SHOULD include (in theIPv6 end-to-end options header orSecurity Considerations section) directions for how it should be handled when calculating theIPv6 hop-by-hop options header). Implementations MAY support explicit labels in addition to implicit labels, but implementations are not required to support explicit labels.AH ICV. Ifexplicit labels are in use, thentheexplicit labelIPSEC implementation encounters an extension header that it does not recognize, it MUSTbe included inzero theauthentication calculation. 4. CALCULATION OF THE AUTHENTICATION DATAwhole header except for the Next Header and Hdr Ext Len fields. Theauthentication data carriedlength of the extension header MUST be computed by 8 * Hdr Ext Len value + 8. If the IPSEC implementation encounters an IPv4 option that it does not recognize, it should zero the whole option, using the second byte of the option as the length. (IPv6 options contain a flag indicating mutability, which determines appropriate processing for such options.) 3.2.3.1.1 ICV Computation for IPv4 3.2.3.1.1.1 Base Header Fields The IPv4 base header fields are classified as follows: Immutable Version Internet Header Length Total Length Identification Protocol Source Address Destination Address (without loose or strict source routing) Kent, Atkinson [Page 9] Internet Draft IP Authentication Headeris usually calculated using a message digest algorithm (for example, MD5) either encrypting that message digest21 July, 1997 Mutable but predictable Destination Address (with loose orkeying the message digest directly. [Riv92] Only algorithms thatstrict source routing) Mutable (zeroed prior to ICV calculation) Type of Service (TOS) Flags Fragment Offset Time to Live (TTL) Header Checksum TOS -- This field is excluded because some routers arebelievedknown tobe cryptographically strong one-way functions should be used withchange the value of this field, even though the IPAuthentication Header. Because conventional checksums and CRCs arespecification does notcryptographically strong, they MUST NOTconsider TOS to beused witha mutable header field. Flags -- This field is excluded since an intermediate router might set theAuthentication Header. WhenDF bit, even if the source did not select it. Fragment Offset -- Since AH is applied only to non-fragmented IP packets, the Offset Field must always be zero, and thus it is excluded (even though it is predictable). TTL -- This is changed en-route as a normal course of processing by routers, and thus its value at the receiver is not predictable by the sender. Header Checksum -- This will change if any of these other fields changes, and thus its value upon reception cannot be predicted by the sender. 3.2.3.1.1.2 Options For IPv4 (unlike IPv6), there is no mechanism for tagging options as mutable in transit. Hence the IPv4 options are explicitly listed in Appendix A and classified as immutable, mutable but predictable, or mutable. For IPv4, the entire option is viewed as a unit; so even though the type and length fields within most options are immutable in transit, if an option is classified as mutable, the entire option is zeroed for ICV computation purposes. 3.2.3.1.2 ICV Computation for IPv6 3.2.3.1.2.1 Base Header Fields The IPv6 base header fields are classified as follows: Kent, Atkinson [Page 10] Internet Draft IP Authentication Header 21 July, 1997 Immutable Version Payload Length Next Header Source Address Destination Address (without Routing Extension Header) Mutable but predictable Destination Address (with Routing Extension Header) Mutable (zeroed prior to ICV calculation) Priority Flow Label Hop Limit 3.2.3.1.2.2 Extension Headers -- Options The IPv6 extension headers (that are options) are explicitly listed in Appendix A and classified as immutable, mutable but predictable, or mutable. IPv6 options in the Hop-by-Hop and Destination Extension Headers contain a bit that indicates whether the option might change (unpredictably) during transit. For any option for which contents may change en-route, the entire "Option Data" field must be treated as zero-valued octets when computing or verifying the ICV. The Option Type and Opt Data Len are included in the ICV calculation. All options for which the bit indicates immutability are included in the ICV calculation. See the IPv6 specification [DH95] for more information. 3.2.3.1.2.3 Extension Headers -- non-Options The IPv6 extension headers (that are not options) are explicitly listed in Appendix A and classified as immutable, mutable but predictable, or mutable. 3.2.3.2 Padding 3.2.3.2.1 Authentication Data Padding As mentioned in section 2.6, the Authentication Data field explicitly includes padding to ensure that the AH header is a multiple of 32 bits (IPv4) or 64 bits (IPv6). If padding is required, its length is determined by two factors: - the length of the ICV - the IP protocol version (v4 or v6) Kent, Atkinson [Page 11] Internet Draft IP Authentication Header 21 July, 1997 For example, if a default, 96-bit truncated (see Section 3.2.3.3) HMAC algorithm is selected no padding is required for either IPv4 nor for IPv6. However, if a different length ICV is generated, due to use of a different algorithm, then padding may be required for the IPv6 environment. The content of the padding field is arbitrarily selected by the sender. (The padding is arbitrary, but need not be random to achieve security.) These padding bytes are included in the Authentication Data calculation, counted as part of the Payload Length, and transmitted at the end of the Authentication Data field to enable the receiver to perform the ICV calculation. 3.2.3.2.2 Implicit Packet Padding For some authentication algorithms, the byte string over which the ICV computation is performed must be a multiple of a blocksize specified by the algorithm. If the IP packet length (including AH) does not match the blocksize requirements for the algorithm, implicit padding MUST be appended to the end of the packet, prior to ICV computation. The padding octets MUST have a value of zero. The blocksize (and hence the length of the padding) is specified by the algorithm specification. This padding is not transmitted with the packet. 3.2.3.3 Authentication Algorithms The authentication algorithm employed for the ICV computation is specified by the SA. For point-to-point communication, suitable authentication algorithms include keyed Message Authentication Codes (MACs) based on symmetric encryption algorithms (e.g., DES) or on one-way hash functions (e.g., MD5 or SHA-1). For multicast communication, one-way hash algorithms combined with asymmetric signature algorithms are appropriate, though performance and space considerations currently preclude use of such algorithms. As of this writing, the mandatory-to-implement authentication algorithms are based on the former class, i.e., HMAC [KBC97] with SHA-1 [SHA] or HMAC with MD5 [Riv92]. The output of the HMAC computation is truncated to the leftmost 96 bits. Other algorithms, possibly with different ICV lengths, MAY be supported. 3.2.4 Fragmentation If required, IP fragmentation occurs after AH processing within an IPsec implementation. Thus, transport mode AH is applied only to whole IP datagrams (not to IP fragments). An IP packet to which AH has been applied may itself be fragmented by routers en route, and such fragments must be reassembled prior to AH processing at a receiver. In tunnel mode, AH is applied to an IP packet, the payload Kent, Atkinson [Page 12] Internet Draft IP Authentication Header 21 July, 1997 of which may be a fragmented IP packet. For example, a security gateway or a "bump-in-the-stack" or "bump-in-the-wire" IPsec implementation (see the Security Architecture document for details) may apply tunnel mode AH to such fragments. 3.3 Inbound Packet Processing 3.3.1 Reassembly If required, reassembly is performed prior to AH processing. If a packet offered to AH for processing appears to be anoutgoingIPpacket for Authentication,fragment, i.e., thefirst stepOFFSET field isfornon-zero or thesending system to locateMORE FRAGMENTS flag is set, theappropriate Security Association. All Security Associations are unidirectional. The selection ofreceiver MUST discard theappropriate Security Association for an outgoing IP packet originating atpacket; thissystemisbased at least upon the sending userid andan auditable event. The audit log entry for this event SHOULD include the SPI value, date/time, Source Address, DestinationAddress. For traffic not originating on the security gateway that is addingAddress, and (in IPv6) the Flow ID. 3.3.2 Security Association Lookup Upon receipt of a packet containing an IP Authentication Header, thesecurity gateway should select anreceiver determines the appropriateSecurity Association(unidirectional) SA, based on thesource anddestinationaddress, upper-layer protocol,IP address andport triple. When host-oriented keying is in use, all sending userids will sharethesame Security Association to a given destination. When user-oriented keyingSPI. (This process is described inuse, then different Atkinson [Page 8] Internet Draft IP Authentication Header 4 June 1996 users will use different Security Associations. When session-unique keying ismore detail inuse, different applications ofthesame user on different sockets will use differentSecurityAssociations.Architecture document.) TheSecurity Association selectedSA dictates whether the Sequence Number field willindicate which algorithm, algorithm mode, key,be checked, specifies the algorithm(s) employed for ICV computation, andother security properties applyindicates the key(s) required to validate theoutgoing packet. Fields which NECESSARILY are modified during transit fromICV. If no valid Security Association exists for this session (e.g., thesender toreceiver has no key), the receiver(e.g. TTL and HEADER CHECKSUM for IPv4 or Hop LimitMUST discard the packet; this is an auditable event. The audit log entry forIPv6) and whose value atthis event SHOULD include thereceiver are not known with certainty bySPI value, date/time, Source Address, Destination Address, and (in IPv6) thesender are included inFlow ID. 3.3.3 Sequence Number Verification All AH implementations MUST support theauthentication data calculation but are processed specially. For these fields whichanti-replay service, though its use may be enabled or disabled on a per-SA basis. (Note that there aremodified during transit,no provisions for managing transmitted Sequence Number values among multiple senders directing traffic to a single, multicast SA. Thus thevalue carriedanti-replay service SHOULD NOT be used inthe IP packeta multi-sender multicast environment that employs a single, multicast SA.) If an SA establishment protocol such as Oakley/ISAKMP isreplaced byemployed, then thevalue zero forreceiver SHOULD notify thepurpose oftransmitter, during SA establishment, if theauthentication calculation. By replacingreceiver will provide anti-replay protection and SHOULD inform thefield's value with zero rather than omitting these fields, alignment is preserved fortransmitter of theauthentication calculation. The sender MUST computewindow size. If theauthentication overreceiver has enabled the anti-replay service for this SA, the receiver packetas that packet will appear atcounter for thereceiver. This requirement is placed in orderSA MUST be initialized toallow for futurezero when Kent, Atkinson [Page 13] Internet Draft IPoptional headers whichAuthentication Header 21 July, 1997 the SA is established. For each received packet, the receivermightMUST verify that the packet contains a Sequence Number that does notknow about butduplicate thesender necessarily knows about if it is including such options inSequence Number of any other packets received during thepacket.life of this SA. Thisalso permitsSHOULD be theauthenticationfirst AH check applied to a packet after it has been matched to an SA, to speed rejection ofdata that will vary in transit but whose value atduplicate packets. Duplicates are rejected through thefinal receiver is known with certainty byuse of a sliding receive window. (How thesender in advance. The sender placeswindow is implemented is a local matter, but thecalculated authentication data intofollowing text describes theAuthentication Data field withinfunctionality that theAuthentication Header. For purposesimplementation must exhibit.) A MINIMUM window size ofAuthentication Data computation, the Authentication Data field32 MUST be supported; but a window size of 64 isconsidered topreferred and SHOULD befilled with zeros. The IPv4 "TIME TO LIVE","HEADER CHECKSUM", "FLAGS", and "TYPE OF SERVICE" fields are the only fields in the IPv4 base header that are handled specially foremployed as theAuthentication Data calculation. Reassemblydefault. A window size offragmented packets occurs PRIOR to processing64 or larger MAY be chosen by thelocal IP Authentication Header implementation. The "more" bitreceiver. If a larger window size is chosen, it MUST be a multiple ofcourse cleared upon reassembly. Hence, no32. If any window size otherfields in the IPv4 header will vary in transit fromthan theperspectivedefault of 64 is employed by theIP Authentication Header implementation. The specially handled field enumerated abovereceiver, it MUST besetreported toall zeros fortheAuthentication Data calculation. All other IPv4 base header fields are processed normally with their actual contents. Because IPv4 packets are subject to intermediate fragmentation in routers, it is importanttransmitter during SA negotiation. The "right" edge of the window represents the highest, validated Sequence Number value received on this SA. Packets that contain Sequence Numbers lower than thereassembly"left" edge ofIPv4the window are rejected. Packets falling within the window are checked against a list of received packetsbe performed prior towithin the window. An efficient means for performing this check, based on theAuthentication Header processing. IPv4 Implementations SHOULDusePath MTU Discovery whenof a bit mask, is described in theIP Authentication HeaderSecurity Architecture document. If the received packet falls within the window and isbeing used. [MD90] For IPv4, options are normally zeroed fornew, or if the packet is to thepurposeright of theAuthentication Data calculation. There are two exceptionswindow, then the receiver proceeds tothis rule. The IP Security Option (IPSO)ICV verification. If the ICV validation fails, the receiver MUSTbe included indiscard theAuthentication Data calculation whenever that option is Atkinson [Page 9] Internet Draftreceived IPAuthentication Header 4 June 1996 present indatagram as invalid; this is anIP datagram. [Ken91]auditable event. Theundocumented non-standard CIPSO option, which has been assigned option number 134 by IANA, also MUST be included inaudit log entry for this event SHOULD include theAuthentication data calculation whenever that option is present in an IP datagram. If a receiving system does not recognise an IPv4 option that is present inSPI value, date/time, Source Address, Destination Address, thepacket, that option is omitted from Authentication Data calculation.Sequence Number, and (in IPv6) the Flow ID. TheIPv6 "HOP LIMIT" fieldreceive window istheupdated onlyfield inif theIPv6 base headerICV verification succeeds. DISCUSSION: Note that if the packet ishandled specially for Authentication Data calculation. The value ofeither inside theHOP LIMIT fieldwindow and new, or iszero foroutside thepurpose of Authentication Data calculation. All other fields inwindow on thebase IPv6 header MUST be included in"right" side, theAuthentication Data calculation usingreceiver MUST authenticate thenormal procedures for calculatingpacket before updating theAuthentication Data. All IPv6 "OPTION TYPE" values contain a bit which MUST be used to determine whether that option data will be included inSequence Number window data. 3.3.4 Integrity Check Value Verification The receiver computes theAuthentication Data calculation. This bit isICV over thethird-highest-order bitappropriate fields of theIPv6 OPTION TYPE field. If this bit is set to zero, thenpacket, using thecorresponding optionspecified authentication algorithm, and verifies that it is the same as the ICV included in the Authentication Datacalculation. If this bit is set to one, then the corresponding option is replaced by all zero bitsfield of thesame length as the option for the purposepacket. Details of the computation are provided below. Kent, Atkinson [Page 14] Internet Draft IP AuthenticationData calculation. The IPv6 RoutingHeader"Type 0" will rearrange21 July, 1997 If theaddress fields withincomputed and received ICV's match, then thepacket during transit from source to destination. However, thisdatagram isnot a problem because the contents of the packet asvalid, and itwill appear atis accepted. If the test fails, then the receiverare known toMUST discard thesenderreceived IP datagram as invalid; this is an auditable event. The audit log entry SHOULD include the SPI value, date/time, Source Address, Destination Address, andto all intermediate hops. Hence,(in IPv6) theIPv6 Routing Header "Type 0" is included inFlow ID. DISCUSSION: Begin by saving the ICV value and replacing it (but not any Authentication Datacalculation using the normal procedure. Upon receipt ofpadding) with zero. Zero all other fields that may have been modified during transit. (See section 3.2.3.1 for apacket containing an IP Authentication Header,discussion of which fields are zeroed before performing thereceiver first usesICV calculation.) Check theDestination Addressoverall length of the packet, andSPI valueif it requires implicit padding based on the requirements of the authentication algorithm, append zero-filled bytes tolocatethecorrect Security Association. The receiver then independently verifies thatend of theAuthentication Data fieldpacket as required. Now perform the ICV computation and compare thereceived data packet are consistent. Again,result with theAuthentication Data field is assumed to be zero forsaved value. (For the mandatory-to- implement authentication algorithms, HMAC [KBC97] with SHA-1 [SHA] or HMAC with MD5 [Riv92], thesole purposeoutput ofmakingtheauthentication computation. Exactly how this is accomplishedHMAC computation isalgorithm dependent. Iftruncated to theprocessing ofleftmost 96 bits. Other algorithms may have different ICV lengths.) (If a digital signature and one-way hash are used for theauthentication algorithm indicatesICV computation, thedatagram is valid, then itmatching process isaccepted. Ifmore complex and will be described in the algorithmdeterminesspecification.) 4. Auditing Not all systems thatthe data and the Authentication Header do not match,implement AH will implement auditing. However, if AH is incorporated into a system that supports auditing, then thereceiverAH implementation MUSTdiscard the received IP datagram as invalidalso support auditing and MUSTrecord the authentication failure in theallow a systemlogadministrator to enable oraudit log. If such a failure occurs,disable auditing for AH. For therecorded log data MUST includemost part, theSPI value, date/time received, clear-text Sending Address, clear-text Destination Address,granularity of auditing is a local matter. However, several auditable events are identified in this specification and(if it exists) the clear-text Flow ID. Thefor each of these events a minimum set of information that SHOULD be included in an audit logdatais defined. Additional information also MAY be included in the audit log for each of these events, and additional events, not explicitly called out in this specification, alsoinclude other information aboutMAY result in audit log entries. There is no requirement for thefailed packet. Atkinson [Page 10] Internet Draft IP Authentication Header 4 June 1996receiver to transmit any message to the purported transmitter in response to the detection of an auditable event, because of the potential to induce denial of service via such action. 5.CONFORMANCE REQUIREMENTSConformance Requirements Implementations that claim conformance or compliance with this specification MUST fully implement theheaderAH syntax and processing describedhere, MUST support manual key distribution for use with this option,here and MUST comply with all requirements of the"SecuritySecurity Architecturefordocument. If the key used to compute an ICV is manually Kent, Atkinson [Page 15] InternetProtocol" [Atk95a],Draft IP Authentication Header 21 July, 1997 distributed, correct provision of the anti-replay service would require correct maintenance of the counter state at the transmitter, until the key is replaced, and there likely would be no automated recovery provision if counter overflow were imminent. Thus a compliant implementation SHOULD NOT provide this service in conjunction with SAs that are manually keyed. A compliant AH implementation MUST support theuse offollowing mandatory-to-implement algorithms (specified in [KBC97]): - HMAC with MD5 - HMAC with SHA-1 6. Security Considerations Security is central to themandatory-to- implement AH transforms. Asdesign of thiswritingprotocol, and these security considerations permeate the specification. Additional security-relevant aspects of using the IPsec protocol areHMAC SHA [CG96] and HMAC MD5 [OG96],discussed in the Security Architecture document. 7. Differences from RFC 1826 This specification of AH differs from RFC 1826 [ATK95] in several important respects, butimplementers need to consultthemost recent versionfundamental features of AH remain intact. One goal of the"Internet Official Protocol Standards" [STD-1] for current information on standards status. Implementations MAY also implement other authentication algorithms. 6. SECURITY CONSIDERATIONS This entirerevision of RFCdiscusses an authentication mechanism1826 was to provide a complete framework forIP. This mechanismAH, with ancillary RFCs required only for algorithm specification. For example, the anti-replay service is now an integral, mandatory part of AH, not apanaceafeature of a transform defined in another RFC. Carriage of a sequence number to support this service is now required at all times, to meet IPv6 alignment requirements (even when anti-replay is not enabled for an SA). The default algorithms required for interoperability have been changed to HMAC with MD5 or SHA-1 (vs. keyed MD5), for security reasons. The list of IPv4 header fields excluded from the ICV computation has been expanded to include the OFFSET and FLAGS fields. Another motivation for revision was to provide additional detail and clarification of subtle points. This specification provides rationale for exclusion of selected IPv4 header fields from AH coverage and provides examples on positioning of AH in both the IPv4 and v6 contexts. Auditing requirements have been clarified in this version of theseveral security issuesspecification. Tunnel mode AH was mentioned only inany internetwork, however it does provide a component usefulpassing inbuildingRFC 1826, but now is asecure internetwork. Users need to understand that the qualitymandatory feature oftheAH. Discussion of interactions with key management and with securityprovided by this specification depends completely onlabels have been moved to thestrength of whichever cryptographic algorithmSecurity Architecture document. Kent, Atkinson [Page 16] Internet Draft IP Authentication Header 21 July, 1997 Acknowledgements For over 2 years, this document hasbeen implemented,evolved through multiple versions and iterations. During this time, many people have contributed significant ideas and energy to thestrength ofprocess and thekey being used,documents themselves. The authors would like to thank Karen Seo for providing extensive help in thecorrectnessreview, editing, background research, and coordination for this version ofthat algorithm's implementation, uponthesecurityspecification. The authors would also like to thank the members of thekey management mechanism and its implementation,IPsec andupon the correctnessIPng working groups, with special mention of the efforts of (in alphabetic order): Steve Bellovin, Steve Deering, Francis Dupont, Phil Karn, Frank Kastenholz, Perry Metzger, David Mihelcic, Hilarie Orman, William Simpson, and Nina Yuan. Kent, Atkinson [Page 17] Internet Draft IP Authentication Headerand IP implementations in all of the participating systems. If any21 July, 1997 Appendix A -- Mutability ofthese assumptions do not hold, then little or no real security will be provided toIP Options/Extension Headers 1. IPv4 Options This table shows how theuser. ImplementorsIPv4 options areencouraged to use high assurance methodsclassified with regard todevelop all of"mutability". Where two references are provided, thesecurity relevant partssecond one supercedes the first. This table is based in part on information provided in RFC1700, "ASSIGNED NUMBERS", (October 1994). Opt. Copy Class # Name Reference ---- ----- --- ------------------------- --------- IMMUTABLE -- included in ICV calculation 0 0 0 End of Options List [RFC791] 0 0 1 No Operation [RFC791] 1 0 2 Security [RFC1108(historic but in use)] 1 0 5 Extended Security [RFC1108(historic but in use)] 1 0 6 Commercial Security [expired I-D, now US MIL STD] 1 0 20 Router Alert [RFC2113] 1 0 21 Sender Directed Multi- [RFC1770] Destination Delivery MUTABLE -- zeroed 1 0 3 Loose Source Route [RFC791] 0 2 4 Time Stamp [RFC791] 0 0 7 Record Route [RFC791] 1 0 9 Strict Source Route [RFC791] 0 2 18 Traceroute [RFC1393] EXPERIMENTAL, SUPERCEDED -- zeroed 1 0 8 Stream ID [RFC791, RFC1122 (Host Req)] 0 0 11 MTU Probe [RFC1063, RFC1191 (PMTU)] 0 0 12 MTU Reply [RFC1063, RFC1191 (PMTU)] 1 0 17 Extended Internet Protocol [RFC1385, RFC1883 (IPv6)] 0 0 10 Experimental Measurement [ZSu] 1 2 13 Experimental Flow Control [Finn] 1 0 14 Experimental Access Ctl [Estrin] 0 0 15 ??? [VerSteeg] 1 0 16 IMI Traffic Descriptor [Lee] 1 0 19 Address Extension [Ullmann IPv7] NOTE: Use oftheir products. Users interested in confidentiality should consider usingtheIP Encapsulating Security Payload (ESP) instead of or in conjunctionRouter Alert option is potentially incompatible withthis specification. [Atk95b] Users seeking protection from traffic analysis might consider theuse ofappropriate link encryption. Description and specification of link encryption is outside the scope of this note. [VK83] Users interested in combining the IP Authentication Header with the IP Encapsulating Security Payload should consultIPSEC. Although theIP Encapsulating Security Payload specification for details. One particular issueoption is immutable, its use implies thatin some caseseach router along a packet's path will "process" the packetwhich causes an error to be reported back via ICMPand consequently mightbe so large as not to entirely fit withinchange theICMP message returned. In such cases, it might not be possible forpacket. This would happen on a hop by hop basis as thereceiver ofpacket goes from router to router. Prior to being processed by theICMP messageapplication toindependently authenticatewhich theportion ofoption contents are directed, e.g., RSVP/IGMP, thereturned message. This could meanpacket should encounter AH processing. However, AH processing would require that each router along thehost receiving such an ICMP message would either trust an unauthenticated ICMP message, which might in turn create somepath Kent, Atkinson [Page11]18] Internet Draft IP Authentication Header4 June 1996 security problem, or21 July, 1997 is a member of a multicast-SA defined by the SPI. This might pose problems for packets that are nottruststrictly source routed, andhenceit requires multicast support techniques notreact appropriately to some legitimate ICMP message that should have been reacted to. Itcurrently available. NOTE: Addition or removal of any security labels (BSO, ESO, CIPSO) by systems along a packet's path conflicts with the classification of these IP Options as immutable and isnot clearincompatible with the use of IPSEC. 2. IPv6 Extension Headers This table shows how the IPv6 Extension Headers are classified with regard to "mutability". Option/Extension Name Reference ----------------------------------- --------- MUTABLE BUT PREDICTABLE -- included in ICV calculation Routing (Type 0) [RFC1883] BIT INDICATES IF OPTION IS MUTABLE (CHANGES UNPREDICTABLY DURING TRANSIT) Hop by Hop options [RFC1883] Destination options [RFC1883] NOT APPLICABLE Fragmentation [RFC1883] Options -- IPv6 options in the Hop-by-Hop and Destination Extension Headers contain a bit thatthis issue canindicates whether the option might change (unpredictably) during transit. For any option for which contents may change en-route, the entire "Option Data" field must befully resolvedtreated as zero-valued octets when computing or verifying the ICV. The Option Type and Opt Data Len are included in thepresence of packets thatICV calculation. All options for which the bit indicates immutability are included in thesame size as or larger thanICV calculation. See the IPv6 specification [DH95] for more information. Routing (Type 0) -- The IPv6 Routing Header "Type 0" will rearrange the address fields within theminimum IP MTU. Similar complications arise if an encryptedpacketcauses an ICMP error messageduring transit from source tobe sent and thatdestination. However, the contents of the packetis truncated. Active attacksas it will appear at the receiver arenow widelyknown toexistthe sender and to all intermediate hops. Hence, the IPv6 Routing Header "Type 0" is included in theInternet [CER95].Authentication Data calculation as mutable but predictable. Thepresence of active attacks meanstransmitter must order the field so thatunauthenticated source routing, either unidirectional (receive-only) or with replies followingit appears as it will at theoriginal received source route represents a significant security risk unless all received source routed packets are authenticated usingreceiver, prior to performing the ICV computation. Fragmentation -- Fragmentation occurs after outbound IPSEC processing (section 3.2.4) and reassembly occurs before inbound IPSEC processing (section 3.3.1). So the Fragmentation Extension Kent, Atkinson [Page 19] Internet Draft IP Authentication Headeror some other cryptologic mechanism. It21 July, 1997 Header, if it exists, isnoteworthynot seen by IPSEC. Note that on theattacks described in [CER95] includereceive side, the IP implementation could leave asubset of those describedFragmentation Extension Header in[Bel89]. The use of IP tunneling withplace when it does re-assembly. If this happens, then when AHcreates multiple pairs of endpoints that might performreceives the packet, before doing ICV processing, AHprocessing. ImplementersMUST "remove" (or skip over) this header andadministrators should carefully consider the impacts of tunneling on authenticity ofchange thereceived tunneled packets. This documented benefited greatly from work done by Bill Simpson, Perry Metzger, and Phil Karnprevious header's "Next Header" field tomake general the approach originally defined bybe theauthor for SIP, SIPP, and finally IPv6. The basic concept here is derived"Next Header" field inlarge part fromtheSNMPv2 Security Protocol work described in [GM93]. Steve Bellovin, Steve Deering, Frank Kastenholz, Dave Mihelcic, and Hilarie Orman provided thoughtful critiquesFragmentation Extension Header. Note that on the send side, the IP implementation could give the IPSEC code a packet with a Fragmentation Extension Header with Offset ofearly versions0 (first fragment) and a More Fragments Flag of 0 (last fragment). If thisnote. Francis Dupont discoveredhappens, then before doing ICV processing, AH MUST first "remove" (or skip over) this header andpointed outchange thesecurity issue with ICMPprevious header's "Next Header" field to be the "Next Header" field inlow IP MTU links that is noted just above. REFERENCES [Atk96a] Randall Atkinson, Security Architecture forthe Fragmentation Extension Header. Kent, Atkinson [Page 20] InternetProtocol, Internet Draft, 4 June 1996 [Atk96b] RandallDraft IP Authentication Header 21 July, 1997 References [ATK95] R. Atkinson, "The IPEncapsulating Security Payload, Internet Draft, 4 June 1996 [Bel89] Steven M. Bellovin, "Security Problems in the TCP/IP Protocol Suite", ACM Computer Communications Review, Vol. 19, No. 2, March 1989.Authentication Header," RFC 1826, August 1995. [BCCH94] R. Braden, D. Clark, S. Crocker, & C.Huitema, "Report of IAB Workshop on Security in the Internet Architecture", RFC-1636,DDN Network Information Center,9 June 1994, pp. 21-34. [Bel89] Steven M. Bellovin, "Security Problems in the TCP/IP Protocol Suite", ACM Computer Communications Review, Vol. 19, No. 2, March 1989. [CER95] Computer Emergency Response Team (CERT), "IP Spoofing Attacks and Hijacked Terminal Connections", CA-95:01, January 1995.Atkinson [Page 12] Internet Draft IP Authentication Header 4 June 1996Available via anonymous ftp from info.cert.org in /pub/cert_advisories.[CG96] Shu-jen Chang & Rob Glenn, "HMAC SHA IP Authentication with Replay Protection", Internet Draft, 1 May 1996.[DH95] Steve Deering & Bob Hinden, "Internet Protocol version 6 (IPv6) Specification", RFC-1883, December 1995. [GM93] James Galvin & Keith McCloghrie, Security Protocols for version 2 of the Simple Network Management Protocol (SNMPv2), RFC-1446,DDN Network Information Center,April 1993.[Hugh96] Jim Hughes (Editor), "Combined DES-CBC, HMAC, and Replay Prevention[KA97a] Steve Kent, Randall Atkinson, "Security Architecture for the Internet Protocol", Internet Draft, ?? 1997. [KA97b] Steve Kent, Randall Atkinson, "IP Encapsulating SecurityTransform",Payload (ESP)", Internet Draft,April 1996.?? 1997. [KA97c] Steve Kent, Randall Atkinson, "IP Authentication Header", Internet Draft, ?? 1997. [KBC97] Hugo Krawczyk, Mihir Bellare, and Ran Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC-2104, February 1997. [Ken91] Steve Kent, "US DoD Security Options for the Internet Protocol", RFC-1108,DDN Network Information Center,November 1991.[Kno93] Steve Knowles, "IESG Advice from Experience with Path MTU Discovery", RFC-1435, DDN Network Information Center, March 1993. [MD90] Jeff Mogul &[KA97a] SteveDeering, "Path MTU Discovery", RFC-1191, DDN Network Information Center, November 1990. [OG96] Mike Oehler & Rob Glenn, "HMAC SHA IP Authentication with Replay Protection",Kent, Randall Atkinson, "Security Architecture for the Internet Protocol", Internet Draft,May 1996.?? 1997. [Riv92] Ronald Rivest, "The MD5 Message Digest Algorithm," RFC- 1321, April 1992. [SHA] NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995 Kent, Atkinson [Page 21] Internet Draft IP Authentication Header 21 July, 1997 [STD-1] J. Postel, "Internet Official Protocol Standards", STD-1,DDN Network Information Center,March 1996. [STD-2] J. Reynolds & J. Postel, "Assigned Numbers", STD-2,DDN Network Information Center,20 October 1994.[Riv92] Ronald Rivest, MD5 Digest Algorithm, RFC-1321, DDN Network Information Center, April 1992. [VK83] V.L. Voydock & S.T. Kent, "Security Mechanisms in High-level Networks", ACM Computing Surveys, Vol. 15, No. 2, June 1983. DISCLAIMERDisclaimer The views and specification here are those of theauthorauthors and are not necessarily those ofhis employer.their employers. Theauthorauthors andhis employertheir employers specifically disclaim responsibility for any problems arising from correct or incorrect implementation or use of this specification.Atkinson [Page 13] Internet Draft IP Authentication Header 4 June 1996 AUTHOR INFORMATIONAuthor Information Stephen Kent BBN Corporation 70 Fawcett Street Cambridge, MA 02140 USA E-mail: kent@bbn.com Telephone: +1 (617) 873-3988 Randall Atkinson<rja@cisco.com> cisco Systems 170 West Tasman@Home Network 385 Ravendale DriveSan Jose, CA, 95134-1706Mountain View, CA 94043 USATelephone: +1 (408) 526-4000E-mail: rja@inet.org Kent, Atkinson [Page14]22] ----