RFC 8061

Locator/ID Separation Protocol (LISP) Data-Plane Confidentiality

๐Ÿ“… published February 2017, from ietf

RFC 8061: Locator/ID Separation Protocol (LISP) Data-Plane Confidentiality ๐Ÿฆ‹

(Part 1 of 4) ๐Ÿ’– Okay bestie, let's start with the title block because it's giving a lot of info! ๐Ÿ‘‘ This is RFC 8061, and it's written by D. Farinacci (lispers.net) and B. Weis (Cisco Systems) ๐ŸŒธ. It was published in February 2017 and is marked Experimental ๐Ÿงช, so it's more of a "come try this out and tell us how it goes" kind of doc than a finished standard. Its ISSN is 2070-1721. It doesn't list anything it obsoletes or updates, so no drama there ๐Ÿ’….

Abstract โœจ

Okay so this doc is about encrypting traffic that gets wrapped up with LISP (the Locator/ID Separation Protocol) ๐Ÿ”. It explains how two sides can agree on keys using the LISP control-plane stuff that already exists, and how to lock down the LISP data plane so third parties snooping on the traffic can't read it ๐Ÿ‘€. Main character energy for privacy! ๐ŸŽ€

Status of This Memo ๐ŸŒˆ

Real talk: this document is not an Internet Standards Track spec ๐Ÿ™ˆ. It's published so people can examine it, try implementing it, and evaluate it. โœจ

It defines an Experimental Protocol for the Internet community ๐Ÿงš. It's a product of the IETF, and it reflects the IETF community's consensus ๐Ÿซถ. It got public review and was approved for publication by the IESG (Internet Engineering Steering Group). Not every IESG-approved doc is up for any level of Internet Standard, so check Section 2 of RFC 7841 if you're curious about that ๐Ÿ“.

If you want the latest status, errata, or a way to send feedback, head to http://www.rfc-editor.org/info/rfc8061 ๐Ÿ’œ.

Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. ๐Ÿ”ฅ

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stand on the publication date. Please actually read those, bestie, because they spell out your rights and restrictions for this document ๐Ÿ“œ. Any Code Components you pull out of this document have to include the Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as the Simplified BSD License says ๐ŸŒธ.

Table of Contents ๐ŸŽ€

   1. Introduction ....................................................3
   2. Requirements Notation ...........................................4
   3. Definition of Terms .............................................4
   4. Overview ........................................................4
   5. Diffie-Hellman Key Exchange .....................................5
   6. Encoding and Transmitting Key Material ..........................6
   7. Shared Keys Used for the Data Plane .............................8
   8. Data-Plane Operation ...........................................10
   9. Procedures for Encryption and Decryption .......................11
   10. Dynamic Rekeying ..............................................12
   11. Future Work ...................................................13
   12. Security Considerations .......................................14
      12.1. SAAG Support .............................................14
      12.2. LISP-Crypto Security Threats .............................14
   13. IANA Considerations ...........................................15
   14. References ....................................................16
      14.1. Normative References .....................................16
      14.2. Informative References ...................................17
   Acknowledgments ...................................................18
   Authors' Addresses ................................................18

1. Introduction โœจ

Okay, so this doc is about encrypting LISP-encapsulated traffic ๐Ÿ”. It shows how key exchange happens using the LISP control-plane mechanisms that already exist, and how to protect the LISP data plane from third-party surveillance ๐Ÿ‘๏ธ.

The Locator/ID Separation Protocol [RFC6830] is basically a set of functions that let routers swap info so they can map non-routable Endpoint Identifiers (EIDs) to routable Routing Locators (RLOCs) ๐Ÿ—บ๏ธ. LISP Ingress Tunnel Routers (ITRs) and Proxy Ingress Tunnel Routers (PITRs) do the encapsulating, sending packets to Egress Tunnel Routers (ETRs) and Re-encapsulating Tunnel Routers (RTRs) ๐Ÿฆ‹. Packets that show up at an ITR or PITR might not be encrypted, which means no protection or privacy gets added to the data ๐Ÿ˜ฌ. If the source host already encrypts its data stream, LISP doesn't need to encrypt the encapsulated packets again ๐Ÿ’œ. But when hosts send plaintext, this design can encrypt the user payload to keep it private on the path between the encapsulator (the ITR or PITR) and the decapsulator (the ETR or RTR) ๐Ÿซถ. The encrypted payload only goes one way ๐Ÿ’…. Return traffic uses the same procedures but with different key values, and it might even go through different xTRs if the paths between LISP sites are asymmetric ๐ŸŒˆ.

