Network Working Group F. Maino Internet-DraftV. ErmaganCisco Systems Intended status: Standards TrackCisco SystemsV. Ermagan Expires:June 2,December 4, 2019 Google A. Cabellos Universitat Politecnica de Catalunya D. Saucez INRIANovember 29, 2018June 2, 2019 LISP-Security (LISP-SEC)draft-ietf-lisp-sec-17draft-ietf-lisp-sec-18 Abstract This memo specifies LISP-SEC, a set of security mechanisms that provides origin authentication, integrity and anti-replay protection to LISP's EID-to-RLOC mapping data conveyed via mapping lookup process. LISP-SEC also enables verification of authorization on EID- prefix claims in Map-Reply messages. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in[RFC2119].BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onJune 2,December 4, 2019. Copyright Notice Copyright (c)20182019 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Definition of Terms . . . . . . . . . . . . . . . . . . . . .34 3. LISP-SEC Threat Model . . . . . . . . . . . . . . . . . . . . 4 4. Protocol Operations . . . . . . . . . . . . . . . . . . . . . 5 5. LISP-SEC Control Messages Details . . . . . . . . . . . . . . 7 5.1. Encapsulated Control Message LISP-SEC Extensions . . . . 7 5.2. Map-Reply LISP-SEC Extensions . . . . . . . . . . . . . .910 5.3. Map-Register LISP-SEC Extentions . . . . . . . . . . . . 11 5.4. ITRProcessingProcessing: Generating a Map-Request . . . . . . . . 12 5.4.1. PITR Processing . . . . . . . . . . . . . .11 5.4.1. Map-Reply Record Validation. . . . . 12 5.5. Encrypting and Decrypting an OTK . . . . . . . .13 5.4.2. PITR Processing. . . . 12 5.5.1. Unencrypted OTK . . . . . . . . . . . . . . . . . . . 145.5. Encrypting and Decrypting an OTK5.6. Map-Resolver Processing . . . . . . . . . . . . . . . . . 145.6. Map-Resolver5.7. Map-Server Processing . . . . . . . . . . . . . . . . . . 155.7. Map-Server Processing5.7.1. Generating a LISP-SEC Protected Encapsulated Map- Request . . . . . . . . . . . . . . . . . .15 5.7.1. Map-Server Processing in. . . . . 17 5.7.2. Generating a ProxymodeMap-Reply . . . . . . . . . . .16. 18 5.8. ETR Processing . . . . . . . . . . . . . . . . . . . . .1618 5.9. ITR Processing: Receiving a Map-Reply . . . . . . . . . . 18 5.9.1. Map-Reply Record Validation . . . . . . . . . . . . . 20 6. Security Considerations . . . . . . . . . . . . . . . . . . .1721 6.1. Mapping System Security . . . . . . . . . . . . . . . . .1721 6.2. Random Number Generation . . . . . . . . . . . . . . . .1721 6.3. Map-Server and ETR Colocation . . . . . . . . . . . . . .1721 6.4. Deploying LISP-SEC . . . . . . . . . . . . . . . . . . .1821 6.5. Shared Keys Provisioning . . . . . . . . . . . . . . . .1822 6.6. Replay Attacks . . . . . . . . . . . . . . . . . . . . .1822 6.7. Message Privacy . . . . . . . . . . . . . . . . . . . . .1922 6.8. Denial of Service and Distributed Denial of Service Attacks . . . . . . . . . . . . . . . . . . . . . . . . .1923 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . .1923 7.1. ECM AD Type Registry . . . . . . . . . . . . . . . . . .1923 7.2. Map-Reply AD Type Registry . . . . . . . . . . . . . . .1923 7.3. HMAC Functions . . . . . . . . . . . . . . . . . . . . .2024 7.4. Key Wrap Functions . . . . . . . . . . . . . . . . . . .2024 7.5. Key Derivation Functions . . . . . . . . . . . . . . . .2125 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .2125 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 9.1. Normative References . . . . . . . . . . . . . . . . . . 25 9.2. Informative References . .21. . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .2327 1. Introduction The Locator/ID Separation Protocol [I-D.ietf-lisp-rfc6830bis],[I-D.ietf-lisp-rfc6833bis] is a network- layer-based protocol that enables separation of IP addresses into two new numbering spaces: Endpoint Identifiers (EIDs) and Routing Locators (RLOCs). EID-to-RLOC mappings are stored in a database, the LISP Mapping System, and made available via the Map-Request/Map-Reply lookup process. If these EID-to-RLOC mappings, carried through Map- Reply messages, are transmitted without integrity protection, an adversary can manipulate them and hijack the communication, impersonate the requested EID, or mount Denial of Service or Distributed Denial of Service attacks. Also, if the Map-Reply message is transported unauthenticated, an adversarial LISP entity can overclaim an EID-prefix and maliciously redirect traffic directed to a large number of hosts. The LISP-SEC threat model, described in Section 3, is built on top of the LISP threat model defined in [RFC7835], that includes a detailed description of "overclaiming" attack. This memo specifies LISP-SEC, a set of security mechanisms that provides origin authentication, integrity and anti-replay protection to LISP's EID-to-RLOC mapping data conveyed via mapping lookup process. LISP-SEC also enables verification of authorization on EID- prefix claims in Map-Reply messages, ensuring that the sender of a Map-Reply that provides the location for a given EID-prefix is entitled to do so according to the EID prefix registered in the associated Map-Server.Map-RegisterMap-Register/Map-Notify security, including the right for a LISP entity to register an EID-prefix or to claim presence at an RLOC, is out of the scope ofLISP-SEC.LISP-SEC as those protocols are protected by the security mechanisms specified in [I-D.ietf-lisp-rfc6833bis]. However, LISP-SEC extends the Map- Register message to allow an ITR to securely downgrade to non LISP- SEC Map-Requests. Additional security considerations are described in Section 6. 2. Definition of Terms One-Time Key (OTK): An ephemeral randomly generated key that must be used for a single Map-Request/Map-Reply exchange. ITR One-Time Key (ITR-OTK): The One-Time Key generated at theITR.Ingress Tunnel Router (ITR). MS One-Time Key (MS-OTK): The One-Time Key generated at the Map- Server. Authentication Data (AD): Metadata that is included either in a LISP Encapsulated Control Message (ECM) header, as defined inSection 6.1.8 of[I-D.ietf-lisp-rfc6833bis], or in a Map-Reply message to support confidentiality, integrity protection, and verification ofEID-prefixEID- prefix authorization. OTK Authentication Data (OTK-AD): The portion of ECM Authentication Data that contains a One-Time Key. EID Authentication Data (EID-AD): The portion of ECM and Map-Reply Authentication Data used for verification of EID-prefix authorization. Packet Authentication Data (PKT-AD): The portion of Map-Reply Authentication Data used to protect the integrity of the Map-Reply message. For definitions of other terms, notably Map-Request, Map-Reply, Ingress Tunnel Router (ITR), Egress Tunnel Router (ETR), Map-Server (MS), and Map-Resolver (MR) please consult the LISP specification [I-D.ietf-lisp-rfc6833bis]. 3. LISP-SEC Threat Model LISP-SEC addresses the control plane threats, described in section 3.7 and 3.8 of [RFC7835], that target EID-to-RLOC mappings, including manipulations of Map-Request and Map-Reply messages, and malicious ETR EID prefix overclaiming. LISP-SEC makes two main assumptions: (1) the LISP mapping system is expected to deliver a Map-Request message to their intended destination ETR as identified by the EID, and (2) no man-in-the-middle (MITM) attack can be mounted within the LISP Mapping System. How the Mapping System is protected from MITM attacks depends from the particular Mapping Systems used, and is out of the scope of this memo. Furthermore, while LISP-SEC enables detection of EID prefix overclaiming attacks, it assumes that Map- Servers can verify the EID prefix authorization at time of registration. According to the threat model described in [RFC7835] LISP-SEC assumes that any kind of attack, including MITM attacks, can be mountedin the access network,outside of the boundaries of the LISP mapping system. An on-path attacker, outside of the LISP mapping system can, for example, hijack Map-Request and Map-Reply messages, spoofing the identity of a LISP node. Another example of on-path attack, called overclaiming attack, can be mounted by a malicious Egress Tunnel Router (ETR), by overclaiming the EID-prefixes for which it is authoritative. In this way the ETR can maliciously redirect traffic directed to a large number of hosts. 4. Protocol Operations The goal of the security mechanisms defined in [I-D.ietf-lisp-rfc6833bis] is to prevent unauthorized insertion of mapping data by providing origin authentication and integrity protection for theMap-Registration,Map-Register, and by using the nonce to detect unsolicited Map-Reply sent by off-path attackers. LISP-SEC builds on top of the security mechanisms defined in [I-D.ietf-lisp-rfc6833bis] to address the threats described in Section 3 by leveraging the trust relationships existing among the LISP entities participating to the exchange of the Map-Request/Map- Reply messages. Those trust relationships are used to securelydistributedistribute, as described in Section 7.4, a per-message One-Time Key (OTK) that provides origin authentication, integrity and anti-replay protection to mapping data conveyed via the mapping lookup process, and that effectively prevent overclaiming attacks. The processing of security parameters during theMap- Request/Map-ReplyMap-Request/Map-Reply exchange is as follows: oThePer each Map-Request message a new ITR-OTK is generated and stored at the ITR, and securely transported to the Map-Server. o The Map-Server uses the ITR-OTK to compute a Keyed-Hashing for Message Authentication (HMAC) [RFC2104] that protects the integrity of the mapping data known to the Map-Server to prevent overclaiming attacks. The Map-Server also derives a new OTK, the MS-OTK, that is passed to the ETR, by applying a Key Derivation Function (KDF) (e.g. [RFC5869]) to the ITR-OTK. o The ETR uses the MS-OTK to compute an HMAC that protects the integrity of the Map-Reply sent to the ITR. o Finally, the ITR uses the stored ITR-OTK to verify the integrity of the mapping data provided by both the Map-Server and the ETR, and to verify that no overclaiming attacks were mounted along the path between the Map-Server and the ITR. Section 5 provides the detailed description of the LISP-SEC control messages and their processing, while the rest of this section describes the flow of LISP protocol operations at each entity involved in the Map-Request/Map-Reply exchange:o1. The ITR, upon needing to transmit a Map-Request message, generates and stores an OTK (ITR-OTK). This ITR-OTK is included into the Encapsulated Control Message (ECM) that contains the Map-Request sent to the Map-Resolver.To provideITR-OTK confidentialityto the ITR- OTK overand integrity protection MUST be provided in the path between the ITR andits Map-Resolver,theITR- OTK SHOULDMap-Resolver. This can beencrypted using a preconfigured key shared betweenachieved either by encrypting theITR andITR-OTK with theMap-Resolver, similarpre-shared secret known to thekey sharedITR and the Map-Resolver (as specified in Section 5.5), or by enabling DTLS between theETRITR and theMap-Server in order to secure ETR registration [I-D.ietf-lisp-rfc6833bis]. oMap-Resolver. 2. The Map-Resolver decapsulates the ECM message, decrypts the ITR- OTK, if needed, and forwards through the Mapping System the received Map-Request and the ITR-OTK, as part of a new ECM message.As described in Section 5.6, theThe LISP Mapping System delivers the ECM to the appropriate Map-Server, as identified by the EID destination address of the Map-Request.oAs mentioned in Section 3, how the Mapping System is protected from MITM attacks depends from the particular Mapping Systems used, and is out of the scope of this memo. 3. The Map-Server is configured with the location mappings and policy information for the ETR responsible for the EID destination address. Using this preconfigured information, the Map-Server, after the decapsulation of the ECM message, finds the longest match EID-prefix that covers the requested EID in the received Map-Request. The Map-Server adds this EID-prefix, together with an HMAC computed using the ITR-OTK, to a new Encapsulated Control Message that contains the receivedMap-Request. oMap- Request. 4. The Map-Server derives a new OTK, the MS-OTK, by applying a Key Derivation Function (KDF) to the ITR-OTK. This MS-OTK is included in the Encapsulated Control Message that the Map-Server uses to forward the Map-Request to the ETR.To provideMS-OTK confidentialityoverand integrity protection MUST be provided in the path between the Map-Server and theETR,ETR. This can be achieved either by encrypting the MS-OTKSHOULD be encrypted usingwith thekey shared betweenpre-shared secret known to theETRMap-Server and theMap-Server in order to secureETRregistration [I-D.ietf-lisp-rfc6833bis]. o(as specified in Section 5.5), or by enabling DTLS between the Map-Server and the ETR. 5. If the Map-Server is acting in proxy mode, as specified in [I-D.ietf-lisp-rfc6833bis], the ETR is not involved in the generation of theMap-Reply.Map-Reply and steps 6 and 7 are skipped. In this case the Map-Server generates the Map-Reply on behalf of the ETR as describedbelow. oin Section 5.7.2. 6. The ETR, upon receiving the ECM encapsulated Map-Request from the Map-Server, decrypts the MS-OTK, if needed, and originates astandard Map-ReplyMap- Reply that contains the EID-to-RLOC mapping information as specified in [I-D.ietf-lisp-rfc6833bis].o7. The ETR computes an HMAC overthis standardthe Map-Reply, keyed with MS-OTK to protect the integrity of the whole Map-Reply. The ETR also copies the EID-prefix authorization data that the Map-Server included in the ECM encapsulated Map-Request into the Map-Reply message. The ETR then sendsthisthe complete Map-Reply message to the requesting ITR.o8. The ITR, upon receiving the Map-Reply, uses the locally stored ITR-OTK to verify the integrity of the EID-prefix authorization data included in the Map-Reply by the Map-Server. The ITR computes the MS-OTK by applying the same KDF (as specified in the ECM encapsulated Map-Reply) used by theMap- Server,Map-Server, and verifies the integrity of the Map-Reply. If the integrity checks fail, the Map-Reply MUST be discarded. Also, if the EID-prefixes claimed by the ETR in the Map-Reply are not equal or more specific than the EID-prefix authorization data inserted by the Map-Server, the ITR MUST discard the Map-Reply. 5. LISP-SEC Control Messages Details LISP-SEC metadata associated with a Map-Request is transported within the Encapsulated Control Message that contains the Map-Request. LISP-SEC metadata associated with the Map-Reply is transported within the Map-Reply itself. 5.1. Encapsulated Control Message LISP-SEC Extensions LISP-SEC uses the ECM(Encapsulated Control Message)defined in [I-D.ietf-lisp-rfc6833bis] withType set to 8, andS bit set to 1 to indicate that the LISP header includes Authentication Data (AD). The format of the LISP-SEC ECM Authentication Data is defined inthe following figure.Figure 1 . OTK-AD stands for One-Time Key Authentication Data and EID-AD stands for EID Authentication Data. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ECM AD Type |V|ReservedUnassigned | Requested HMAC ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | OTK Length | Key ID | OTKEncryptionWrap. ID | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | One-Time-Key Preamble ... | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+OTK-AD | ... One-Time-Key Preamble | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ One-Time Key (128 bits) ~/ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ | EID-AD Length | KDF ID | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | Record Count| Reserved|E| Unassigned | EID HMAC ID |EID-AD +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | |ReservedUnassigned | EID mask-len | EID-AFI | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | ~ EID-prefix ... ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | ~ EID HMAC ~ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ Figure 1: LISP-SEC ECM Authentication Data ECM AD Type: 1 (LISP-SEC Authentication Data). See Section 7. V: Key Version bit. This bit is toggled when the sender switches to a new OTK wrapping keyReserved:Unassigned: Set to 0 on transmission and ignored on receipt. Requested HMAC ID: The HMACalgorithmalgorithm, that will be used to protect the mappings, requested by the ITR. See Section 5.4 fordetails.details, and Section 7.3 for HMAC IDs that MUST be supported. OTK Length: The length (in bytes) of the OTK Authentication Data (OTK-AD), that contains the OTK Preamble and the OTK.OTK EncryptionKey ID: The identifier of thekey wrapping algorithm used to encrypt the One-Time-Key. When a 128-bit OTK is sent unencryptedpre-shared secret shared by an ITR and the Map-Resolver, and by theOTK Encryption ID is setMap-Server and an ETR. Per- message keys are derived from the pre-shared secret toNULL_KEY_WRAP_128. See Section 5.5 for more details. One-Time-Key Preamble:encrypt, authenticate the origin and protect the integrity of the OTK. The Key ID allows to rotate between multiple pre-shared secrets in a non disruptive way. OTK Wrapping ID: The identifier of the key derivation function and of the key wrapping algorithm used to encrypt the One-Time-Key. See Section 5.5 for more details, and Section 7.4 for Wrapping IDs that MUST be supported. One-Time-Key Preamble: set to 0 if the OTK is not encrypted. When the OTK is encrypted, this field MAY carry additional metadata resulting from the key wrapping operation. When a 128-bit OTK is sent unencrypted by Map-Resolver, the OTK Preamble is set to 0x0000000000000000 (64 bits). See Section5.55.5.1 for details. One-Time-Key: the OTKencrypted (or not)wrapped as specified by OTKEncryptionWrapping ID. See Section 5.5 for details. EID-AD Length: length (in bytes) of the EID Authentication Data (EID-AD). The ITR MUST set EID-AD Length to 4 bytes, as it only fills the KDF ID field, and all the remaining fields part of the EID-AD are not present. An EID-AD MAY contain multiple EID- records. Each EID-record is 4-byte long plus the length of the AFI-encoded EID-prefix. KDF ID: Identifier of the Key Derivation Function used to derive the MS-OTK. The ITR MAY use this field to indicate the recommended KDF algorithm, according to local policy. The Map- Server can overwrite the KDF ID if it does not support the KDF ID recommended by the ITR. See Section 5.4 for moredetails.details, and Section 7.5 for KDF IDs that MUST be supported. Record Count: The number of records in this Map-Request message. A record is comprised of the portion of the packet that is labeled 'Rec' above and occurs the number of times equal to Record Count.Reserved:E: ETR-Cant-Sign bit. This bit is set to 1 to signal to the ITR that at least one of the ETRs authoritative for the EID prefixes of this Map-Reply has not enabled LISP-SEC. This allows the ITR to securely downgrade to non LISP-SEC requests, as specified in Section 5.7, if so desired. Unassigned: Set to 0 on transmission and ignored on receipt. EID HMAC ID: Identifier of the HMAC algorithm used to protect the integrity of the EID-AD. This field is filled by Map-Server that computed the EID-prefix HMAC. See Section 5.4 for moredetails.details, and Section 7.3 for HMAC IDs that MUST be supported. EID mask-len: Mask length for EID-prefix. EID-AFI: Address family of EID-prefix according to [RFC5226] EID-prefix: The Map-Server uses this field to specify the EID- prefix that the destination ETR is authoritative for, and is the longest match for the requested EID. EID HMAC: HMAC of the EID-AD computed and inserted by Map-Server. Before computing the HMAC operation the EID HMAC field MUST be set to 0. The HMACcoversMUST cover the entire EID-AD. 5.2. Map-Reply LISP-SEC Extensions LISP-SEC uses the Map-Reply defined in [I-D.ietf-lisp-rfc6833bis], with Type set to 2, andS bitS-bit set to 1 to indicate that the Map-Reply message includes Authentication Data (AD). The format of the LISP- SEC Map-Reply Authentication Data is defined inthe following figure.Figure 2. PKT-AD is the Packet Authentication Data that covers the Map-Reply payload. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MR AD Type |ReservedUnassigned | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ | EID-AD Length | KDF ID | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | Record Count |ReservedUnassigned | EID HMAC ID |EID-AD +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | |ReservedUnassigned | EID mask-len | EID-AFI | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rec | ~ EID-prefix ... ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | ~ EID HMAC ~ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <---+ | PKT-AD Length | PKT HMAC ID |\ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ PKT HMAC ~PKT-AD +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ Figure 2: LISP-SEC Map-Reply Authentication Data MR AD Type: 1 (LISP-SEC Authentication Data). See Section 7. EID-AD Length: length (in bytes) of the EID-AD. An EID-AD MAY contain multiple EID-records. Each EID-record is 4-byte long plus the length of the AFI-encoded EID-prefix. KDF ID: Identifier of the Key Derivation Function used to derive MS-OTK. See Section 5.7 for moredetails.details, and Section 7.5 for KDF IDs that MUST be supported. Record Count: The number of records in this Map-Reply message. A record is comprised of the portion of the packet that is labeled 'Rec' above and occurs the number of times equal to Record Count.Reserved:Unassigned: Set to 0 on transmission and ignored on receipt. EID HMAC ID: Identifier of the HMAC algorithm used to protect the integrity of the EID-AD. See Section 5.7 for moredetails.details, and Section 7.3 for HMAC IDs that MUST be supported. EID mask-len: Mask length for EID-prefix. EID-AFI: Address family of EID-prefix according to[RFC5226].[RFC8060]. EID-prefix: This field contains an EID-prefix that the destination ETR is authoritative for, and is the longest match for the requested EID. EID HMAC: HMAC of the EID-AD, as computed by the Map-Server. Before computing the HMAC operation the EID HMAC field MUST be set to 0. The HMAC covers the entire EID-AD. PKT-AD Length: length (in bytes) of the Packet Authentication Data (PKT-AD). PKT HMAC ID: Identifier of the HMAC algorithm used to protect the integrity of theMap-reply.Map-Reply. See Section 7.3 for HMAC IDs that MUST be supported. PKT HMAC: HMAC of the whole Map-Reply packet, including the LISP- SEC Authentication Data. The scope of the authentication goes from the Map-Reply Type field to the PKT HMAC field included. Before computing the HMAC operation the PKT HMAC field MUST be set to 0. See Section 5.8 for more details. 5.3. Map-Register LISP-SEC Extentions This memo is allocating one of the bits marked asReservedUnassigned in the Map-Register message defined inSection 6.1.6 of[I-D.ietf-lisp-rfc6833bis]. More precisely, the second bit after the Type field in a Map-Register message is allocated as the S bit. The S bit indicates to theMap-ServerMap- Server that the registering ETR isLISP- SECLISP-SEC enabled. An ETR that supports LISP-SEC MUST set the S bit in its Map-Register messages. 5.4. ITRProcessingProcessing: Generating a Map-Request Upon creating a Map-Request, the ITR generates a random ITR-OTK that is storedlocally,locally (until the corresponding Map-Reply is received), together with the nonce generated as specified in [I-D.ietf-lisp-rfc6833bis]. ITR-OTK confidentiality and integrity protection MUST be provided in the path between the ITR and the Map-Resolver. This can be achieved either by encrypting the ITR-OTK with the pre-shared secret known to the ITR and the Map-Resolver (see Section 5.5), or by enabling DTLS between the ITR and the Map-Resolver. The Map-Request MUST be encapsulated in an ECM, with the S-bit set to 1, to indicate the presence of Authentication Data.If the ITR and the Map-Resolver are configured with a shared key, the ITR-OTK confidentiality SHOULD be protected by wrapping theITR-OTK is wrapped with the algorithm specified by the OTKEncryptionWrapping ID field. See Section 5.5 for further details on OTK encryption.The Requested HMAC ID field containsIf thesuggested HMACNULL-KEY-WRAP-128 algorithmto be used by the Map-Serveris selected and DTLS is not enabled in the path between the ITR and the Map-Resolver, the Map-Request MUST be dropped and an appropiate log action SHOULD be taken. The Requested HMAC ID field contains the suggested HMAC algorithm to be used by the Map-Server and the ETR to protect the integrity of the ECM Authentication data and of the Map-Reply. The KDF ID field specifies the suggested key derivation function to be used by the Map-Server to derive the MS-OTK. A KDF Value of NONE (0), MAY be used to specify that the ITR has no preferred KDF ID. The EID-AD length is set to 4 bytes, since the Authentication Data does not contain EID-prefix Authentication Data, and the EID-AD contains only the KDF ID field.In response5.4.1. PITR Processing The processing performed by a PITR is equivalent toan encapsulated Map-Request that hastheS-bit set,processing of anITR MUST receiveITR. However, if the PITR is directly connected to aMap-Reply withMapping System such as LISP+ALT [RFC6836], theS-bit set,PITR performs the functions of both the ITR and the Map-Resolver forwarding the Map-Request encapsulated in an ECM header that includes the Authentication Data fields as described in Section 5.6. 5.5. Encrypting and Decrypting anEID-ADOTK MS-OTK confidentiality anda PKT-AD. Ifintegrity protection MUST be provided in theMap-Reply does not include both ADs,path between theITR MUST discard it. In response to an encapsulated Map-Request with S-bit set to 0,Map-Server and theITR expects a Map-Reply with S-bit set to 0,ETR. This can be achieved either by enabling DTLS between the Map-Server and the ITRSHOULD discardor by encrypting theMap-Reply ifMS-OTK with theS-bit is set. Upon receiving a Map-Reply,pre-shared secret known to theITR must verifyMap- Server and the ETR [I-D.ietf-lisp-rfc6833bis]. Similarly, ITR-OTK confidentiality and integrityof bothprotection MUST be provided in theEID-ADpath between the ITR and thePKT-AD,Map-Resolver. This can be achieved either by enabling DTLS between the Map-Server andMUST discardtheMap-Reply if one ofITR, or by encrypting theintegrity checks fails. After processingITR-OTK with theMap-Reply,pre-shared secret known to the ITRmust discardand the<nonce,ITK-OTK> pair associatedMap-Resolver. The ITR/Map-Resolver pre-shared key is similar to theMap-Reply The integrity ofMap-Server/ETR pre-shared key. However, to prevent ETR's overclaiming attacks, theEID-AD is verified usingITR/Map-Resolver pre-shared secret MUST have a different value than thelocally stored ITR-Map-Server/ETR pre-shared secret. This section describes OTK processing in the ITR/Map-Resolver path, as well as in the Map-Server/ETR path. It's important tore-computenote that, to prevent ETR's overclaiming attacks, theHMAC ofITR/Map-Resolver pre-shared secret MUST be different from theEID-ADMap-Server/ETR pre-shared secret. The OTK is wrapped using the algorithm specified in theEID HMACOTK Wrapping ID field.If the EID HMAC IDThis fielddoes not matchidentifies both the: o Key Encryption Algorithm used to encrypt theRequested HMAC IDwrapped OTK, as well as theITR SHOULD discardo Key Derivation Function used to derive a per-message encryption key. Implementations of this specification MUST support OTK Wrapping ID AES-KEY-WRAP-128+HKDF-SHA256 that specifies theMap-Reply and send, atuse of thefirst opportunity it needs to,HKDF- SHA256 Key Derivation Function specified in[RFC4868] to derive anew Map-Request withper- message encryption key (per-msg-key), as well as the AES-KEY-WRAP-128 Key Wrap algorithm used to encrypt adifferent Requested HMAC ID field,128-bit OTK, according toITR's local policy.[RFC3394]. Thescope ofkey wrapping process for OTK Wrapping ID AES-KEY-WRAP-128+HKDF- SHA256 is described below: 1. The KDF algorithm is identified by theHMAC operation coversfield 'OTK Wrapping ID' according to theentire EID-AD, fromtable in Section Section 7.4. 2. The Key Wrap algorithm is identified by theEID-AD Lengthfield 'OTK Wrapping ID' according to theEID HMAC field, which must be set to 0 beforetable in Section Section 7.4. 3. If thecomputation ofNULL-KEY-WRAP-128 algorithm (defined in (Section 7.4)) is selected and DTLS is not enabled, theHMAC. ITRMap-Request MUSTset the EID HMAC ID fieldbe dropped and an appropiate log action SHOULD be taken. 4. The pre-shared secret used to0 before computingderive theHMAC. To verifyper-msg-key is represented by PSK[Key ID], that is theintegrity ofpre-shared secret identified by thePKT-AD, first'Key ID'. 5. The per-message encryption key key is computed as: * per-msg-key = KDF( nonce + s + PSK[Key ID] ) * where theMS-OTKnonce isderived fromthelocally stored ITR-OTK using the algorithm specifiedvalue in theKDF ID field. This is becauseNonce field of thePKT-ADMap- Request, and * 's' isgenerated bytheETR usingstring "OTK-Key-Wrap" 6. According to [RFC3394] theMS-OTK. Ifper-msg-key is used to wrap theKDF IDOTK with AES-KEY-WRAP-128. The AES Key Wrap Initialization Value MUST be set to 0xA6A6A6A6A6A6A6A6 (64 bits). The output of the AES Key Wrap operation is 192-bit long. The most significant 64-bit are copied in theMap-Reply does not matchOne-Time Key Preamble field, while theKDF ID requested128 less significant bits are copied in theMap-Request,One-Time Key field of theITR SHOULD discardLISP-SEC Authentication Data. When decrypting an encrypted OTK theMap- Reply and send, atreceiver MUST verify that thefirst opportunity it needs to, a new Map- Request with a different KDF ID, according to ITR's local policy. The derived MS-OTKInitialization Value resulting from the AES Key Wrap decryption operation isthen usedequal tore-compute the HMAC of0xA6A6A6A6A6A6A6A6. If this verification fails thePKT-AD usingreceiver MUST discard theAlgorithm specifiedentire message. 5.5.1. Unencrypted OTK MS-OTK confidentiality and integrity protection MUST be provided in thePKT HMAC ID field. Ifpath between thePKT HMAC ID field does not matchMap-Server and theRequested HMAC IDETR. Similarly, ITR-OTK confidentiality and integrity protection MUST be provided in theITR SHOULD discardpath between theMap-ReplyITR andsend, atthefirst opportunity it needs to, a new Map-Request withMap-Resolver. However, when DTLS is enabled the OTK MAY be sent unencrypted as transport layer security is providing confidentiality and integrity protection. When adifferent Requested HMAC128-bit OTK is sent unencrypted the OTK Wrapping IDaccordingis set toITR's local policy or until all HMAC IDs supported by the ITR have been attempted. Each individual Map-Reply EID-record is considered valid only if: (1) both EID-AD and PKT-AD are valid,NULL_KEY_WRAP_128, and(2) the intersection oftheEID-prefix in the Map-Reply EID-recordOTK Preamble is set to 0x0000000000000000 (64 bits). 5.6. Map-Resolver Processing Upon receiving an encapsulated Map-Request withone oftheEID-prefixes contained inS-bit set, theEID-AD is not empty. After identifyingMap-Resolver decapsulates theMap- Reply recordECM message. The ITR-OTK, if encrypted, is decrypted asvalid, the ITR sets the EID-prefixspecified in Section 5.5. Protecting theMap-Reply record to the valueconfidentiality of theintersection set computed before, and adds the Map-Reply EID-record to its EID-to-RLOC cache, as describedITR-OTK and, in[I-D.ietf-lisp-rfc6833bis]. An examplegeneral, the security ofMap-Reply record validationhow the Map-Request isprovided in Section 5.4.1. The ITR SHOULD send SMR triggered Map-Requests overhanded by themapping system in orderMap-Resolver toreceive a secure Map-Reply. If an ITR accepts piggybacked Map-Replies, it SHOULD also send a Map-Request overthemapping system in orderMap-Server, is specific toverifythepiggybacked Map-Reply with a secure Map-Reply. 5.4.1. Map-Reply Record Validation The payloadparticular Mapping System used, and outside ofa Map-Reply may contain multiple EID-records. The whole Map-Replythe scope of this memo. In Mapping Systems where the Map-Server issigned bycompliant with [I-D.ietf-lisp-rfc6833bis], theETR,Map-Resolver originates a new ECM header with thePKT HMAC, to provide integrity protectionS-bit set, that contains the unencrypted ITR-OTK, as specified in Section 5.5, andorigin authentication totheEID-prefix records claimed byother data derived from theETR. TheECM Authentication Datafieldofa Map- Reply may contain multiple EID-records intheEID-AD.received encapsulated Map-Request. TheEID-AD is signed byMap-Resolver then forwards to theMap-Server, withMap-Server theEID HMAC, to provide integrity protection and origin authentication toreceived Map- Request, encapsulated in theEID-prefix records inserted bynew ECM header that includes theMap-Server.newly computed Authentication Data fields. 5.7. Map-Server Processing Upon receivinga Map-Replyan ECM encapsulated Map-Request with the S-bitset, the ITR first checksset to 1, thevalidity of bothMap-Server process theEID HMAC and ofMap-Request according to thePKT-AD HMAC. If either onevalue of theHMACs is not valid, a log action MUST be takensecurity-capable S-bit and of theMap-Reply MUST NOT be processed any further. If both HMACs are valid, the ITR proceeds with validating each individual EID-record claimed byproxy map-reply P-bit contained in theETRMap-Register sent bycomputingtheintersection of each oneETRs authoritative for that prefix during registration. Processing of theEID-prefix containedMap-Request MUST proceed in thepayload oforder described in theMap-Reply with each one oftable below, applying theEID-prefixes containedprocessing corresponding to the first rule that matches the conditions indicated in theEID-AD. An EID-record is valid only if atfirst column: +----------------+--------------------------------------------------+ | Matching | Processing | | Condition | | +----------------+--------------------------------------------------+ | 1. At least | The Map-Server MUST generate a LISP-SEC | | one of theintersections is not the empty set. For instance, the| protected Map-Replypayload contains 3 mapping record EID- prefixes: 2001:db8:0102::/48 2001:db8:0103::/48 2001:db8:0200::/40 The EID-AD contains two EID-prefixes: 2001:db8:0103::/48 2001:db8:0203::/48as specified in Section | | ETRs | 5.7.2. TheEID-record with EID-prefix 2001:db8:0102::/48 is not eligible to be used by the ITR since it is not includedETR-Cant-Sign E-bit inany of the EID-ADs signed bytheMap-Server. A log actionEID | | authoritative | Authentication Data (EID-AD) MUST betaken. The EID-record withset to 0. | | for the EID | | | prefix | | | included in | | | the Map- | | | Request | | | registered | | | with the P-bit | | | set to 1 | | | | | | 2. At least | The Map-Server MUST generate a LISP-SEC | | one of the | protected Encapsulated Map-Request (as specified | | ETRs | in Section 5.7.1), to be sent to one of the | | authoritative | authoritative ETRs that registered with the | | for the EID | S-bit set to 1 (and the P-bit set to 0). If | | prefix | there is at least one ETR that registered with | | included in | the S-bit set to 0, the ETR-Cant-Sign E-bit of | | the Map- | the EID-AD MUST be set to 1 to signal the ITR | | Request | that a non LISP-SEC Map-Request might reach | | registered | additional ETRs that have LISP-SEC disabled. | | with the S-bit | | | set to 1 | | | | | | 3. All the | The Map-Server MUST send a Negative Map-Reply | | ETRs | protected with LISP-SEC, as described in Section | | authoritative | 5.7.2. The ETR-Cant-Sign E-bit MUST be set to 1 | | for the EID | to signal the ITR that a non LISP-SEC Map- | | prefix | Request might reach additional ETRs that have | | included in | LISP-SEC disabled. | | the Map- | | | Request | | | registered | | | with the S-bit | | | set to 0 | | +----------------+--------------------------------------------------+ In this way the ITR that sent a LISP-SEC protected Map-Request always receives a LISP-SEC protected Map-Reply. However, the ETR-Cant-Sign E-bit set to 1 specifies that a non LISP-SEC Map-Request might reach additional ETRs that have LISP-SEC disabled. This mechanism allows the ITR to securely downgrade to non LISP-SEC requests, if so desired. 5.7.1. Generating a LISP-SEC Protected Encapsulated Map-Request The Map-Server decapsulates the ECM and generates a new ECM Authentication Data. The Authentication Data includes the OTK-AD and the EID-AD, that contains EID-prefix2001:db8:0103::/48authorization information, that are eventually received by the requesting ITR. The Map-Server updates the OTK-AD by deriving a new OTK (MS-OTK) from the ITR-OTK received with the Map-Request. MS-OTK iseligiblederived applying the key derivation function specified in the KDF ID field. If the algorithm specified in the KDF ID field is not supported, the Map-Server uses a different algorithm to derive the key and updates the KDF ID field accordingly. MS-OTK confidentiality and integrity protection MUST beusedprovided in the path between the Map-Server and the ETR. This can be achieved either by enabling DTLS between theITR because it matchesMap-Server and thesecond EID-prefix contained inETR, or by encrypting theEID-AD. The EID-recordMS-OTK withEID-prefix 2001:db8:0200::/40 is not eligiblethe pre-shared secret known to the Map- Server and the ETR. The Map-Request MUST beusedencapsulated in an ECM, with the S-bit set to 1, to indicate the presence of Authentication Data. MS-OTK is wrapped with the algorithm specified by theITR since itOTK Wrapping ID field. See Section 5.5 for further details on OTK encryption. If the NULL-KEY-WRAP-128 algorithm is selected and DTLS is notincludedenabled inany oftheEID-ADs signed bypath between theMap-Server. AMap-Server and the ETR, the Map-Request MUST be dropped and an appropiate log actionMUSTSHOULD be taken.In this last exampleThe Map-Server includes in theETR is trying to over claimEID-AD the longest match registered EID-prefix2001:db8:0200::/40, butfor theMap-Server authorized only 2001:db8:0203::/48, hencedestination EID, and an HMAC of this EID-prefix. The HMAC is keyed with theEID-recordITR-OTK contained in the received ECM Authentication Data, and the HMAC algorithm isdiscarded. 5.4.2. PITR Processingchosen according to the Requested HMAC ID field. If Theprocessing performed byMap-Server does not support this algorithm, the Map-Server uses aPITR is equivalent todifferent algorithm and specifies it in theprocessingEID HMAC ID field. The scope ofan ITR. However, ifthePITR is directly connected to a Mapping System such as LISP+ALT [RFC6836],HMAC operation covers thePITR performsentire EID-AD, from thefunctions of bothEID-AD Length field to theITR andEID HMAC field, which must be set to 0 before theMap-Resolver forwardingcomputation. The Map-Server then forwards theMap-Request encapsulated in anupdated ECMheaderencapsulated Map- Request, thatincludescontains theAuthentication Data fields as described in Section 5.6. 5.5. EncryptingOTK-AD, the EID-AD, andDecryptingthe received Map- Request to anOTK MS-OTK confidentiality is requiredauthoritative ETR as specified in [I-D.ietf-lisp-rfc6833bis]. 5.7.2. Generating a Proxy Map-Reply LISP-SEC proxy Map-Reply are generated according to [I-D.ietf-lisp-rfc6833bis], with thepath between the Map-Server andMap-Replay S-bit set to 1. The Map-Reply includes theETR,Authentication Data that contains theMS-OTK SHOULD be encrypted usingEID-AD, computed as specified in Section 5.7.1, as well as thepreconfigured key shared betweenPKT-AD computed as specified in Section 5.8. 5.8. ETR Processing Upon receiving an ECM encapsulated Map-Request with theMap-Server andS-bit set, the ETRfordecapsulates thepurpose of securing ETR registration [I-D.ietf-lisp-rfc6833bis]. Similarly,ECM message. The OTK field, ifITR-OTK confidentialityencrypted, isrequireddecrypted as specified in Section 5.5 to obtain thepath between the ITRunencrypted MS-OTK. The ETR then generates a Map-Reply as specified in [I-D.ietf-lisp-rfc6833bis] and includes theMap-Resolver,Authentication Data that contains theITR-OTK SHOULD be encrypted with a key shared betweenEID-AD, as received in theITR andencapsulated Map-Request, as well as theMap-Resolver.PKT-AD. TheOTKEID-AD isencryptedcopied from the Authentication Data of the received encapsulated Map-Request. The PKT-AD contains the HMAC of the whole Map-Reply packet, keyed with the MS-OTK and computed using the HMAC algorithm specified in theOTK EncryptionRequested HMAC IDfield. Whenfield of theAES Key Wrap algorithm is used to encryptreceived encapsulated Map-Request. If the ETR does not support the Requested HMAC ID, it uses a128-bit OTK, according to [RFC3394],different algorithm and updates theAES Key Wrap Initialization Value MUST be set to 0xA6A6A6A6A6A6A6A6 (64 bits).PKT HMAC ID field accordingly. Theoutputscope of theAES Key WrapHMAC operationis 192-bit long. The most significant 64-bit are copied in the One-Time Key Preamble field, whilecovers the128 less significant bits are copied inentire PKT-AD, from theOne-Time KeyMap-Reply Type fieldofto theLISP-SEC Authentication Data. When decrypting an encrypted OTKPKT HMAC field, which must be set to 0 bendlfore thereceiver MUST verify thatcomputation. Finally theInitialization Value resulting fromETR sends theAES Key Wrap decryption operation is equalMap-Reply to0xA6A6A6A6A6A6A6A6. If this verification failsthereceiver MUST discardrequesting ITR as specified in [I-D.ietf-lisp-rfc6833bis]. 5.9. ITR Processing: Receiving a Map-Reply In response to an encapsulated Map-Request that has theentire message. WhenS-bit set, an ITR MUST receive a128-bit OTK is sent unencryptedMap-Reply with theOTK Encryption ID is set to NULL_KEY_WRAP_128,S-bit set, that includes an EID-AD and a PKT-AD. If theOTK Preamble is setMap-Reply does not include both ADs, the ITR MUST discard it. In response to0x0000000000000000 (64 bits). 5.6. Map-Resolver Processing Upon receivingan encapsulated Map-Request with S-bit set to 0, the ITR expects a Map-Reply with S-bitset,set to 0, and theMap-Resolver decapsulatesITR SHOULD discard theECM message. The ITR-OTK,Map-Reply ifencrypted,the S-bit isdecrypted as specified in Section 5.5. Protectingset. Upon receiving a Map-Reply, theconfidentialityITR must verify the integrity of both theITR-OTK and, in general,EID-AD and thesecurityPKT-AD, and MUST discard the Map-Reply if one ofhowtheMap-Request is handed byintegrity checks fails. After processing theMap-Resolver toMap-Reply, theMap-Server, is specificITR must discard the <nonce,ITK-OTK> pair associated to theparticular Mapping System used, and outsideMap-Reply The integrity of thescopeEID-AD is verified using the ITR-OTK (stored locally for the duration of thismemo. In Mapping Systems where the Map-Server is compliant with [I-D.ietf-lisp-rfc6833bis],exchange) to re-compute theMap-Resolver originates a new ECM header withHMAC of theS-bit set, that containsEID-AD using theunencrypted ITR-OTK, asalgorithm specified inSection 5.5, andtheother data derived fromEID HMAC ID field. If theECM Authentication Data ofEID HMAC ID field does not match thereceived encapsulated Map-Request. The Map-Resolver then forwards toRequested HMAC ID theMap-ServerITR SHOULD discard thereceived Map- Request, encapsulated inMap-Reply and send, at the first opportunity it needs to, a newECM header that includes the newly computed Authentication Data fields. 5.7. Map-Server Processing Upon receiving an ECM encapsulatedMap-Request with a different Requested HMAC ID field, according to ITR's local policy. The scope of theS-bit set,HMAC operation covers theMap-Server processentire EID-AD, from theMap-Request accordingEID-AD Length field to thevalueEID HMAC field, which must be set to 0 before the computation of theS-bit containedHMAC. ITR MUST set the EID HMAC ID field to 0 before computing the HMAC. To verify the integrity of the PKT-AD, first the MS-OTK is derived from the locally stored ITR-OTK using the algorithm specified in theMap-Register sentKDF ID field. This is because the PKT-AD is generated by the ETRduring registration. If the S-bit contained in the Map-Register was clearusing theMap-Server decapsulatesMS-OTK. If theECM and generates a new ECM encapsulated Map-Request that does not contain an ECM Authentication Data, as specifiedKDF ID in[I-D.ietf-lisp-rfc6833bis]. The Map-Server does not perform any further LISP-SEC processing, andthe Map-Replywilldoes notbe protected. Ifmatch theS-bit containedKDF ID requested in theMap-Register was set the Map-Server decapsulatesMap-Request, theECM and generates a new ECM Authentication Data. The Authentication Data includesITR SHOULD discard theOTK-ADMap- Reply and send, at theEID-AD, that contains EID-prefix authorization information, that are ultimately sent to the requesting ITR. The Map-Server updates the OTK-AD by derivingfirst opportunity it needs to, a newOTK (MS-OTK) from the ITR-OTK receivedMap- Request with a different KDF ID, according to ITR's local policy. Without consistent configuration of involved entities, extra delays may be experienced. However, since HKDF-SHA1-128 is specified as mandatory to implement in Section 7.5, theMap-Request.process will eventually converge. The derived MS-OTK isderived applyingthen used to re-compute thekey derivation functionHMAC of the PKT-AD using the Algorithm specified in theKDFPKT HMAC ID field. If thealgorithm specified in the KDFPKT HMAC ID fieldisdoes notsupported,match theMap-Server uses a different algorithm to deriveRequested HMAC ID thekey and updatesITR SHOULD discard theKDF ID field accordingly. The Map-ServerMap-Reply and send, at theETR MUST be configuredfirst opportunity it needs to, a new Map-Request with ashared key for mapping registrationdifferent Requested HMAC ID according to[I-D.ietf-lisp-rfc6833bis]. If MS- OTK confidentialityITR's local policy or until all HMAC IDs supported by the ITR have been attempted. Each individual Map-Reply EID-record isrequired, thenconsidered valid only if: (1) both EID-AD and PKT-AD are valid, and (2) theMS-OTK SHOULD be encrypted, by wrappingintersection of theMS-OTK withEID-prefix in thealgorithm specified byMap-Reply EID-record with one of theOTK Encryption ID field as specified in Section 5.5. The Map-Server includesEID-prefixes contained in the EID-AD is not empty. After identifying thelongest match registered EID-prefix forMap- Reply record as valid, thedestination EID, and an HMAC of this EID-prefix. The HMAC is keyed withITR sets theITR-OTK containedEID-prefix in thereceived ECM Authentication Data,Map-Reply record to the value of the intersection set computed before, and adds theHMAC algorithm is chosen accordingMap-Reply EID-record tothe Requested HMAC ID field. Ifits EID-to-RLOC cache, as described in [I-D.ietf-lisp-rfc6833bis]. An example of Map-Reply record validation is provided in Section 5.9.1. TheMap-Server does not support this algorithm,ITR SHOULD send SMR triggered Map-Requests over theMap-Server usesmapping system in order to receive adifferent algorithm and specifiessecure Map-Reply. If an ITR accepts piggybacked Map-Replies, it SHOULD also send a Map-Request over the mapping system in order to verify theEID HMAC ID field.piggybacked Map-Reply with a secure Map-Reply. 5.9.1. Map-Reply Record Validation Thescopepayload of a Map-Reply may contain multiple EID-records. The whole Map-Reply is signed by theHMAC operation covers the entire EID-AD, fromETR, with theEID-AD Length fieldPKT HMAC, tothe EID HMAC field, which must be setprovide integrity protection and origin authentication to0 before the computation. The Map-Server then forwards the updated ECM encapsulated Map- Request, that contains the OTK-AD,theEID-AD, andEID-prefix records claimed by thereceived Map- Request to an authoritative ETR as specified in [I-D.ietf-lisp-rfc6833bis]. 5.7.1. Map-Server ProcessingETR. The Authentication Data field of a Map- Reply may contain multiple EID-records inProxy mode IftheMap-ServerEID-AD. The EID-AD isin proxy mode, it generates a Map-Reply, as specified in [I-D.ietf-lisp-rfc6833bis],signed by the Map-Server, with theS-bit setEID HMAC, to provide integrity protection and origin authentication to1. The Map-Reply includes the Authentication Data that containstheEID- AD, computed as specified in Section 5.7, as well asEID-prefix records inserted by thePKT-AD computed as specified in Section 5.8. 5.8. ETR ProcessingMap-Server. Upon receivingan ECM encapsulated Map-Requesta Map-Reply with the S-bit set, theETR decapsulatesITR first checks theECM message. The OTK field, if encrypted, is decrypted as specified in Section 5.5 to obtainvalidity of both theunencrypted MS-OTK. The ETR then generatesEID HMAC and of the PKT-AD HMAC. If either one of the HMACs is not valid, a log action MUST be taken and the Map-Replyas specifiedMUST NOT be processed any further. If both HMACs are valid, the ITR proceeds with validating each individual EID-record claimed by the ETR by computing the intersection of each one of the EID-prefix contained in[I-D.ietf-lisp-rfc6833bis] and includestheAuthentication Data that containspayload of theEID-AD, as receivedMap-Reply with each one of the EID-prefixes contained in theencapsulated Map-Request, as well asEID-AD. An EID-record is valid only if at least one of thePKT-AD. The EID-ADintersections iscopied fromnot theAuthentication Data ofempty set. For instance, thereceived encapsulated Map-Request.Map-Reply payload contains 3 mapping record EID- prefixes: 2001:db8:102::/48 2001:db8:103::/48 2001:db8:200::/40 ThePKT-ADEID-AD contains two EID-prefixes: 2001:db8:103::/48 2001:db8:203::/48 The EID-record with EID-prefix 2001:db8:102::/48 is not eligible to be used by theHMACITR since it is not included in any of thewhole Map-Reply packet, keyedEID-ADs signed by the Map-Server. A log action MUST be taken. The EID-record with EID-prefix 2001:db8:103::/48 is eligible to be used by theMS-OTK and computed usingITR because it matches theHMAC algorithm specifiedsecond EID-prefix contained in theRequested HMAC ID field of the received encapsulated Map-Request. If the ETR doesEID-AD. The EID-record with EID-prefix 2001:db8:200::/40 is notsupporteligible to be used by theRequested HMAC ID,ITR since ituses a different algorithm and updates the PKT HMAC ID field accordingly. The scopeis not included in any of theHMAC operation covers the entire PKT-AD, from the Map-Reply Type field toEID-ADs signed by thePKT HMAC field, which mustMap-Server. A log action MUST beset to 0 before the computation. Finallytaken. In this last example the ETRsends the Map-Replyis trying to over claim therequesting ITR as specified in [I-D.ietf-lisp-rfc6833bis].EID-prefix 2001:db8:200::/40, but the Map-Server authorized only 2001:db8:203::/48, hence the EID-record is discarded. 6. Security Considerations 6.1. Mapping System Security The LISP-SEC threat model described in Section 3, assumes that the LISP Mapping System is working properly and eventually delivers Map- Request messages to a Map-Server that is authoritative for the requested EID. It is assumed that the Mapping System ensures the confidentiality of the OTK, and the integrity of the Map-Reply data. However, how the LISP Mapping System is secured is out of the scope of this document. Similarly, Map-Register security, including the right for a LISP entity to register an EID-prefix or to claim presence at an RLOC, is out of the scope of LISP-SEC. 6.2. Random Number Generation The ITR-OTK MUST be generated by a properly seeded pseudo-random (or strong random) source. See [RFC4086] for advice on generating security-sensitive random data 6.3. Map-Server and ETR Colocation If the Map-Server and the ETR are colocated, LISP-SEC does not provide protection from overclaiming attacks mounted by the ETR. However, in this particular case, since the ETR is within the trust boundaries of the Map-Server, ETR's overclaiming attacks are not included in the threat model. 6.4. Deploying LISP-SEC This memo is written according to [RFC2119]. Specifically, the use of the key word SHOULD "or the adjective 'RECOMMENDED', mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course". Those deploying LISP-SEC according to this memo, should carefully weight how the LISP-SEC threat model applies to their particular use case or deployment. If they decide to ignore a particular recommendation, they should make sure the risk associated with the corresponding threats is well understood. As an example, in certain closed and controlled deployments, it is possible that the threat associated with a MiTM between the xTR and the Mapping System is very low, and after carfeul consideration it may be decided to allow a NULL key wrapping algorithm while carrying the OTKs between the xTR and the Mapping System. As an example at the other end of the spectrum, in certain other deployments, attackers may be very sophisticated, and force the deployers to enforce very strict policies in term of HMAC algorithms accepted by an ITR. Similar considerations apply to the entire LISP-SEC threat model, and should guide the deployers and implementors whenever they encounter the key word SHOULD across this memo. 6.5. Shared Keys Provisioning Provisioning of the keys shared between the ITR and the Map-Resolver as well as between the ETR and the Map-Server should be performed via an orchestration infrastructure and it is out of the scope of this draft. It is recommended that both shared keys are refreshed at periodical intervals to address key aging or attackers gaining unauthorized access to the shared keys. Shared keys should be unpredictable random values. 6.6. Replay Attacks An attacker can capture a valid Map-Request and/or Map-Reply and replay it, however once the ITR receives the original Map-Reply the <nonce,ITR-OTK> pair stored at the ITR will be discarded. If a replayed Map-Reply arrives at the ITR, there is no <nonce,ITR-OTK> that matches the incoming Map-Reply and will be discarded. In case of replayed Map-Request, the Map-Server, Map-Resolver and ETR will have to do a LISP-SEC computation. This is equivalent to a valid LISP-SEC computation and an attacker does not obtain any benefit. 6.7. Message Privacy DTLS [RFC6347] SHOULD be used to provide communication privacy and to prevent eavesdropping, tampering, or message forgery to the messages exchanged between the ITR, Map-Resolver, Map-Server, and ETR. 6.8. Denial of Service and Distributed Denial of Service Attacks LISP-SEC mitigates the risks of Denial of Service and Distributed Denial of Service attacks by protecting the integrity and authenticating the origin of the Map-Request/Map-Reply messages, and by preventing malicious ETRs from overclaiming EID prefixes that could re-direct traffic directed to a potentially large number of hosts. 7. IANA Considerations 7.1. ECM AD Type Registry IANA is requested to create the "ECM Authentication Data Type" registry with values 0-255, for use in the ECM LISP-SEC Extensions Section 5.1. The registry MUST be initially populated with the following values: Name Value Defined In -------------------------------------------------ReservedUnassigned 0 This memo LISP-SEC-ECM-EXT 1 This memo HMAC Functions Values 2-255 are unassigned. They are to be assigned according to the "Specification Required" policy defined in [RFC5226]. 7.2. Map-Reply AD Type Registry IANA is requested to create the "Map-Reply Authentication Data Type" registry with values 0-255, for use in the Map-Reply LISP-SEC Extensions Section 5.2. The registry MUST be initially populated with the following values: Name Value Defined In -------------------------------------------------ReservedUnassigned 0 This memo LISP-SEC-MR-EXT 1 This memo HMAC Functions Values 2-255 are unassigned. They are to be assigned according to the "Specification Required" policy defined in [RFC5226]. 7.3. HMAC Functions IANA is requested to create the "LISP-SEC Authentication Data HMAC ID" registry with values 0-65535 for use as Requested HMAC ID, EID HMAC ID, and PKT HMAC ID in the LISP-SEC Authentication Data: Name Number Defined In ------------------------------------------------- NONE 0 This memo AUTH-HMAC-SHA-1-96 1 [RFC2104] AUTH-HMAC-SHA-256-128 2 [RFC6234] HMAC Functions Values 3-65535 are unassigned. They are to be assigned according to the "Specification Required" policy defined in [RFC5226]. AUTH-HMAC-SHA-1-96 MUST be supported, AUTH-HMAC-SHA-256-128 SHOULD be supported. 7.4. Key Wrap Functions IANA is requested to create the "LISP-SEC Authentication Data Key Wrap ID" registry with values 0-65535 for use as OTK key wrap algorithms ID in the LISP-SEC Authentication Data: Name NumberDefined In ------------------------------------------------- ReservedKEY WRAP KDF ----------------------------------------------------------------- Unassigned 0This memoNone None NULL-KEY-WRAP-128 1 This memoAES-KEY-WRAP-128None AES-KEY-WRAP-128+HKDF-SHA256 2 [RFC3394] [RFC4868] Key Wrap Functions Values 3-65535 are unassigned. They are to be assigned according to the "Specification Required" policy defined in [RFC5226]. NULL-KEY-WRAP-128, andAES-KEY-WRAP-128AES-KEY-WRAP-128+HKDF-SHA256 MUST be supported. NULL-KEY-WRAP-128 is used to carry an unencrypted 128-bit OTK, with a 64-bit preamble set to 0x0000000000000000 (64 bits). 7.5. Key Derivation Functions IANA is requested to create the "LISP-SEC Authentication Data Key Derivation Function ID" registry with values 0-65535 for use as KDF ID in the LISP-SEC Authentication Data: Name Number Defined In ------------------------------------------------- NONE 0 This memo HKDF-SHA1-128 1 [RFC5869] Key Derivation Functions Values 2-65535 are unassigned. They are to be assigned according to the "Specification Required" policy defined in [RFC5226]. HKDF-SHA1-128 MUST be supported 8. Acknowledgements The authors would like to acknowledge Pere Monclus, Dave Meyer, Dino Farinacci, Brian Weis, David McGrew, Darrel Lewis and Landon Curt Noll for their valuable suggestions provided during the preparation of this document. 9. References 9.1. Normative References[I-D.ietf-lisp-rfc6830bis] Farinacci, D., Fuller, V., Meyer, D., Lewis, D., and A. Cabellos-Aparicio, "The Locator/ID Separation Protocol (LISP)", draft-ietf-lisp-rfc6830bis-26 (work in progress), November 2018.[I-D.ietf-lisp-rfc6833bis] Fuller, V., Farinacci, D., and A. Cabellos-Aparicio, "Locator/ID Separation Protocol (LISP) Control-Plane",draft-ietf-lisp-rfc6833bis-22draft-ietf-lisp-rfc6833bis-24 (work in progress),November 2018.February 2019. [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997, <https://www.rfc- editor.org/info/rfc2104>. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc- editor.org/info/rfc2119>. [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard (AES) Key Wrap Algorithm", RFC 3394, DOI 10.17487/RFC3394, September 2002, <https://www.rfc-editor.org/info/rfc3394>. [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10.17487/RFC4086, June 2005, <https://www.rfc- editor.org/info/rfc4086>. [RFC4868] Kelly, S. and S. Frankel, "Using HMAC-SHA-256, HMAC-SHA- 384, and HMAC-SHA-512 with IPsec", RFC 4868, DOI 10.17487/RFC4868, May 2007, <https://www.rfc- editor.org/info/rfc4868>. [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", RFC 5226, DOI 10.17487/RFC5226, May 2008, <https://www.rfc- editor.org/info/rfc5226>. [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)", RFC 5869, DOI 10.17487/RFC5869, May 2010, <https://www.rfc- editor.org/info/rfc5869>.[RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487/RFC6234, May 2011, <https://www.rfc- editor.org/info/rfc6234>.[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, January 2012, <https://www.rfc-editor.org/info/rfc6347>. [RFC6836] Fuller, V., Farinacci, D., Meyer, D., and D. Lewis, "Locator/ID Separation Protocol Alternative Logical Topology (LISP+ALT)", RFC 6836, DOI 10.17487/RFC6836, January 2013, <https://www.rfc-editor.org/info/rfc6836>. [RFC7835] Saucez, D., Iannone, L., and O. Bonaventure, "Locator/ID Separation Protocol (LISP) Threat Analysis", RFC 7835, DOI 10.17487/RFC7835, April 2016, <https://www.rfc- editor.org/info/rfc7835>. [RFC8060] Farinacci, D., Meyer, D., and J. Snijders, "LISP Canonical Address Format (LCAF)", RFC 8060, DOI 10.17487/RFC8060, February 2017, <https://www.rfc-editor.org/info/rfc8060>. [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>. 9.2. Informative References [I-D.ietf-lisp-rfc6830bis] Farinacci, D., Fuller, V., Meyer, D., Lewis, D., and A. Cabellos-Aparicio, "The Locator/ID Separation Protocol (LISP)", draft-ietf-lisp-rfc6830bis-26 (work in progress), November 2018. Authors' Addresses Fabio Maino Cisco Systems 170 Tasman Drive San Jose, California 95134 USA Email: fmaino@cisco.com Vina ErmaganCisco Systems 170 Tasman Drive San Jose,Google California95134USA Email:vermagan@cisco.comermagan@gmail.com Albert Cabellos Universitat Politecnica de Catalunya c/ Jordi Girona s/n Barcelona 08034 Spain Email: acabello@ac.upc.edu Damien Saucez INRIA 2004 route des Lucioles - BP 93 Sophia Antipolis France Email: damien.saucez@inria.fr