idnits 2.17.1 draft-ietf-lisp-sec-05.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 (October 21, 2013) is 3837 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Missing Reference: 'RFC3339' is mentioned on line 605, but not defined == Missing Reference: 'RFC4634' is mentioned on line 774, but not defined ** Obsolete undefined reference: RFC 4634 (Obsoleted by RFC 6234) == Outdated reference: A later version (-15) exists of draft-ietf-lisp-threats-08 ** 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 24, 2014 A. Cabellos 6 Technical University of Catalonia 7 D. Saucez 8 INRIA 9 O. Bonaventure 10 Universite Catholique de Louvain 11 October 21, 2013 13 LISP-Security (LISP-SEC) 14 draft-ietf-lisp-sec-05 16 Abstract 18 This memo specifies LISP-SEC, a set of security mechanisms that 19 provide origin authentication, integrity and anti-replay protection 20 to LISP's EID-to-RLOC mapping data conveyed via mapping lookup 21 process. LISP-SEC also enables verification of authorization on EID- 22 prefix claims in Map-Reply messages. 24 Requirements Language 26 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 27 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 28 document are to be interpreted as described in [RFC2119]. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on April 24, 2014. 47 Copyright Notice 48 Copyright (c) 2013 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Definition of Terms . . . . . . . . . . . . . . . . . . . . . 3 65 3. LISP-SEC Threat Model . . . . . . . . . . . . . . . . . . . . 4 66 4. Protocol Operations . . . . . . . . . . . . . . . . . . . . . 4 67 5. LISP-SEC Control Messages Details . . . . . . . . . . . . . . 7 68 5.1. Encapsulated Control Message LISP-SEC Extensions . . . . 7 69 5.2. Map-Reply LISP-SEC Extensions . . . . . . . . . . . . . . 9 70 5.3. Map-Register LISP-SEC Extentions . . . . . . . . . . . . 10 71 5.4. ITR Processing . . . . . . . . . . . . . . . . . . . . . 11 72 5.4.1. Map-Reply Record Validation . . . . . . . . . . . . . 12 73 5.4.2. PITR Processing . . . . . . . . . . . . . . . . . . . 13 74 5.5. Encrypting and Decrypting an OTK . . . . . . . . . . . . 13 75 5.6. Map-Resolver Processing . . . . . . . . . . . . . . . . . 14 76 5.7. Map-Server Processing . . . . . . . . . . . . . . . . . . 14 77 5.7.1. Map-Server Processing in Proxy mode . . . . . . . . . 15 78 5.8. ETR Processing . . . . . . . . . . . . . . . . . . . . . 15 79 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 80 6.1. Mapping System Security . . . . . . . . . . . . . . . . . 16 81 6.2. Random Number Generation . . . . . . . . . . . . . . . . 16 82 6.3. Map-Server and ETR Colocation . . . . . . . . . . . . . . 17 83 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 84 7.1. HMAC functions . . . . . . . . . . . . . . . . . . . . . 17 85 7.2. Key Wrap Functions . . . . . . . . . . . . . . . . . . . 17 86 7.3. Key Derivation Functions . . . . . . . . . . . . . . . . 18 87 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 88 9. Normative References . . . . . . . . . . . . . . . . . . . . 18 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 91 1. Introduction 93 The Locator/ID Separation Protocol [RFC6830] defines a set of 94 functions for routers to exchange information used to map from non- 95 routable Endpoint Identifiers (EIDs) to routable Routing Locators 96 (RLOCs). If these EID-to-RLOC mappings, carried through Map-Reply 97 messages, are transmitted without integrity protection, an adversary 98 can manipulate them and hijack the communication, impersonate the 99 requested EID or mount Denial of Service or Distributed Denial of 100 Service attacks. Also, if the Map-Reply message is transported 101 unauthenticated, an adversarial LISP entity can overclaim an EID- 102 prefix and maliciously redirect traffic directed to a large number of 103 hosts. A detailed description of "overclaiming" attack is provided 104 in [I-D.ietf-lisp-threats]. 106 This memo specifies LISP-SEC, a set of security mechanisms that 107 provide origin authentication, integrity and anti-replay protection 108 to LISP's EID-to-RLOC mapping data conveyed via mapping lookup 109 process. LISP-SEC also enables verification of authorization on EID- 110 prefix claims in Map-Reply messages, ensuring that the sender of a 111 Map-Reply that provides the location for a given EID-prefix is 112 entitled to do so according to the EID prefix registered in the 113 associated Map Server. Map-Register security, including the right 114 for a LISP entity to register an EID-prefix or to claim presence at 115 an RLOC, is out of the scope of LISP-SEC. Additional security 116 considerations are described in Section 6. 118 2. Definition of Terms 120 One-Time Key (OTK): An ephemeral randomly generated key that must 121 be used for a single Map-Request/Map-Reply exchange. 123 ITR-OTK: The One-Time Key generated at the ITR. 125 MS-OTK: The One-Time Key generated at the Map-Server. 127 Encapsulated Control Message (ECM): A LISP control message that is 128 prepended with an additional LISP header. ECM is used by ITRs to 129 send LISP control messages to a Map-Resolver, by Map-Resolvers to 130 forward LISP control messages to a Map-Server, and by Map- 131 Resolvers to forward LISP control messages to an ETR. 133 Authentication Data (AD): Metadata that is included either in a 134 LISP ECM header or in a Map-Reply message to support 135 confidentiality, integrity protection, and verification of EID- 136 prefix authorization. 138 OTK-AD: The portion of ECM Authentication Data that contains a 139 One-Time Key. 141 EID-AD: The portion of ECM and Map-Reply Authentication Data 142 used for verification of EID-prefix authorization. 144 PKT-AD: The portion of Map-Reply Authentication Data used to 145 protect the integrity of the Map-Reply message. 147 For definitions of other terms, notably Map-Request, Map-Reply, 148 Ingress Tunnel Router (ITR), Egress Tunnel Router (ETR), Map-Server 149 (MS) and Map-Resolver (MR) please consult the LISP specification 150 [RFC6830]. 152 3. LISP-SEC Threat Model 154 LISP-SEC addresses the control plane threats, described in 155 [I-D.ietf-lisp-threats], that target EID-to-RLOC mappings, including 156 manipulations of Map-Request and Map-Reply messages, and malicious 157 ETR EID prefix overclaiming. However LISP-SEC makes two main 158 assumptions that are not part of [I-D.ietf-lisp-threats]. First, the 159 LISP mapping system is expected to deliver a Map-Request message to 160 their intended destination ETR as identified by the EID. Second, no 161 man-in-the-middle attack can be mounted within the LISP Mapping 162 System. Furthermore, while LISP-SEC enables detection of EID prefix 163 overclaiming attacks, it assumes that Map Servers can verify the EID 164 prefix authorization at time of registration. 166 According to the threat model described in [I-D.ietf-lisp-threats] 167 LISP-SEC assumes that any kind of attack, including MITM attacks, can 168 be mounted in the access network, outside of the boundaries of the 169 LISP mapping system. An on-path attacker, outside of the LISP 170 mapping system can, for example, hijack Map-Request and Map-Reply 171 messages, spoofing the identity of a LISP node. Another example of 172 on-path attack, called over claiming attack, can be mounted by a 173 malicious Egress Tunnel Router (ETR), by overclaiming the EID- 174 prefixes for which it is authoritative. In this way the ETR can 175 maliciously redirect traffic directed to a large number of hosts. 177 4. Protocol Operations 179 The goal of the security mechanisms defined in [RFC6830] is to 180 prevent unauthorized insertion of mapping data by providing origin 181 authentication and integrity protection for the Map-Registration, and 182 by using the nonce to detect unsolicited Map-Reply sent by off-path 183 attackers. 185 LISP-SEC builds on top of the security mechanisms defined in 186 [RFC6830] to address the threats described in Section 3 by leveraging 187 the trust relationships existing among the LISP entities 188 participating to the exchange of the Map-Request/Map-Reply messages. 189 Those trust relationships are used to securely distribute a One-Time 190 Key (OTK) that provides origin authentication, integrity and anti- 191 replay protection to mapping data conveyed via the mapping lookup 192 process, and that effectively prevent over claiming attacks. The 193 processing of security parameters during the Map-Request/Map-Reply 194 exchange is as follows: 196 o The ITR-OTK is generated and stored at the ITR, and securely 197 transported to the Map-Server. 199 o The Map-Server uses the ITR-OTK to compute an HMAC that protects 200 the integrity of the mapping data known to the Map-Server to 201 prevent overclaiming attacks. The Map-Server also derives a new 202 OTK, the MS-OTK, that is passed to the ETR, by applying a Key 203 Derivation Function (KDF) to the ITR-OTK. 205 o The ETR uses the MS-OTK to compute an HMAC that protects the 206 integrity of the Map-Reply sent to the ITR. 208 o Finally, the ITR uses the stored ITR-OTK to verify the integrity 209 of the mapping data provided by both the Map-Server and the ETR, 210 and to verify that no overclaiming attacks were mounted along the 211 path between the Map-Server and the ITR. 213 Section 5 provides the detailed description of the LISP-SEC control 214 messages and their processing, while the rest of this section 215 describes the flow of protocol operations at each entity involved in 216 the Map-Request/Map-Reply exchange: 218 o The ITR, upon needing to transmit a Map-Request message, generates 219 and stores an OTK (ITR-OTK). This ITR-OTK is included into the 220 Encapsulated Control Message (ECM) that contains the Map-Request 221 sent to the Map-Resolver. To provide confidentiality to the ITR- 222 OTK over the path between the ITR and its Map-Resolver, the ITR- 223 OTK SHOULD be encrypted using a preconfigured key shared between 224 the ITR and the Map-Resolver, similar to the key shared between 225 the ETR and the Map-Server in order to secure ETR registration 226 [RFC6833]. 228 o The Map-Resolver decapsulates the ECM message, decrypts the ITR- 229 OTK, if needed, and forwards through the Mapping System the 230 received Map-Request and the ITR-OTK, as part of a new ECM 231 message. As described in Section 5.6, the LISP Mapping System 232 delivers the ECM to the appropriate Map-Server, as identified by 233 the EID destination address of the Map-Request. 235 o The Map-Server is configured with the location mappings and policy 236 information for the ETR responsible for the EID destination 237 address. Using this preconfigured information, the Map-Server, 238 after the decapsulation of the ECM message, finds the longest 239 match EID-prefix that covers the requested EID in the received 240 Map-Request. The Map-Server adds this EID-prefix, together with 241 an HMAC computed using the ITR-OTK, to a new Encapsulated Control 242 Message that contains the received Map-Request. 244 o The Map-Server derives a new OTK, the MS-OTK, by applying a Key 245 Derivation Function (KDF) to the ITR-OTK. This MS-OTK is included 246 in the Encapsulated Control Message that the Map Server uses to 247 forward the Map-Request to the ETR. To provide MS-OTK 248 confidentiality over the path between the Map-Server and the ETR, 249 the MS-OTK should be encrypted using the key shared between the 250 ETR and the Map-Server in order to secure ETR registration 251 [RFC6833]. 253 o If the Map-Server is acting in proxy mode, as specified in 254 [RFC6830], the ETR is not involved in the generation of the Map- 255 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 ECM encapsulated Map-Request from the 259 Map-Server, decrypts the MS-OTK, if needed, and originates a 260 standard Map-Reply that contains the EID-to-RLOC mapping 261 information as specified in [RFC6830]. 263 o The ETR computes an HMAC over this standard Map-Reply, keyed with 264 MS-OTK to protect the integrity of the whole Map-Reply. The ETR 265 also copies the EID-prefix authorization data that the Map-Server 266 included in the ECM encapsulated Map-Request into the Map-Reply 267 message. The ETR then sends this complete Map-Reply message to 268 the requesting ITR. 270 o The ITR, upon receiving the Map-Reply, uses the locally stored 271 ITR-OTK to verify the integrity of the EID-prefix authorization 272 data included in the Map-Reply by the Map-Server. The ITR 273 computes the MS-OTK by applying the same KDF used by the Map- 274 Server, and verifies the integrity of the Map-Reply. If the 275 integrity checks fail, the Map-Reply MUST be discarded. Also, if 276 the EID-prefixes claimed by the ETR in the Map-Reply are not equal 277 or more specific than the EID-prefix authorization data inserted 278 by the Map-Server, the ITR MUST discard the Map-Reply. 280 5. LISP-SEC Control Messages Details 282 LISP-SEC metadata associated with a Map-Request is transported within 283 the Encapsulated Control Message that contains the Map-Request. 285 LISP-SEC metadata associated with the Map-Reply is transported within 286 the Map-Reply itself. 288 5.1. Encapsulated Control Message LISP-SEC Extensions 290 LISP-SEC uses the ECM (Encapsulated Control Message) defined in 291 [RFC6830] with Type set to 8, and S bit set to 1 to indicate that the 292 LISP header includes Authentication Data (AD). The format of the 293 LISP-SEC ECM Authentication Data is defined in the following figure. 294 OTK-AD stands for One-Time Key Authentication Data and EID-AD stands 295 for EID Authentication Data. 297 0 1 2 3 298 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 299 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 300 | AD Type |V| Reserved | Requested HMAC ID | 301 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ 302 | OTK Length | OTK Encryption ID | | 303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 304 | One-Time-Key Preamble ... | | 305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ OTK-AD 306 | ... One-Time-Key Preamble | | 307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 308 ~ One-Time Key (128 bits) ~/ 309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 310 | EID-AD Length | KDF ID | | 311 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 312 | Record Count | Reserved | EID HMAC ID | EID-AD 313 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | 314 | Reserved | EID mask-len | EID-AFI | | | 315 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | 316 ~ EID-prefix ... ~ | | 317 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | 318 ~ EID HMAC ~ | 319 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 321 LISP-SEC ECM Authentication Data 323 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 [RFC6830], with Type set to 2, 387 and S bit set to 1 to indicate that the Map-Reply message includes 388 Authentication Data (AD). The format of the LISP-SEC Map-Reply 389 Authentication Data is defined in the following figure. PKT-AD is 390 the Packet Authentication Data that covers the Map-Reply payload. 392 0 1 2 3 393 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 394 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 395 | AD Type | Reserved | 396 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 397 | EID-AD Length | KDF ID | | 398 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 399 | Record Count | Reserved | EID HMAC ID | EID-AD 400 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | 401 | Reserved | EID mask-len | EID-AFI | | | 402 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | 403 ~ EID-prefix ... ~ | | 404 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | 405 ~ EID HMAC ~ | 406 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ 407 | PKT-AD Length | PKT HMAC ID |\ 408 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 409 ~ PKT HMAC ~ PKT-AD 410 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ 412 LISP-SEC Map-Reply Authentication Data 414 AD Type: 1 (LISP-SEC Authentication Data) 416 EID-AD Length: length (in bytes) of the EID-AD. An EID-AD MAY 417 contain multiple EID-records. Each EID-record is 4-byte long plus 418 the length of the AFI-encoded EID-prefix. 420 KDF ID: Identifier of the Key Derivation Function used to derive 421 MS-OTK. See Section 5.7 for more details. 423 Record Count: The number of records in this Map-Reply message. A 424 record is comprised of the portion of the packet that is labeled 425 'Rec' above and occurs the number of times equal to Record Count. 427 Reserved: Set to 0 on transmission and ignored on receipt. 429 EID HMAC ID: Identifier of the HMAC algorithm used to protect the 430 integrity of the EID-AD. See Section 5.7 for more details. 432 EID mask-len: Mask length for EID-prefix. 434 EID-AFI: Address family of EID-prefix according to [RFC5226]. 436 EID-prefix: This field contains an EID-prefix that the destination 437 ETR is authoritative for, and is the longest match for the 438 requested EID. 440 EID HMAC: HMAC of the EID-AD, as computed by the Map-Server. 441 Before computing the HMAC operation the EID HMAC field MUST be set 442 to 0. The HMAC covers the entire EID-AD. 444 PKT-AD Length: length (in bytes) of the Packet Authentication Data 445 (PKT-AD). 447 PKT HMAC ID: Identifier of the HMAC algorithm used to protect the 448 integrity of the Map-reply Location Data. 450 PKT HMAC: HMAC of the whole Map-Reply packet, including the LISP- 451 SEC Authentication Data. The scope of the authentication goes 452 from the Map-Reply Type field to the PKT HMAC field included. 453 Before computing the HMAC operation the PKT HMAC field MUST be set 454 to 0. See Section 5.8 for more details. 456 5.3. Map-Register LISP-SEC Extentions 458 The second bit after the Type field in a Map-Register message is 459 allocated as the S bit. The S bit indicates to the Map-Server that 460 the registering ETR is LISP-SEC enabled. An ETR that supports LISP- 461 SEC MUST set the S bit in its Map-Register messages. 463 5.4. ITR Processing 465 Upon creating a Map-Request, the ITR generates a random ITR-OTK that 466 is stored locally, together with the nonce generated as specified in 467 [RFC6830]. 469 The Map-Request MUST be encapsulated in an ECM, with the S-bit set to 470 1, to indicate the presence of Authentication Data. If the ITR and 471 the Map-Resolver are configured with a shared key, the ITR-OTK 472 confidentiality SHOULD be protected by wrapping the ITR-OTK with the 473 algorithm specified by the OTK Encryption ID field. See Section 5.5 474 for further details on OTK encryption. 476 The Requested HMAC ID field contains the suggested HMAC algorithm to 477 be used by the Map-Server and the ETR to protect the integrity of the 478 ECM Authentication data and of the Map-Reply. 480 The KDF ID field, specifies the suggested key derivation function to 481 be used by the Map-Server to derive the MS-OTK. 483 The EID-AD length is set to 4 bytes, since the Authentication Data 484 does not contain EID-prefix Authentication Data, and the EID-AD 485 contains only the KDF ID field. 487 In response to an encapsulated Map-Request that has the S-bit set, an 488 ITR MUST receive a Map-Reply with the S-bit set, that includes an 489 EID-AD and a PKT-AD. If the Map-Reply does not include both ADs, the 490 ITR MUST discard it. In response to an encapsulated Map-Request with 491 S-bit set to 0, the ITR expects a Map-Reply with S-bit set to 0, and 492 the ITR SHOULD discard the Map-Reply if the S-bit is set. 494 Upon receiving a Map-Reply, the ITR must verify the integrity of both 495 the EID-AD and the PKT-AD, and MUST discard the Map-Reply if one of 496 the integrity checks fails. 498 The integrity of the EID-AD is verified using the locally stored ITR- 499 OTK to re-compute the HMAC of the EID-AD using the algorithm 500 specified in the EID HMAC ID field. If the EID HMAC ID field does 501 not match the Requested HMAC ID the ITR SHOULD discard the Map-Reply 502 and send, at the first opportunity it needs to, a new Map-Request 503 with a different Requested HMAC ID field, according to ITR's local 504 policy. The ITR MUST set the EID HMAC ID field to 0 before computing 505 the HMAC. 507 To verify the integrity of the PKT-AD, first the MS-OTK is derived 508 from the locally stored ITR-OTK using the algorithm specified in the 509 KDF ID field. This is because the PKT-AD is generated by the ETR 510 using the MS-OTK. If the KDF ID in the Map-Reply does not match the 511 KDF ID requested in the Map-Request, the ITR SHOULD discard the Map- 512 Reply and send, at the first opportunity it needs to, a new Map- 513 Request with a different KDF ID, according to ITR's local policy. 514 The derived MS-OTK is then used to re-compute the HMAC of the PKT-AD 515 using the Algorithm specified in the PKT HMAC ID field. If the PKT 516 HMAC ID field does not match the Requested HMAC ID the ITR SHOULD 517 discard the Map-Reply and send, at the first opportunity it needs to, 518 a new Map-Request with a different Requested HMAC ID according to 519 ITR's local policy. 521 Each individual Map-Reply EID-record is considered valid only if: (1) 522 both EID-AD and PKT-AD are valid, and (2) the intersection of the 523 EID-prefix in the Map-Reply EID-record with one of the EID-prefixes 524 contained in the EID-AD is not empty. After identifying the Map- 525 Reply record as valid, the ITR sets the EID-prefix in the Map-Reply 526 record to the value of the intersection set computed before, and adds 527 the Map-Reply EID-record to its EID-to-RLOC cache, as described in 528 [RFC6830]. An example of Map-Reply record validation is provided in 529 Section 5.4.1. 531 The ITR SHOULD send SMR triggered Map Requests over the mapping 532 system in order to receive a secure Map-Reply. If an ITR accepts 533 piggybacked Map-Replies, it SHOULD also send a Map-Request over the 534 mapping system in order to securely verify the piggybacked Map-Reply. 536 5.4.1. Map-Reply Record Validation 538 The payload of a Map-Reply may contain multiple EID-records. The 539 whole Map-Reply is signed by the ETR, with the PKT HMAC, to provide 540 integrity protection and origin authentication to the EID-prefix 541 records claimed by the ETR. The Authentication Data field of a Map- 542 Reply may contain multiple EID-records in the EID-AD. The EID-AD is 543 signed by the Map-Server, with the EID HMAC, to provide integrity 544 protection and origin authentication to the EID-prefix records 545 inserted by the Map-Server. 547 Upon receiving a Map-Reply with the S-bit set, the ITR first checks 548 the validity of both the EID HMAC and of the PKT-AD HMAC. If either 549 one of the HMACs is not valid, a log message is issued and the Map- 550 Reply is not processed any further. If both HMACs are valid, the ITR 551 proceeds with validating each individual EID-record claimed by the 552 ETR by computing the intersection of each one of the EID-prefix 553 contained in the payload of the Map-Reply with each one of the EID- 554 prefixes contained in the EID-AD. An EID-record is valid only if at 555 least one of the intersections is not the empty set. 557 For instance, the Map-Reply payload contains 3 mapping record EID- 558 prefixes: 560 1.1.1.0/24 562 1.1.2.0/24 564 1.2.0.0/16 566 The EID-AD contains two EID-prefixes: 568 1.1.2.0/24 570 1.2.3.0/24 572 The EID-record with EID-prefix 1.1.1.0/24 is not processed since it 573 is not included in any of the EID-ADs signed by the Map-Server. A 574 log message is issued. 576 The EID-record with EID-prefix 1.1.2.0/24 is stored in the map-cache 577 because it matches the second EID-prefix contained in the EID-AD. 579 The EID-record with EID-prefix 1.2.0.0/16 is not processed since it 580 is not included in any of the EID-ADs signed by the Map-Server. A 581 log message is issued. In this last example the ETR is trying to 582 over claim the EID-prefix 1.2.0.0/16, but the Map-Server authorized 583 only 1.2.3.0/24, hence the EID-record is discarded. 585 5.4.2. PITR Processing 587 The processing performed by a PITR is equivalent to the processing of 588 an ITR. However, if the PITR is directly connected to the ALT, the 589 PITR performs the functions of both the ITR and the Map-Resolver 590 forwarding the Map-Request encapsulated in an ECM header that 591 includes the Authentication Data fields as described in Section 5.6. 593 5.5. Encrypting and Decrypting an OTK 595 MS-OTK confidentiality is required in the path between the Map-Server 596 and the ETR, the MS-OTK SHOULD be encrypted using the preconfigured 597 key shared between the Map-Server and the ETR for the purpose of 598 securing ETR registration [RFC6833]. Similarly, if ITR-OTK 599 confidentiality is required in the path between the ITR and the Map- 600 Resolver, the ITR-OTK SHOULD be encrypted with a key shared between 601 the ITR and the Map-Resolver. 603 The OTK is encrypted using the algorithm specified in the OTK 604 Encryption ID field. When the AES Key Wrap algorithm is used to 605 encrypt a 128-bit OTK, according to [RFC3339], the AES Key Wrap 606 Initialization Value MUST be set to 0xA6A6A6A6A6A6A6A6 (64 bits). 607 The output of the AES Key Wrap operation is 192-bit long. The most 608 significant 64-bit are copied in the One-Time Key Preamble field, 609 while the 128 less significant bits are copied in the One-Time Key 610 field of the LISP-SEC Authentication Data. 612 When decrypting an encrypted OTK the receiver MUST verify that the 613 Initialization Value resulting from the AES Key Wrap decryption 614 operation is equal to 0xA6A6A6A6A6A6A6A6. If this verification fails 615 the receiver MUST discard the entire message. 617 When a 128-bit OTK is sent unencrypted the OTK Encryption ID is set 618 to NULL_KEY_WRAP_128, and the OTK Preamble is set to 619 0x0000000000000000 (64 bits). 621 5.6. Map-Resolver Processing 623 Upon receiving an encapsulated Map-Request with the S-bit set, the 624 Map-Resolver decapsulates the ECM message. The ITR-OTK, if 625 encrypted, is decrypted as specified in Section 5.5. 627 The Map-Resolver, as specified in [RFC6833], originates a new ECM 628 header with the S-bit set, that contains the unencrypted ITR-OTK, as 629 specified in Section 5.5, and the other data derived from the ECM 630 Authentication Data of the received encapsulated Map-Request. 632 The Map-Resolver then forwards the received Map-Request, encapsulated 633 in the new ECM header that includes the newly computed Authentication 634 Data fields. 636 5.7. Map-Server Processing 638 Upon receiving an ECM encapsulated Map-Request with the S-bit set, 639 the Map-Server process the Map-Request according to the value of the 640 S-bit contained in the Map-Register sent by the ETR during 641 registration. 643 If the S-bit contained in the Map-Register was clear the Map-Server 644 decapsulates the ECM and generates a new ECM encapsulated Map-Request 645 that does not contain an ECM Authentication Data, as specified in 646 [RFC6830]. The Map-Server does not perform any further LISP-SEC 647 processing. 649 If the S-bit contained in the Map-Register was set the Map-Server 650 decapsulates the ECM and generates a new ECM Authentication Data. 651 The Authentication Data includes the OTK-AD and the EID-AD, that 652 contains EID-prefix authorization information, that are ultimately 653 sent to the requesting ITR. 655 The Map-Server updates the OTK-AD by deriving a new OTK (MS-OTK) from 656 the ITR-OTK received with the Map-Request. MS-OTK is derived 657 applying the key derivation function specified in the KDF ID field. 658 If the algorithm specified in the KDF ID field is not supported, the 659 Map-Server uses a different algorithm to derive the key and updates 660 the KDF ID field accordingly. 662 The Map-Server and the ETR MUST be configured with a shared key for 663 mapping registration according to [RFC6833]. If MS-OTK 664 confidentiality is required, then the MS-OTK SHOULD be encrypted, by 665 wrapping the MS-OTK with the algorithm specified by the OTK 666 Encryption ID field as specified in Section 5.5. 668 The Map-Server includes in the EID-AD the longest match registered 669 EID-prefix for the destination EID, and an HMAC of this EID-prefix. 670 The HMAC is keyed with the ITR-OTK contained in the received ECM 671 Authentication Data, and the HMAC algorithm is chosen according to 672 the Requested HMAC ID field. If The Map-Server does not support this 673 algorithm, the Map-Server uses a different algorithm and specifies it 674 in the EID HMAC ID field. The scope of the HMAC operation covers the 675 entire EID-AD, from the EID-AD Length field to the EID HMAC field, 676 which must be set to 0 before the computation. 678 The Map-Server then forwards the updated ECM encapsulated Map- 679 Request, that contains the OTK-AD, the EID-AD, and the received Map- 680 Request to an authoritative ETR as specified in [RFC6830]. 682 5.7.1. Map-Server Processing in Proxy mode 684 If the Map-Server is in proxy mode, it generates a Map-Reply, as 685 specified in [RFC6830], with the S-bit set to 1. The Map-Reply 686 includes the Authentication Data that contains the EID-AD, computed 687 as specified in Section 5.7, as well as the PKT-AD computed as 688 specified in Section 5.8. 690 5.8. ETR Processing 692 Upon receiving an ECM encapsulated Map-Request with the S-bit set, 693 the ETR decapsulates the ECM message. The OTK field, if encrypted, 694 is decrypted as specified in Section 5.5 to obtain the unencrypted 695 MS-OTK. 697 The ETR then generates a Map-Reply as specified in [RFC6830] and 698 includes the Authentication Data that contains the EID-AD, as 699 received in the encapsulated Map-Request, as well as the PKT-AD. 701 The EID-AD is copied from the Authentication Data of the received 702 encapsulated Map-Request. 704 The PKT-AD contains the HMAC of the whole Map-Reply packet, keyed 705 with the MS-OTK and computed using the HMAC algorithm specified in 706 the Requested HMAC ID field of the received encapsulated Map-Request. 707 If the ETR does not support the Requested HMAC ID, it uses a 708 different algorithm and updates the PKT HMAC ID field accordingly. 709 The scope of the HMAC operation covers the entire PKT-AD, from the 710 Map-Reply Type field to the PKT HMAC field, which must be set to 0 711 before the computation. 713 Finally the ETR sends the Map-Reply to the requesting ITR as 714 specified in [RFC6830]. 716 6. Security Considerations 718 6.1. Mapping System Security 720 The LISP-SEC threat model described in Section 3, assumes that the 721 LISP Mapping System is working properly and eventually delivers Map- 722 Request messages to a Map-Server that is authoritative for the 723 requested EID. 725 Security is not yet embedded in LISP+ALT but BGP route filtering 726 SHOULD be deployed in the ALT infrastructure to enforce proper 727 routing in the mapping system. The SIDR working group is currently 728 addressing prefix and route advertisement authorization and 729 authentication for BGP. While following SIDR recommendations in the 730 global Internet will take time, applying these recommendations to the 731 ALT, which relies on BGP, should be less complex, as ALT is currently 732 small and with a limited number of operators. Ultimately, deploying 733 the SIDR recommendations in ALT further ensures that the fore 734 mentioned assumption is true. 736 It is also assumed that no man-in-the-middle attack can be carried 737 out against the ALT router to ALT router tunnels, and that the 738 information included into the Map-Requests, in particular the OTK, 739 cannot be read by third-party entities. It should be noted that the 740 integrity of the Map-Request in the ALT is protected by BGP 741 authentication, and that in order to provide OTK confidentiality in 742 the ALT mapping system the ALT router to ALT router tunnels MAY be 743 deployed using IPsec (ESP). 745 Map-Register security, including the right for a LISP entity to 746 register an EID-prefix or to claim presence at an RLOC, is out of the 747 scope of LISP-SEC. 749 6.2. Random Number Generation 750 The ITR-OTK MUST be generated by a properly seeded pseudo-random (or 751 strong random) source. See [RFC4086] for advice on generating 752 security-sensitive random data 754 6.3. Map-Server and ETR Colocation 756 If the Map-Server and the ETR are colocated, LISP-SEC does not 757 provide protection from overclaiming attacks mounted by the ETR. 758 However, in this particular case, since the ETR is within the trust 759 boundaries of the Map-Server, ETR's overclaiming attacks are not 760 included in the threat model. 762 7. IANA Considerations 764 7.1. HMAC functions 766 The following HMAC ID values are defined by this memo for use as 767 Requested HMAC ID, EID HMAC ID, and PKT HMAC ID in the LISP-SEC 768 Authentication Data: 770 Name Number Defined In 771 ------------------------------------------------- 772 NONE 0 773 AUTH-HMAC-SHA-1-96 1 [RFC2104] 774 AUTH-HMAC-SHA-256-128 2 [RFC4634] 776 values 2-65535 are reserved to IANA. 778 HMAC Functions 780 AUTH-HMAC-SHA-1-96 MUST be supported, AUTH-HMAC-SHA-256-128 should be 781 supported. 783 7.2. Key Wrap Functions 785 The following OTK Encryption ID values are defined by this memo for 786 use as OTK key wrap algorithms ID in the LISP-SEC Authentication 787 Data: 789 Name Number Defined In 790 ------------------------------------------------- 791 NULL-KEY-WRAP-128 1 792 AES-KEY-WRAP-128 2 [RFC3394] 794 values 0 and 3-65535 are reserved to IANA. 796 Key Wrap Functions 798 NULL-KEY-WRAP-128, and AES-KEY-WRAP-128 MUST be supported. 800 NULL-KEY-WRAP-128 is used to carry an unencrypted 128-bit OTK, with a 801 64-bit preamble set to 0x0000000000000000 (64 bits). 803 7.3. Key Derivation Functions 805 The following KDF ID values are defined by this memo for use as KDF 806 ID in the LISP-SEC Authentication Data: 808 Name Number Defined In 809 ------------------------------------------------- 810 NONE 0 811 HKDF-SHA1-128 1 [RFC5869] 813 values 2-65535 are reserved to IANA. 815 Key Derivation Functions 817 HKDF-SHA1-128 MUST be supported 819 8. Acknowledgements 821 The authors would like to acknowledge Pere Monclus, Dave Meyer, Dino 822 Farinacci, Brian Weis, David McGrew, Darrel Lewis and Landon Curt 823 Noll for their valuable suggestions provided during the preparation 824 of this document. 826 9. Normative References 828 [I-D.ietf-lisp-threats] 829 Saucez, D., Iannone, L., and O. Bonaventure, "LISP Threats 830 Analysis", draft-ietf-lisp-threats-08 (work in progress), 831 October 2013. 833 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 834 Hashing for Message Authentication", RFC 2104, February 835 1997. 837 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 838 Requirement Levels", BCP 14, RFC 2119, March 1997. 840 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 841 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 843 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 844 Requirements for Security", BCP 106, RFC 4086, June 2005. 846 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 847 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 848 May 2008. 850 [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand 851 Key Derivation Function (HKDF)", RFC 5869, May 2010. 853 [RFC6830] Farinacci, D., Fuller, V., Meyer, D., and D. Lewis, "The 854 Locator/ID Separation Protocol (LISP)", RFC 6830, January 855 2013. 857 [RFC6833] Fuller, V. and D. Farinacci, "Locator/ID Separation 858 Protocol (LISP) Map-Server Interface", RFC 6833, January 859 2013. 861 Authors' Addresses 863 Fabio Maino 864 Cisco Systems 865 170 Tasman Drive 866 San Jose, California 95134 867 USA 869 Email: fmaino@cisco.com 871 Vina Ermagan 872 Cisco Systems 873 170 Tasman Drive 874 San Jose, California 95134 875 USA 877 Email: vermagan@cisco.com 879 Albert Cabellos 880 Technical University of Catalonia 881 c/ Jordi Girona s/n 882 Barcelona 08034 883 Spain 885 Email: acabello@ac.upc.edu 886 Damien Saucez 887 INRIA 888 2004 route des Lucioles - BP 93 889 Sophia Antipolis 890 France 892 Email: damien.saucez@inria.fr 894 Olivier Bonaventure 895 Universite Catholique de Louvain 896 Place St. Barbe 2 897 Louvain-la-Neuve 898 Belgium 900 Email: olivier.bonaventure@uclouvain.be