This doc has the following requirements for the solution space, on top of the general requirements from [RFC6973] ๐Ÿ“‹:

  • Do not require a separate Public Key Infrastructure (PKI) that is out of scope of the LISP control-plane architecture.
  • The budget for key exchange MUST be one round-trip time. That is, only a two-packet exchange can occur.
  • Use symmetric keying so faster cryptography can be performed in the LISP data plane.
  • Avoid a third-party trust anchor if possible.
  • Provide for rekeying when secret keys are compromised.
  • Support Authenticated Encryption with packet integrity checks.
  • Support multiple Cipher Suites so new crypto algorithms can be easily introduced.

Meeting those requirements gets you these perks ๐ŸŽ‰:

  • Skipping a PKI cuts the operational cost of running a secure network ๐Ÿ’ฐ. Key management is distributed and doesn't depend on any other infrastructure ๐Ÿงฉ.
  • Packet transport gets optimized because there are fewer packet headers ๐Ÿš€. Packet loss goes down thanks to a more efficient key exchange ๐Ÿ“‰.
  • Authentication and privacy come from a single mechanism, so there's less per-packet overhead and more resource efficiency ๐Ÿ”‹.

2. Requirements Notation ๐Ÿ’–

Okay so 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] ๐Ÿ“–.

3. Definition of Terms ๐Ÿง 

  • AEAD: Authenticated Encryption with Associated Data [RFC5116]
  • ICV: Integrity Check Value
  • LCAF: LISP Canonical Address Format [RFC8060]
  • xTR: A general reference to ITRs, ETRs, RTRs, and PxTRs

4. Overview ๐ŸŒธ

The approach in this doc is NOT to rely on the LISP mapping system (or any other key-infrastructure system) to store security keys ๐Ÿ™…โ€โ™€๏ธ. That keeps things simpler and more secure, which is iconic โœจ. Secret shared keys get negotiated between the ITR and the ETR inside Map-Request and Map-Reply messages ๐Ÿ’Œ. So when an ITR needs an ETR's RLOC, it also gets the security material it needs to compute a shared secret with that ETR ๐Ÿ”‘.

The ITR can compute three shared secrets per ETR it's encapsulating to ๐ŸŽ€. When the ITR encrypts a packet before encapsulating it, it identifies the key it used for the crypto calculation, so the ETR knows which key to use to decrypt the packet after decapsulation ๐Ÿ•ต๏ธโ€โ™€๏ธ. By putting key-ids in the LISP header, we also get fast rekeying ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ.

The key management in this doc only goes one way, from the ITR (the encapsulator) to the ETR (the decapsultor) ๐Ÿฆ‹.

5. Diffie-Hellman Key Exchange ๐Ÿ”ฅ

So LISP is going to use a Diffie-Hellman [RFC2631] key exchange sequence and computation to come up with a shared secret ๐Ÿค. The Diffie-Hellman parameters get passed through Cipher Suite code-points in Map-Request and Map-Reply messages ๐Ÿ“ฌ.

