idnits 2.17.1 draft-ymbk-lsvr-l3dl-signing-01.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 (May 6, 2020) is 1450 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-12) exists of draft-ietf-lsvr-l3dl-03 ** Downref: Normative reference to an Experimental draft: draft-ietf-lsvr-l3dl (ref. 'I-D.ietf-lsvr-l3dl') Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Bush 3 Internet-Draft Arrcus & IIJ 4 Intended status: Standards Track R. Austein 5 Expires: November 7, 2020 Arrcus 6 May 6, 2020 8 Layer 3 Discovery and Liveness Signing 9 draft-ymbk-lsvr-l3dl-signing-01 11 Abstract 13 The Layer 3 Discovery and Liveness protocol OPEN PDU may contain a 14 key and a certificate, which can be used to verify signatures on 15 subsequent PDUs. This document describes two mechanisms based on 16 digital signatures, one that is Trust On First Use (TOFU), and one 17 that uses certificates to provide authentication as well as session 18 integrity. 20 Requirements Language 22 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 23 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 24 "OPTIONAL" in this document are to be interpreted as described in 25 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 26 capitals, as shown here. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at https://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on November 7, 2020. 45 Copyright Notice 47 Copyright (c) 2020 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (https://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 2. Trust On First Use Method . . . . . . . . . . . . . . . . . . 3 64 2.1. Signing a PDU . . . . . . . . . . . . . . . . . . . . . . 3 65 2.2. Verifying the OPEN PDU . . . . . . . . . . . . . . . . . 4 66 2.3. Verifying Other PDUs . . . . . . . . . . . . . . . . . . 4 67 3. Public Key Infrastructure Method . . . . . . . . . . . . . . 5 68 3.1. Signing OPEN PDU with PKI . . . . . . . . . . . . . . . . 5 69 3.2. Verifying OPEN PDU with PKI . . . . . . . . . . . . . . . 5 70 4. Local Policy . . . . . . . . . . . . . . . . . . . . . . . . 6 71 5. NEWKEY, Key Roll . . . . . . . . . . . . . . . . . . . . . . 6 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7 73 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 74 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8 75 9. Normative References . . . . . . . . . . . . . . . . . . . . 8 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 78 1. Introduction 80 This draft is being published without incorporating changes from an 81 excellent security review. This is being done so a couple of other 82 drafts can reference it. While all comments will, of course, be 83 appreciated, readers may want to wait for the -01 version. 85 The Layer 3 Discovery and Liveness protocol [I-D.ietf-lsvr-l3dl] OPEN 86 PDU contains an algorithm specifier, a key, and a certificate, which 87 can be used to verify signatures on subsequent PDUs. This document 88 describes two methods of key generation and signing for use by L3DL, 89 Trust On First Use (TOFU) and a PKI-based mechanism to provide 90 authentication as well as session integrity. 92 The Key in the OPEN PDU SHOULD be the public key of an asymmetric key 93 pair. The sender signs with the private key, of course. The device 94 sending the OPEN may use one key for all links, a different key for 95 each link, or some aggregation(s) thereof. 97 In the TOFU method the OPEN key is generated on the sending device, 98 believed without question by the receiver, and used to verify all 99 subsequent PDUs from the same sender with the same Key Type. 101 With the PKI-mechanism, an enrollment step is performed. The public 102 key is put into a certificate, which is signed by the the operational 103 environment's trust anchor. In this way, the relying party can be 104 confident that the public key is under control of the identified L3DL 105 protocol entity. 107 To the receiver verifying signatures on PDUs, the two methods are 108 indistinguishable; the key provided in the OPEN PDU is used to verify 109 the signatures of subsequent PDUs. The difference that PKI-based 110 keys may be verified against the trust anchor when the OPEN PDU is 111 received. 113 In the PKI method the OPEN key MUST be verified against the trust 114 anchor for the operational domain. It is then used to verify all 115 subsequent PDUs in the session. 117 2. Trust On First Use Method 119 There are three parts to using a key: signing PDUs, verifying the 120 OPEN PDU, and verifying subsequent PDUs. 122 2.1. Signing a PDU 124 All signed PDUs are generated in the same way: 126 o Compose the PDU, with all fields including "Sig Type" and 127 "Signature Length" set, but omitting the trailing "Signature" 128 field itself. The Certificate Length should be zero and the 129 Certificate field should be empty. This is the "message to be 130 signed" for purposes of the signature algorithm. 132 o Generate the signature as specified for the chosen signature 133 suite, using the private member of the asymmetric key pair. In 134 general this will involve first hashing the "message to be signed" 135 then signing the hash, but the precise details may vary with the 136 specific algorithm. The result will be a sequence of octets, the 137 length of which MUST be equal to the setting of the "Signature 138 Length" field. 140 o Construct the complete message by appending the signature octets 141 to the otherwise complete message composed above. 143 In the case of the OPEN PDU, the message to be signed will include 144 the public member of the asymmetric keypair, but as far as the 145 signature algorithm is concerned that's just payload, no different 146 from any other PDU content. 148 2.2. Verifying the OPEN PDU 150 The process for verifying an OPEN PDU is slightly different from the 151 process for verifying other PDU types, because the OPEN PDU also 152 establishes the session key. 154 o Verify that the PDU is syntactically correct, and extract the Auth 155 Type, Key, Sig Type, and Signature fields. 157 o Verify that Auth Type and Sig Type refer to the same algorithm 158 suite, and that said algorithm suite is one that the 159 implementation understands. 161 o Construct the "message to be verified" by truncating the PDU to 162 remove the Signature field (in practice this should not require 163 copying any data, just subtract the signature length from the PDU 164 length). 166 o Verify the message constructed above against the public key using 167 the rules for the specific signature suite. 169 o Record Auth Type and Key as this sessions's authentication type 170 and session key, for use in verifying subseuqent PDUs. 172 If any of the above verification steps fail, generate an error using 173 error code 2 ("Authorization failure in OPEN"). 175 2.3. Verifying Other PDUs 177 The process for verifying non-OPEN PDUs is slightly simpler, but 178 follows the same basic pattern as for OPEN PDUs. 180 o Verify that the PDU is syntactically correct, and extract the Sig 181 Type and Signature fields. 183 o Verify that Sig Type refers to the same algorithm suite as the 184 Auth Type recorded during verification of the OPEN PDU. 186 o Construct the "message to be verified" by truncating the PDU to 187 remove the Signature field. 189 o Verify the message constructed above against the recorded session 190 key using the rules for the specific signature suite. 192 If any of the above verification steps fail, generate an error using 193 error code 3 ("Signature failure in PDU"). 195 3. Public Key Infrastructure Method 197 Using a PKI is almost the same as using TOFU, but with one additional 198 step: during verification of an OPEN PDU, after extracting the Key 199 field from the PDU but before attempting to use it to verify the 200 PDU's signature, the receiver MUST verify the received key against 201 the PKI to confirm that it's an authorized key. 203 Generating an OPEN PDU using the PKI method requires a certificate, 204 which must be supplied via out of band configuration. The 205 certificate is a signature of the public key to be sent in the Key 206 field of the OPEN PDU, signed by the trust anchor private key. 208 Verifying an OPEN PDU using the PKI method requires the public key of 209 the trust anchor, which the receiver uses to verify the certificate, 210 thereby demonstrating that the supplied is represents an authorized 211 L3DL speaker in this administrative domain. 213 We use the term "certificate" here in the generic sense. These are 214 not X.509 certificates: X.509 is much more complicated than we need 215 for L3DL. The certificates used here are just signatures of one key 216 (the session key supplied in the Key field of the OPEN PDU) by 217 another key (the trust anchor). 219 3.1. Signing OPEN PDU with PKI 221 Generating and signing the OPEN PDU with the PKI method is almost the 222 same as in Section 2.1. The only difference is that the PKI method 223 MUST supply the appropriate certificate in the Certificate field. 225 Note that the Auth Type field applies to both the Key and Certificate 226 fields. That is: the certificate uses the same certificate suite as 227 the session keys, L3DL does not support cross-algorithm-suite 228 certification. 230 3.2. Verifying OPEN PDU with PKI 232 Verifying the OPEN PDU with PKI is similar to verifying with TOFU as 233 described in Section 2.2, but includes one critical extra step: 235 After extracting the Key field from the PDU but before verifying the 236 Signature, extract the Certificate field and verfiy that the 237 Certificate is a valid signature of the Key field, according to the 238 rules for the signature suite specified by Auth Type. If this step 239 fails, handle as in Section 2.2. 241 4. Local Policy 243 Whether to use TOFU, PKI, or no signatures at all is a matter of 244 local policy, to be decided by the operator. The useful policy 245 combinations for Key and Certificate are probably: 247 o Not signing: sender need not sign, receiver does not check. 249 o Require TOFU: sender MUST supply key and receiver MUST check, 250 certificate not needed and ignored if sent. 252 o Allow TOFU: sender must supply key and receiver MUST check, 253 receiver SHOULD check certificate if supplyed by sender. 255 o Require PKI: sender must supply key and certificate, receiver must 256 check both. 258 5. NEWKEY, Key Roll 260 Modern key management allows for agility in 'rolling' to a new key or 261 even algorithm in case of key expiry, key compromise, or merely 262 prudence. Declaring a new key with an L3DL OPEN PDU would cause 263 serious churn in topology as a new OPEN may cause a withdraw of 264 previously announced encapsulations. Therefore, a gentler rekeying 265 is needed. 267 0 1 2 3 268 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 269 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 270 | Type = 8 | Payload Length | New Key Type | 271 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 272 | New Key Length | New Key ... | 273 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 274 | | New Cert Length | 275 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 276 | New Certificate ... | 277 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 278 | Old Sig Type | Old Signature Length | | 279 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 280 | Old Signature ... | 281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 282 The New Key Type, New Key Length, New Key, New Cert Length, and New 283 Certificate field declare the replacement algorithm suite, key, and 284 certificate. 286 The NEWKEY PDU is signed using the current (soon to be old) algorithm 287 suite and key. 289 The sender and the receiver should be cautious of algorithm suite 290 downgrade attacks. 292 To avoid possible race conditions, the receiver SHOULD accept 293 signatures using either the new or old key for a configurable time 294 (default 30 seconds). This is intended to accommodate situations 295 such as senders with high peer out-degree and a single per-device 296 asymmetric key. 298 If the sender does not receive an ACK in the normal window, including 299 retransmission, then the sender MAY choose to allow a session reset 300 by either issuing a new OPEN or by letting the receiver eventually 301 have a signature failure (error code 3) on a PDU. 303 The rekeying operation changes the session key and algorithm suite 304 described in Section 2.3. The NEWKEY PDU itself is verified using 305 the old algorithm and session key, subsequent PDUs are verified with 306 the new algorithm and session key recorded after the NEWKEY PDU has 307 been accepted. 309 6. Security Considerations 311 The TOFU method requires a leap of faith to accept the key in the 312 OPEN PDU, as it can not be verified against any authority. Hence it 313 is jokingly referred to as Married On First Date. The assurance it 314 does provide is that subsequent signed PDUs are from the same peer. 315 And data integrity is a positive side effect of the signature 316 covering the payload. 318 The PKI-based method offers assurance that the certificate, and hence 319 the keying material, provided in the OPEN PDU are authorized by a 320 central authority, e.g. the network's network security team. The 321 onward assurance of talking to the same peer and data integrity are 322 the same as in the TOFU method. 324 With the PKI-based method, automated device provisioning could 325 restrict which certificates are allowed from which peers on a per 326 interface basis. This would complicate key rolls. Where one draws 327 the line between rigidity, flexibility, and security varies. 329 The REKEY PDU is open to abuse to create an algorithm suite downgrade 330 attack. 332 7. IANA Considerations 334 This document requests the IANA create a new entry in the L3DL PDU 335 Type registry as follows: 337 PDU 338 Code PDU Name 339 ---- ------------------- 340 8 NEWKEY 342 This document requests the IANA add a registry entry for "TOFU - 343 Trust On First Use" to the L3DL-Signature-Type registry as follows: 345 Number Name 346 ------ ------------------- 347 1 TOFU - Trust On First Use 348 2 PKI 350 8. Acknowledgments 352 The authors than Russ Housley for advice and review. 354 9. Normative References 356 [I-D.ietf-lsvr-l3dl] 357 Bush, R., Austein, R., and K. Patel, "Layer 3 Discovery 358 and Liveness", draft-ietf-lsvr-l3dl-03 (work in progress), 359 November 2019. 361 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 362 Requirement Levels", BCP 14, RFC 2119, 363 DOI 10.17487/RFC2119, March 1997, 364 . 366 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 367 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 368 May 2017, . 370 Authors' Addresses 371 Randy Bush 372 Arrcus & IIJ 373 5147 Crystal Springs 374 Bainbridge Island, WA 98110 375 United States of America 377 Email: randy@psg.com 379 Rob Austein 380 Arrcus, Inc. 382 Email: sra@hactrn.net