idnits 2.17.1 draft-ietf-lisp-sec-07.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 2 instances of too long lines in the document, the longest one being 4 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 (October 16, 2014) is 3473 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Missing Reference: 'RFC3339' is mentioned on line 602, but not defined == Missing Reference: 'RFC4634' is mentioned on line 752, but not defined ** Obsolete undefined reference: RFC 4634 (Obsoleted by RFC 6234) == Outdated reference: A later version (-15) exists of draft-ietf-lisp-threats-10 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 6830 (Obsoleted by RFC 9300, RFC 9301) ** Obsolete normative reference: RFC 6833 (Obsoleted by RFC 9301) Summary: 5 errors (**), 0 flaws (~~), 5 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: April 19, 2015 A. Cabellos 6 Technical University of Catalonia 7 D. Saucez 8 INRIA 9 October 16, 2014 11 LISP-Security (LISP-SEC) 12 draft-ietf-lisp-sec-07 14 Abstract 16 This memo specifies LISP-SEC, a set of security mechanisms that 17 provides origin authentication, integrity and anti-replay protection 18 to LISP's EID-to-RLOC mapping data conveyed via mapping lookup 19 process. LISP-SEC also enables verification of authorization on EID- 20 prefix claims in Map-Reply messages. 22 Requirements Language 24 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 25 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 26 document are to be interpreted as described in [RFC2119]. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on April 19, 2015. 45 Copyright Notice 47 Copyright (c) 2014 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 63 2. Definition of Terms . . . . . . . . . . . . . . . . . . . . . 3 64 3. LISP-SEC Threat Model . . . . . . . . . . . . . . . . . . . . 4 65 4. Protocol Operations . . . . . . . . . . . . . . . . . . . . . 4 66 5. LISP-SEC Control Messages Details . . . . . . . . . . . . . . 7 67 5.1. Encapsulated Control Message LISP-SEC Extensions . . . . 7 68 5.2. Map-Reply LISP-SEC Extensions . . . . . . . . . . . . . . 9 69 5.3. Map-Register LISP-SEC Extentions . . . . . . . . . . . . 10 70 5.4. ITR Processing . . . . . . . . . . . . . . . . . . . . . 10 71 5.4.1. Map-Reply Record Validation . . . . . . . . . . . . . 12 72 5.4.2. PITR Processing . . . . . . . . . . . . . . . . . . . 13 73 5.5. Encrypting and Decrypting an OTK . . . . . . . . . . . . 13 74 5.6. Map-Resolver Processing . . . . . . . . . . . . . . . . . 14 75 5.7. Map-Server Processing . . . . . . . . . . . . . . . . . . 14 76 5.7.1. Map-Server Processing in Proxy mode . . . . . . . . . 15 77 5.8. ETR Processing . . . . . . . . . . . . . . . . . . . . . 15 78 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 79 6.1. Mapping System Security . . . . . . . . . . . . . . . . . 16 80 6.2. Random Number Generation . . . . . . . . . . . . . . . . 16 81 6.3. Map-Server and ETR Colocation . . . . . . . . . . . . . . 16 82 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 83 7.1. HMAC functions . . . . . . . . . . . . . . . . . . . . . 16 84 7.2. Key Wrap Functions . . . . . . . . . . . . . . . . . . . 17 85 7.3. Key Derivation Functions . . . . . . . . . . . . . . . . 17 86 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 87 9. Normative References . . . . . . . . . . . . . . . . . . . . 18 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 90 1. Introduction 92 The Locator/ID Separation Protocol [RFC6830] defines a set of 93 functions for routers to exchange information used to map from non- 94 routable Endpoint Identifiers (EIDs) to routable Routing Locators 95 (RLOCs). If these EID-to-RLOC mappings, carried through Map-Reply 96 messages, are transmitted without integrity protection, an adversary 97 can manipulate them and hijack the communication, impersonate the 98 requested EID, or mount Denial of Service or Distributed Denial of 99 Service attacks. Also, if the Map-Reply message is transported 100 unauthenticated, an adversarial LISP entity can overclaim an EID- 101 prefix and maliciously redirect traffic directed to a large number of 102 hosts. A detailed description of "overclaiming" attack is provided 103 in [I-D.ietf-lisp-threats]. 105 This memo specifies LISP-SEC, a set of security mechanisms that 106 provides origin authentication, integrity and anti-replay protection 107 to LISP's EID-to-RLOC mapping data conveyed via mapping lookup 108 process. LISP-SEC also enables verification of authorization on EID- 109 prefix claims in Map-Reply messages, ensuring that the sender of a 110 Map-Reply that provides the location for a given EID-prefix is 111 entitled to do so according to the EID prefix registered in the 112 associated Map-Server. Map-Register security, including the right 113 for a LISP entity to register an EID-prefix or to claim presence at 114 an RLOC, is out of the scope of LISP-SEC. Additional security 115 considerations are described in Section 6. 117 2. Definition of Terms 119 One-Time Key (OTK): An ephemeral randomly generated key that must 120 be used for a single Map-Request/Map-Reply exchange. 122 ITR-OTK: The One-Time Key generated at the ITR. 124 MS-OTK: The One-Time Key generated at the Map-Server. 126 Encapsulated Control Message (ECM): A LISP control message that is 127 prepended with an additional LISP header. ECM is used by ITRs to 128 send LISP control messages to a Map-Resolver, by Map-Resolvers to 129 forward LISP control messages to a Map-Server, and by Map- 130 Resolvers to forward LISP control messages to an ETR. 132 Authentication Data (AD): Metadata that is included either in a 133 LISP ECM header or in a Map-Reply message to support 134 confidentiality, integrity protection, and verification of EID- 135 prefix authorization. 137 OTK-AD: The portion of ECM Authentication Data that contains a 138 One-Time Key. 140 EID-AD: The portion of ECM and Map-Reply Authentication Data 141 used for verification of EID-prefix authorization. 143 PKT-AD: The portion of Map-Reply Authentication Data used to 144 protect the integrity of the Map-Reply message. 146 For definitions of other terms, notably Map-Request, Map-Reply, 147 Ingress Tunnel Router (ITR), Egress Tunnel Router (ETR), Map-Server 148 (MS), and Map-Resolver (MR) please consult the LISP specification 149 [RFC6830]. 151 3. LISP-SEC Threat Model 153 LISP-SEC addresses the control plane threats, described in 154 [I-D.ietf-lisp-threats], that target EID-to-RLOC mappings, including 155 manipulations of Map-Request and Map-Reply messages, and malicious 156 ETR EID prefix overclaiming. LISP-SEC makes two main assumptions: 157 (1) the LISP mapping system is expected to deliver a Map-Request 158 message to their intended destination ETR as identified by the EID, 159 and (2) no man-in-the-middle (MITM) attack can be mounted within the 160 LISP Mapping System. Furthermore, while LISP-SEC enables detection 161 of EID prefix overclaiming attacks, it assumes that Map-Servers can 162 verify the EID prefix authorization at time of registration. 164 According to the threat model described in [I-D.ietf-lisp-threats] 165 LISP-SEC assumes that any kind of attack, including MITM attacks, can 166 be mounted in the access network, outside of the boundaries of the 167 LISP mapping system. An on-path attacker, outside of the LISP 168 mapping system can, for example, hijack Map-Request and Map-Reply 169 messages, spoofing the identity of a LISP node. Another example of 170 on-path attack, called overclaiming attack, can be mounted by a 171 malicious Egress Tunnel Router (ETR), by overclaiming the EID- 172 prefixes for which it is authoritative. In this way the ETR can 173 maliciously redirect traffic directed to a large number of hosts. 175 4. Protocol Operations 177 The goal of the security mechanisms defined in [RFC6830] is to 178 prevent unauthorized insertion of mapping data by providing origin 179 authentication and integrity protection for the Map-Registration, and 180 by using the nonce to detect unsolicited Map-Reply sent by off-path 181 attackers. 183 LISP-SEC builds on top of the security mechanisms defined in 184 [RFC6830] to address the threats described in Section 3 by leveraging 185 the trust relationships existing among the LISP entities 186 participating to the exchange of the Map-Request/Map-Reply messages. 187 Those trust relationships are used to securely distribute a One-Time 188 Key (OTK) that provides origin authentication, integrity and anti- 189 replay protection to mapping data conveyed via the mapping lookup 190 process, and that effectively prevent overclaiming attacks. The 191 processing of security parameters during the Map-Request/Map-Reply 192 exchange is as follows: 194 o The ITR-OTK is generated and stored at the ITR, and securely 195 transported to the Map-Server. 197 o The Map-Server uses the ITR-OTK to compute an HMAC that protects 198 the integrity of the mapping data known to the Map-Server to 199 prevent overclaiming attacks. The Map-Server also derives a new 200 OTK, the MS-OTK, that is passed to the ETR, by applying a Key 201 Derivation Function (KDF) to the ITR-OTK. 203 o The ETR uses the MS-OTK to compute an HMAC that protects the 204 integrity of the Map-Reply sent to the ITR. 206 o Finally, the ITR uses the stored ITR-OTK to verify the integrity 207 of the mapping data provided by both the Map-Server and the ETR, 208 and to verify that no overclaiming attacks were mounted along the 209 path between the Map-Server and the ITR. 211 Section 5 provides the detailed description of the LISP-SEC control 212 messages and their processing, while the rest of this section 213 describes the flow of protocol operations at each entity involved in 214 the Map-Request/Map-Reply exchange: 216 o The ITR, upon needing to transmit a Map-Request message, generates 217 and stores an OTK (ITR-OTK). This ITR-OTK is included into the 218 Encapsulated Control Message (ECM) that contains the Map-Request 219 sent to the Map-Resolver. To provide confidentiality to the ITR- 220 OTK over the path between the ITR and its Map-Resolver, the ITR- 221 OTK SHOULD be encrypted using a preconfigured key shared between 222 the ITR and the Map-Resolver, similar to the key shared between 223 the ETR and the Map-Server in order to secure ETR registration 224 [RFC6833]. 226 o The Map-Resolver decapsulates the ECM message, decrypts the ITR- 227 OTK, if needed, and forwards through the Mapping System the 228 received Map-Request and the ITR-OTK, as part of a new ECM 229 message. As described in Section 5.6, the LISP Mapping System 230 delivers the ECM to the appropriate Map-Server, as identified by 231 the EID destination address of the Map-Request. 233 o The Map-Server is configured with the location mappings and policy 234 information for the ETR responsible for the EID destination 235 address. Using this preconfigured information, the Map-Server, 236 after the decapsulation of the ECM message, finds the longest 237 match EID-prefix that covers the requested EID in the received 238 Map-Request. The Map-Server adds this EID-prefix, together with 239 an HMAC computed using the ITR-OTK, to a new Encapsulated Control 240 Message that contains the received Map-Request. 242 o The Map-Server derives a new OTK, the MS-OTK, by applying a Key 243 Derivation Function (KDF) to the ITR-OTK. This MS-OTK is included 244 in the Encapsulated Control Message that the Map-Server uses to 245 forward the Map-Request to the ETR. To provide MS-OTK 246 confidentiality over the path between the Map-Server and the ETR, 247 the MS-OTK should be encrypted using the key shared between the 248 ETR and the Map-Server in order to secure ETR registration 249 [RFC6833]. 251 o If the Map-Server is acting in proxy mode, as specified in 252 [RFC6830], the ETR is not involved in the generation of the Map- 253 Reply. In this case the Map-Server generates the Map-Reply on 254 behalf of the ETR as described below. 256 o The ETR, upon receiving the ECM encapsulated Map-Request from the 257 Map-Server, decrypts the MS-OTK, if needed, and originates a 258 standard Map-Reply that contains the EID-to-RLOC mapping 259 information as specified in [RFC6830]. 261 o The ETR computes an HMAC over this standard Map-Reply, keyed with 262 MS-OTK to protect the integrity of the whole Map-Reply. The ETR 263 also copies the EID-prefix authorization data that the Map-Server 264 included in the ECM encapsulated Map-Request into the Map-Reply 265 message. The ETR then sends this complete Map-Reply message to 266 the requesting ITR. 268 o The ITR, upon receiving the Map-Reply, uses the locally stored 269 ITR-OTK to verify the integrity of the EID-prefix authorization 270 data included in the Map-Reply by the Map-Server. The ITR 271 computes the MS-OTK by applying the same KDF used by the Map- 272 Server, and verifies the integrity of the Map-Reply. If the 273 integrity checks fail, the Map-Reply MUST be discarded. Also, if 274 the EID-prefixes claimed by the ETR in the Map-Reply are not equal 275 or more specific than the EID-prefix authorization data inserted 276 by the Map-Server, the ITR MUST discard the Map-Reply. 278 5. LISP-SEC Control Messages Details 280 LISP-SEC metadata associated with a Map-Request is transported within 281 the Encapsulated Control Message that contains the Map-Request. 283 LISP-SEC metadata associated with the Map-Reply is transported within 284 the Map-Reply itself. 286 5.1. Encapsulated Control Message LISP-SEC Extensions 288 LISP-SEC uses the ECM (Encapsulated Control Message) defined in 289 [RFC6830] with Type set to 8, and S bit set to 1 to indicate that the 290 LISP header includes Authentication Data (AD). The format of the 291 LISP-SEC ECM Authentication Data is defined in the following figure. 292 OTK-AD stands for One-Time Key Authentication Data and EID-AD stands 293 for EID Authentication Data. 295 0 1 2 3 296 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 297 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 298 | AD Type |V| Reserved | Requested HMAC ID | 299 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ 300 | OTK Length | OTK Encryption ID | | 301 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 302 | One-Time-Key Preamble ... | | 303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ OTK-AD 304 | ... One-Time-Key Preamble | | 305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 306 ~ One-Time Key (128 bits) ~/ 307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 308 | EID-AD Length | KDF ID | | 309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 310 | Record Count | Reserved | EID HMAC ID | EID-AD 311 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | 312 | Reserved | EID mask-len | EID-AFI | | | 313 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | 314 ~ EID-prefix ... ~ | | 315 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | 316 ~ EID HMAC ~ | 317 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 319 LISP-SEC ECM Authentication Data 321 AD Type: 1 (LISP-SEC Authentication Data) 323 V: Key Version bit. This bit is toggled when the sender switches 324 to a new OTK wrapping key 325 Reserved: Set to 0 on transmission and ignored on receipt. 327 Requested HMAC ID: The HMAC algorithm requested by the ITR. See 328 Section 5.4 for details. 330 OTK Length: The length (in bytes) of the OTK Authentication Data 331 (OTK-AD), that contains the OTK Preamble and the OTK. 333 OTK Encryption ID: The identifier of the key wrapping algorithm 334 used to encrypt the One-Time-Key. When a 128-bit OTK is sent 335 unencrypted by the Map-Resolver, the OTK Encryption ID is set to 336 NULL_KEY_WRAP_128. See Section 5.5 for more details. 338 One-Time-Key Preamble: set to 0 if the OTK is not encrypted. When 339 the OTK is encrypted, this field may carry additional metadata 340 resulting from the key wrapping operation. When a 128-bit OTK is 341 sent unencrypted by Map-Resolver, the OTK Preamble is set to 342 0x0000000000000000 (64 bits). See Section 5.5 for details. 344 One-Time-Key: the OTK encrypted (or not) as specified by OTK 345 Encryption ID. See Section 5.5 for details. 347 EID-AD Length: length (in bytes) of the EID Authentication Data 348 (EID-AD). The ITR MUST set EID-AD Length to 4 bytes, as it only 349 fills the KDF ID field, and all the remaining fields part of the 350 EID-AD are not present. An EID-AD MAY contain multiple EID- 351 records. Each EID-record is 4-byte long plus the length of the 352 AFI-encoded EID-prefix. 354 KDF ID: Identifier of the Key Derivation Function used to derive 355 the MS-OTK. The ITR SHOULD use this field to indicate the 356 recommended KDF algorithm, according to local policy. The Map- 357 Server can overwrite the KDF ID if it does not support the KDF ID 358 recommended by the ITR. See Section 5.4 for more details. 360 Record Count: The number of records in this Map-Request message. 361 A record is comprised of the portion of the packet that is labeled 362 'Rec' above and occurs the number of times equal to Record Count. 364 Reserved: Set to 0 on transmission and ignored on receipt. 366 EID HMAC ID: Identifier of the HMAC algorithm used to protect the 367 integrity of the EID-AD. This field is filled by Map-Server that 368 computed the EID-prefix HMAC. See Section 5.4 for more details. 370 EID mask-len: Mask length for EID-prefix. 372 EID-AFI: Address family of EID-prefix according to [RFC5226] 373 EID-prefix: The Map-Server uses this field to specify the EID- 374 prefix that the destination ETR is authoritative for, and is the 375 longest match for the requested EID. 377 EID HMAC: HMAC of the EID-AD computed and inserted by Map-Server. 378 Before computing the HMAC operation the EID HMAC field MUST be set 379 to 0. The HMAC covers the entire EID-AD. 381 5.2. Map-Reply LISP-SEC Extensions 383 LISP-SEC uses the Map-Reply defined in [RFC6830], with Type set to 2, 384 and S bit set to 1 to indicate that the Map-Reply message includes 385 Authentication Data (AD). The format of the LISP-SEC Map-Reply 386 Authentication Data is defined in the following figure. PKT-AD is 387 the Packet Authentication Data that covers the Map-Reply payload. 389 0 1 2 3 390 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 391 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 392 | AD Type | Reserved | 393 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 394 | EID-AD Length | KDF ID | | 395 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 396 | Record Count | Reserved | EID HMAC ID | EID-AD 397 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | 398 | Reserved | EID mask-len | EID-AFI | | | 399 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | 400 ~ EID-prefix ... ~ | | 401 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | 402 ~ EID HMAC ~ | 403 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 404 | PKT-AD Length | PKT HMAC ID |\ 405 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 406 ~ PKT HMAC ~ PKT-AD 407 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ 409 LISP-SEC Map-Reply Authentication Data 411 AD Type: 1 (LISP-SEC Authentication Data) 413 EID-AD Length: length (in bytes) of the EID-AD. An EID-AD MAY 414 contain multiple EID-records. Each EID-record is 4-byte long plus 415 the length of the AFI-encoded EID-prefix. 417 KDF ID: Identifier of the Key Derivation Function used to derive 418 MS-OTK. See Section 5.7 for more details. 420 Record Count: The number of records in this Map-Reply message. A 421 record is comprised of the portion of the packet that is labeled 422 'Rec' above and occurs the number of times equal to Record Count. 424 Reserved: Set to 0 on transmission and ignored on receipt. 426 EID HMAC ID: Identifier of the HMAC algorithm used to protect the 427 integrity of the EID-AD. See Section 5.7 for more details. 429 EID mask-len: Mask length for EID-prefix. 431 EID-AFI: Address family of EID-prefix according to [RFC5226]. 433 EID-prefix: This field contains an EID-prefix that the destination 434 ETR is authoritative for, and is the longest match for the 435 requested EID. 437 EID HMAC: HMAC of the EID-AD, as computed by the Map-Server. 438 Before computing the HMAC operation the EID HMAC field MUST be set 439 to 0. The HMAC covers the entire EID-AD. 441 PKT-AD Length: length (in bytes) of the Packet Authentication Data 442 (PKT-AD). 444 PKT HMAC ID: Identifier of the HMAC algorithm used to protect the 445 integrity of the Map-reply Location Data. 447 PKT HMAC: HMAC of the whole Map-Reply packet, including the LISP- 448 SEC Authentication Data. The scope of the authentication goes 449 from the Map-Reply Type field to the PKT HMAC field included. 450 Before computing the HMAC operation the PKT HMAC field MUST be set 451 to 0. See Section 5.8 for more details. 453 5.3. Map-Register LISP-SEC Extentions 455 The second bit after the Type field in a Map-Register message is 456 allocated as the S bit. The S bit indicates to the Map-Server that 457 the registering ETR is LISP-SEC enabled. An ETR that supports LISP- 458 SEC MUST set the S bit in its Map-Register messages. 460 5.4. ITR Processing 462 Upon creating a Map-Request, the ITR generates a random ITR-OTK that 463 is stored locally, together with the nonce generated as specified in 464 [RFC6830]. 466 The Map-Request MUST be encapsulated in an ECM, with the S-bit set to 467 1, to indicate the presence of Authentication Data. If the ITR and 468 the Map-Resolver are configured with a shared key, the ITR-OTK 469 confidentiality SHOULD be protected by wrapping the ITR-OTK with the 470 algorithm specified by the OTK Encryption ID field. See Section 5.5 471 for further details on OTK encryption. 473 The Requested HMAC ID field contains the suggested HMAC algorithm to 474 be used by the Map-Server and the ETR to protect the integrity of the 475 ECM Authentication data and of the Map-Reply. 477 The KDF ID field, specifies the suggested key derivation function to 478 be used by the Map-Server to derive the MS-OTK. 480 The EID-AD length is set to 4 bytes, since the Authentication Data 481 does not contain EID-prefix Authentication Data, and the EID-AD 482 contains only the KDF ID field. 484 In response to an encapsulated Map-Request that has the S-bit set, an 485 ITR MUST receive a Map-Reply with the S-bit set, that includes an 486 EID-AD and a PKT-AD. If the Map-Reply does not include both ADs, the 487 ITR MUST discard it. In response to an encapsulated Map-Request with 488 S-bit set to 0, the ITR expects a Map-Reply with S-bit set to 0, and 489 the ITR SHOULD discard the Map-Reply if the S-bit is set. 491 Upon receiving a Map-Reply, the ITR must verify the integrity of both 492 the EID-AD and the PKT-AD, and MUST discard the Map-Reply if one of 493 the integrity checks fails. 495 The integrity of the EID-AD is verified using the locally stored ITR- 496 OTK to re-compute the HMAC of the EID-AD using the algorithm 497 specified in the EID HMAC ID field. If the EID HMAC ID field does 498 not match the Requested HMAC ID the ITR SHOULD discard the Map-Reply 499 and send, at the first opportunity it needs to, a new Map-Request 500 with a different Requested HMAC ID field, according to ITR's local 501 policy. The ITR MUST set the EID HMAC ID field to 0 before computing 502 the HMAC. 504 To verify the integrity of the PKT-AD, first the MS-OTK is derived 505 from the locally stored ITR-OTK using the algorithm specified in the 506 KDF ID field. This is because the PKT-AD is generated by the ETR 507 using the MS-OTK. If the KDF ID in the Map-Reply does not match the 508 KDF ID requested in the Map-Request, the ITR SHOULD discard the Map- 509 Reply and send, at the first opportunity it needs to, a new Map- 510 Request with a different KDF ID, according to ITR's local policy. 511 The derived MS-OTK is then used to re-compute the HMAC of the PKT-AD 512 using the Algorithm specified in the PKT HMAC ID field. If the PKT 513 HMAC ID field does not match the Requested HMAC ID the ITR SHOULD 514 discard the Map-Reply and send, at the first opportunity it needs to, 515 a new Map-Request with a different Requested HMAC ID according to 516 ITR's local policy. 518 Each individual Map-Reply EID-record is considered valid only if: (1) 519 both EID-AD and PKT-AD are valid, and (2) the intersection of the 520 EID-prefix in the Map-Reply EID-record with one of the EID-prefixes 521 contained in the EID-AD is not empty. After identifying the Map- 522 Reply record as valid, the ITR sets the EID-prefix in the Map-Reply 523 record to the value of the intersection set computed before, and adds 524 the Map-Reply EID-record to its EID-to-RLOC cache, as described in 525 [RFC6830]. An example of Map-Reply record validation is provided in 526 Section 5.4.1. 528 The ITR SHOULD send SMR triggered Map-Requests over the mapping 529 system in order to receive a secure Map-Reply. If an ITR accepts 530 piggybacked Map-Replies, it SHOULD also send a Map-Request over the 531 mapping system in order to securely verify the piggybacked Map-Reply. 533 5.4.1. Map-Reply Record Validation 535 The payload of a Map-Reply may contain multiple EID-records. The 536 whole Map-Reply is signed by the ETR, with the PKT HMAC, to provide 537 integrity protection and origin authentication to the EID-prefix 538 records claimed by the ETR. The Authentication Data field of a Map- 539 Reply may contain multiple EID-records in the EID-AD. The EID-AD is 540 signed by the Map-Server, with the EID HMAC, to provide integrity 541 protection and origin authentication to the EID-prefix records 542 inserted by the Map-Server. 544 Upon receiving a Map-Reply with the S-bit set, the ITR first checks 545 the validity of both the EID HMAC and of the PKT-AD HMAC. If either 546 one of the HMACs is not valid, a log message is issued and the Map- 547 Reply is not processed any further. If both HMACs are valid, the ITR 548 proceeds with validating each individual EID-record claimed by the 549 ETR by computing the intersection of each one of the EID-prefix 550 contained in the payload of the Map-Reply with each one of the EID- 551 prefixes contained in the EID-AD. An EID-record is valid only if at 552 least one of the intersections is not the empty set. 554 For instance, the Map-Reply payload contains 3 mapping record EID- 555 prefixes: 557 1.1.1.0/24 559 1.1.2.0/24 561 1.2.0.0/16 563 The EID-AD contains two EID-prefixes: 565 1.1.2.0/24 567 1.2.3.0/24 569 The EID-record with EID-prefix 1.1.1.0/24 is not processed since it 570 is not included in any of the EID-ADs signed by the Map-Server. A 571 log message is issued. 573 The EID-record with EID-prefix 1.1.2.0/24 is stored in the map-cache 574 because it matches the second EID-prefix contained in the EID-AD. 576 The EID-record with EID-prefix 1.2.0.0/16 is not processed since it 577 is not included in any of the EID-ADs signed by the Map-Server. A 578 log message is issued. In this last example the ETR is trying to 579 over claim the EID-prefix 1.2.0.0/16, but the Map-Server authorized 580 only 1.2.3.0/24, hence the EID-record is discarded. 582 5.4.2. PITR Processing 584 The processing performed by a PITR is equivalent to the processing of 585 an ITR. However, if the PITR is directly connected to the ALT, the 586 PITR performs the functions of both the ITR and the Map-Resolver 587 forwarding the Map-Request encapsulated in an ECM header that 588 includes the Authentication Data fields as described in Section 5.6. 590 5.5. Encrypting and Decrypting an OTK 592 MS-OTK confidentiality is required in the path between the Map-Server 593 and the ETR, the MS-OTK SHOULD be encrypted using the preconfigured 594 key shared between the Map-Server and the ETR for the purpose of 595 securing ETR registration [RFC6833]. Similarly, if ITR-OTK 596 confidentiality is required in the path between the ITR and the Map- 597 Resolver, the ITR-OTK SHOULD be encrypted with a key shared between 598 the ITR and the Map-Resolver. 600 The OTK is encrypted using the algorithm specified in the OTK 601 Encryption ID field. When the AES Key Wrap algorithm is used to 602 encrypt a 128-bit OTK, according to [RFC3339], the AES Key Wrap 603 Initialization Value MUST be set to 0xA6A6A6A6A6A6A6A6 (64 bits). 604 The output of the AES Key Wrap operation is 192-bit long. The most 605 significant 64-bit are copied in the One-Time Key Preamble field, 606 while the 128 less significant bits are copied in the One-Time Key 607 field of the LISP-SEC Authentication Data. 609 When decrypting an encrypted OTK the receiver MUST verify that the 610 Initialization Value resulting from the AES Key Wrap decryption 611 operation is equal to 0xA6A6A6A6A6A6A6A6. If this verification fails 612 the receiver MUST discard the entire message. 614 When a 128-bit OTK is sent unencrypted the OTK Encryption ID is set 615 to NULL_KEY_WRAP_128, and the OTK Preamble is set to 616 0x0000000000000000 (64 bits). 618 5.6. Map-Resolver Processing 620 Upon receiving an encapsulated Map-Request with the S-bit set, the 621 Map-Resolver decapsulates the ECM message. The ITR-OTK, if 622 encrypted, is decrypted as specified in Section 5.5. 624 The Map-Resolver, as specified in [RFC6833], originates a new ECM 625 header with the S-bit set, that contains the unencrypted ITR-OTK, as 626 specified in Section 5.5, and the other data derived from the ECM 627 Authentication Data of the received encapsulated Map-Request. 629 The Map-Resolver then forwards the received Map-Request, encapsulated 630 in the new ECM header that includes the newly computed Authentication 631 Data fields. 633 5.7. Map-Server Processing 635 Upon receiving an ECM encapsulated Map-Request with the S-bit set, 636 the Map-Server process the Map-Request according to the value of the 637 S-bit contained in the Map-Register sent by the ETR during 638 registration. 640 If the S-bit contained in the Map-Register was clear the Map-Server 641 decapsulates the ECM and generates a new ECM encapsulated Map-Request 642 that does not contain an ECM Authentication Data, as specified in 643 [RFC6830]. The Map-Server does not perform any further LISP-SEC 644 processing. 646 If the S-bit contained in the Map-Register was set the Map-Server 647 decapsulates the ECM and generates a new ECM Authentication Data. 648 The Authentication Data includes the OTK-AD and the EID-AD, that 649 contains EID-prefix authorization information, that are ultimately 650 sent to the requesting ITR. 652 The Map-Server updates the OTK-AD by deriving a new OTK (MS-OTK) from 653 the ITR-OTK received with the Map-Request. MS-OTK is derived 654 applying the key derivation function specified in the KDF ID field. 655 If the algorithm specified in the KDF ID field is not supported, the 656 Map-Server uses a different algorithm to derive the key and updates 657 the KDF ID field accordingly. 659 The Map-Server and the ETR MUST be configured with a shared key for 660 mapping registration according to [RFC6833]. If MS-OTK 661 confidentiality is required, then the MS-OTK SHOULD be encrypted, by 662 wrapping the MS-OTK with the algorithm specified by the OTK 663 Encryption ID field as specified in Section 5.5. 665 The Map-Server includes in the EID-AD the longest match registered 666 EID-prefix for the destination EID, and an HMAC of this EID-prefix. 667 The HMAC is keyed with the ITR-OTK contained in the received ECM 668 Authentication Data, and the HMAC algorithm is chosen according to 669 the Requested HMAC ID field. If The Map-Server does not support this 670 algorithm, the Map-Server uses a different algorithm and specifies it 671 in the EID HMAC ID field. The scope of the HMAC operation covers the 672 entire EID-AD, from the EID-AD Length field to the EID HMAC field, 673 which must be set to 0 before the computation. 675 The Map-Server then forwards the updated ECM encapsulated Map- 676 Request, that contains the OTK-AD, the EID-AD, and the received Map- 677 Request to an authoritative ETR as specified in [RFC6830]. 679 5.7.1. Map-Server Processing in Proxy mode 681 If the Map-Server is in proxy mode, it generates a Map-Reply, as 682 specified in [RFC6830], with the S-bit set to 1. The Map-Reply 683 includes the Authentication Data that contains the EID-AD, computed 684 as specified in Section 5.7, as well as the PKT-AD computed as 685 specified in Section 5.8. 687 5.8. ETR Processing 689 Upon receiving an ECM encapsulated Map-Request with the S-bit set, 690 the ETR decapsulates the ECM message. The OTK field, if encrypted, 691 is decrypted as specified in Section 5.5 to obtain the unencrypted 692 MS-OTK. 694 The ETR then generates a Map-Reply as specified in [RFC6830] and 695 includes the Authentication Data that contains the EID-AD, as 696 received in the encapsulated Map-Request, as well as the PKT-AD. 698 The EID-AD is copied from the Authentication Data of the received 699 encapsulated Map-Request. 701 The PKT-AD contains the HMAC of the whole Map-Reply packet, keyed 702 with the MS-OTK and computed using the HMAC algorithm specified in 703 the Requested HMAC ID field of the received encapsulated Map-Request. 704 If the ETR does not support the Requested HMAC ID, it uses a 705 different algorithm and updates the PKT HMAC ID field accordingly. 706 The scope of the HMAC operation covers the entire PKT-AD, from the 707 Map-Reply Type field to the PKT HMAC field, which must be set to 0 708 before the computation. 710 Finally the ETR sends the Map-Reply to the requesting ITR as 711 specified in [RFC6830]. 713 6. Security Considerations 715 6.1. Mapping System Security 717 The LISP-SEC threat model described in Section 3, assumes that the 718 LISP Mapping System is working properly and eventually delivers Map- 719 Request messages to a Map-Server that is authoritative for the 720 requested EID. 722 Map-Register security, including the right for a LISP entity to 723 register an EID-prefix or to claim presence at an RLOC, is out of the 724 scope of LISP-SEC. 726 6.2. Random Number Generation 728 The ITR-OTK MUST be generated by a properly seeded pseudo-random (or 729 strong random) source. See [RFC4086] for advice on generating 730 security-sensitive random data 732 6.3. Map-Server and ETR Colocation 734 If the Map-Server and the ETR are colocated, LISP-SEC does not 735 provide protection from overclaiming attacks mounted by the ETR. 736 However, in this particular case, since the ETR is within the trust 737 boundaries of the Map-Server, ETR's overclaiming attacks are not 738 included in the threat model. 740 7. IANA Considerations 742 7.1. HMAC functions 744 The following HMAC ID values are defined by this memo for use as 745 Requested HMAC ID, EID HMAC ID, and PKT HMAC ID in the LISP-SEC 746 Authentication Data: 748 Name Number Defined In 749 ------------------------------------------------- 750 NONE 0 751 AUTH-HMAC-SHA-1-96 1 [RFC2104] 752 AUTH-HMAC-SHA-256-128 2 [RFC4634] 754 values 2-65535 are reserved to IANA. 756 HMAC Functions 758 AUTH-HMAC-SHA-1-96 MUST be supported, AUTH-HMAC-SHA-256-128 should be 759 supported. 761 7.2. Key Wrap Functions 763 The following OTK Encryption ID values are defined by this memo for 764 use as OTK key wrap algorithms ID in the LISP-SEC Authentication 765 Data: 767 Name Number Defined In 768 ------------------------------------------------- 769 NULL-KEY-WRAP-128 1 770 AES-KEY-WRAP-128 2 [RFC3394] 772 values 0 and 3-65535 are reserved to IANA. 774 Key Wrap Functions 776 NULL-KEY-WRAP-128, and AES-KEY-WRAP-128 MUST be supported. 778 NULL-KEY-WRAP-128 is used to carry an unencrypted 128-bit OTK, with a 779 64-bit preamble set to 0x0000000000000000 (64 bits). 781 7.3. Key Derivation Functions 783 The following KDF ID values are defined by this memo for use as KDF 784 ID in the LISP-SEC Authentication Data: 786 Name Number Defined In 787 ------------------------------------------------- 788 NONE 0 789 HKDF-SHA1-128 1 [RFC5869] 791 values 2-65535 are reserved to IANA. 793 Key Derivation Functions 795 HKDF-SHA1-128 MUST be supported 797 8. Acknowledgements 799 The authors would like to acknowledge Pere Monclus, Dave Meyer, Dino 800 Farinacci, Brian Weis, David McGrew, Darrel Lewis and Landon Curt 801 Noll for their valuable suggestions provided during the preparation 802 of this document. 804 9. Normative References 806 [I-D.ietf-lisp-threats] 807 Saucez, D., Iannone, L., and O. Bonaventure, "LISP Threats 808 Analysis", draft-ietf-lisp-threats-10 (work in progress), 809 July 2014. 811 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 812 Hashing for Message Authentication", RFC 2104, February 813 1997. 815 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 816 Requirement Levels", BCP 14, RFC 2119, March 1997. 818 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 819 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 821 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 822 Requirements for Security", BCP 106, RFC 4086, June 2005. 824 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 825 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 826 May 2008. 828 [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand 829 Key Derivation Function (HKDF)", RFC 5869, May 2010. 831 [RFC6830] Farinacci, D., Fuller, V., Meyer, D., and D. Lewis, "The 832 Locator/ID Separation Protocol (LISP)", RFC 6830, January 833 2013. 835 [RFC6833] Fuller, V. and D. Farinacci, "Locator/ID Separation 836 Protocol (LISP) Map-Server Interface", RFC 6833, January 837 2013. 839 Authors' Addresses 840 Fabio Maino 841 Cisco Systems 842 170 Tasman Drive 843 San Jose, California 95134 844 USA 846 Email: fmaino@cisco.com 848 Vina Ermagan 849 Cisco Systems 850 170 Tasman Drive 851 San Jose, California 95134 852 USA 854 Email: vermagan@cisco.com 856 Albert Cabellos 857 Technical University of Catalonia 858 c/ Jordi Girona s/n 859 Barcelona 08034 860 Spain 862 Email: acabello@ac.upc.edu 864 Damien Saucez 865 INRIA 866 2004 route des Lucioles - BP 93 867 Sophia Antipolis 868 France 870 Email: damien.saucez@inria.fr