Here's a quick rundown of how Diffie-Hellman works, because it's honestly so cool ๐Ÿ˜ญ:

   +----------------------------+---------+----------------------------+
   |              ITR           |         |           ETR              |
   +------+--------+------------+---------+------------+---------------+
   |Secret| Public | Calculates |  Sends  | Calculates | Public |Secret|
   +------|--------|------------|---------|------------|--------|------+
   |  i   |  p,g   |            | p,g --> |            |        |  e   |
   +------|--------|------------|---------|------------|--------|------+
   |  i   | p,g,I  |g^i mod p=I |  I -->  |            | p,g,I  |  e   |
   +------|--------|------------|---------|------------|--------|------+
   |  i   | p,g,I  |            |  <-- E  |g^e mod p=E |  p,g   |  e   |
   +------|--------|------------|---------|------------|--------|------+
   | i,s  |p,g,I,E |E^i mod p=s |         |I^e mod p=s |p,g,I,E | e,s  |
   +------|--------|------------|---------|------------|--------|------+

        Public-Key Exchange for Computing a Shared Private Key [DH]

Here's the flow ๐Ÿ’ซ. The Diffie-Hellman parameters 'p' and 'g' must be the same values the ITR and ETR use. The ITR works out its public key 'I' and sends 'I' in a Map-Request packet ๐Ÿ“จ. When the ETR gets that Map-Request, it uses 'p' and 'g' to compute its own public key 'E' ๐Ÿงฎ. The ETR sends 'E' back in a Map-Reply message ๐Ÿ’œ. At this point the ETR has enough info to compute 's', the shared secret, by using 'I' as the base and its private key 'e' as the exponent ๐Ÿฅน. When the ITR gets the Map-Reply, it uses the ETR's public key 'E' along with its own private key 'i' to compute the same 's' the ETR got ๐ŸŽ‰. The value 'p' is used as a modulus to set the width of the shared secret 's' (see Section 6) โœจ.

Part 2 is coming up next, so stay tuned, bestie ๐Ÿซถ๐Ÿฆ‹

6. Encoding and Transmitting Key Material โœจ

okay so the Diffie-Hellman key material rides along inside Map-Request and Map-Reply messages ๐Ÿ’Œ and the parameters get packed into the LISP Security Key LCAF Type [RFC8060]. here's the layout bestie ๐Ÿซถ

 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           AFI = 16387         |     Rsvd1     |     Flags     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 11   |      Rsvd2    |             6 + n             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Key Count   |      Rsvd3    | Cipher Suite  |   Rsvd4     |R|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Key Length          |     Public Key Material ...   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    ... Public Key Material                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              AFI = x          |       Locator Address ...     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Cipher Suite field is where the DH key exchange plus the cipher and hash functions get picked ๐Ÿ’…

The Key Count field tells you how many {'Key-Length', 'Key-Material'} pairs are in the LCAF. You can fit up to three keys, and they're tagged key-id 1, then key-id 2, then key-id 3. Iconic ordering ๐Ÿ‘‘

The R bit isn't used for this use case of the Security Key LCAF Type. It's saved for [LISP-DDT] security instead. So the R bit SHOULD be transmitted as 0 and MUST be ignored on receipt ๐Ÿ™ˆ

Here are the cipher suites, all spelled out:

Cipher Suite 0:
   Reserved

Cipher Suite 1 (LISP_2048MODP_AES128_CBC_SHA256):
   Diffie-Hellman Group: 2048-bit MODP [RFC3526]
   Encryption:  AES with 128-bit keys in CBC mode [AES-CBC]
   Integrity:   Integrated with AEAD_AES_128_CBC_HMAC_SHA_256 [AES-CBC]
   IV length:   16 bytes
   KDF:         HMAC-SHA-256

Cipher Suite 2 (LISP_EC25519_AES128_CBC_SHA256):
   Diffie-Hellman Group: 256-bit Elliptic-Curve 25519 [CURVE25519]
   Encryption:  AES with 128-bit keys in CBC mode [AES-CBC]
   Integrity:   Integrated with AEAD_AES_128_CBC_HMAC_SHA_256 [AES-CBC]
   IV length:   16 bytes
   KDF:         HMAC-SHA-256

Cipher Suite 3 (LISP_2048MODP_AES128_GCM):
   Diffie-Hellman Group: 2048-bit MODP [RFC3526]
   Encryption:  AES with 128-bit keys in GCM mode [RFC5116]
   Integrity:   Integrated with AEAD_AES_128_GCM [RFC5116]
   IV length:   12 bytes
   KDF:         HMAC-SHA-256

