idnits 2.17.1 draft-ietf-lisp-sec-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 24 instances of too long lines in the document, the longest one being 7 characters in excess of 72. == There are 10 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 12, 2012) is 4422 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Missing Reference: 'RFC3339' is mentioned on line 603, but not defined == Missing Reference: 'RFC4634' is mentioned on line 773, but not defined ** Obsolete undefined reference: RFC 4634 (Obsoleted by RFC 6234) == Unused Reference: 'I-D.ietf-lisp-interworking' is defined on line 832, but no explicit reference was found in the text == Outdated reference: A later version (-24) exists of draft-ietf-lisp-18 == Outdated reference: A later version (-06) exists of draft-ietf-lisp-interworking-02 == Outdated reference: A later version (-16) exists of draft-ietf-lisp-ms-14 == Outdated reference: A later version (-15) exists of draft-ietf-lisp-threats-00 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) Summary: 3 errors (**), 0 flaws (~~), 9 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group F. Maino 3 Internet-Draft V. Ermagan 4 Intended status: Experimental Cisco Systems 5 Expires: September 13, 2012 A. Cabellos 6 Technical University of 7 Catalonia 8 D. Saucez 9 INRIA 10 O. Bonaventure 11 Universite catholique de Louvain 12 March 12, 2012 14 LISP-Security (LISP-SEC) 15 draft-ietf-lisp-sec-02.txt 17 Abstract 19 This memo specifies LISP-SEC, a set of security mechanisms that 20 provide origin authentication, integrity and anti-replay protection 21 to LISP's EID-to-RLOC mapping data conveyed via mapping lookup 22 process. LISP-SEC also enables verification of authorization on EID- 23 prefix claims in Map-Reply messages. 25 Requirements Language 27 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 28 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 29 document are to be interpreted as described in [RFC2119]. 31 Status of this Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at http://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on September 13, 2012. 48 Copyright Notice 49 Copyright (c) 2012 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 2. Definition of Terms . . . . . . . . . . . . . . . . . . . . . 3 66 3. LISP-SEC Threat Model . . . . . . . . . . . . . . . . . . . . 4 67 4. Protocol Operations . . . . . . . . . . . . . . . . . . . . . 4 68 5. LISP-SEC Control Messages Details . . . . . . . . . . . . . . 7 69 5.1. Encapsulated Control Message LISP-SEC Extensions . . . . . 7 70 5.2. Map-Reply LISP-SEC Extensions . . . . . . . . . . . . . . 9 71 5.3. Map-Register LISP-SEC Extentions . . . . . . . . . . . . . 10 72 5.4. ITR Processing . . . . . . . . . . . . . . . . . . . . . . 10 73 5.4.1. Map-Reply Record Validation . . . . . . . . . . . . . 12 74 5.4.2. PITR Processing . . . . . . . . . . . . . . . . . . . 13 75 5.5. Encrypting and Decrypting an OTK . . . . . . . . . . . . . 13 76 5.6. Map-Resolver Processing . . . . . . . . . . . . . . . . . 14 77 5.7. Map-Server Processing . . . . . . . . . . . . . . . . . . 14 78 5.7.1. Map-Server Processing in Proxy mode . . . . . . . . . 15 79 5.8. ETR Processing . . . . . . . . . . . . . . . . . . . . . . 15 80 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 81 6.1. Mapping System Security . . . . . . . . . . . . . . . . . 16 82 6.2. Random Number Generation . . . . . . . . . . . . . . . . . 16 83 6.3. Map-Server and ETR Colocation . . . . . . . . . . . . . . 17 84 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 85 7.1. HMAC functions . . . . . . . . . . . . . . . . . . . . . . 17 86 7.2. Key Wrap Functions . . . . . . . . . . . . . . . . . . . . 17 87 7.3. Key Derivation Functions . . . . . . . . . . . . . . . . . 18 88 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 18 89 9. Normative References . . . . . . . . . . . . . . . . . . . . . 18 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 92 1. Introduction 94 The Locator/ID Separation Protocol [I-D.ietf-lisp] defines a set of 95 functions for routers to exchange information used to map from non- 96 routable Endpoint Identifiers (EIDs) to routable Routing Locators 97 (RLOCs). If these EID-to-RLOC mappings, carried through Map-Reply 98 messages, are transmitted without integrity protection, an adversary 99 can manipulate them and hijack the communication, impersonate the 100 requested EID or mount Denial of Service or Distributed Denial of 101 Service attacks. Also, if the Map-Reply message is transported 102 unauthenticated, an adversarial LISP entity can overclaim an EID- 103 prefix and maliciously redirect traffic directed to a large number of 104 hosts. A detailed description of "overclaiming" attack is provided 105 in [I-D.ietf-lisp-threats]. 107 This memo specifies LISP-SEC, a set of security mechanisms that 108 provide origin authentication, integrity and anti-replay protection 109 to LISP's EID-to-RLOC mapping data conveyed via mapping lookup 110 process. LISP-SEC also enables verification of authorization on EID- 111 prefix claims in Map-Reply messages, ensuring that the sender of a 112 Map-Reply that provides the location for a given EID-prefix is 113 entitled to do so according to the EID prefix registered in the 114 associated Map Server. Map-Register security, including the right 115 for a LISP entity to register an EID-prefix or to claim presence at 116 an RLOC, is out of the scope of LISP-SEC. Additional security 117 considerations are described in Section 6. 119 2. Definition of Terms 121 One-Time Key (OTK): An ephemeral randomly generated key that must 122 be used for a single Map-Request/Map-Reply exchange. 124 ITR-OTK: The One-Time Key generated at the ITR. 126 MS-OTK: The One-Time Key generated at the Map-Server. 128 Encapsulated Control Message (ECM): A LISP control message that is 129 prepended with an additional LISP header. ECM is used by ITRs to 130 send LISP control messages to a Map-Resolver, by Map-Resolvers to 131 forward LISP control messages to a Map-Server, and by Map- 132 Resolvers to forward LISP control messages to an ETR. 134 Authentication Data (AD): Metadata that is included either in a 135 LISP ECM header or in a Map-Reply message to support 136 confidentiality, integrity protection, and verification of EID- 137 prefix authorization. 139 OTK-AD: The portion of ECM Authentication Data that contains a 140 One-Time Key. 142 EID-AD: The portion of ECM and Map-Reply Authentication Data 143 used for verification of EID-prefix authorization. 145 PKT-AD: The portion of Map-Reply Authentication Data used to 146 protect the integrity of the Map-Reply message. 148 For definitions of other terms, notably Map-Request, Map-Reply, 149 Ingress Tunnel Router (ITR), Egress Tunnel Router (ETR), Map-Server 150 (MS) and Map-Resolver (MR) please consult the LISP specification 151 [I-D.ietf-lisp]. 153 3. LISP-SEC Threat Model 155 LISP-SEC addresses the control plane threats, described in 156 [I-D.ietf-lisp-threats], that target EID-to-RLOC mappings, including 157 manipulations of Map-Request and Map-Reply messages, and malicious 158 xTR EID overclaiming. However LISP-SEC makes two main assumptions 159 that are not part of [I-D.ietf-lisp-threats]. First, the LISP 160 Mapping System is expected to deliver Map-Request messages to their 161 intended destinations as identified by the EID. Second, no man-in- 162 the-middle attack can be mounted within the LISP Mapping System. 163 Furthermore, while LISP-SEC enables detection of EID prefix over 164 claiming attacks, it assumes that Map Servers can verify the EID 165 prefix authorization at time of registration. 167 Accordingly to the threat model described in [I-D.ietf-lisp-threats] 168 LISP-SEC assumes that any kind of attack, including MITM attacks, can 169 be mounted in the access network, outside of the boundaries of the 170 LISP mapping system. An on-path attacker, outside of the LISP 171 mapping service system can, for instance, hijack mapping requests and 172 replies, spoofing the identity of a LISP node. Another example of 173 on-path attack, called over claiming attack, can be mounted by a 174 malicious Egress Tunnel Router (ETR), by over claiming the EID- 175 prefixes for which it is authoritative. In this way the ETR can 176 maliciously redirect traffic directed to a large number of hosts. 178 4. Protocol Operations 180 The goal of the security mechanisms defined in [I-D.ietf-lisp] is to 181 prevent unauthorized insertion of mapping data, by providing origin 182 authentication and integrity protection for the Map-Registration, and 183 by using the nonce to detect unsolicited Map-Reply sent by off-path 184 attackers. 186 LISP-SEC builds on top of the security mechanisms defined in 187 [I-D.ietf-lisp] to address the threats described in Section 3 by 188 leveraging the trust relationships existing among the LISP entities 189 participating to the exchange of the Map-Request/Map-Reply messages. 190 Those trust relationships are used to securely distribute a One-Time 191 Key (OTK) that provides origin authentication, integrity and anti- 192 replay protection to mapping data conveyed via the mapping lookup 193 process, and that effectively prevent over claiming attacks. The 194 processing of security parameters during the Map-Request/Map-Reply 195 exchange is as follows: 197 o The ITR-OTK is generated and stored at the ITR, and securely 198 transported to the Map-Server. 200 o The Map-Server uses the ITR-OTK to compute an HMAC that protects 201 the integrity of the mapping data provided by the Map-Server to 202 prevent overclaiming attacks. The Map-Server also derives a new 203 OTK (MS-OTK) that is passed to the ETR, by applying a Key 204 Derivation Function (KDF) to the ITR-OTK. 206 o The ETR uses the MS-OTK to compute an HMAC that protects the 207 integrity of the Map-Reply sent to the ITR. 209 o Finally, the ITR uses the stored ITR-OTK to verify the integrity 210 of the mapping data provided by both the Map-Server and the ETR, 211 and to verify that no overclaiming attacks were mounted along the 212 path between the Map-Server and the ITR. 214 Section 5 provides the detailed description of the LISP-SEC control 215 messages and their processing, while the rest of this section 216 describes the flow of protocol operations at each entity involved in 217 the Map-Request/Map-Reply exchange: 219 o The ITR, upon transmitting a Map-Request message, generates and 220 stores an OTK (ITR-OTK). This key is included into the 221 Encapsulated Control Message (ECM) that contains the Map-Request 222 sent to the Map-Resolver. To provide confidentiality to the ITR- 223 OTK over the path between the ITR and its Map-Resolver, the ITR- 224 OTK SHOULD be encrypted using a preconfigured key shared between 225 the ITR and the Map-Resolver, similar to the key shared between 226 the ETR and the Map-Server in order to secure ETR registration 227 [I-D.ietf-lisp-ms]. 229 o The Map-Resolver decapsulates the ECM message, decrypts the ITR- 230 OTK, if needed, and forwards through the Mapping System the 231 received Map-Request and the ITR-OTK, as part of a new ECM 232 message. As described in Section 5.6, the LISP Mapping System 233 delivers the ECM to the appropriate Map-Server, as identified by 234 the EID destination address of the Map-Request. 236 o The Map-Server is configured with the location mappings and policy 237 information for the ETR responsible for the destination EID 238 address. Using this preconfigured information the Map-Server, 239 after the decapsulation of the ECM message, finds the longest 240 match EID-prefix that covers the requested EID in the received 241 Map-Request. The Map-Server adds this EID-prefix, together with 242 an HMAC computed using the ITR-OTK, to a new Encapsulated Control 243 Message that contains the received Map-Request. 245 o The Map-Server derives a new OTK (MS-OTK) by applying a Key 246 Derivation Function (KDF) to the ITR-OTK. MS-OTK is included in 247 the Encapsulated Control Message sent to the ETR. To provide MS- 248 OTK confidentiality over the path between the Map-Server and the 249 ETR, the MS-OTK should be encrypted using the key shared between 250 the ETR and the Map-Server in order to secure ETR registration 251 [I-D.ietf-lisp-ms]. 253 o If the Map-Server is acting in proxy mode, as specified in 254 [I-D.ietf-lisp], the ETR is not involved in the generation of the 255 Map-Reply. In this case the Map-Server generates the Map-Reply on 256 behalf of the ETR as described below. 258 o The ETR, upon receiving the Encapsulated Map-Request from the Map- 259 Server, decrypts the MS-OTK, if needed, and originates a Map-Reply 260 that contains the EID-to-RLOC mapping information as specified in 261 [I-D.ietf-lisp]. 263 o The ETR computes an HMAC over the original LISP Map-Reply, keyed 264 with MS-OTK to protect the integrity of the whole Map-Reply. The 265 ETR also copies the EID-prefix authorization data that the Map- 266 Server included in the Encapsulated Map-Request into the Map-Reply 267 message. 269 o The ITR, upon receiving the Map-Reply, uses the locally stored 270 ITR-OTK to verify the integrity of the EID-prefix authorization 271 data included in the Map-Reply by the Map-Server. The ITR 272 computes the MS-OTK by applying the same KDF used by the Map- 273 Server, and verifies the integrity of the Map-Reply. If the 274 integrity checks fail, the Map-Reply MUST be discarded. Also, if 275 the EID-prefixes claimed by the ETR in the Map-Reply are not equal 276 or less specific than the EID-prefix authorization data inserted 277 by the Map-Server, the ITR MUST discard the Map-Reply. 279 5. LISP-SEC Control Messages Details 281 LISP-SEC metadata associated with a Map-Request is transported within 282 the Encapsulated Control Message that contains the Map-Request. 284 LISP-SEC metadata associated with the Map-Reply is transported within 285 the Map-Reply itself. 287 5.1. Encapsulated Control Message LISP-SEC Extensions 289 LISP-SEC uses the ECM (Encapsulated Control Message) defined in 290 [I-D.ietf-lisp] with Type set to 8, and S bit set to 1 to indicate 291 that the LISP header includes Authentication Data (AD). The format 292 of the LISP-SEC ECM Authentication Data is defined in the following 293 figure. OTK-AD stands for One-Time Key Authentication Data and 294 EID-AD stands for EID Authentication Data. 296 0 1 2 3 297 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 298 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 299 | AD Type |V| Reserved | Requested HMAC ID | 300 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ 301 | OTK Length | OTK Encryption ID | | 302 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 303 | One-Time-Key Preamble ... | | 304 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ OTK-AD 305 | ... One-Time-Key Preamble | | 306 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 307 ~ One-Time Key (128 bits) ~/ 308 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 309 | EID-AD Length | KDF ID | | 310 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 311 | Record Count | Reserved | EID HMAC ID | EID-AD 312 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | 313 | Reserved | EID mask-len | EID-AFI | | | 314 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | 315 ~ EID-prefix ... ~ | | 316 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | 317 ~ EID HMAC ~ | 318 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 320 LISP-SEC ECM Authentication Data 322 AD Type: 1 (LISP-SEC Authentication Data) 324 V: Key Version bit. This bit is toggled when the sender switches 325 to a new OTK wrapping key 327 Reserved: Set to 0 on transmission and ignored on receipt. 329 Requested HMAC ID: The HMAC algorithm requested by the ITR. See 330 Section 5.4 for details. 332 OTK Length: The length (in bytes) of the OTK Authentication Data 333 (OTK-AD), that contains the OTK Preamble and the OTK. 335 OTK Encryption ID: The identifier of the key wrapping algorithm 336 used to encrypt the One-Time-Key. When a 128-bit OTK is sent 337 unencrypted by the Map-Resolver, the OTK Encryption ID is set to 338 NULL_KEY_WRAP_128. See Section 5.5 for more details. 340 One-Time-Key Preamble: set to 0 if the OTK is not encrypted. When 341 the OTK is encrypted, this field may carry additional metadata 342 resulting from the key wrapping operation. When a 128-bit OTK is 343 sent unencrypted by Map-Resolver, the OTK Preamble is set to 344 0x0000000000000000 (64 bits). See Section 5.5 for details. 346 One-Time-Key: the OTK encrypted (or not) as specified by OTK 347 Encryption ID. See Section 5.5 for details. 349 EID-AD Length: length (in bytes) of the EID Authentication Data 350 (EID-AD). The ITR MUST set EID-AD Length to 4 bytes, as it only 351 fills the KDF ID field, and all the remaining fields part of the 352 EID-AD are not present. An EID-AD MAY contain multiple EID- 353 records. Each EID-record is 4-byte long plus the length of the 354 AFI-encoded EID-prefix. 356 KDF ID: Identifier of the Key Derivation Function used to derive 357 the MS-OTK. The ITR SHOULD use this field to indicate the 358 recommended KDF algorithm, according to local policy. The Map- 359 Server can overwrite the KDF ID if it does not support the KDF ID 360 recommended by the ITR. See Section 5.4 for more details. 362 Record Count: The number of records in this Map-Request message. 363 A record is comprised of the portion of the packet that is labeled 364 'Rec' above and occurs the number of times equal to Record Count. 366 Reserved: Set to 0 on transmission and ignored on receipt. 368 EID HMAC ID: Identifier of the HMAC algorithm used to protect the 369 integrity of the EID-AD. This field is filled by Map-Server that 370 computed the EID-prefix HMAC. See Section 5.4 for more details. 372 EID mask-len: Mask length for EID-prefix. 374 EID-AFI: Address family of EID-prefix according to [RFC5226] 376 EID-prefix: The Map-Server uses this field to specify the EID- 377 prefix that the destination ETR is authoritative for, and is the 378 longest match for the requested EID. 380 EID HMAC: HMAC of the EID-AD computed and inserted by Map-Server. 381 Before computing the HMAC operation the EID HMAC field MUST be set 382 to 0. The HMAC covers the entire EID-AD. 384 5.2. Map-Reply LISP-SEC Extensions 386 LISP-SEC uses the Map-Reply defined in [I-D.ietf-lisp], with Type set 387 to 2, and S bit set to 1 to indicate that the Map-Reply message 388 includes Authentication Data (AD). The format of the LISP-SEC Map- 389 Reply Authentication Data is defined in the following figure. PKT-AD 390 is the Packet Authentication Data that covers the Map-Reply payload. 391 0 1 2 3 392 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 393 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 394 | AD Type | Reserved | 395 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 396 | EID-AD Length | KDF ID | | 397 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 398 | Record Count | Reserved | EID HMAC ID | EID-AD 399 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | 400 | Reserved | EID mask-len | EID-AFI | | | 401 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | 402 ~ EID-prefix ... ~ | | 403 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | 404 ~ EID HMAC ~ | 405 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 406 | PKT-AD Length | PKT HMAC ID |\ 407 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 408 ~ PKT HMAC ~ PKT-AD 409 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ 411 LISP-SEC Map-Reply Authentication Data 413 AD Type: 1 (LISP-SEC Authentication Data) 415 EID-AD Length: length (in bytes) of the EID-AD. An EID-AD MAY 416 contain multiple EID-records. Each EID-record is 4-byte long plus 417 the length of the AFI-encoded EID-prefix. 419 KDF ID: Identifier of the Key Derivation Function used to derive 420 MS-OTK. See Section 5.7 for more details. 422 Record Count: The number of records in this Map-Reply message. A 423 record is comprised of the portion of the packet that is labeled 424 'Rec' above and occurs the number of times equal to Record Count. 426 Reserved: Set to 0 on transmission and ignored on receipt. 428 EID HMAC ID: Identifier of the HMAC algorithm used to protect the 429 integrity of the EID-AD. See Section 5.7 for more details. 431 EID mask-len: Mask length for EID-prefix. 433 EID-AFI: Address family of EID-prefix according to [RFC5226]. 435 EID-prefix: This field contains an EID-prefix that the destination 436 ETR is authoritative for, and is the longest match for the 437 requested EID. 439 EID HMAC: HMAC of the EID-AD, as computed by the Map-Server. 440 Before computing the HMAC operation the EID HMAC field MUST be set 441 to 0. The HMAC covers the entire EID-AD. 443 PKT-AD Length: length (in bytes) of the Packet Authentication Data 444 (PKT-AD). 446 PKT HMAC ID: Identifier of the HMAC algorithm used to protect the 447 integrity of the Map-reply Location Data. 449 PKT HMAC: HMAC of the whole Map-Reply packet, including the LISP- 450 SEC Authentication Data. The scope of the authentication goes 451 from the Map-Reply Type field to the PKT HMAC field included. 452 Before computing the HMAC operation the PKT HMAC field MUST be set 453 to 0. See Section 5.8 for more details. 455 5.3. Map-Register LISP-SEC Extentions 457 The second bit after the Type field in a Map-Register message is 458 allocated as the S bit. The S bit indicates to the Map-Server that 459 the registering ETR is LISP-SEC enabled. An ETR that supports LISP- 460 SEC MUST set the S bit in its Map-Register messages. 462 5.4. ITR Processing 464 Upon creating a Map-Request, the ITR generates a random ITR-OTK that 465 is stored locally, together with the nonce generated as specified in 466 [I-D.ietf-lisp]. 468 The Map-Request MUST be encapsulated in an ECM, with the S-bit set to 469 1, to indicate the presence of Authentication Data. If the ITR and 470 the Map-Resolver are configured with a shared key, the ITR-OTK 471 confidentiality SHOULD be protected by wrapping the ITR-OTK with the 472 algorithm specified by the OTK Encryption ID field. See Section 5.5 473 for further details on OTK encryption. 475 The Requested HMAC ID field contains the suggested HMAC algorithm to 476 be used by the Map-Server and the ETR to protect the integrity of the 477 ECM Authentication data and of the Map-Reply. 479 The KDF ID field, specifies the suggested key derivation function to 480 be used by the Map-Server to derive the MS-OTK. 482 The EID-AD length is set to 4 bytes, since the Authentication Data 483 does not contain EID-prefix Authentication Data, and the EID-AD 484 contains only the KDF ID field. 486 In response to an encapsulated Map-Request that has the S-bit set, an 487 ITR MUST receive a Map-Reply with the S-bit set, that includes an 488 EID-AD and a PKT-AD. If the Map-Reply does not include both ADs, the 489 ITR MUST discard it. In response to an encapsulated Map-Request with 490 S-bit set to 0, the ITR expects a Map-Reply with S-bit set to 0, and 491 the ITR SHOULD discard the Map-Reply if the S-bit is set. 493 Upon receiving a Map-Reply, the ITR must verify the integrity of both 494 the EID-AD and the PKT-AD, and MUST discard the Map-Reply if one of 495 the integrity checks fails. 497 The integrity of the EID-AD is verified using the locally stored ITR- 498 OTK to re-compute the HMAC of the EID-AD using the algorithm 499 specified in the EID HMAC ID field. If the EID HMAC ID field does 500 not match the Requested HMAC ID the ITR SHOULD discard the Map-Reply 501 and send, at the first opportunity it needs to, a new Map-Request 502 with a different Requested HMAC ID field, according to ITR's local 503 policy. The ITR MUST set the EID HMAC ID field to 0 before computing 504 the HMAC. 506 To verify the integrity of the PKT-AD, first the MS-OTK is derived 507 from the locally stored ITR-OTK using the algorithm specified in the 508 KDF ID field. This is because the PKT-AD is generated by the ETR 509 using the MS-OTK. If the KDF ID in the Map-Reply does not match the 510 KDF ID requested in the Map-Request, the ITR SHOULD discard the Map- 511 Reply and send, at the first opportunity it needs to, a new Map- 512 Request with a different KDF ID, according to ITR's local policy. 513 The derived MS-OTK is then used to re-compute the HMAC of the PKT-AD 514 using the Algorithm specified in the PKT HMAC ID field. If the PKT 515 HMAC ID field does not match the Requested HMAC ID the ITR SHOULD 516 discard the Map-Reply and send, at the first opportunity it needs to, 517 a new Map-Request with a different Requested HMAC ID according to 518 ITR's local policy. 520 Each individual Map-Reply EID-record is considered valid only if: (1) 521 both EID-AD and PKT-AD are valid, and (2) the intersection of the 522 EID-prefix in the Map-Reply EID-record with one of the EID-prefixes 523 contained in the EID-AD is not empty. After identifying the Map- 524 Reply record as valid, the ITR sets the EID-prefix in the Map-Reply 525 record to the value of the intersection set computed before, and adds 526 the Map-Reply EID-record to its EID-to-RLOC cache, as described in 527 [I-D.ietf-lisp]. An example of Map-Reply record validation is 528 provided in Section 5.4.1. 530 The ITR SHOULD send SMR triggered Map Requests over the mapping 531 system in order to receive a secure Map-Reply. If an ITR accepts 532 piggybacked Map-Replies, it SHOULD also send a Map-Request over the 533 mapping system in order to securely verify the piggybacked Map-Reply. 535 5.4.1. Map-Reply Record Validation 537 The payload of a Map-Reply may contain multiple EID-records. The 538 whole Map-Reply is signed by the ETR, with the PKT HMAC, to provide 539 integrity protection and origin authentication to the EID-prefix 540 records claimed by the ETR. The Authentication Data field of a Map- 541 Reply may contain multiple EID-records in the EID-AD. The EID-AD is 542 signed by the Map-Server, with the EID HMAC, to provide integrity 543 protection and origin authentication to the EID-prefix records 544 inserted by the Map-Server. 546 Upon receiving a Map-Reply with the S-bit set, the ITR first checks 547 the validity of both the EID HMAC and of the PKT-AD HMAC. If either 548 one of the HMACs is not valid, a log message is issued and the Map- 549 Reply is not processed any further. If both HMACs are valid, the ITR 550 proceeds with validating each individual EID-record claimed by the 551 ETR by computing the intersection of each one of the EID-prefix 552 contained in the payload of the Map-Reply with each one of the EID- 553 prefixes contained in the EID-AD. An EID-record is valid only if at 554 least one of the intersections is not the empty set. 556 For instance, the Map-Reply payload contains 3 mapping record EID- 557 prefixes: 559 1.1.1.0/24 561 1.1.2.0/24 562 1.2.0.0/16 564 The EID-AD contains two EID-prefixes: 566 1.1.2.0/24 568 1.2.3.0/24 570 The EID-record with EID-prefix 1.1.1.0/24 is not processed since it 571 is not included in any of the EID-ADs signed by the Map-Server. A 572 log message is issued. 574 The EID-record with EID-prefix 1.1.2.0/24 is stored in the map-cache 575 because it matches the second EID-prefix contained in the EID-AD. 577 The EID-record with EID-prefix 1.2.0.0/16 is not processed since it 578 is not included in any of the EID-ADs signed by the Map-Server. A 579 log message is issued. In this last example the ETR is trying to 580 over claim the EID-prefix 1.2.0.0/16, but the Map-Server authorized 581 only 1.2.3.0/24, hence the EID-record is discarded. 583 5.4.2. PITR Processing 585 The processing performed by a PITR is equivalent to the processing of 586 an ITR. However, if the PITR is directly connected to the ALT, the 587 PITR performs the functions of both the ITR and the Map-Resolver 588 forwarding the Map-Request encapsulated in an ECM header that 589 includes the Authentication Data fields as described in Section 5.6. 591 5.5. Encrypting and Decrypting an OTK 593 MS-OTK confidentiality is required in the path between the Map-Server 594 and the ETR, the MS-OTK SHOULD be encrypted using the preconfigured 595 key shared between the Map-Server and the ETR for the purpose of 596 securing ETR registration [I-D.ietf-lisp-ms]. Similarly, if ITR-OTK 597 confidentiality is required in the path between the ITR and the Map- 598 Resolver, the ITR-OTK SHOULD be encrypted with a key shared between 599 the ITR and the Map-Resolver. 601 The OTK is encrypted using the algorithm specified in the OTK 602 Encryption ID field. When the AES Key Wrap algorithm is used to 603 encrypt a 128-bit OTK, according to [RFC3339], the AES Key Wrap 604 Initialization Value MUST be set to 0xA6A6A6A6A6A6A6A6 (64 bits). 605 The output of the AES Key Wrap operation is 192-bit long. The most 606 significant 64-bit are copied in the One-Time Key Preamble field, 607 while the 128 less significant bits are copied in the One-Time Key 608 field of the LISP-SEC Authentication Data. 610 When decrypting an encrypted OTK the receiver MUST verify that the 611 Initialization Value resulting from the AES Key Wrap decryption 612 operation is equal to 0xA6A6A6A6A6A6A6A6. If this verification fails 613 the receiver MUST discard the entire message. 615 When a 128-bit OTK is sent unencrypted the OTK Encryption ID is set 616 to NULL_KEY_WRAP_128, and the OTK Preamble is set to 617 0x0000000000000000 (64 bits). 619 5.6. Map-Resolver Processing 621 Upon receiving an encapsulated Map-Request with the S-bit set, the 622 Map-Resolver decapsulates the ECM message. The ITR-OTK, if 623 encrypted, is decrypted as specified in Section 5.5. 625 The Map-Resolver, as specified in [I-D.ietf-lisp-ms], originates a 626 new ECM header with the S-bit set, that contains the unencrypted ITR- 627 OTK, as specified in Section 5.5, and the other data derived from the 628 ECM Authentication Data of the received encapsulated Map-Request. 630 The Map-Resolver then forwards the received Map-Request, encapsulated 631 in the new ECM header that includes the newly computed Authentication 632 Data fields. 634 5.7. Map-Server Processing 636 Upon receiving an ECM encapsulated Map-Request with the S-bit set, 637 the Map-Server process the Map-Request according to the value of the 638 S-bit contained in the Map-Register sent by the ETR during 639 registration. 641 If the S-bit contained in the Map-Register was clear the Map-Server 642 decapsulates the ECM and generates a new ECM encapsulated Map-Request 643 that does not contain an ECM Authentication Data, as specified in 644 [I-D.ietf-lisp]. The Map-Server does not perform any further LISP- 645 SEC processing. 647 If the S-bit contained in the Map-Register was set the Map-Server 648 decapsulates the ECM and generates a new ECM Authentication Data. 649 The Authentication Data includes the OTK-AD and the EID-AD, that 650 contains EID-prefix authorization information, that are ultimately 651 sent to the requesting ITR. 653 The Map-Server updates the OTK-AD by deriving a new OTK (MS-OTK) from 654 the ITR-OTK received with the Map-Request. MS-OTK is derived 655 applying the key derivation function specified in the KDF ID field. 656 If the algorithm specified in the KDF ID field is not supported, the 657 Map-Server uses a different algorithm to derive the key and updates 658 the KDF ID field accordingly. 660 The Map-Server and the ETR MUST be configured with a shared key for 661 mapping registration according to [I-D.ietf-lisp-ms]. If MS-OTK 662 confidentiality is required, then the MS-OTK SHOULD be encrypted, by 663 wrapping the MS-OTK with the algorithm specified by the OTK 664 Encryption ID field as specified in Section 5.5. 666 The Map-Server includes in the EID-AD the longest match registered 667 EID-prefix for the destination EID, and an HMAC of this EID-prefix. 668 The HMAC is keyed with the ITR-OTK contained in the received ECM 669 Authentication Data, and the HMAC algorithm is chosen according to 670 the Requested HMAC ID field. If The Map-Server does not support this 671 algorithm, the Map-Server uses a different algorithm and specifies it 672 in the EID HMAC ID field. The scope of the HMAC operation covers the 673 entire EID-AD, from the EID-AD Length field to the EID HMAC field, 674 which must be set to 0 before the computation. 676 The Map-Server then forwards the updated ECM encapsulated Map- 677 Request, that contains the OTK-AD, the EID-AD, and the received Map- 678 Request to an authoritative ETR as specified in [I-D.ietf-lisp]. 680 5.7.1. Map-Server Processing in Proxy mode 682 If the Map-Server is in proxy mode, it generates a Map-Reply, as 683 specified in [I-D.ietf-lisp], with the S-bit set to 1. The Map-Reply 684 includes the Authentication Data that contains the EID-AD, computed 685 as specified in Section 5.7, as well as the PKT-AD computed as 686 specified in Section 5.8. 688 5.8. ETR Processing 690 Upon receiving an encapsulated Map-Request with the S-bit set, the 691 ETR decapsulates the ECM message. The OTK field, if encrypted, is 692 decrypted as specified in Section 5.5 to obtain the unencrypted MS- 693 OTK. 695 The ETR then generates a Map-Reply as specified in [I-D.ietf-lisp] 696 and includes an Authentication Data that contains the EID-AD, as 697 received in the encapsulated Map-Request, as well as the PKT-AD. 699 The EID-AD is copied from the Authentication Data of the received 700 encapsulated Map-Request. 702 The PKT-AD contains the HMAC of the whole Map-Reply packet, keyed 703 with the MS-OTK and computed using the HMAC algorithm specified in 704 the Requested HMAC ID field of the received encapsulated Map-Request. 705 If the ETR does not support the Requested HMAC ID, it uses a 706 different algorithm and updates the PKT HMAC ID field accordingly. 707 The scope of the HMAC operation covers the entire PKT-AD, from the 708 Map-Reply Type field to the PKT HMAC field, which must be set to 0 709 before the computation. 711 Finally the ETR sends the Map-Reply to the requesting ITR as 712 specified in [I-D.ietf-lisp]. 714 6. Security Considerations 716 6.1. Mapping System Security 718 The LISP-SEC threat model described in Section 3, assumes that the 719 LISP Mapping System is working properly and eventually delivers Map- 720 Request messages to a Map-Server that is authoritative for the 721 requested EID. 723 Security is not yet embedded in LISP+ALT but BGP route filtering 724 SHOULD be deployed in the ALT infrastructure to enforce proper 725 routing in the mapping system. The SIDR working group is currently 726 addressing prefix and route advertisement authorization and 727 authentication for BGP. While following SIDR recommendations in the 728 global Internet will take time, applying these recommendations to the 729 ALT, which relies on BGP, should be less complex, as ALT is currently 730 small and with a limited number of operators. Ultimately, deploying 731 the SIDR recommendations in ALT further ensures that the fore 732 mentioned assumption is true. 734 It is also assumed that no man-in-the-middle attack can be carried 735 out against the ALT router to ALT router tunnels, and that the 736 information included into the Map-Requests, in particular the OTK, 737 cannot be read by third-party entities. It should be noted that the 738 integrity of the Map-Request in the ALT is protected by BGP 739 authentication, and that in order to provide OTK confidentiality in 740 the ALT mapping system the ALT router to ALT router tunnels MAY be 741 deployed using IPsec (ESP). 743 Map-Register security, including the right for a LISP entity to 744 register an EID-prefix or to claim presence at an RLOC, is out of the 745 scope of LISP-SEC. 747 6.2. Random Number Generation 749 The ITR-OTK MUST be generated by a properly seeded pseudo-random (or 750 strong random) source. See [RFC4086] for advice on generating 751 security-sensitive random data 753 6.3. Map-Server and ETR Colocation 755 If the Map-Server and the ETR are colocated, LISP-SEC does not 756 provide protection from overclaiming attacks mounted by the ETR. 757 However, in this particular case, since the ETR is within the trust 758 boundaries of the Map-Server, ETR's overclaiming attacks are not 759 included in the threat model. 761 7. IANA Considerations 763 7.1. HMAC functions 765 The following HMAC ID values are defined by this memo for use as 766 Requested HMAC ID, EID HMAC ID, and PKT HMAC ID in the LISP-SEC 767 Authentication Data: 769 Name Number Defined In 770 ------------------------------------------------- 771 NONE 0 772 AUTH-HMAC-SHA-1-96 1 [RFC2104] 773 AUTH-HMAC-SHA-256-128 2 [RFC4634] 775 values 2-65535 are reserved to IANA. 777 HMAC Functions 779 AUTH-HMAC-SHA-1-96 MUST be supported, AUTH-HMAC-SHA-256-128 should be 780 supported. 782 7.2. Key Wrap Functions 784 The following OTK Encryption ID values are defined by this memo for 785 use as OTK key wrap algorithms ID in the LISP-SEC Authentication 786 Data: 788 Name Number Defined In 789 ------------------------------------------------- 790 NULL-KEY-WRAP-128 1 791 AES-KEY-WRAP-128 2 [RFC3394] 793 values 0 and 3-65535 are reserved to IANA. 795 Key Wrap Functions 797 NULL-KEY-WRAP-128, and AES-KEY-WRAP-128 MUST be supported. 799 NULL-KEY-WRAP-128 is used to carry an unencrypted 128-bit OTK, with a 800 64-bit preamble set to 0x0000000000000000 (64 bits). 802 7.3. Key Derivation Functions 804 The following KDF ID values are defined by this memo for use as KDF 805 ID in the LISP-SEC Authentication Data: 807 Name Number Defined In 808 ------------------------------------------------- 809 NONE 0 810 HKDF-SHA1-128 1 [RFC5869] 812 values 2-65535 are reserved to IANA. 814 Key Derivation Functions 816 HKDF-SHA1-128 MUST be supported 818 8. Acknowledgements 820 The authors would like to acknowledge Pere Monclus, Dave Meyer, Dino 821 Farinacci, Brian Weis, David McGrew, Darrel Lewis and Landon Curt 822 Noll for their valuable suggestions provided during the preparation 823 of this document. 825 9. Normative References 827 [I-D.ietf-lisp] 828 Farinacci, D., Fuller, V., Meyer, D., and D. Lewis, 829 "Locator/ID Separation Protocol (LISP)", 830 draft-ietf-lisp-18 (work in progress), December 2011. 832 [I-D.ietf-lisp-interworking] 833 Lewis, D., Meyer, D., Farinacci, D., and V. Fuller, 834 "Interworking LISP with IPv4 and IPv6", 835 draft-ietf-lisp-interworking-02 (work in progress), 836 June 2011. 838 [I-D.ietf-lisp-ms] 839 Fuller, V. and D. Farinacci, "LISP Map Server Interface", 840 draft-ietf-lisp-ms-14 (work in progress), December 2011. 842 [I-D.ietf-lisp-threats] 843 Saucez, D., Iannone, L., and O. Bonaventure, "LISP Threats 844 Analysis", draft-ietf-lisp-threats-00 (work in progress), 845 July 2011. 847 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 848 Hashing for Message Authentication", RFC 2104, 849 February 1997. 851 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 852 Requirement Levels", BCP 14, RFC 2119, March 1997. 854 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 855 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 857 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 858 Requirements for Security", BCP 106, RFC 4086, June 2005. 860 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 861 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 862 May 2008. 864 [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand 865 Key Derivation Function (HKDF)", RFC 5869, May 2010. 867 Authors' Addresses 869 Fabio Maino 870 Cisco Systems 871 170 Tasman Drive 872 San Jose, California 95134 873 USA 875 Email: fmaino@cisco.com 877 Vina Ermagan 878 Cisco Systems 879 170 Tasman Drive 880 San Jose, California 95134 881 USA 883 Email: vermagan@cisco.com 884 Albert Cabellos 885 Technical University of Catalonia 886 c/ Jordi Girona s/n 887 Barcelona, 08034 888 Spain 890 Email: acabello@ac.upc.edu 892 Damien Saucez 893 INRIA 894 2004 route des Lucioles - BP 93 895 Sophia Antipolis, 896 France 898 Email: damien.saucez@inria.fr 900 Olivier Bonaventure 901 Universite catholique de Louvain 902 Place St. Barbe 2 903 Louvain-la-Neuve, 904 Belgium 906 Email: olivier.bonaventure@uclouvain.be