idnits 2.17.1 draft-ietf-lisp-crypto-08.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 25, 2016) is 2769 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: A later version (-22) exists of draft-ietf-lisp-lcaf-13 ** Obsolete normative reference: RFC 4492 (Obsoleted by RFC 8422) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 6830 (Obsoleted by RFC 9300, RFC 9301) ** Obsolete normative reference: RFC 7539 (Obsoleted by RFC 8439) == Outdated reference: A later version (-29) exists of draft-ietf-lisp-sec-10 Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force D. Farinacci 3 Internet-Draft lispers.net 4 Intended status: Experimental B. Weis 5 Expires: March 29, 2017 cisco Systems 6 September 25, 2016 8 LISP Data-Plane Confidentiality 9 draft-ietf-lisp-crypto-08 11 Abstract 13 This document describes a mechanism for encrypting LISP encapsulated 14 traffic. The design describes how key exchange is achieved using 15 existing LISP control-plane mechanisms as well as how to secure the 16 LISP data-plane from third-party surveillance attacks. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on March 29, 2017. 35 Copyright Notice 37 Copyright (c) 2016 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Requirements Notation . . . . . . . . . . . . . . . . . . . . 3 54 3. Definition of Terms . . . . . . . . . . . . . . . . . . . . . 3 55 4. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 5. Diffie-Hellman Key Exchange . . . . . . . . . . . . . . . . . 4 57 6. Encoding and Transmitting Key Material . . . . . . . . . . . 5 58 7. Shared Keys used for the Data-Plane . . . . . . . . . . . . . 7 59 8. Data-Plane Operation . . . . . . . . . . . . . . . . . . . . 9 60 9. Procedures for Encryption and Decryption . . . . . . . . . . 10 61 10. Dynamic Rekeying . . . . . . . . . . . . . . . . . . . . . . 11 62 11. Future Work . . . . . . . . . . . . . . . . . . . . . . . . . 12 63 12. Security Considerations . . . . . . . . . . . . . . . . . . . 12 64 12.1. SAAG Support . . . . . . . . . . . . . . . . . . . . . . 12 65 12.2. LISP-Crypto Security Threats . . . . . . . . . . . . . . 13 66 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 67 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 68 14.1. Normative References . . . . . . . . . . . . . . . . . . 14 69 14.2. Informative References . . . . . . . . . . . . . . . . . 15 70 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 16 71 Appendix B. Document Change Log . . . . . . . . . . . . . . . . 16 72 B.1. Changes to draft-ietf-lisp-crypto-08.txt . . . . . . . . 16 73 B.2. Changes to draft-ietf-lisp-crypto-07.txt . . . . . . . . 17 74 B.3. Changes to draft-ietf-lisp-crypto-06.txt . . . . . . . . 17 75 B.4. Changes to draft-ietf-lisp-crypto-05.txt . . . . . . . . 17 76 B.5. Changes to draft-ietf-lisp-crypto-04.txt . . . . . . . . 17 77 B.6. Changes to draft-ietf-lisp-crypto-03.txt . . . . . . . . 17 78 B.7. Changes to draft-ietf-lisp-crypto-02.txt . . . . . . . . 18 79 B.8. Changes to draft-ietf-lisp-crypto-01.txt . . . . . . . . 18 80 B.9. Changes to draft-ietf-lisp-crypto-00.txt . . . . . . . . 18 81 B.10. Changes to draft-farinacci-lisp-crypto-01.txt . . . . . . 18 82 B.11. Changes to draft-farinacci-lisp-crypto-00.txt . . . . . . 19 83 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 85 1. Introduction 87 The Locator/ID Separation Protocol [RFC6830] defines a set of 88 functions for routers to exchange information used to map from non- 89 routable Endpoint Identifiers (EIDs) to routable Routing Locators 90 (RLOCs). LISP Ingress Tunnel Routers (ITRs) and Proxy Ingress Tunnel 91 Routers (PITRs) encapsulate packets to Egress Tunnel Routers (ETRs) 92 and Reencapsulating Tunnel Routers (RTRs). Packets that arrive at 93 the ITR or PITR are typically not modified, which means no protection 94 or privacy of the data is added. If the source host encrypts the 95 data stream then the encapsulated packets can be encrypted but would 96 be redundant. However, when plaintext packets are sent by hosts, 97 this design can encrypt the user payload to maintain privacy on the 98 path between the encapsulator (the ITR or PITR) to a decapsulator 99 (ETR or RTR). The encrypted payload is unidirectional. However, 100 return traffic uses the same procedures but with different key values 101 by the same xTRs or potentially different xTRs when the paths between 102 LISP sites are asymmetric. 104 This document has the following requirements (as well as the general 105 requirements from [RFC6973]) for the solution space: 107 o Do not require a separate Public Key Infrastructure (PKI) that is 108 out of scope of the LISP control-plane architecture. 110 o The budget for key exchange MUST be one round-trip time. That is, 111 only a two packet exchange can occur. 113 o Use symmetric keying so faster cryptography can be performed in 114 the LISP data plane. 116 o Avoid a third-party trust anchor if possible. 118 o Provide for rekeying when secret keys are compromised. 120 o Support Authenticated Encryption with packet integrity checks. 122 o Support multiple cipher suites so new crypto algorithms can be 123 easily introduced. 125 2. Requirements Notation 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 129 document are to be interpreted as described in [RFC2119]. 131 3. Definition of Terms 133 AEAD: Authenticated Encryption with Additional Data. 135 ICV: Integrity Check Value. 137 LCAF: LISP Canonical Address Format ([LCAF]). 139 xTR: A general reference to ITRs, ETRs, RTRs, and PxTRs. 141 4. Overview 143 The approach proposed in this document is to NOT rely on the LISP 144 mapping system (or any other key infrastructure system) to store 145 security keys. This will provide for a simpler and more secure 146 mechanism. Secret shared keys will be negotiated between the ITR and 147 the ETR in Map-Request and Map-Reply messages. Therefore, when an 148 ITR needs to obtain the RLOC of an ETR, it will get security material 149 to compute a shared secret with the ETR. 151 The ITR can compute 3 shared-secrets per ETR the ITR is encapsulating 152 to. When the ITR encrypts a packet before encapsulation, it will 153 identify the key it used for the crypto calculation so the ETR knows 154 which key to use for decrypting the packet after decapsulation. By 155 using key-ids in the LISP header, we can also get fast rekeying 156 functionality. 158 The key management described in this documemnt is unidirectional from 159 the ITR (the encapsulator) to the ETR (the decapsultor). 161 5. Diffie-Hellman Key Exchange 163 LISP will use a Diffie-Hellman [RFC2631] key exchange sequence and 164 computation for computing a shared secret. The Diffie-Hellman 165 parameters will be passed via Cipher Suite code-points in Map-Request 166 and Map-Reply messages. 168 Here is a brief description how Diff-Hellman works: 170 +----------------------------+---------+----------------------------+ 171 | ITR | | ETR | 172 +------+--------+------------+---------+------------+---------------+ 173 |Secret| Public | Calculates | Sends | Calculates | Public |Secret| 174 +------|--------|------------|---------|------------|--------|------+ 175 | i | p,g | | p,g --> | | | e | 176 +------|--------|------------|---------|------------|--------|------+ 177 | i | p,g,I |g^i mod p=I | I --> | | p,g,I | e | 178 +------|--------|------------|---------|------------|--------|------+ 179 | i | p,g,I | | <-- E |g^e mod p=E | p,g | e | 180 +------|--------|------------|---------|------------|--------|------+ 181 | i,s |p,g,I,E |E^i mod p=s | |I^e mod p=s |p,g,I,E | e,s | 182 +------|--------|------------|---------|------------|--------|------+ 184 Public-key exchange for computing a shared private key [DH] 186 Diffie-Hellman parameters 'p' and 'g' must be the same values used by 187 the ITR and ETR. The ITR computes public-key 'I' and transmits 'I' 188 in a Map-Request packet. When the ETR receives the Map-Request, it 189 uses parameters 'p' and 'g' to compute the ETR's public key 'E'. The 190 ETR transmits 'E' in a Map-Reply message. At this point, the ETR has 191 enough information to compute 's', the shared secret, by using 'I' as 192 the base and the ETR's private key 'e' as the exponent. When the ITR 193 receives the Map-Reply, it uses the ETR's public-key 'E' with the 194 ITR's private key 'i' to compute the same 's' shared secret the ETR 195 computed. The value 'p' is used as a modulus to create the width of 196 the shared secret 's' (see Section 6). 198 6. Encoding and Transmitting Key Material 200 The Diffie-Hellman key material is transmitted in Map-Request and 201 Map-Reply messages. Diffie-Hellman parameters are encoded in the 202 LISP Security Type LCAF [LCAF]. 204 0 1 2 3 205 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 206 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 207 | AFI = 16387 | Rsvd1 | Flags | 208 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 209 | Type = 11 | Rsvd2 | 6 + n | 210 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 211 | Key Count | Rsvd3 | Cipher Suite | Rsvd4 |R| 212 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 213 | Key Length | Public Key Material ... | 214 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 215 | ... Public Key Material | 216 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 217 | AFI = x | Locator Address ... | 218 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 220 Cipher Suite field contains DH Key Exchange and Cipher/Hash Functions 222 The 'Key Count' field encodes the number of {'Key-Length', 'Key- 223 Material'} fields included in the encoded LCAF. The maximum number 224 of keys that can be encoded are 3, each identified by key-id 1, 225 followed by key-id 2, and finally key-id 3. 227 The 'R' bit is not used for this use-case of the Security Type LCAF 228 but is reserved for [LISP-DDT] security. Therefore, the R bit SHOULD 229 be transmitted as 0 and MUST be ignored on receipt. 231 Cipher Suite 0: 232 Reserved 234 Cipher Suite 1: 235 Diffie-Hellman Group: 2048-bit MODP [RFC3526] 236 Encryption: AES with 128-bit keys in CBC mode [AES-CBC] 237 Integrity: Integrated with [AES-CBC] AEAD_AES_128_CBC_HMAC_SHA_256 238 IV length: 16 bytes 240 Cipher Suite 2: 241 Diffie-Hellman Group: 256-bit Elliptic-Curve 25519 [CURVE25519] 242 Encryption: AES with 128-bit keys in CBC mode [AES-CBC] 243 Integrity: Integrated with [AES-CBC] AEAD_AES_128_CBC_HMAC_SHA_256 244 IV length: 16 bytes 246 Cipher Suite 3: 247 Diffie-Hellman Group: 2048-bit MODP [RFC3526] 248 Encryption: AES with 128-bit keys in GCM mode [RFC5116] 249 Integrity: Integrated with [RFC5116] AEAD_AES_128_GCM 250 IV length: 12 bytes 252 Cipher Suite 4: 253 Diffie-Hellman Group: 3072-bit MODP [RFC3526] 254 Encryption: AES with 128-bit keys in GCM mode [RFC5116] 255 Integrity: Integrated with [RFC5116] AEAD_AES_128_GCM 256 IV length: 12 bytes 258 Cipher Suite 5: 259 Diffie-Hellman Group: 256-bit Elliptic-Curve 25519 [CURVE25519] 260 Encryption: AES with 128-bit keys in GCM mode [RFC5116] 261 Integrity: Integrated with [RFC5116] AEAD_AES_128_GCM 262 IV length: 12 bytes 264 Cipher Suite 6: 265 Diffie-Hellman Group: 256-bit Elliptic-Curve 25519 [CURVE25519] 266 Encryption: Chacha20-Poly1305 [CHACHA-POLY] [RFC7539] 267 Integrity: Integrated with [CHACHA-POLY] AEAD_CHACHA20_POLY1305 268 IV length: 8 bytes 270 The "Public Key Material" field contains the public key generated by 271 one of the Cipher Suites defined above. The length of the key in 272 octets is encoded in the "Key Length" field. 274 When an ITR, PITR, or RTR sends a Map-Request, they will encode their 275 own RLOC in the Security Type LCAF format within the ITR-RLOCs field. 276 When a ETR or RTR sends a Map-Reply, they will encode their RLOCs in 277 Security Type LCAF format within the RLOC-record field of each EID- 278 record supplied. 280 If an ITR, PITR, or RTR sends a Map-Request with the Security Type 281 LCAF included and the ETR or RTR does not want to have encapsulated 282 traffic encrypted, they will return a Map-Reply with no RLOC records 283 encoded with the Security Type LCAF. This signals to the ITR, PITR 284 or RTR not to encrypt traffic (it cannot encrypt traffic anyways 285 since no ETR public-key was returned). 287 Likewise, if an ITR or PITR wish to include multiple key-ids in the 288 Map-Request but the ETR or RTR wish to use some but not all of the 289 key-ids, they return a Map-Reply only for those key-ids they wish to 290 use. 292 7. Shared Keys used for the Data-Plane 294 When an ITR or PITR receives a Map-Reply accepting the Cipher Suite 295 sent in the Map-Request, it is ready to create data plane keys. The 296 same process is followed by the ETR or RTR returning the Map-Reply. 298 The first step is to create a shared secret, using the peer's shared 299 Diffie-Hellman Public Key Material combined with device's own private 300 keying material as described in Section 5. The Diffie-Hellman 301 parameters used is defined in the cipher suite sent in the Map- 302 Request and copied into the Map-Reply. 304 The resulting shared secret is used to compute an AEAD-key for the 305 algorithms specified in the cipher suite. A Key Derivation Function 306 (KDF) in counter mode as specified by [NIST-SP800-108] is used to 307 generate the data-plane keys. The amount of keying material that is 308 derived depends on the algorithms in the cipher suite. 310 The inputs to the KDF are as follows: 312 o KDF function. This is HMAC-SHA-256. 314 o A key for the KDF function. This is the computed Diffie-Hellman 315 shared secret. 317 o Context that binds the use of the data-plane keys to this session. 318 The context is made up of the following fields, which are 319 concatenated and provided as the data to be acted upon by the KDF 320 function. 322 Context: 324 o A counter, represented as a two-octet value in network byte order. 326 o The null-terminated string "lisp-crypto". 328 o The ITR's nonce from the Map-Request the cipher suite was included 329 in. 331 o The number of bits of keying material required (L), represented as 332 a two-octet value in network byte order. 334 The counter value in the context is first set to 1. When the amount 335 of keying material exceeds the number of bits returned by the KDF 336 function, then the KDF function is called again with the same inputs 337 except that the counter increments for each call. When enough keying 338 material is returned, it is concatenated and used to create keys. 340 For example, AES with 128-bit keys requires 16 octets (128 bits) of 341 keying material, and HMAC-SHA1-96 requires another 16 octets (128 342 bits) of keying material in order to maintain a consistent 128-bits 343 of security. Since 32 octets (256 bits) of keying material are 344 required, and the KDF function HMAC-SHA-256 outputs 256 bits, only 345 one call is required. The inputs are as follows: 347 key-material = HMAC-SHA-256(dh-shared-secret, context) 349 where: context = 0x0001 || "lisp-crypto" || || 0x0100 351 In contrast, a cipher suite specifying AES with 256-bit keys requires 352 32 octets (256 bits) of keying material, and HMAC-SHA256-128 requires 353 another 32 octets (256 bits) of keying material in order to maintain 354 a consistent 256-bits of security. Since 64 octets (512 bits) of 355 keying material are required, and the KDF function HMAC-SHA-256 356 outputs 256 bits, two calls are required. 358 key-material-1 = HMAC-SHA-256(dh-shared-secret, context) 360 where: context = 0x0001 || "lisp-crypto" || || 0x0200 362 key-material-2 = HMAC-SHA-256(dh-shared-secret, context) 364 where: context = 0x0002 || "lisp-crypto" || || 0x0200 366 key-material = key-material-1 || key-material-2 368 If the key-material is longer than the required number of bits (L), 369 then only the most significant L bits are used. 371 From the derived key-material, the most significant 256 bits are used 372 for the AEAD-key by AEAD ciphers. The 256-bit AEAD-key is divided 373 into a 128-bit encryption key and a 128-bit integrity check key 374 internal to the cipher used by the ITR. 376 8. Data-Plane Operation 378 The LISP encapsulation header [RFC6830] requires changes to encode 379 the key-id for the key being used for encryption. 381 0 1 2 3 382 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 383 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 384 / | Source Port = xxxx | Dest Port = 4341 | 385 UDP +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 386 \ | UDP Length | UDP Checksum | 387 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 388 L / |N|L|E|V|I|R|K|K| Nonce/Map-Version |\ \ 389 I +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |A 390 S \ | Instance ID/Locator-Status-Bits | |D 391 P +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |/ 392 | Initialization Vector (IV) | I 393 E +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ C 394 n / | | V 395 c | | | 396 r | Packet Payload with EID Header ... | | 397 y | | | 398 p \ | |/ 399 t +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 401 K-bits indicate when packet is encrypted and which key used 403 When the KK bits are 00, the encapsulated packet is not encrypted. 404 When the value of the KK bits are 1, 2, or 3, it encodes the key-id 405 of the secret keys computed during the Diffie-Hellman Map-Request/ 406 Map-Reply exchange. When the KK bits are not 0, the payload is 407 prepended with an Initialization Vector (IV). The length of the IV 408 field is based on the cipher suite used. Since all cipher suites 409 defined in this document do Authenticated Encryption (AEAD), an ICV 410 field does not need to be present in the packet since it is included 411 in the ciphertext. The Additional Data (AD) used for the ICV is 412 shown above and includes the LISP header, the IV field and the packet 413 payload. 415 When an ITR or PITR receives a packet to be encapsulated, they will 416 first decide what key to use, encode the key-id into the LISP header, 417 and use that key to encrypt all packet data that follows the LISP 418 header. Therefore, the outer header, UDP header, and LISP header 419 travel as plaintext. 421 There is an open working group item to discuss if the data 422 encapsulation header needs change for encryption or any new 423 applications. This document proposes changes to the existing header 424 so experimentation can continue without making large changes to the 425 data-plane at this time. This document allocates 2 bits of the 426 previously unused 3 flag bits (note the R-bit above is still a 427 reserved flag bit as documented in [RFC6830]) for the KK bits. 429 9. Procedures for Encryption and Decryption 431 When an ITR, PITR, or RTR encapsulate a packet and have already 432 computed an AEAD-key (detailed in section Section 7) that is 433 associated with a destination RLOC, the following encryption and 434 encapsulation procedures are performed: 436 1. The encapsulator creates an IV and prepends the IV value to the 437 packet being encapsulated. For GCM and Chacha cipher suites, the 438 IV is incremented for every packet (beginning with a value of 1 439 in the first packet) and sent to the destination RLOC. For CBC 440 cipher suites, the IV is a new random number for every packet 441 sent to the destination RLOC. For the Chacha cipher suite, the 442 IV is an 8-byte random value that is appended to a 4-byte counter 443 that is incremented for every packet (beginning with a value of 1 444 in the first packet). 446 2. Next encrypt with cipher function AES or Chacha20 using the AEAD- 447 key over the packet payload following the AEAD specification 448 referenced in the cipher suite definition. This does not include 449 the IV. The IV must be transmitted as plaintext so the decrypter 450 can use it as input to the decryption cipher. The payload should 451 be padded to an integral number of bytes a block cipher may 452 require. The result of the AEAD operation may contain an ICV, 453 the size of which is defined by the referenced AEAD 454 specification. Note that the AD (i.e. the LISP header exactly as 455 will be prepended in the next step and the IV) must be given to 456 the AEAD encryption function as the "associated data" argument. 458 3. Prepend the LISP header. The key-id field of the LISP header is 459 set to the key-id value that corresponds to key-pair used for the 460 encryption cipher. 462 4. Lastly, prepend the UDP header and outer IP header onto the 463 encrypted packet and send packet to destination RLOC. 465 When an ETR, PETR, or RTR receive an encapsulated packet, the 466 following decapsulation and decryption procedures are performed: 468 1. The outer IP header, UDP header, LISP header, and IV field are 469 stripped from the start of the packet. The LISP header and IV 470 are retained and given to the AEAD decryption operation as the 471 "associated data" argument. 473 2. The packet is decrypted using the AEAD-key and the IV from the 474 packet. The AEAD-key is obtained from a local-cache associated 475 with the key-id value from the LISP header. The result of the 476 decryption function is a plaintext packet payload if the cipher 477 returned a verified ICV. Otherwise, the packet has been tampered 478 with and is discarded. If the AEAD specification included an 479 ICV, the AEAD decryption function will locate the ICV in the 480 ciphertext and compare it to a version of the ICV that the AEAD 481 decryption function computes. If the computed ICV is different 482 than the ICV located in the ciphertext, then it will be 483 considered tampered. 485 3. If the packet was not tampered with, the decrypted packet is 486 forwarded to the destination EID. 488 10. Dynamic Rekeying 490 Since multiple keys can be encoded in both control and data messages, 491 an ITR can encapsulate and encrypt with a specific key while it is 492 negotiating other keys with the same ETR. As soon as an ETR or RTR 493 returns a Map-Reply, it should be prepared to decapsulate and decrypt 494 using the new keys computed with the new Diffie-Hellman parameters 495 received in the Map-Request and returned in the Map-Reply. 497 RLOC-probing can be used to change keys or cipher suites by the ITR 498 at any time. And when an initial Map-Request is sent to populate the 499 ITR's map-cache, the Map-Request flows across the mapping system 500 where a single ETR from the Map-Reply RLOC-set will respond. If the 501 ITR decides to use the other RLOCs in the RLOC-set, it MUST send a 502 Map-Request directly to negotiate security parameters with the ETR. 503 This process may be used to test reachability from an ITR to an ETR 504 initially when a map-cache entry is added for the first time, so an 505 ITR can get both reachability status and keys negotiated with one 506 Map-Request/Map-Reply exchange. 508 A rekeying event is defined to be when an ITR or PITR changes the 509 cipher suite or public-key in the Map-Request. The ETR or RTR 510 compares the cipher suite and public-key it last received from the 511 ITR for the key-id, and if any value has changed, it computes a new 512 public-key and cipher suite requested by the ITR from the Map-Request 513 and returns it in the Map-Reply. Now a new shared secret is computed 514 and can be used for the key-id for encryption by the ITR and 515 decryption by the ETR. When the ITR or PITR starts this process of 516 negotiating a new key, it must not use the corresponding key-id in 517 encapsulated packets until it receives a Map-Reply from the ETR with 518 the same cipher suite value it expects (the values it sent in a Map- 519 Request). 521 Note when RLOC-probing continues to maintain RLOC reachability and 522 rekeying is not desirable, the ITR or RTR can either not include the 523 Security Type LCAF in the Map-Request or supply the same key material 524 as it received from the last Map-Reply from the ETR or RTR. This 525 approach signals to the ETR or RTR that no rekeying event is 526 requested. 528 11. Future Work 530 For performance considerations, newer Elliptic-Curve Diffie-Hellman 531 (ECDH) groups can be used as specified in [RFC4492] and [RFC6090] to 532 reduce CPU cycles required to compute shared secret keys. 534 For better security considerations as well as to be able to build 535 faster software implementations, newer approaches to ciphers and 536 authentication methods will be researched and tested. Some examples 537 are Chacha20 and Poly1305 [CHACHA-POLY] [RFC7539]. 539 12. Security Considerations 541 12.1. SAAG Support 543 The LISP working group received security advice and guidance from the 544 Security Area Advisory Group (SAAG). The SAAG has been involved 545 early in the design process and their input and reviews have been 546 included in this document. 548 Comments from the SAAG included: 550 1. Do not use asymmetric ciphers in the data-plane. 552 2. Consider adding ECDH early in the design. 554 3. Add cipher suites because ciphers are created more frequently 555 than protocols that use them. 557 4. Consider the newer AEAD technology so authentication comes with 558 doing encryption. 560 12.2. LISP-Crypto Security Threats 562 Since ITRs and ETRs participate in key exchange over a public non- 563 secure network, a man-in-the-middle (MITM) could circumvent the key 564 exchange and compromise data-plane confidentiality. This can happen 565 when the MITM is acting as a Map-Replier, provides its own public key 566 so the ITR and the MITM generate a shared secret key among each 567 other. If the MITM is in the data path between the ITR and ETR, it 568 can use the shared secret key to decrypt traffic from the ITR. 570 Since LISP can secure Map-Replies by the authentication process 571 specified in [LISP-SEC], the ITR can detect when a MITM has signed a 572 Map-Reply for an EID-prefix it is not authoritative for. When an ITR 573 determines the signature verification fails, it discards and does not 574 reuse the key exchange parameters, avoids using the ETR for 575 encapsulation, and issues a severe log message to the network 576 administrator. Optionally, the ITR can send RLOC-probes to the 577 compromised RLOC to determine if can reach the authoritative ETR. 578 And when the ITR validates the signature of a Map-Reply, it can begin 579 encrypting and encapsulating packets to the RLOC of ETR. 581 13. IANA Considerations 583 This document describes a mechanism for encrypting LISP encapsulated 584 packets based on Diffie-Hellman key exchange procedures. During the 585 exchange the devices have to agree on a Cipher Suite used (i.e. the 586 cipher and hash functions used to encrypt/decrypt and to sign/verify 587 packets). The 8-bit Cipher Suite field is reserved for such purpose 588 in the security material section of the Map-Request and Map-Reply 589 messages. 591 This document requests IANA to create and maintain a new registry (as 592 outlined in [RFC5226]) entitled "LISP Crypto Cipher Suite". Initial 593 values for the registry are provided below. Future assignments are 594 to be made on a First Come First Served Basis. 596 +-----+--------------------------------------------+------------+ 597 |Value| Suite | Definition | 598 +-----+--------------------------------------------+------------+ 599 | 0 | Reserved | Section 6 | 600 +-----+--------------------------------------------+------------+ 601 | 1 | LISP_2048MODP_AES128_CBC_SHA256 | Section 6 | 602 +-----+--------------------------------------------+------------+ 603 | 2 | LISP_EC25519_AES128_CBC_SHA256 | Section 6 | 604 +-----+--------------------------------------------+------------+ 605 | 3 | LISP_2048MODP_AES128_GCM | Section 6 | 606 +-----+--------------------------------------------+------------+ 607 | 4 | LISP_3072MODP_AES128_GCM M-3072 | Section 6 | 608 +-----+--------------------------------------------+------------+ 609 | 5 | LISP_256_EC25519_AES128_GCM | Section 6 | 610 +-----+--------------------------------------------+------------+ 611 | 6 | LISP_256_EC25519_CHACHA20_POLY1305 | Section 6 | 612 +-----+--------------------------------------------+------------+ 614 LISP Crypto Cipher Suites 616 14. References 618 14.1. Normative References 620 [LCAF] Farinacci, D., Meyer, D., and J. Snijders, "LISP Canonical 621 Address Format", draft-ietf-lisp-lcaf-13.txt (work in 622 progress). 624 [NIST-SP800-108] 625 "National Institute of Standards and Technology, 626 "Recommendation for Key Derivation Using Pseudorandom 627 Functions NIST SP800-108"", NIST SP 800-108, October 2009. 629 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 630 Requirement Levels", BCP 14, RFC 2119, 631 DOI 10.17487/RFC2119, March 1997, 632 . 634 [RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", 635 RFC 2631, DOI 10.17487/RFC2631, June 1999, 636 . 638 [RFC3526] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) 639 Diffie-Hellman groups for Internet Key Exchange (IKE)", 640 RFC 3526, DOI 10.17487/RFC3526, May 2003, 641 . 643 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 644 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 645 for Transport Layer Security (TLS)", RFC 4492, 646 DOI 10.17487/RFC4492, May 2006, 647 . 649 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 650 Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, 651 . 653 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 654 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 655 DOI 10.17487/RFC5226, May 2008, 656 . 658 [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic 659 Curve Cryptography Algorithms", RFC 6090, 660 DOI 10.17487/RFC6090, February 2011, 661 . 663 [RFC6830] Farinacci, D., Fuller, V., Meyer, D., and D. Lewis, "The 664 Locator/ID Separation Protocol (LISP)", RFC 6830, 665 DOI 10.17487/RFC6830, January 2013, 666 . 668 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 669 Morris, J., Hansen, M., and R. Smith, "Privacy 670 Considerations for Internet Protocols", RFC 6973, 671 DOI 10.17487/RFC6973, July 2013, 672 . 674 [RFC7539] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF 675 Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015, 676 . 678 14.2. Informative References 680 [AES-CBC] McGrew, D., Foley, J., and K. Paterson, "Authenticated 681 Encryption with AES-CBC and HMAC-SHA", draft-mcgrew-aead- 682 aes-cbc-hmac-sha2-05.txt (work in progress). 684 [CHACHA-POLY] 685 Langley, A., "ChaCha20 and Poly1305 based Cipher Suites 686 for TLS", draft-agl-tls-chacha20poly1305-04 (work in 687 progress). 689 [CURVE25519] 690 Bernstein, D., "Curve25519: new Diffie-Hellman speed 691 records", Publication 692 http://www.iacr.org/cryptodb/archive/2006/ 693 PKC/3351/3351.pdf. 695 [DH] "Diffie-Hellman key exchange", Wikipedia 696 http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange. 698 [LISP-DDT] 699 Fuller, V., Lewis, D., Ermaagan, V., and A. Jain, "LISP 700 Delegated Database Tree", draft-fuller-lisp-ddt-04 (work 701 in progress). 703 [LISP-SEC] 704 Maino, F., Ermagan, V., Cabellos, A., and D. Saucez, 705 "LISP-Secuirty (LISP-SEC)", draft-ietf-lisp-sec-10 (work 706 in progress). 708 Appendix A. Acknowledgments 710 The authors would like to thank Dan Harkins, Joel Halpern, Fabio 711 Maino, Ed Lopez, Roger Jorgensen, and Watson Ladd for their interest, 712 suggestions, and discussions about LISP data-plane security. An 713 individual thank you to LISP WG chair Luigi Iannone for shepherding 714 this document as well as contributing to the IANA Considerations 715 section. 717 The authors would like to give a special thank you to Ilari Liusvaara 718 for his extensive commentary and discussion. He has contributed his 719 security expertise to make lisp-crypto as secure as the state of the 720 art in cryptography. 722 In addition, the support and suggestions from the SAAG working group 723 were helpful and appreciative. 725 Appendix B. Document Change Log 727 [RFC Editor: Please delete this section on publication as RFC.] 729 B.1. Changes to draft-ietf-lisp-crypto-08.txt 731 o Posted September 2016. 733 o Addressed comments from Security Directorate reviewer Chris 734 Lonvick. 736 B.2. Changes to draft-ietf-lisp-crypto-07.txt 738 o Posted September 2016. 740 o Addressed comments from Routing Directorate reviewer Danny 741 McPherson. 743 B.3. Changes to draft-ietf-lisp-crypto-06.txt 745 o Posted June 2016. 747 o Fixed IDnits errors. 749 B.4. Changes to draft-ietf-lisp-crypto-05.txt 751 o Posted June 2016. 753 o Update document which reflects comments Luigi provided as document 754 shepherd. 756 B.5. Changes to draft-ietf-lisp-crypto-04.txt 758 o Posted May 2016. 760 o Update document timer from expiration. 762 B.6. Changes to draft-ietf-lisp-crypto-03.txt 764 o Posted December 2015. 766 o Changed cipher suite allocations. We now have 2 AES-CBC cipher 767 suites for compatibility, 3 AES-GCM cipher suites that are faster 768 ciphers that include AE and a Chacha20-Poly1305 cipher suite which 769 is the fastest but not totally proven/accepted.. 771 o Remove 1024-bit DH keys for key exchange. 773 o Make clear that AES and chacha20 ciphers use AEAD so part of 774 encrytion/decryption does authentication. 776 o Make it more clear that separate key pairs are used in each 777 direction between xTRs. 779 o Indicate that the IV length is different per cipher suite. 781 o Use a counter based IV for every packet for AEAD ciphers. 782 Previously text said to use a random number. But CBC ciphers, use 783 a random number. 785 o Indicate that key material is sent in network byte order (big 786 endian). 788 o Remove A-bit from Security Type LCAF. No need to do 789 authentication only with the introduction of AEAD ciphers. These 790 ciphers can do authentication. So you get ciphertext for free. 792 o Remove language that refers to "encryption-key" and "integrity- 793 key". Used term "AEAD-key" that is used by the AEAD cipher suites 794 that do encryption and authenticaiton internal to the cipher. 796 B.7. Changes to draft-ietf-lisp-crypto-02.txt 798 o Posted September 2015. 800 o Add cipher suite for Elliptic Curve 25519 DH exchange. 802 o Add cipher suite for Chacha20/Poly1305 ciphers. 804 B.8. Changes to draft-ietf-lisp-crypto-01.txt 806 o Posted May 2015. 808 o Create cipher suites and encode them in the Security LCAF. 810 o Add IV to beginning of packet header and ICV to end of packet. 812 o AEAD procedures are now part of encrpytion process. 814 B.9. Changes to draft-ietf-lisp-crypto-00.txt 816 o Posted January 2015. 818 o Changing draft-farinacci-lisp-crypto-01 to draft-ietf-lisp-crypto- 819 00. This draft has become a working group document 821 o Add text to indicate the working group may work on a new data 822 encapsulation header format for data-plane encryption. 824 B.10. Changes to draft-farinacci-lisp-crypto-01.txt 826 o Posted July 2014. 828 o Add Group-ID to the encoding format of Key Material in a Security 829 Type LCAF and modify the IANA Considerations so this draft can use 830 key exchange parameters from the IANA registry. 832 o Indicate that the R-bit in the Security Type LCAF is not used by 833 lisp-crypto. 835 o Add text to indicate that ETRs/RTRs can negotiate less number of 836 keys from which the ITR/PITR sent in a Map-Request. 838 o Add text explaining how LISP-SEC solves the problem when a man-in- 839 the-middle becomes part of the Map-Request/Map-Reply key exchange 840 process. 842 o Add text indicating that when RLOC-probing is used for RLOC 843 reachability purposes and rekeying is not desired, that the same 844 key exchange parameters should be used so a reallocation of a 845 pubic key does not happen at the ETR. 847 o Add text to indicate that ECDH can be used to reduce CPU 848 requirements for computing shared secret-keys. 850 B.11. Changes to draft-farinacci-lisp-crypto-00.txt 852 o Initial draft posted February 2014. 854 Authors' Addresses 856 Dino Farinacci 857 lispers.net 858 San Jose, California 95120 859 USA 861 Phone: 408-718-2001 862 Email: farinacci@gmail.com 864 Brian Weis 865 cisco Systems 866 170 West Tasman Drive 867 San Jose, California 95124-1706 868 USA 870 Phone: 408-526-4796 871 Email: bew@cisco.com