Cipher Suite 4 (LISP_3072MODP_AES128_GCM):
   Diffie-Hellman Group: 3072-bit MODP [RFC3526]
   Encryption:  AES with 128-bit keys in GCM mode [RFC5116]
   Integrity:   Integrated with AEAD_AES_128_GCM [RFC5116]
   IV length:   12 bytes
   KDF:         HMAC-SHA-256

Cipher Suite 5 (LISP_256_EC25519_AES128_GCM):
   Diffie-Hellman Group: 256-bit Elliptic-Curve 25519 [CURVE25519]
   Encryption:  AES with 128-bit keys in GCM mode [RFC5116]
   Integrity:   Integrated with AEAD_AES_128_GCM [RFC5116]
   IV length:   12 bytes
   KDF:         HMAC-SHA-256

Cipher Suite 6 (LISP_256_EC25519_CHACHA20_POLY1305):
   Diffie-Hellman Group: 256-bit Elliptic-Curve 25519 [CURVE25519]
   Encryption: Chacha20-Poly1305 [CHACHA-POLY] [RFC7539]
   Integrity:  Integrated with AEAD_CHACHA20_POLY1305 [CHACHA-POLY]
   IV length:  8 bytes
   KDF:        HMAC-SHA-256

The Public Key Material field holds the public key made by whichever Cipher Suite is listed above. Its length, in octets, goes in the Key Length field ๐ŸŒธ

When an ITR, PITR, or RTR sends a Map-Request, it puts its own RLOC into the ITR-RLOCs field, encoded in the Security Key LCAF Type format. When an ETR or RTR sends a Map-Reply, it puts its RLOCs in that same format inside the RLOC-record field of each EID-record it supplies. ๐Ÿฆ‹

Now the plot twist ๐Ÿ˜ญ If an ITR, PITR, or RTR sends a Map-Request with the Security Key LCAF Type included, but the ETR or RTR doesn't want the encapsulated traffic encrypted, it sends back a Map-Reply with no RLOC-records encoded with the Security Key LCAF Type. That tells the ITR, PITR, or RTR not to encrypt anything. It can't encrypt anyway, since no ETR public key came back. ๐Ÿ’€

Same energy for multiple keys: if an ITR or PITR wants to include several key-ids in the Map-Request, but the ETR or RTR only wants some of them, the ETR or RTR replies only for the key-ids it actually wants to use. Very selective, very valid ๐Ÿ’…


7. Shared Keys Used for the Data Plane

okay this is where the data-plane keys get made ๐Ÿ”ฅ When an ITR or PITR gets a Map-Reply that accepts the Cipher Suite it sent in the Map-Request, it's ready to make the data-plane keys. The ETR or RTR does the same thing when it returns the Map-Reply โœจ

Step one is making a shared secret. You take the peer's shared Diffie-Hellman Public Key Material and combine it with your own private keying material, just like in Section 5 ๐Ÿ’– The Diffie-Hellman parameters are the ones defined in the Cipher Suite that was sent in the Map-Request and copied into the Map-Reply.

Next, that shared secret gets used to compute an AEAD-key for the algorithms in the Cipher Suite. A Key Derivation Function (KDF) in counter mode, as specified by [NIST-SP800-108], then spits out the data-plane keys. How much keying material you derive depends on the algorithms in the Cipher Suite ๐Ÿงš

The inputs to the KDF are:

  • KDF function. This is HMAC-SHA-256 in this document, but each Cipher Suite definition generally specifies it.
  • A key for the KDF function. This is the computed Diffie-Hellman shared secret.
  • Context that ties the data-plane keys to this session. The context is made of the following fields, which get concatenated and handed to the KDF function as the data to act on. A Context is made up of these components:
    • A counter, as a two-octet value in network byte order.
    • The null-terminated string "lisp-crypto".
    • The ITR's nonce from the Map-Request that the Cipher Suite was included in.
    • The number of bits of keying material required (L), as a two-octet value in network byte order.

The counter in the context starts at 1. If the keying material needed is more than the number of bits the KDF returns, the KDF gets called again with the same inputs, except the counter goes up by one each time. Once there's enough keying material, it gets concatenated and used to make the keys ๐ŸŒˆ

Here's a worked example. AES with 128-bit keys needs 16 octets (128 bits) of keying material, and HMAC-SHA1-96 needs another 16 octets (128 bits) so everything keeps a consistent 128 bits of security. That's 32 octets (256 bits) total, and HMAC-SHA-256 outputs 256 bits, so only one call is needed. The inputs look like this:

key-material = HMAC-SHA-256(dh-shared-secret, context)

    where: context = 0x0001 || "lisp-crypto" || <itr-nonce> || 0x0100

Now the contrast ๐Ÿ‘‘ A Cipher Suite using AES with 256-bit keys needs 32 octets (256 bits) of keying material, and HMAC-SHA256-128 needs another 32 octets (256 bits) to keep a consistent 256 bits of security. That's 64 octets (512 bits) total, and HMAC-SHA-256 only outputs 256 bits, so two calls are needed:

key-material-1 = HMAC-SHA-256(dh-shared-secret, context)

    where: context = 0x0001 || "lisp-crypto" || <itr-nonce> || 0x0200

key-material-2 = HMAC-SHA-256(dh-shared-secret, context)

    where: context = 0x0002 || "lisp-crypto" || <itr-nonce> || 0x0200

key-material = key-material-1 || key-material-2

If the key-material is longer than the required number of bits (L), only the most significant L bits get used ๐Ÿซถ

From the derived key-material, the most significant 256 bits become the AEAD-key for AEAD ciphers. That 256-bit AEAD-key gets split into a 128-bit encryption key and a 128-bit integrity check key, which are internal to the cipher the ITR uses ๐Ÿ”


8. Data-Plane Operation

so the LISP encapsulation header [RFC6830] needs a tweak to carry the key-id for whichever key is doing the encrypting ๐Ÿ’…

 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ |       Source Port = xxxx      |       Dest Port = 4341        |
UDP +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ |           UDP Length          |        UDP Checksum           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
L / |N|L|E|V|I|R|K|K|            Nonce/Map-Version                  |\ \
I   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |A
S \ |                 Instance ID/Locator-Status-Bits               | |D
P   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |/
    |                   Initialization Vector (IV)                  | I
E   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ C
n / |                                                               | V
c   |                                                               | |
r   |                Packet Payload with EID Header ...             | |
y   |                                                               | |
p \ |                                                               |/
t   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

K-bits: they tell you whether a packet is encrypted and which key was used ๐Ÿฆ‹

When the KK bits are 00, the encapsulated packet isn't encrypted. When the KK bits are 1, 2, or 3, they hold the key-id of the secret keys computed during the Diffie-Hellman Map-Request/Map-Reply exchange. Whenever the KK bits aren't 0, the payload gets an Initialization Vector (IV) in front of it. How long the IV is depends on the Cipher Suite in use. Every Cipher Suite in this document does Authenticated Encryption with Associated Data (AEAD), so an ICV field doesn't need to be in the packet, because the ICV is already baked into the ciphertext. The Additional Data (AD) used for the ICV is the bit shown above, and it covers the LISP header, the IV field, and the packet payload ๐ŸŒธ

When an ITR or PITR gets a packet to encapsulate, the device first picks a key, encodes that key's key-id into the LISP header, and then uses that key to encrypt all the packet data after the LISP header. So the outer header, UDP header, and LISP header all travel as plaintext ๐Ÿ™ˆ

Quick heads up on the timeline: there's an open working group item asking whether the data encapsulation header needs to change for encryption or for any new applications. This document proposes changes to the existing header so experimentation can keep going without big data-plane changes right now. It uses two of the three previously unused flag bits for the KK bits. The R bit above is still a reserved flag bit, as documented in [RFC6830] โœจ

9. Procedures for Encryption and Decryption โœจ

okay so this is where the magic happens ๐Ÿ’– When an ITR, PITR, or RTR is encapsulating a packet and has already worked out an AEAD-key (more on that in Section 7) tied to a destination RLOC, it runs these encryption and encapsulation steps ๐Ÿ”:

  1. IV time! The encapsulator makes an IV and sticks it on the front of the packet being encapsulated. For GCM and ChaCha20 Cipher Suites, the IV goes up by one for every packet (starting at 1 for the very first packet) and gets sent to the destination RLOC. For CBC Cipher Suites, every packet sent to the destination RLOC gets a brand new random number as its IV. For the ChaCha20 Cipher Suite, the IV is an 8-byte random value tacked onto a 4-byte counter, and that counter goes up for every packet (starting at 1 in the first packet) ๐ŸŽ€
  2. Encrypt the payload! Next, encrypt with AES or ChaCha20 using the AEAD-key over the packet payload, following the AEAD specification referenced in the Cipher Suite definition. The IV is not part of this encryption. Heads up, the IV must be transmitted as plaintext so the decrypter can use it as input to the decryption cipher ๐Ÿ‘€ The payload should be padded to an integral number of bytes a block cipher may require. The result of the AEAD operation may contain an ICV, and its size is defined by the referenced AEAD specification. Also, the AD (basically the LISP header exactly as it will be prepended in the next step, plus the IV) must be given to the AEAD encryption function as the associated data argument ๐Ÿง 
  3. LISP header time. Prepend the LISP header. The key-id field gets set to the key-id value that matches the key-pair used for the encryption cipher ๐Ÿ—๏ธ
  4. Send it! Lastly, prepend the UDP header and outer IP header onto the encrypted packet and send it to the destination RLOC ๐Ÿš€

When an ETR, PETR, or RTR receives an encapsulated packet, it runs these decapsulation and decryption steps ๐Ÿ•ต๏ธโ€โ™€๏ธ:

  1. Strip the layers. The outer IP header, UDP header, LISP header, and IV field get stripped from the start of the packet. The LISP header and IV are kept and handed to the AEAD decryption operation as the associated data argument ๐Ÿงน
  2. Decrypt and verify. The packet is decrypted using the AEAD-key and the IV from the packet. The AEAD-key is pulled from a local-cache linked to the key-id value in the LISP header. The decryption result is a plaintext packet payload only if the cipher returned a verified ICV. Otherwise, the packet is invalid and gets discarded ๐Ÿ—‘๏ธ If the AEAD specification included an ICV, the AEAD decryption function finds the ICV in the ciphertext and compares it to its own computed version of the ICV. If the computed ICV is different from the one in the ciphertext, the packet is considered tampered ๐Ÿšจ
  3. Forward it. If the packet was not tampered with, the decrypted packet gets forwarded to the destination EID ๐Ÿ’Œ

10. Dynamic Rekeying ๐Ÿ”„

Since multiple keys can be encoded in both control and data messages, an ITR can encapsulate and encrypt with one specific key while it is negotiating other keys with the same ETR. As soon as an ETR or RTR returns a Map-Reply, it should be ready to decapsulate and decrypt using the new keys computed from the new Diffie-Hellman parameters that came in the Map-Request and went back out in the Map-Reply ๐Ÿ—๏ธโœจ

RLOC-probing can be used to change keys or Cipher Suites by the ITR at any time ๐Ÿ“ When an initial Map-Request is sent to fill up the ITR's map-cache, the Map-Request travels across the mapping system and a single ETR from the Map-Reply RLOC-set will respond. If the ITR decides to use the other RLOCs in the RLOC-set, it MUST send a Map-Request directly to negotiate security parameters with the ETR. This process may be used to test reachability from an ITR to an ETR when a map-cache entry is added for the first time, so an ITR can get both reachability status and negotiated keys from one Map-Request/Map-Reply exchange ๐Ÿงช

A rekeying event is defined as when an ITR or PITR changes the Cipher Suite or public key in the Map-Request ๐Ÿ” The ETR or RTR compares the Cipher Suite and public key it last received from the ITR for the key-id. If any value has changed, it computes a new public key and Cipher Suite requested by the ITR from the Map-Request, and returns them in the Map-Reply. Now a new shared secret is computed and can be used for that key-id, for encryption by the ITR and decryption by the ETR ๐Ÿ’– When the ITR or PITR starts negotiating this new key, it must not use the corresponding key-id in encapsulated packets until it receives a Map-Reply from the ETR with the same Cipher Suite value it expects (the values it sent in a Map-Request) โณ

Quick note: when RLOC-probing keeps RLOC reachability going and rekeying is not wanted, the ITR or RTR can either leave out the Security Key LCAF Type from the Map-Request, or supply the same key material it received from the last Map-Reply from the ETR or RTR. That approach tells the ETR or RTR that no rekeying event is requested ๐Ÿ™…โ€โ™€๏ธ

11. Future Work ๐Ÿ”ฎ

For performance, newer Elliptic-Curve Diffie-Hellman (ECDH) groups can be used as specified in [RFC4492] and [RFC6090] to cut down the CPU cycles needed to compute shared secret keys โšก

For better security, and so faster software implementations can be built, newer approaches to ciphers and authentication methods will be researched and tested ๐Ÿงช Some examples are ChaCha20 and Poly1305 [CHACHA-POLY] [RFC7539] ๐ŸŒˆ


12. Security Considerations ๐Ÿ›ก๏ธ

12.1. SAAG Support ๐Ÿ’Œ

The LISP working group received security advice and guidance from the Security Area Advisory Group (SAAG). The SAAG got involved early in the design process, and their input and reviews are included in this document ๐Ÿซถ

Comments from the SAAG included:

  1. Do not use asymmetric ciphers in the data plane.
  2. Consider adding ECDH early in the design.
  3. Add Cipher Suites because ciphers are created more frequently than protocols that use them.
  4. Consider the newer AEAD technology so authentication comes with doing encryption.

12.2. LISP-Crypto Security Threats ๐Ÿ˜ฑ

Since ITRs and ETRs take part in key exchange over a public non-secure network, a man in the middle (MITM) could circumvent the key exchange and compromise data-plane confidentiality. This can happen when the MITM acts as a Map-Replier and provides its own public key, so the ITR and the MITM generate a shared secret key between them. If the MITM is in the data path between the ITR and ETR, it can use that shared secret key to decrypt traffic from the ITR ๐Ÿ’€

Serious talk, bestie: a MITM sitting in the data path can read the ITR's traffic if it gets the key exchange to go its way. Please take this one seriously ๐Ÿ™

Since LISP can secure Map-Replies through the authentication process specified in [LISP-SEC], the ITR can detect when a MITM has signed a Map-Reply for an EID-prefix it is not authoritative for. When an ITR determines that signature verification fails, it discards the key exchange parameters and does not reuse them, avoids using the ETR for encapsulation, and issues a severe log message to the network administrator ๐Ÿšฉ Optionally, the ITR can send RLOC-probes to the compromised RLOC to find out whether the authoritative ETR is reachable ๐Ÿ” And once the ITR validates the signature of a Map-Reply, it can begin encrypting and encapsulating packets to the RLOC of the ETR ๐Ÿ”


13. IANA Considerations ๐Ÿ“‹

This document describes a mechanism for encrypting LISP-encapsulated packets based on Diffie-Hellman key exchange procedures. During the exchange, the devices have to agree on a Cipher Suite to use (that is, the cipher and hash functions used to encrypt/decrypt and to sign/verify packets). The 8-bit Cipher Suite field is reserved for that purpose in the security material section of the Map-Request and Map-Reply messages ๐ŸŽ€

IANA has created a new registry (as outlined in [RFC5226]) titled "LISP Crypto Cipher Suite". Initial values for the registry are shown below. Future assignments are made on a "First Come, First Served" basis [RFC5226] ๐Ÿ“

+-----+--------------------------------------------+------------+
|Value| Suite                                      | Reference  |
+-----+--------------------------------------------+------------+
|  0  | Reserved                                   | Section 6  |
+-----+--------------------------------------------+------------+
|  1  | LISP_2048MODP_AES128_CBC_SHA256            | Section 6  |
+-----+--------------------------------------------+------------+
|  2  | LISP_EC25519_AES128_CBC_SHA256             | Section 6  |
+-----+--------------------------------------------+------------+
|  3  | LISP_2048MODP_AES128_GCM                   | Section 6  |
+-----+--------------------------------------------+------------+
|  4  | LISP_3072MODP_AES128_GCM                   | Section 6  |
+-----+--------------------------------------------+------------+
|  5  | LISP_256_EC25519_AES128_GCM                | Section 6  |
+-----+--------------------------------------------+------------+
|  6  | LISP_256_EC25519_CHACHA20_POLY1305         | Section 6  |
+-----+--------------------------------------------+------------+

                         LISP Crypto Cipher Suites

14. References ๐Ÿ“š

14.1. Normative References ๐Ÿ“š

okay so these are the docs you NEED to have read before any of this makes sense, bestie ๐Ÿ’… no skipping!

14.2. Informative References ๐Ÿฆ‹

these ones are extra reading, not required, but ngl they're kinda fun to poke at ๐ŸŒˆ

  • [AES-CBC] McGrew, D., Foley, J., and K. Paterson, "Authenticated Encryption with AES-CBC and HMAC-SHA", Work in Progress, draft-mcgrew-aead-aes-cbc-hmac-sha2-05, July 2014.
  • [CHACHA-POLY] Langley, A. and W. Chang, "ChaCha20 and Poly1305 based Cipher Suites for TLS", Work in Progress, draft-agl-tls-chacha20poly1305-04, November 2013.
  • [CURVE25519] Bernstein, D., "Curve25519: new Diffie-Hellman speed records", DOI 10.1007/11745853_14, <http://www.iacr.org/cryptodb/archive/2006/PKC/3351/3351.pdf>.
  • [DH] Wikipedia, "Diffie-Hellman key exchange", January 2017, <https://en.wikipedia.org/w/index.php?title=Diffie%E2%80%93Hellman_key_exchange&oldid=759611604>.
  • [LISP-DDT] Fuller, V., Lewis, D., Ermagan, V., Jain, A., and A. Smirnov, "LISP Delegated Database Tree", Work in Progress, draft-ietf-lisp-ddt-08, September 2016.
  • [LISP-SEC] Maino, F., Ermagan, V., Cabellos, A., and D. Saucez, "LISP-Security (LISP-SEC)", Work in Progress, draft-ietf-lisp-sec-12, November 2016.

Acknowledgments ๐Ÿซถ

the authors wanted to shout out a bunch of people, and they totally deserve it! ๐Ÿ’–

Dan Harkins, Joel Halpern, Fabio Maino, Ed Lopez, Roger Jorgensen, and Watson Ladd were all super into LISP data-plane security and gave interest, suggestions, and discussions. ๐Ÿ™Œ

LISP WG Chair Luigi Iannone gets his own special thank you for shepherding this document and also helping out with the IANA Considerations section. ๐Ÿ‘‘

Ilari Liusvaara gets a HUGE thank you ๐Ÿฅน for his extensive commentary and discussion. He brought his security expertise so lisp-crypto could be as secure as the state of the art in cryptography. literally iconic ๐Ÿ’œ

And the SAAG working group's support and suggestions were really helpful and appreciated โœจ

Authors' Addresses ๐Ÿ’Œ

Dino Farinacci ๐ŸŒธ

Dino Farinacci
lispers.net
San Jose, California  95120
United States of America

Phone: 408-718-2001
Email: farinacci@gmail.com

Brian Weis ๐ŸŽ€

Brian Weis
Cisco Systems
170 West Tasman Drive
San Jose, California  95124-1706
United States of America

Phone: 408-526-4796
Email: bew@cisco.com
๐Ÿ“ฆ where this page comes from