idnits 2.17.1 draft-ietf-sidr-bgpsec-protocol-20.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 seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (December 5, 2016) is 2670 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) == Missing Reference: 'This RFC' is mentioned on line 1607, but not defined == Outdated reference: A later version (-36) exists of draft-ietf-idr-bgp-extended-messages-13 == Outdated reference: A later version (-18) exists of draft-ietf-sidr-bgpsec-algs-16 == Outdated reference: A later version (-21) exists of draft-ietf-sidr-bgpsec-pki-profiles-18 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) == Outdated reference: A later version (-06) exists of draft-ietf-sidr-as-migration-05 == Outdated reference: A later version (-16) exists of draft-ietf-sidr-bgpsec-ops-11 == Outdated reference: A later version (-09) exists of draft-ietf-sidr-rpki-rtr-rfc6810-bis-07 Summary: 1 error (**), 0 flaws (~~), 9 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Lepinski, Ed. 3 Internet-Draft NCF 4 Intended status: Standards Track K. Sriram, Ed. 5 Expires: June 8, 2017 NIST 6 December 5, 2016 8 BGPsec Protocol Specification 9 draft-ietf-sidr-bgpsec-protocol-20 11 Abstract 13 This document describes BGPsec, an extension to the Border Gateway 14 Protocol (BGP) that provides security for the path of autonomous 15 systems through which a BGP update message passes. BGPsec is 16 implemented via an optional non-transitive BGP path attribute that 17 carries a digital signature produced by each autonomous system that 18 propagates the update message. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on June 8, 2017. 37 Copyright Notice 39 Copyright (c) 2016 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 56 2. BGPsec Negotiation . . . . . . . . . . . . . . . . . . . . . 3 57 2.1. The BGPsec Capability . . . . . . . . . . . . . . . . . . 3 58 2.2. Negotiating BGPsec Support . . . . . . . . . . . . . . . 4 59 3. The BGPsec_Path Attribute . . . . . . . . . . . . . . . . . . 6 60 3.1. Secure_Path . . . . . . . . . . . . . . . . . . . . . . . 8 61 3.2. Signature_Block . . . . . . . . . . . . . . . . . . . . . 9 62 4. BGPsec Update Messages . . . . . . . . . . . . . . . . . . . 11 63 4.1. General Guidance . . . . . . . . . . . . . . . . . . . . 11 64 4.2. Constructing the BGPsec_Path Attribute . . . . . . . . . 13 65 4.3. Processing Instructions for Confederation Members . . . . 17 66 4.4. Reconstructing the AS_PATH Attribute . . . . . . . . . . 19 67 5. Processing a Received BGPsec Update . . . . . . . . . . . . . 21 68 5.1. Overview of BGPsec Validation . . . . . . . . . . . . . . 22 69 5.2. Validation Algorithm . . . . . . . . . . . . . . . . . . 23 70 6. Algorithms and Extensibility . . . . . . . . . . . . . . . . 27 71 6.1. Algorithm Suite Considerations . . . . . . . . . . . . . 27 72 6.2. Extensibility Considerations . . . . . . . . . . . . . . 27 73 7. Operations and Management Considerations . . . . . . . . . . 28 74 8. Security Considerations . . . . . . . . . . . . . . . . . . . 30 75 8.1. Security Guarantees . . . . . . . . . . . . . . . . . . . 30 76 8.2. On the Removal of BGPsec Signatures . . . . . . . . . . . 31 77 8.3. Mitigation of Denial of Service Attacks . . . . . . . . . 32 78 8.4. Additional Security Considerations . . . . . . . . . . . 33 79 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 80 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 35 81 10.1. Authors . . . . . . . . . . . . . . . . . . . . . . . . 35 82 10.2. Acknowledgements . . . . . . . . . . . . . . . . . . . . 36 83 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 84 11.1. Normative References . . . . . . . . . . . . . . . . . . 37 85 11.2. Informative References . . . . . . . . . . . . . . . . . 38 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 88 1. Introduction 90 This document describes BGPsec, a mechanism for providing path 91 security for Border Gateway Protocol (BGP) [RFC4271] route 92 advertisements. That is, a BGP speaker who receives a valid BGPsec 93 update has cryptographic assurance that the advertised route has the 94 following property: Every AS on the path of ASes listed in the update 95 message has explicitly authorized the advertisement of the route to 96 the subsequent AS in the path. 98 This document specifies an optional (non-transitive) BGP path 99 attribute, BGPsec_Path. It also describes how a BGPsec-compliant BGP 100 speaker (referred to hereafter as a BGPsec speaker) can generate, 101 propagate, and validate BGP update messages containing this attribute 102 to obtain the above assurances. 104 BGPsec is intended to be used to supplement BGP Origin Validation 105 [RFC6483][RFC6811] and when used in conjunction with origin 106 validation, it is possible to prevent a wide variety of route 107 hijacking attacks against BGP. 109 BGPsec relies on the Resource Public Key Infrastructure (RPKI) 110 certificates that attest to the allocation of AS number and IP 111 address resources. (For more information on the RPKI, see RFC 6480 112 [RFC6480] and the documents referenced therein.) Any BGPsec speaker 113 who wishes to send, to external (eBGP) peers, BGP update messages 114 containing the BGPsec_Path needs to possess a private key associated 115 with an RPKI router certificate [I-D.ietf-sidr-bgpsec-pki-profiles] 116 that corresponds to the BGPsec speaker's AS number. Note, however, 117 that a BGPsec speaker does not need such a certificate in order to 118 validate received update messages containing the BGPsec_Path 119 attribute (see Section 5.2). 121 1.1. Requirements Language 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 125 document are to be interpreted as described in RFC 2119 [RFC2119]. 127 2. BGPsec Negotiation 129 This document defines a BGP capability [RFC5492] that allows a BGP 130 speaker to advertise to a neighbor the ability to send or to receive 131 BGPsec update messages (i.e., update messages containing the 132 BGPsec_Path attribute). 134 2.1. The BGPsec Capability 136 This capability has capability code : TBD 138 The capability length for this capability MUST be set to 3. 140 The three octets of the capability format are specified in Figure 1. 142 0 1 2 3 4 5 6 7 143 +---------------------------------------+ 144 | Version | Dir | Unassigned | 145 +---------------------------------------+ 146 | | 147 +------ AFI -----+ 148 | | 149 +---------------------------------------+ 151 Figure 1: BGPsec Capability format. 153 The first four bits of the first octet indicate the version of BGPsec 154 for which the BGP speaker is advertising support. This document 155 defines only BGPsec version 0 (all four bits set to zero). Other 156 versions of BGPsec may be defined in future documents. A BGPsec 157 speaker MAY advertise support for multiple versions of BGPsec by 158 including multiple versions of the BGPsec capability in its BGP OPEN 159 message. 161 The fifth bit of the first octet is a direction bit which indicates 162 whether the BGP speaker is advertising the capability to send BGPsec 163 update messages or receive BGPsec update messages. The BGP speaker 164 sets this bit to 0 to indicate the capability to receive BGPsec 165 update messages. The BGP speaker sets this bit to 1 to indicate the 166 capability to send BGPsec update messages. 168 The remaining three bits of the first octet are unassigned and for 169 future use. These bits are set to zero by the sender of the 170 capability and ignored by the receiver of the capability. 172 The second and third octets contain the 16-bit Address Family 173 Identifier (AFI) which indicates the address family for which the 174 BGPsec speaker is advertising support for BGPsec. This document only 175 specifies BGPsec for use with two address families, IPv4 and IPv6, 176 AFI values 1 and 2 respectively. BGPsec for use with other address 177 families may be specified in future documents. 179 2.2. Negotiating BGPsec Support 181 In order to indicate that a BGP speaker is willing to send BGPsec 182 update messages (for a particular address family), a BGP speaker 183 sends the BGPsec Capability (see Section 2.1) with the Direction bit 184 (the fifth bit of the first octet) set to 1. In order to indicate 185 that the speaker is willing to receive BGP update messages containing 186 the BGPsec_Path attribute (for a particular address family), a BGP 187 speaker sends the BGPsec capability with the Direction bit set to 0. 188 In order to advertise the capability to both send and receive BGPsec 189 update messages, the BGP speaker sends two copies of the BGPsec 190 capability (one with the direction bit set to 0 and one with the 191 direction bit set to 1). 193 Similarly, if a BGP speaker wishes to use BGPsec with two different 194 address families (i.e., IPv4 and IPv6) over the same BGP session, 195 then the speaker includes two instances of this capability (one for 196 each address family) in the BGP OPEN message. A BGP speaker MAY 197 announce BGPsec capability only if it supports the BGP multiprotocol 198 extension [RFC4760]. Additionally, a BGP speaker MUST NOT advertise 199 the capability of BGPsec support for a particular AFI unless it has 200 also advertised the multiprotocol extension capability for the same 201 AFI [RFC4760]. 203 In a BGPsec peering session, a peer is permitted to send update 204 messages containing the BGPsec_Path attribute if, and only if: 206 o The given peer sent the BGPsec capability for a particular version 207 of BGPsec and a particular address family with the Direction bit 208 set to 1; and 210 o The other (receiving) peer sent the BGPsec capability for the same 211 version of BGPsec and the same address family with the Direction 212 bit set to 0. 214 In such a session, it can be said that the use of the particular 215 version of BGPsec has been negotiated for a particular address 216 family. BGP update messages without the BGPsec_Path attribute MAY be 217 sent within a session regardless of whether or not the use of BGPsec 218 is successfully negotiated. However, if BGPsec is not successfully 219 negotiated, then BGP update messages containing the BGPsec_Path 220 attribute MUST NOT be sent. 222 This document defines the behavior of implementations in the case 223 where BGPsec version zero is the only version that has been 224 successfully negotiated. Any future document which specifies 225 additional versions of BGPsec will need to specify behavior in the 226 case that support for multiple versions is negotiated. 228 BGPsec cannot provide meaningful security guarantees without support 229 for four-byte AS numbers. Therefore, any BGP speaker that announces 230 the BGPsec capability, MUST also announce the capability for four- 231 byte AS support [RFC6793]. If a BGP speaker sends the BGPsec 232 capability but not the four-byte AS support capability then BGPsec 233 has not been successfully negotiated, and update messages containing 234 the BGPsec_Path attribute MUST NOT be sent within such a session. 236 Note that BGPsec update messages can be quite large, therefore any 237 BGPsec speaker announcing the capability to receive BGPsec messages 238 SHOULD also announce support for the capability to receive BGP 239 extended messages [I-D.ietf-idr-bgp-extended-messages]. 241 3. The BGPsec_Path Attribute 243 The BGPsec_Path attribute is an optional non-transitive BGP path 244 attribute. 246 This document registers an attribute type code for this attribute: 247 BGPsec_Path (see Section 9). 249 The BGPsec_Path attribute carries the secured information regarding 250 the path of ASes through which an update message passes. This 251 includes the digital signatures used to protect the path information. 252 The update messages that contain the BGPsec_Path attribute are 253 referred to as "BGPsec Update messages". The BGPsec_Path attribute 254 replaces the AS_PATH attribute in a BGPsec update message. That is, 255 update messages that contain the BGPsec_Path attribute MUST NOT 256 contain the AS_PATH attribute, and vice versa. 258 The BGPsec_Path attribute is made up of several parts. The high- 259 level diagram in Figure 2 provides an overview of the structure of 260 the BGPsec_Path attribute. 262 +---------------------------------------------------------+ 263 | +-----------------+ | 264 | | Secure Path | | 265 | +-----------------+ | 266 | | AS X | | 267 | | pCount X | | 268 | | Flags X | | 269 | | AS Y | | 270 | | pCount Y | | 271 | | Flags Y | | 272 | | ... | | 273 | +-----------------+ | 274 | | 275 | +-----------------+ +-----------------+ | 276 | | Sig Block 1 | | Sig Block 2 | | 277 | +-----------------+ +-----------------+ | 278 | | Alg Suite 1 | | Alg Suite 2 | | 279 | | SKI X1 | | SKI X1 | | 280 | | Signature X1 | | Signature X1 | | 281 | | SKI Y1 | | SKI Y1 | | 282 | | Signature Y1 | | Signature Y1 | | 283 | | ... | | .... | | 284 | +-----------------+ +-----------------+ | 285 | | 286 +---------------------------------------------------------+ 288 Figure 2: High-level diagram of the BGPsec_Path attribute. 290 Figure 3 provides the specification of the format for the BGPsec_Path 291 attribute. 293 +-------------------------------------------------------+ 294 | Secure_Path (variable) | 295 +-------------------------------------------------------+ 296 | Sequence of one or two Signature_Blocks (variable) | 297 +-------------------------------------------------------+ 299 Figure 3: BGPsec_Path attribute format. 301 The Secure_Path contains AS path information for the BGPsec update 302 message. This is logically equivalent to the information that is 303 contained in a non-BGPsec AS_PATH attribute. The information in 304 Secure_Path is used by BGPsec speakers in the same way that 305 information from the AS_PATH is used by non-BGPsec speakers. The 306 format of the Secure_Path is described below in Section 3.1. 308 The BGPsec_Path attribute will contain one or two Signature_Blocks, 309 each of which corresponds to a different algorithm suite. Each of 310 the Signature_Blocks will contain a signature segment for each AS 311 number (i.e., Secure_Path segment) in the Secure_Path. In the most 312 common case, the BGPsec_Path attribute will contain only a single 313 Signature_Block. However, in order to enable a transition from an 314 old algorithm suite to a new algorithm suite (without a flag day), it 315 will be necessary to include two Signature_Blocks (one for the old 316 algorithm suite and one for the new algorithm suite) during the 317 transition period. (See Section 6.1 for more discussion of algorithm 318 transitions.) The format of the Signature_Blocks is described below 319 in Section 3.2. 321 3.1. Secure_Path 323 A detailed description of the Secure_Path information in the 324 BGPsec_Path attribute is provided here. 326 +-----------------------------------------------+ 327 | Secure_Path Length (2 octets) | 328 +-----------------------------------------------+ 329 | One or More Secure_Path Segments (variable) | 330 +-----------------------------------------------+ 332 Figure 4: Secure_Path format. 334 The specification for the Secure_Path field is provided in Figure 4 335 and Figure 5. The Secure_Path Length contains the length (in octets) 336 of the entire Secure_Path (including the two octets used to express 337 this length field). As explained below, each Secure_Path segment is 338 six octets long. Note that this means the Secure_Path Length is two 339 greater than six times the number Secure_Path Segments (i.e., the 340 number of AS numbers in the path). 342 The Secure_Path contains one Secure_Path Segment (see Figure 5) for 343 each Autonomous System in the path to the originating AS of the 344 prefix specified in the update message. (Note: Repeated Autonomous 345 Systems are compressed out using the pCount field as discussed 346 below). 348 +----------------------------+ 349 | pCount (1 octet) | 350 +----------------------------+ 351 | Flags (1 octet) | 352 +----------------------------+ 353 | AS Number (4 octets) | 354 +----------------------------+ 356 Figure 5: Secure_Path Segment format. 358 The AS Number (in Figure 5) is the AS number of the BGP speaker that 359 added this Secure_Path segment to the BGPsec_Path attribute. (See 360 Section 4 for more information on populating this field.) 362 The pCount field contains the number of repetitions of the associated 363 autonomous system number that the signature covers. This field 364 enables a BGPsec speaker to mimic the semantics of prepending 365 multiple copies of their AS to the AS_PATH without requiring the 366 speaker to generate multiple signatures. Note that Section 9.1.2.2 367 ("Breaking Ties") in [RFC4271] mentions "number of AS numbers" in the 368 AS_PATH attribute that is used in the route selection process. This 369 metric (number of AS numbers) is the same as the AS path length 370 obtained in BGPsec by summing the pCount values in the BGPsec_Path 371 attribute. The pCount field is also useful in managing route servers 372 (see Section 4.2) and AS Number migrations, see 373 [I-D.ietf-sidr-as-migration] for details. 375 The left most (i.e. the most significant) bit of the Flags field in 376 Figure 5 is the Confed_Segment flag. The Confed_Segment flag is set 377 to one to indicate that the BGPsec speaker that constructed this 378 Secure_Path segment is sending the update message to a peer AS within 379 the same Autonomous System confederation [RFC5065]. (That is, the 380 Confed_Segment flag is set in a BGPsec update message whenever, in a 381 non-BGPsec update message, the BGP speaker's AS would appear in a 382 AS_PATH segment of type AS_CONFED_SEQUENCE.) In all other cases the 383 Confed_Segment flag is set to zero. 385 The remaining seven bits of the Flags are unassigned and MUST be set 386 to zero by the sender, and ignored by the receiver. Note, however, 387 that the signature is computed over all eight bits of the flags 388 field. 390 3.2. Signature_Block 392 A detailed description of the Signature_Blocks in the BGPsec_Path 393 attribute is provided here using Figure 6 and Figure 7. 395 +---------------------------------------------+ 396 | Signature_Block Length (2 octets) | 397 +---------------------------------------------+ 398 | Algorithm Suite Identifier (1 octet) | 399 +---------------------------------------------+ 400 | Sequence of Signature Segments (variable) | 401 +---------------------------------------------+ 403 Figure 6: Signature_Block format. 405 The Signature_Block Length in Figure 6 is the total number of octets 406 in the Signature_Block (including the two octets used to express this 407 length field). 409 The Algorithm Suite Identifier is a one-octet identifier specifying 410 the digest algorithm and digital signature algorithm used to produce 411 the digital signature in each Signature Segment. An IANA registry of 412 algorithm identifiers for use in BGPsec is specified in the BGPsec 413 algorithms document [I-D.ietf-sidr-bgpsec-algs]. 415 A Signature_Block in Figure 6 has exactly one Signature Segment (see 416 Figure 7) for each Secure_Path Segment in the Secure_Path portion of 417 the BGPsec_Path Attribute. (That is, one Signature Segment for each 418 distinct AS on the path for the prefix in the Update message.) 420 +---------------------------------------------+ 421 | Subject Key Identifier (SKI) (20 octets) | 422 +---------------------------------------------+ 423 | Signature Length (2 octets) | 424 +---------------------------------------------+ 425 | Signature (variable) | 426 +---------------------------------------------+ 428 Figure 7: Signature Segment format. 430 The Subject Key Identifier (SKI) field in Figure 7 contains the value 431 in the Subject Key Identifier extension of the RPKI router 432 certificate [I-D.ietf-sidr-bgpsec-pki-profiles] that is used to 433 verify the signature (see Section 5 for details on validity of BGPsec 434 update messages). 436 The Signature Length field contains the size (in octets) of the value 437 in the Signature field of the Signature Segment. 439 The Signature in Figure 7 contains a digital signature that protects 440 the prefix and the BGPsec_Path attribute (see Section 4 and Section 5 441 for details on signature generation and validation, respectively). 443 4. BGPsec Update Messages 445 Section 4.1 provides general guidance on the creation of BGPsec 446 Update Messages -- that is, update messages containing the 447 BGPsec_Path attribute. 449 Section 4.2 specifies how a BGPsec speaker generates the BGPsec_Path 450 attribute to include in a BGPsec Update message. 452 Section 4.3 contains special processing instructions for members of 453 an autonomous system confederation [RFC5065]. A BGPsec speaker that 454 is not a member of such a confederation MUST NOT set the 455 Confed_Segment flag in its Secure_Path Segment (i.e. leave the flag 456 bit at default value zero) in all BGPsec update messages it sends. 458 Section 4.4 contains instructions for reconstructing the AS_PATH 459 attribute in cases where a BGPsec speaker receives an update message 460 with a BGPsec_Path attribute and wishes to propagate the update 461 message to a peer who does not support BGPsec. 463 4.1. General Guidance 465 The information protected by the signature on a BGPsec update message 466 includes the AS number of the peer to whom the update message is 467 being sent. Therefore, if a BGPsec speaker wishes to send a BGPsec 468 update to multiple BGP peers, it must generate a separate BGPsec 469 update message for each unique peer AS to whom the update message is 470 sent. 472 A BGPsec update message MUST advertise a route to only a single 473 prefix. This is because a BGPsec speaker receiving an update message 474 with multiple prefixes would be unable to construct a valid BGPsec 475 update message (i.e., valid path signatures) containing a subset of 476 the prefixes in the received update. If a BGPsec speaker wishes to 477 advertise routes to multiple prefixes, then it MUST generate a 478 separate BGPsec update message for each prefix. Additionally, a 479 BGPsec update message MUST use the MP_REACH_NLRI [RFC4760] attribute 480 to encode the prefix. 482 The BGPsec_Path attribute and the AS_PATH attribute are mutually 483 exclusive. That is, any update message containing the BGPsec_Path 484 attribute MUST NOT contain the AS_PATH attribute. The information 485 that would be contained in the AS_PATH attribute is instead conveyed 486 in the Secure_Path portion of the BGPsec_Path attribute. 488 In order to create or add a new signature to a BGPsec update message 489 with a given algorithm suite, the BGPsec speaker must possess a 490 private key suitable for generating signatures for this algorithm 491 suite. Additionally, this private key must correspond to the public 492 key in a valid Resource PKI end-entity certificate whose AS number 493 resource extension includes the BGPsec speaker's AS number 494 [I-D.ietf-sidr-bgpsec-pki-profiles]. Note also that new signatures 495 are only added to a BGPsec update message when a BGPsec speaker is 496 generating an update message to send to an external peer (i.e., when 497 the AS number of the peer is not equal to the BGPsec speaker's own AS 498 number). Therefore, a BGPsec speaker who only sends BGPsec update 499 messages to peers within its own AS does not need to possess any 500 private signature keys. 502 The Resource PKI enables the legitimate holder of IP address 503 prefix(es) to issue a signed object, called a Route Origination 504 Authorization (ROA), that authorizes a given AS to originate routes 505 to a given set of prefixes (see RFC 6482 [RFC6482]). It is expected 506 that most relying parties will utilize BGPsec in tandem with origin 507 validation (see RFC 6483 [RFC6483] and RFC 6811 [RFC6811]). 508 Therefore, it is RECOMMENDED that a BGPsec speaker only originate a 509 BGPsec update advertising a route for a given prefix if there exists 510 a valid ROA authorizing the BGPsec speaker's AS to originate routes 511 to this prefix. 513 If a BGPsec router has received only a non-BGPsec update message 514 (without the BGPsec_Path attribute), containing the AS_PATH 515 attribute, from a peer for a given prefix then it MUST NOT attach a 516 BGPsec_Path attribute when it propagates the update message. (Note 517 that a BGPsec router may also receive a non-BGPsec update message 518 from an internal peer without the AS_PATH attribute, i.e., with just 519 the NLRI in it. In that case, the prefix is originating from that 520 AS, and if it is selected for advertisement, the BGPsec speaker 521 SHOULD attach a BGPsec_Path attribute and send a signed route (for 522 that prefix) to its external BGPsec-speaking peers.) 524 Conversely, if a BGPsec router has received a BGPsec update message 525 (with the BGPsec_Path attribute) from a peer for a given prefix and 526 it chooses to propagate that peer's route for the prefix, then it 527 SHOULD propagate the route as a BGPsec update message containing the 528 BGPsec_Path attribute. 530 Note that removing BGPsec signatures (i.e., propagating a route 531 advertisement without the BGPsec_Path attribute) has significant 532 security ramifications. (See Section 8 for discussion of the 533 security ramifications of removing BGPsec signatures.) Therefore, 534 when a route advertisement is received via a BGPsec update message, 535 propagating the route advertisement without the BGPsec_Path attribute 536 is NOT RECOMMENDED, unless the message is sent to a peer that did not 537 advertise the capability to receive BGPsec update messages (see 538 Section 4.4). 540 Furthermore, note that when a BGPsec speaker propagates a route 541 advertisement with the BGPsec_Path attribute it is not attesting to 542 the validation state of the update message it received. (See 543 Section 8 for more discussion of the security semantics of BGPsec 544 signatures.) 546 If the BGPsec speaker is producing an update message which would, in 547 the absence of BGPsec, contain an AS_SET (e.g., the BGPsec speaker is 548 performing proxy aggregation), then the BGPsec speaker MUST NOT 549 include the BGPsec_Path attribute. In such a case, the BGPsec 550 speaker must remove any existing BGPsec_Path in the received 551 advertisement(s) for this prefix and produce a traditional (non- 552 BGPsec) update message. It should be noted that BCP 172 [RFC6472] 553 recommends against the use of AS_SET and AS_CONFED_SET in the AS_PATH 554 of BGP updates. 556 The case where the BGPsec speaker sends a BGPsec update message to an 557 internal (iBGP) peer is quite simple. When originating a new route 558 advertisement and sending it to an internal peer, the BGPsec speaker 559 omits the BGPsec_Path attribute. When a BGPsec speaker chooses to 560 forward a BGPsec update message to an iBGP peer, the BGPsec_Path 561 attribute SHOULD NOT be removed, unless the peer doesn't support 562 BGPsec. In the case when an iBGP peer doesn't support BGPsec, then 563 the BGPsec update is reconstructed to a BGP update with AS_PATH and 564 then forwarded (see Section 4.4). In particular, when forwarding to 565 a BGPsec capable iBGP peer, the BGPsec_Path attribute SHOULD NOT be 566 removed even in the case where the BGPsec update message has not been 567 successfully validated. (See Section 5 for more information on 568 validation, and Section 8 for the security ramifications of removing 569 BGPsec signatures.) 571 4.2. Constructing the BGPsec_Path Attribute 573 When a BGPsec speaker receives a BGPsec update message containing a 574 BGPsec_Path attribute (with one or more signatures) from an (internal 575 or external) peer, it may choose to propagate the route advertisement 576 by sending it to its other (internal or external) peers. When 577 sending said route advertisement to an internal BGPsec-speaking peer, 578 the BGPsec_Path attribute SHALL NOT be modified. When sending said 579 route advertisement to an external BGPsec-speaking peer, the 580 following procedures are used to form or update the BGPsec_Path 581 attribute. 583 To generate the BGPsec_Path attribute on the outgoing update message, 584 the BGPsec speaker first generates a new Secure_Path Segment. Note 585 that if the BGPsec speaker is not the origin AS and there is an 586 existing BGPsec_Path attribute, then the BGPsec speaker prepends its 587 new Secure_Path Segment (places in first position) onto the existing 588 Secure_Path. 590 The AS number in this Secure_Path segment MUST match the AS number in 591 the Subject field of the Resource PKI router certificate that will be 592 used to verify the digital signature constructed by this BGPsec 593 speaker (see Section 3.1.1.1 in [I-D.ietf-sidr-bgpsec-pki-profiles] 594 and RFC 6487 [RFC6487]). 596 The pCount field of the Secure_Path Segment is typically set to the 597 value 1. However, a BGPsec speaker may set the pCount field to a 598 value greater than 1. Setting the pCount field to a value greater 599 than one has the same semantics as repeating an AS number multiple 600 times in the AS_PATH of a non-BGPsec update message (e.g., for 601 traffic engineering purposes). 603 To prevent unnecessary processing load in the validation of BGPsec 604 signatures, a BGPsec speaker SHOULD NOT produce multiple consecutive 605 Secure_Path Segments with the same AS number. This means that to 606 achieve the semantics of prepending the same AS number k times, a 607 BGPsec speaker SHOULD produce a single Secure_Path Segment -- with 608 pCount of k -- and a single corresponding Signature Segment. 610 A route server that participates in the BGP control plane, but does 611 not act as a transit AS in the data plane, may choose to set pCount 612 to 0. This option enables the route server to participate in BGPsec 613 and obtain the associated security guarantees without increasing the 614 length of the AS path. (Note that BGPsec speakers compute the length 615 of the AS path by summing the pCount values in the BGPsec_Path 616 attribute, see Section 5.) However, when a route server sets the 617 pCount value to 0, it still inserts its AS number into the 618 Secure_Path segment, as this information is needed to validate the 619 signature added by the route server. (See 620 [I-D.ietf-sidr-as-migration] for a discussion of setting pCount to 0 621 to facilitate AS Number Migration.) BGPsec speakers SHOULD drop 622 incoming update messages with pCount set to zero in cases where the 623 BGPsec speaker does not expect its peer to set pCount to zero. (That 624 is, pCount is only to be set to zero in cases such as route servers 625 or AS Number Migration where the BGPsec speaker's peer expects pCount 626 to be set to zero.) 628 Next, the BGPsec speaker generates one or two Signature_Blocks. 629 Typically, a BGPsec speaker will use only a single algorithm suite, 630 and thus create only a single Signature_Block in the BGPsec_Path 631 attribute. However, to ensure backwards compatibility during a 632 period of transition from a 'current' algorithm suite to a 'new' 633 algorithm suite, it will be necessary to originate update messages 634 that contain a Signature_Block for both the 'current' and the 'new' 635 algorithm suites (see Section 6.1). 637 If the received BGPsec update message contains two Signature_Blocks 638 and the BGPsec speaker supports both of the corresponding algorithm 639 suites, then the new update message generated by the BGPsec speaker 640 MUST include both of the Signature_Blocks. If the received BGPsec 641 update message contains two Signature_Blocks and the BGPsec speaker 642 only supports one of the two corresponding algorithm suites, then the 643 BGPsec speaker MUST remove the Signature_Block corresponding to the 644 algorithm suite that it does not understand. If the BGPsec speaker 645 does not support the algorithm suites in any of the Signature_Blocks 646 contained in the received update message, then the BGPsec speaker 647 MUST NOT propagate the route advertisement with the BGPsec_Path 648 attribute. (That is, if it chooses to propagate this route 649 advertisement at all, it must do so as an unsigned BGP update 650 message. See Section 4.4 for more information on converting to an 651 unsigned BGP message.) 653 Note that in the case where the BGPsec_Path has two Signature_Blocks 654 (corresponding to different algorithm suites), the validation 655 algorithm (see Section 5.2) deems a BGPsec update message to be 656 'Valid' if there is at least one supported algorithm suite (and 657 corresponding Signature_Block) that is deemed 'Valid'. This means 658 that a 'Valid' BGPsec update message may contain a Signature_Block 659 which is not deemed 'Valid' (e.g., contains signatures that BGPsec 660 does not successfully verify). Nonetheless, such Signature_Blocks 661 MUST NOT be removed. (See Section 8 for a discussion of the security 662 ramifications of this design choice.) 664 For each Signature_Block corresponding to an algorithm suite that the 665 BGPsec speaker does support, the BGPsec speaker MUST add a new 666 Signature Segment to the Signature_Block. This Signature Segment is 667 prepended to the list of Signature Segments (placed in the first 668 position) so that the list of Signature Segments appears in the same 669 order as the corresponding Secure_Path segments. The BGPsec speaker 670 populates the fields of this new signature segment as follows. 672 The Subject Key Identifier field in the new segment is populated with 673 the identifier contained in the Subject Key Identifier extension of 674 the RPKI router certificate corresponding to the BGPsec speaker 675 [I-D.ietf-sidr-bgpsec-pki-profiles]. This Subject Key Identifier 676 will be used by recipients of the route advertisement to identify the 677 proper certificate to use in verifying the signature. 679 The Signature field in the new segment contains a digital signature 680 that binds the prefix and BGPsec_Path attribute to the RPKI router 681 certificate corresponding to the BGPsec speaker. The digital 682 signature is computed as follows: 684 o For clarity, let us number the Secure_Path and corresponding 685 Signature Segments from 1 to N as follows. Let Secure_Path 686 Segment 1 and Signature Segment 1 be the segments produced by the 687 origin AS. Let Secure_Path Segment 2 and Signature Segment 2 be 688 the segments added by the next AS after the origin. Continue this 689 method of numbering and ultimately let Secure_Path Segment N and 690 Signature Segment N be those that are being added by the current 691 AS. The current AS (Nth AS) is signing and forwarding the update 692 to the next AS (i.e. (N+1)th AS) in the chain of ASes that form 693 the AS path. 695 o In order to construct the digital signature for Signature Segment 696 N (the signature segment being produced by the current AS), first 697 construct the sequence of octets to be hashed as shown in 698 Figure 8. (Note: This sequence of octets includes all the data 699 that the Nth AS attests to by adding its digital signature in the 700 update which is being forwarded to a BGPsec speaker in the (N+1)th 701 AS.) 703 +------------------------------------+ 704 | Target AS Number | 705 +------------------------------------+ ---\ 706 | Signature Segment : N-1 | \ 707 +------------------------------------+ | 708 | Secure_Path Segment : N | | 709 +------------------------------------+ \ 710 ... > Data from 711 +------------------------------------+ / N Segments 712 | Signature Segment : 1 | | 713 +------------------------------------+ | 714 | Secure_Path Segment : 2 | | 715 +------------------------------------+ / 716 | Secure_Path Segment : 1 | / 717 +------------------------------------+---/ 718 | Algorithm Suite Identifier | 719 +------------------------------------+ 720 | AFI | 721 +------------------------------------+ 722 | SAFI | 723 +------------------------------------+ 724 | Prefix | 725 +------------------------------------+ 727 Figure 8: Sequence of octets to be hashed. 729 The elements in this sequence (Figure 8) MUST be ordered exactly 730 as shown. The 'Target AS Number' is the AS to whom the BGPsec 731 speaker intends to send the update message. (Note that the 732 'Target AS Number' is the AS number announced by the peer in the 733 OPEN message of the BGP session within which the update is sent.) 734 The Secure_Path and Signature Segments (1 through N-1) are 735 obtained from the BGPsec_Path attribute. Finally, the Address 736 Family Identifier (AFI), Subsequent Address Family Identifier 737 (SAFI), and Prefix fields are obtained from the MP_REACH_NLRI 738 attribute. Additionally, in the Prefix field all of the trailing 739 bits MUST be set to zero when constructing this sequence. 741 o Apply to this octet sequence (in Figure 8) the digest algorithm 742 (for the algorithm suite of this Signature_Block) to obtain a 743 digest value. 745 o Apply to this digest value the signature algorithm, (for the 746 algorithm suite of this Signature_Block) to obtain the digital 747 signature. Then populate the Signature Field (in Figure 7) with 748 this digital signature. 750 The Signature Length field (in Figure 7) is populated with the length 751 (in octets) of the value in the Signature field. 753 4.3. Processing Instructions for Confederation Members 755 Members of autonomous system confederations [RFC5065] MUST 756 additionally follow the instructions in this section for processing 757 BGPsec update messages. 759 When a confederation member sends a BGPsec update message to a peer 760 that is a member of the same Member-AS, the confederation member 761 SHALL NOT modify the BGPsec_Path attribute. When a confederation 762 member sends a BGPsec update message to a peer that is a member of 763 the same confederation but is a different Member-AS, the 764 confederation member puts its (private) Member-AS Number (as opposed 765 to the public AS Confederation Identifier) in the AS Number field of 766 the Secure_Path Segment that it adds to the BGPsec update message. 767 Additionally, in this case, the confederation member that generates 768 the Secure_Path Segment sets the Confed_Segment flag to one. This 769 means that in a BGPsec update message, an AS number appears in a 770 Secure_Path Segment with the Confed_Segment flag set whenever, in a 771 non-BGPsec update message, the AS number would appear in a segment of 772 type AS_CONFED_SEQUENCE. 774 Within a confederation, the verification of BGPsec signatures added 775 by other members of the confederation is optional. If a 776 confederation chooses not to have its members verify signatures added 777 by other confederation members, then when sending a BGPsec update 778 message to a peer that is a member of the same confederation, the 779 confederation members MAY set the Signature field within the 780 Signature Segment that it generates to be zero (in lieu of 781 calculating the correct digital signature as described in 782 Section 4.2). Note that if a confederation chooses not to verify 783 digital signatures within the confederation, then BGPsec is able to 784 provide no assurances about the integrity of the (private) Member-AS 785 Numbers placed in Secure_Path segments where the Confed_Segment flag 786 is set to one. 788 When a confederation member receives a BGPsec update message from a 789 peer within the confederation and propagates it to a peer outside the 790 confederation, it needs to remove all of the Secure_Path Segments 791 added by confederation members as well as the corresponding Signature 792 Segments. To do this, the confederation member propagating the route 793 outside the confederation does the following: 795 o First, starting with the most recently added Secure_Path segment, 796 remove all of the consecutive Secure_Path segments that have the 797 Confed_Segment flag set to one. Stop this process once a 798 Secure_Path segment is reached which has its Confed_Segment flag 799 set to zero. Keep a count of the number of segments removed in 800 this fashion. 802 o Second, starting with the most recently added Signature Segment, 803 remove a number of Signature Segments equal to the number of 804 Secure_Path Segments removed in the previous step. (That is, 805 remove the K most recently added signature segments, where K is 806 the number of Secure_Path Segments removed in the previous step.) 808 o Finally, add a Secure_Path Segment containing, in the AS field, 809 the AS Confederation Identifier (the public AS number of the 810 confederation) as well as a corresponding Signature Segment. Note 811 that all fields other that the AS field are populated as per 812 Section 4.2. 814 When validating a received BGPsec update message, confederation 815 members need to make the following adjustment to the algorithm 816 presented in Section 5.2. When a confederation member processes 817 (validates) a Signature Segment and its corresponding Secure_Path 818 Segment, the confederation member must note the following. For a 819 signature produced by a peer BGPsec speaker outside of a 820 confederation, the 'Target AS Number' will always be the AS 821 Confederation Identifier (the public AS number of the confederation) 822 as opposed to the Member-AS Number. 824 To handle this case, when a BGPsec speaker (that is a confederation 825 member) processes a current Secure_Path Segment that has the 826 Confed_Segment flag set to zero, if the next most recently added 827 Secure_Path segment has the Confed_Segment flag set to one then, when 828 computing the digest for the current Secure_Path segment, the BGPsec 829 speaker takes the 'Target AS Number' to be the AS Confederation 830 Identifier of the validating BGPsec speaker's own confederation. 831 (Note that the algorithm in Section 5.2 processes Secure_Path 832 Segments in order from most recently added to least recently added, 833 therefore, this special case will apply to the first Secure_Path 834 segment that the algorithm encounters that has the Confed_Segment 835 flag set to zero.) 837 Finally, as discussed above, an AS confederation may optionally 838 decide that its members will not verify digital signatures added by 839 members. In such a federation, when a confederation member runs the 840 algorithm in Section 5.2, the confederation member, during the 841 process of error checking, first checks whether the Confed_Segment 842 flag in the corresponding Secure_Path segment is set to one. If the 843 Confed_Segment flag is set to one in the corresponding Secure_Path 844 segment, the confederation member does not perform any further checks 845 on the Signature Segment and immediately moves on to the next 846 Signature Segment (and checks its corresponding Secure_Path segment). 847 Note that as specified in Section 5.2, it is an error when a BGPsec 848 speaker receives from a peer, who is not in the same AS 849 confederation, a BGPsec update containing a Confed_Segment flag set 850 to one. 852 4.4. Reconstructing the AS_PATH Attribute 854 BGPsec update messages do not contain the AS_PATH attribute. 855 However, the AS_PATH attribute can be reconstructed from the 856 BGPsec_Path attribute. This is necessary in the case where a route 857 advertisement is received via a BGPsec update message and then 858 propagated to a peer via a non-BGPsec update message (e.g., because 859 the latter peer does not support BGPsec). Note that there may be 860 additional cases where an implementation finds it useful to perform 861 this reconstruction. Before attempting to reconstruct an AS_PATH for 862 the purpose of forwarding an unsigned (non-BGPsec) update to a peer, 863 a BGPsec speaker MUST perform the basic integrity checks listed in 864 Section 5.2 to ensure that the received BGPsec update is properly 865 formed. 867 The AS_PATH attribute can be constructed from the BGPsec_Path 868 attribute as follows. Starting with an empty AS_PATH attribute, 869 process the Secure_Path segments in order from least-recently added 870 (corresponding to the origin) to most-recently added. For each 871 Secure_Path segment perform the following steps: 873 1. If the Confed_Segment flag in the Secure_Path segment is set to 874 one, then look at the most-recently added segment in the AS_PATH. 876 * In the case where the AS_PATH is empty or in the case where 877 the most-recently added segment is of type AS_SEQUENCE then 878 add (prepend to the AS_PATH) a new AS_PATH segment of type 879 AS_CONFED_SEQUENCE. This segment of type AS_CONFED_SEQUENCE 880 shall contain a number of elements equal to the pCount field 881 in the current Secure_Path segment. Each of these elements 882 shall be the AS number contained in the current Secure_Path 883 segment. (That is, if the pCount field is X, then the segment 884 of type AS_CONFED_SEQUENCE contains X copies of the 885 Secure_Path segment's AS Number field.) 887 * In the case where the most-recently added segment in the 888 AS_PATH is of type AS_CONFED_SEQUENCE then add (prepend to the 889 segment) a number of elements equal to the pCount field in the 890 current Secure_Path segment. The value of each of these 891 elements shall be the AS number contained in the current 892 Secure_Path segment. (That is, if the pCount field is X, then 893 add X copies of the Secure_Path segment's AS Number field to 894 the existing AS_CONFED_SEQUENCE.) 896 2. If the Confed_Segment flag in the Secure_Path segment is set to 897 zero, then look at the most-recently added segment in the 898 AS_PATH. 900 * In the case where the AS_PATH is empty, and the pCount field 901 in the Secure_Path segment is greater than zero, add (prepend 902 to the AS_PATH) a new AS_PATH segment of type AS_SEQUENCE. 903 This segment of type AS_SEQUENCE shall contain a number of 904 elements equal to the pCount field in the current Secure_Path 905 segment. Each of these elements shall be the AS number 906 contained in the current Secure_Path segment. (That is, if 907 the pCount field is X, then the segment of type AS_SEQUENCE 908 contains X copies of the Secure_Path segment's AS Number 909 field.) 911 * In the case where the most recently added segment in the 912 AS_PATH is of type AS_SEQUENCE then add (prepend to the 913 segment) a number of elements equal to the pCount field in the 914 current Secure_Path segment. The value of each of these 915 elements shall be the AS number contained in the current 916 Secure_Path segment. (That is, if the pCount field is X, then 917 add X copies of the Secure_Path segment's AS Number field to 918 the existing AS_SEQUENCE.) 920 As part of the above described procedure, the following additional 921 actions are performed in order not to exceed the size limitations of 922 AS_SEQUENCE and AS_CONFED_SEQUENCE. While adding the next 923 Secure_Path segment (with its prepends, if any) to the AS_PATH being 924 assembled, if it would cause the AS_SEQUENCE (or AS_CONFED_SEQUENCE) 925 at hand to exceed the 255 ASN per segment limit [RFC4271] [RFC5065], 926 then the BGPsec speaker would follow the recommendations in RFC 4271 927 [RFC4271] and RFC 5065 [RFC5065] of creating another segment of the 928 same type (AS_SEQUENCE or AS_CONFED_SEQUENCE) and continue filling 929 that. 931 5. Processing a Received BGPsec Update 933 Upon receiving a BGPsec update message from an external (eBGP) peer, 934 a BGPsec speaker SHOULD validate the message to determine the 935 authenticity of the path information contained in the BGPsec_Path 936 attribute. Typically, a BGPsec speaker will also wish to perform 937 origin validation (see RFC 6483 [RFC6483] and RFC 6811 [RFC6811]) on 938 an incoming BGPsec update message, but such validation is independent 939 of the validation described in this section. 941 Section 5.1 provides an overview of BGPsec validation and Section 5.2 942 provides a specific algorithm for performing such validation. (Note 943 that an implementation need not follow the specific algorithm in 944 Section 5.2 as long as the input/output behavior of the validation is 945 identical to that of the algorithm in Section 5.2.) During 946 exceptional conditions (e.g., the BGPsec speaker receives an 947 incredibly large number of update messages at once) a BGPsec speaker 948 MAY temporarily defer validation of incoming BGPsec update messages. 949 The treatment of such BGPsec update messages, whose validation has 950 been deferred, is a matter of local policy. However, an 951 implementation SHOULD ensure that deferment of validation and status 952 of deferred messages is visible to the operator. 954 The validity of BGPsec update messages is a function of the current 955 RPKI state. When a BGPsec speaker learns that RPKI state has changed 956 (e.g., from an RPKI validating cache via the RPKI-to-Router protocol 957 [I-D.ietf-sidr-rpki-rtr-rfc6810-bis]), the BGPsec speaker MUST re-run 958 validation on all affected update messages stored in its Adj-RIB-In. 959 For example, when a given RPKI certificate ceases to be valid (e.g., 960 it expires or is revoked), all update messages containing a signature 961 whose SKI matches the SKI in the given certificate must be re- 962 assessed to determine if they are still valid. If this reassessment 963 determines that the validity state of an update has changed then, 964 depending on local policy, it may be necessary to re-run best path 965 selection. 967 BGPsec update messages do not contain an AS_PATH attribute. The 968 Secure_Path contains AS path information for the BGPsec update 969 message. Therefore, a BGPsec speaker MUST utilize the AS path 970 information in the Secure_Path in all cases where it would otherwise 971 use the AS path information in the AS_PATH attribute. The only 972 exception to this rule is when AS path information must be updated in 973 order to propagate a route to a peer (in which case the BGPsec 974 speaker follows the instructions in Section 4). Section 4.4 provides 975 an algorithm for constructing an AS_PATH attribute from a BGPsec_Path 976 attribute. Whenever the use of AS path information is called for 977 (e.g., loop detection, or use of AS path length in best path 978 selection) the externally visible behavior of the implementation 979 shall be the same as if the implementation had run the algorithm in 980 Section 4.4 and used the resulting AS_PATH attribute as it would for 981 a non-BGPsec update message. 983 5.1. Overview of BGPsec Validation 985 Validation of a BGPsec update messages makes use of data from RPKI 986 certificates. In particular, it is necessary that the recipient have 987 access to the following data obtained from valid RPKI certificates: 988 the AS Number, Public Key and Subject Key Identifier from each valid 989 RPKI router certificate. 991 Note that the BGPsec speaker could perform the validation of RPKI 992 certificates on its own and extract the required data, or it could 993 receive the same data from a trusted cache that performs RPKI 994 validation on behalf of (some set of) BGPsec speakers. (For example, 995 the trusted cache could deliver the necessary validity information to 996 the BGPsec speaker using the router key PDU for the RPKI-to-Router 997 protocol [I-D.ietf-sidr-rpki-rtr-rfc6810-bis].) 999 To validate a BGPsec update message containing the BGPsec_Path 1000 attribute, the recipient performs the validation steps specified in 1001 Section 5.2. The validation procedure results in one of two states: 1002 'Valid' and 'Not Valid'. 1004 It is expected that the output of the validation procedure will be 1005 used as an input to BGP route selection. That said, BGP route 1006 selection, and thus the handling of the validation states is a matter 1007 of local policy, and is handled using local policy mechanisms. 1008 Implementations SHOULD enable operators to set such local policy on a 1009 per-session basis. (That is, it is expected that some operators will 1010 choose to treat BGPsec validation status differently for update 1011 messages received over different BGP sessions.) 1013 BGPsec validation needs only be performed at the eBGP edge. The 1014 validation status of a BGP signed/unsigned update MAY be conveyed via 1015 iBGP from an ingress edge router to an egress edge router via some 1016 mechanism, according to local policy within an AS. As discussed in 1017 Section 4, when a BGPsec speaker chooses to forward a (syntactically 1018 correct) BGPsec update message, it should be forwarded with its 1019 BGPsec_Path attribute intact (regardless of the validation state of 1020 the update message). Based entirely on local policy, an egress 1021 router receiving a BGPsec update message from within its own AS MAY 1022 choose to perform its own validation. 1024 5.2. Validation Algorithm 1026 This section specifies an algorithm for validation of BGPsec update 1027 messages. A conformant implementation MUST include a BGPsec update 1028 validation algorithm that is functionally equivalent to the 1029 externally visible behavior of this algorithm. 1031 First, the recipient of a BGPsec update message performs a check to 1032 ensure that the message is properly formed. Both syntactical and 1033 protocol violation errors are checked. The error checks specified in 1034 Section 6.3 of [RFC4271] are performed, except that for BGPsec 1035 updates the checks on the AS_PATH attribute do not apply and instead 1036 the following checks on BGPsec_Path attribute are performed: 1038 1. Check to ensure that the entire BGPsec_Path attribute is 1039 syntactically correct (conforms to the specification in this 1040 document). 1042 2. Check that AS number in the most recently added Secure_Path 1043 segment (i.e. the one corresponding to the peer from which the 1044 update message was received) matches the AS number of that peer 1045 (as specified in the BGP OPEN message). 1047 3. Check that each Signature_Block contains one Signature segment 1048 for each Secure_Path segment in the Secure_Path portion of the 1049 BGPsec_Path attribute. (Note that the entirety of each 1050 Signature_Block must be checked to ensure that it is well formed, 1051 even though the validation process may terminate before all 1052 signatures are cryptographically verified.) 1054 4. Check that the update message does not contain an AS_PATH 1055 attribute. 1057 5. If the update message was received from an BGPsec peer that is 1058 not a member of the BGPsec speaker's AS confederation, check to 1059 ensure that none of the Secure_Path segments contain a Flags 1060 field with the Confed_Segment flag set to one. 1062 6. If the update message was received from a BGPsec peer that is a 1063 member of the BGPsec speaker's AS confederation, check to ensure 1064 that the Secure_Path segment corresponding to that peer contains 1065 a Flags field with the Confed_Segment flag set to one. 1067 7. If the update message was received from a peer that is not 1068 expected to set pCount equal to zero (see Section 4.2) then check 1069 to ensure that the pCount field in the most-recently added 1070 Secure_Path segment is not equal to zero. 1072 If any of these checks fail, it is an error in the BGPsec_Path 1073 attribute. BGPsec speakers MUST handle any syntactical or protocol 1074 errors in the BGPsec_Path attribute using the "treat-as-withdraw" 1075 approach as defined in RFC 7606 [RFC7606]. 1077 Next, the BGPsec speaker examines the Signature_Blocks in the 1078 BGPsec_Path attribute. A Signature_Block corresponding to an 1079 algorithm suite that the BGPsec speaker does not support is not 1080 considered in validation. If there is no Signature_Block 1081 corresponding to an algorithm suite that the BGPsec speaker supports, 1082 then in order to consider the update in the route selection process, 1083 the BGPsec speaker MUST strip the Signature_Block(s), reconstruct the 1084 AS_PATH from the Secure_Path (see Section 4.4), and treat the update 1085 as if it was received as an unsigned BGP update. 1087 For each remaining Signature_Block (corresponding to an algorithm 1088 suite supported by the BGPsec speaker), the BGPsec speaker iterates 1089 through the Signature segments in the Signature_Block, starting with 1090 the most recently added segment (and concluding with the least 1091 recently added segment). Note that there is a one-to-one 1092 correspondence between Signature segments and Secure_Path segments 1093 within the BGPsec_Path attribute. The following steps make use of 1094 this correspondence. 1096 o (Step 1): Let there be K AS hops in a received BGPsec_Path 1097 attribute that is to be validated. Let AS(1), AS(2), ..., AS(K+1) 1098 denote the sequence of AS numbers from the origin AS to the 1099 validating AS. Let Secure_Path Segment N and Signature Segment N 1100 in the BGPsec_Path attribute refer to those corresponding to AS(N) 1101 (where N = 1, 2, ..., K). The BGPsec speaker that is processing 1102 and validating the BGPsec_Path attribute resides in AS(K+1). Let 1103 Signature Segment N be the Signature Segment that is currently 1104 being verified. 1106 o (Step 2): Locate the public key needed to verify the signature (in 1107 the current Signature segment). To do this, consult the valid 1108 RPKI router certificate data and look up all valid (AS, SKI, 1109 Public Key) triples in which the AS matches the AS number in the 1110 corresponding Secure_Path segment. Of these triples that match 1111 the AS number, check whether there is an SKI that matches the 1112 value in the Subject Key Identifier field of the Signature 1113 segment. If this check finds no such matching SKI value, then 1114 mark the entire Signature_Block as 'Not Valid' and proceed to the 1115 next Signature_Block. 1117 o (Step 3): Compute the digest function (for the given algorithm 1118 suite) on the appropriate data. 1120 In order to verify the digital signature in Signature Segment N, 1121 construct the sequence of octets to be hashed as shown in Figure 9 1122 (using the notations defined in Step 1). (Note that this sequence 1123 is the same sequence that was used by AS(N) that created the 1124 Signature Segment N (see Section 4.2 and Figure 8).) 1126 +------------------------------------+ 1127 | Target AS Number | 1128 +------------------------------------+ ---\ 1129 | Signature Segment : N-1 | \ 1130 +------------------------------------+ | 1131 | Secure_Path Segment : N | | 1132 +------------------------------------+ \ 1133 ... > Data from 1134 +------------------------------------+ / N Segments 1135 | Signature Segment : 1 | | 1136 +------------------------------------+ | 1137 | Secure_Path Segment : 2 | | 1138 +------------------------------------+ / 1139 | Secure_Path Segment : 1 | / 1140 +------------------------------------+---/ 1141 | Algorithm Suite Identifier | 1142 +------------------------------------+ 1143 | AFI | 1144 +------------------------------------+ 1145 | SAFI | 1146 +------------------------------------+ 1147 | Prefix | 1148 +------------------------------------+ 1150 Figure 9: The Sequence of octets to be hashed for signature 1151 verification of Signature Segment N; N = 1,2, ..., K, where K is the 1152 number of AS hops in the BGPsec_Path attribute. 1154 The elements in this sequence (Figure 9) MUST be ordered exactly 1155 as shown. For the first segment to be processed (the most 1156 recently added segment (i.e. N = K) given that there are K hops 1157 in the Secure_Path), the 'Target AS Number' is AS(K+1), the AS 1158 number of the BGPsec speaker validating the update message. Note 1159 that if a BGPsec speaker uses multiple AS Numbers (e.g., the 1160 BGPsec speaker is a member of a confederation), the AS number used 1161 here MUST be the AS number announced in the OPEN message for the 1162 BGP session over which the BGPsec update was received. 1164 For each other Signature Segment (N smaller than K), the 'Target 1165 AS Number' is AS(N+1), the AS number in the Secure_Path segment 1166 that corresponds to the Signature Segment added immediately after 1167 the one being processed. (That is, in the Secure_Path segment 1168 that corresponds to the Signature segment that the validator just 1169 finished processing.) 1171 The Secure_Path and Signature Segment are obtained from the 1172 BGPsec_Path attribute. The Address Family Identifier (AFI), 1173 Subsequent Address Family Identifier (SAFI), and Prefix fields are 1174 obtained from the MP_REACH_NLRI attribute. Additionally, in the 1175 Prefix field all of the trailing bits MUST be set to zero when 1176 constructing this sequence. 1178 o (Step 4): Use the signature validation algorithm (for the given 1179 algorithm suite) to verify the signature in the current segment. 1180 That is, invoke the signature validation algorithm on the 1181 following three inputs: the value of the Signature field in the 1182 current segment; the digest value computed in Step 3 above; and 1183 the public key obtained from the valid RPKI data in Step 2 above. 1184 If the signature validation algorithm determines that the 1185 signature is invalid, then mark the entire Signature_Block as 'Not 1186 Valid' and proceed to the next Signature_Block. If the signature 1187 validation algorithm determines that the signature is valid, then 1188 continue processing Signature Segments (within the current 1189 Signature_Block). 1191 If all Signature Segments within a Signature_Block pass validation 1192 (i.e., all segments are processed and the Signature_Block has not yet 1193 been marked 'Not Valid'), then the Signature_Block is marked as 1194 'Valid'. 1196 If at least one Signature_Block is marked as 'Valid', then the 1197 validation algorithm terminates and the BGPsec update message is 1198 deemed to be 'Valid'. (That is, if a BGPsec update message contains 1199 two Signature_Blocks then the update message is deemed 'Valid' if the 1200 first Signature_Block is marked 'Valid' OR the second Signature_Block 1201 is marked 'Valid'.) 1203 6. Algorithms and Extensibility 1205 6.1. Algorithm Suite Considerations 1207 Note that there is currently no support for bilateral negotiation 1208 (using BGP capabilities) between BGPsec peers to use a particular 1209 (digest and signature) algorithm suite. This is because the 1210 algorithm suite used by the sender of a BGPsec update message must be 1211 understood not only by the peer to whom it is directly sending the 1212 message, but also by all BGPsec speakers to whom the route 1213 advertisement is eventually propagated. Therefore, selection of an 1214 algorithm suite cannot be a local matter negotiated by BGP peers, but 1215 instead must be coordinated throughout the Internet. 1217 To this end, a mandatory algorithm suites document exists which 1218 specifies a mandatory-to-use 'current' algorithm suite for use by all 1219 BGPsec speakers [I-D.ietf-sidr-bgpsec-algs]. 1221 It is anticipated that, in the future, the mandatory algorithm suites 1222 document will be updated to specify a transition from the 'current' 1223 algorithm suite to a 'new' algorithm suite. During the period of 1224 transition (likely a small number of years), all BGPsec update 1225 messages SHOULD simultaneously use both the 'current' algorithm suite 1226 and the 'new' algorithm suite. (Note that Section 3 and Section 4 1227 specify how the BGPsec_Path attribute can contain signatures, in 1228 parallel, for two algorithm suites.) Once the transition is 1229 complete, use of the old 'current' algorithm will be deprecated, use 1230 of the 'new' algorithm will be mandatory, and a subsequent 'even 1231 newer' algorithm suite may be specified as recommended to implement. 1232 Once the transition has successfully been completed in this manner, 1233 BGPsec speakers SHOULD include only a single Signature_Block 1234 (corresponding to the 'new' algorithm). 1236 6.2. Extensibility Considerations 1238 This section discusses potential changes to BGPsec that would require 1239 substantial changes to the processing of the BGPsec_Path and thus 1240 necessitate a new version of BGPsec. Examples of such changes 1241 include: 1243 o A new type of signature algorithm that produces signatures of 1244 variable length 1246 o A new type of signature algorithm for which the number of 1247 signatures in the Signature_Block is not equal to the number of 1248 ASes in the Secure_Path (e.g., aggregate signatures) 1250 o Changes to the data that is protected by the BGPsec signatures 1251 (e.g., attributes other than the AS path) 1253 In the case that such a change to BGPsec were deemed desirable, it is 1254 expected that a subsequent version of BGPsec would be created and 1255 that this version of BGPsec would specify a new BGP path attribute, 1256 let's call it BGPsec_Path_Two, which is designed to accommodate the 1257 desired changes to BGPsec. In such a case, the mandatory algorithm 1258 suites document would be updated to specify algorithm suites 1259 appropriate for the new version of BGPsec. 1261 At this point a transition would begin which is analogous to the 1262 algorithm transition discussed in Section 6.1. During the transition 1263 period all BGPsec speakers should simultaneously include both the 1264 BGPsec_Path attribute and the new BGPsec_Path_Two attribute. Once 1265 the transition is complete, the use of BGPsec_Path could then be 1266 deprecated, at which point BGPsec speakers should include only the 1267 new BGPsec_Path_Two attribute. Such a process could facilitate a 1268 transition to a new BGPsec semantics in a backwards compatible 1269 fashion. 1271 7. Operations and Management Considerations 1273 Some operations and management issues that are closely relevant to 1274 BGPsec protocol specification and its deployment are highlighted 1275 here. The Best Current Practice concerning operational deployment of 1276 BGPSec is provided in [I-D.ietf-sidr-bgpsec-ops]. 1278 Section 2.2 describes the negotiation required to establish a BGPsec- 1279 capable peering session. Not only must the BGPsec capability be 1280 exchanged (and agreed on), but the BGP multiprotocol extension 1281 [RFC4760] for the same AFI and the four-byte AS capability [RFC6793] 1282 must also be exchanged. Failure to properly negotiate a BGPsec 1283 session, due to a missing capability, for example, may still result 1284 in the exchange of BGP (unsigned) updates. While the BGP chain of 1285 ASNs is not broken, the security can be reduced and a contiguous set 1286 of BGPsec peers may not exist anymore. It is RECOMMENDED that an 1287 implementation log the failure to properly negotiate a BGPsec session 1288 if the local BGP speaker is configured for it. Also, an 1289 implementation MUST have ability to prevent a BGP session from being 1290 established if configured for only BGPsec use. 1292 A peer that is an Internet Exchange Point (IXP) (i.e. Route Server) 1293 with a transparent AS is expected to set pCount = 0 in its 1294 Secure_Path segment while forwarding an update to a peer (see 1295 Section 4.2). Clearly, such an IXP SHOULD configure itself to set 1296 its own pCount = 0. As stated in Section 4.2, "BGPsec speakers 1297 SHOULD drop incoming update messages with pCount set to zero in cases 1298 where the BGPsec speaker does not expect its peer to set pCount to 1299 zero." This means that a BGPsec speaker SHOULD be configured so that 1300 it permits pCount =0 from an IXP peer and never permits pCount = 0 1301 from a peer that is not an IXP. 1303 During the validation of a BGPsec update, route processor performance 1304 speedup can be achieved by incorporating the following observations. 1305 An update is deemed 'Valid' if at least one of the Signature_Blocks 1306 is marked as 'Valid' (see Section 5.2). Therefore, if an update 1307 contains two Signature_Blocks and the first one verified is found 1308 'Valid', then the second Signature_Block does not have to be 1309 verified. And if the update were chosen for best path, then the 1310 BGPsec speaker adds its signature (generated with the respective 1311 algorithm) to each of the two Signature_Blocks and forwards the 1312 update. Also, a BGPsec update is deemed 'Not Valid' if at least one 1313 signature in each of the Signature_Blocks is invalid. This principle 1314 can also be used for route processor workload savings, i.e. the 1315 verification for a Signature_Block terminates early when the first 1316 invalid signature is encountered. 1318 Many signature algorithms are non-deterministic. That is, many 1319 signature algorithms will produce different signatures each time they 1320 are run (even when they are signing the same data with the same key). 1321 Therefore, if a BGPsec router receives a BGPsec update from a peer 1322 and later receives a second BGPsec update message from the same peer 1323 for the same prefix with the same Secure_Path and SKIs, the second 1324 update will differ from the first update in the signature fields (for 1325 a non-deterministic signature algorithm). For a deterministic 1326 signature algorithm, the signature fields will also be identical 1327 between the two updates. On the basis of these observations, an 1328 implementation may incorporate optimizations in update validation 1329 processing. 1331 In Section 2.2, is was stated that a BGPsec speaker SHOULD announce 1332 support for the capability to receive BGP extended messages. Lack of 1333 negotiation of this capability is not expected to pose a problem in 1334 the early years of BGPsec deployment. However, as BGPsec is deployed 1335 more and more, the BGPsec update messages would grow in size and some 1336 messages may be dropped due to their size exceeding the current 4K 1337 bytes limit. Therefore, it is strongly RECOMMENDED that all BGPsec 1338 speakers negotiate the extended message capability within a 1339 reasonable period of time after initial deployment of BGPsec. 1341 How will migration from BGP to BGPsec look like? What are the 1342 benefits for the first adopters? Initially small groups of 1343 contiguous ASes would be doing BGPsec. There would be possibly one 1344 or more such groups in different geographic regions of the global 1345 Internet. Only the routes originated within each group and 1346 propagated within its borders would get the benefits of cryptographic 1347 AS path protection. As BGPsec adoption grows, each group grows in 1348 size and eventually they join together to form even larger BGPsec 1349 capable groups of contiguous ASes. The benefit for early adopters 1350 starts with AS path security within the contiguous-AS regions spanned 1351 by their respective groups. Over time they would see those 1352 contiguous-AS regions grow much larger. 1354 8. Security Considerations 1356 For a discussion of the BGPsec threat model and related security 1357 considerations, please see RFC 7132 [RFC7132]. 1359 8.1. Security Guarantees 1361 When used in conjunction with Origin Validation (see RFC 6483 1362 [RFC6483] and RFC 6811 [RFC6811]), a BGPsec speaker who receives a 1363 valid BGPsec update message, containing a route advertisement for a 1364 given prefix, is provided with the following security guarantees: 1366 o The origin AS number corresponds to an autonomous system that has 1367 been authorized, in the RPKI, by the IP address space holder to 1368 originate route advertisements for the given prefix. 1370 o For each AS in the path, a BGPsec speaker authorized by the holder 1371 of the AS number intentionally chose (in accordance with local 1372 policy) to propagate the route advertisement to the subsequent AS 1373 in the path. 1375 That is, the recipient of a valid BGPsec update message is assured 1376 that the update propagated via the sequence of ASes listed in the 1377 Secure_Path portion of the BGPsec_Path attribute. (It should be 1378 noted that BGPsec does not offer any guarantee that the data packets 1379 would flow along the indicated path; it only guarantees that the BGP 1380 update conveying the path indeed propagated along the indicated 1381 path.) Furthermore, the recipient is assured that this path 1382 terminates in an autonomous system that has been authorized by the IP 1383 address space holder as a legitimate destination for traffic to the 1384 given prefix. 1386 Note that although BGPsec provides a mechanism for an AS to validate 1387 that a received update message has certain security properties, the 1388 use of such a mechanism to influence route selection is completely a 1389 matter of local policy. Therefore, a BGPsec speaker can make no 1390 assumptions about the validity of a route received from an external 1391 BGPsec peer. That is, a compliant BGPsec peer may (depending on the 1392 local policy of the peer) send update messages that fail the validity 1393 test in Section 5. Thus, a BGPsec speaker MUST completely validate 1394 all BGPsec update messages received from external peers. (Validation 1395 of update messages received from internal peers is a matter of local 1396 policy, see Section 5). 1398 8.2. On the Removal of BGPsec Signatures 1400 There may be cases where a BGPsec speaker deems 'Valid' (as per the 1401 validation algorithm in Section 5.2) a BGPsec update message that 1402 contains both a 'Valid' and a 'Not Valid' Signature_Block. That is, 1403 the update message contains two sets of signatures corresponding to 1404 two algorithm suites, and one set of signatures verifies correctly 1405 and the other set of signatures fails to verify. In this case, the 1406 protocol specifies that a BGPsec speaker choosing to propagate the 1407 route advertisement in such an update message should add its 1408 signature to each of the Signature_Blocks (see Section 4.2). Thus 1409 the BGPsec speaker creates a signature using both algorithm suites 1410 and creates a new update message that contains both the 'Valid' and 1411 the 'Not Valid' set of signatures (from its own vantage point). 1413 To understand the reason for such a design decision, consider the 1414 case where the BGPsec speaker receives an update message with both a 1415 set of algorithm A signatures which are 'Valid' and a set of 1416 algorithm B signatures which are 'Not Valid'. In such a case it is 1417 possible (perhaps even likely, depending on the state of the 1418 algorithm transition) that some of the BGPsec speaker's peers (or 1419 other entities further 'downstream' in the BGP topology) do not 1420 support algorithm A. Therefore, if the BGPsec speaker were to remove 1421 the 'Not Valid' set of signatures corresponding to algorithm B, such 1422 entities would treat the message as though it were unsigned. By 1423 including the 'Not Valid' set of signatures when propagating a route 1424 advertisement, the BGPsec speaker ensures that 'downstream' entities 1425 have as much information as possible to make an informed opinion 1426 about the validation status of a BGPsec update. 1428 Note also that during a period of partial BGPsec deployment, a 1429 'downstream' entity might reasonably treat unsigned messages 1430 differently from BGPsec updates that contain a single set of 'Not 1431 Valid' signatures. That is, by removing the set of 'Not Valid' 1432 signatures the BGPsec speaker might actually cause a downstream 1433 entity to 'upgrade' the status of a route advertisement from 'Not 1434 Valid' to unsigned. Finally, note that in the above scenario, the 1435 BGPsec speaker might have deemed algorithm A signatures 'Valid' only 1436 because of some issue with RPKI state local to its AS (for example, 1437 its AS might not yet have obtained a CRL indicating that a key used 1438 to verify an algorithm A signature belongs to a newly revoked 1439 certificate). In such a case, it is highly desirable for a 1440 downstream entity to treat the update as 'Not Valid' (due to the 1441 revocation) and not as 'unsigned' (which would happen if the 'Not 1442 Valid' Signature_Blocks were removed). 1444 A similar argument applies to the case where a BGPsec speaker (for 1445 some reason such as lack of viable alternatives) selects as its best 1446 path (to a given prefix) a route obtained via a 'Not Valid' BGPsec 1447 update message. In such a case, the BGPsec speaker should propagate 1448 a signed BGPsec update message, adding its signature to the 'Not 1449 Valid' signatures that already exist. Again, this is to ensure that 1450 'downstream' entities are able to make an informed decision and not 1451 erroneously treat the route as unsigned. It should also be noted 1452 that due to possible differences in RPKI data observed at different 1453 vantage points in the network, a BGPsec update deemed 'Not Valid' at 1454 an upstream BGPsec speaker may be deemed 'Valid' by another BGP 1455 speaker downstream. 1457 Indeed, when a BGPsec speaker signs an outgoing update message, it is 1458 not attesting to a belief that all signatures prior to its are valid. 1459 Instead it is merely asserting that: 1461 o The BGPsec speaker received the given route advertisement with the 1462 indicated prefix, AFI, SAFI, and Secure_Path; and 1464 o The BGPsec speaker chose to propagate an advertisement for this 1465 route to the peer (implicitly) indicated by the 'Target AS 1466 Number'. 1468 8.3. Mitigation of Denial of Service Attacks 1470 The BGPsec update validation procedure is a potential target for 1471 denial of service attacks against a BGPsec speaker. The mitigation 1472 of denial of service attacks that are specific to the BGPsec protocol 1473 is considered here. 1475 To mitigate the effectiveness of such denial of service attacks, 1476 BGPsec speakers should implement an update validation algorithm that 1477 performs expensive checks (e.g., signature verification) after 1478 performing less expensive checks (e.g., syntax checks). The 1479 validation algorithm specified in Section 5.2 was chosen so as to 1480 perform checks which are likely to be expensive after checks that are 1481 likely to be inexpensive. However, the relative cost of performing 1482 required validation steps may vary between implementations, and thus 1483 the algorithm specified in Section 5.2 may not provide the best 1484 denial of service protection for all implementations. 1486 Additionally, sending update messages with very long AS paths (and 1487 hence a large number of signatures) is a potential mechanism to 1488 conduct denial of service attacks. For this reason, it is important 1489 that an implementation of the validation algorithm stops attempting 1490 to verify signatures as soon as an invalid signature is found. (This 1491 ensures that long sequences of invalid signatures cannot be used for 1492 denial of service attacks.) Furthermore, implementations can 1493 mitigate such attacks by only performing validation on update 1494 messages that, if valid, would be selected as the best path. That 1495 is, if an update message contains a route that would lose out in best 1496 path selection for other reasons (e.g., a very long AS path) then it 1497 is not necessary to determine the BGPsec-validity status of the 1498 route. 1500 8.4. Additional Security Considerations 1502 The mechanism of setting the pCount field to zero is included in this 1503 specification to enable route servers in the control path to 1504 participate in BGPsec without increasing the length of the AS path. 1505 However, entities other than route servers could conceivably use this 1506 mechanism (set the pCount to zero) to attract traffic (by reducing 1507 the length of the AS path) illegitimately. This risk is largely 1508 mitigated if every BGPsec speaker drops incoming update messages that 1509 set pCount to zero but come from a peer that is not a route server. 1510 However, note that a recipient of a BGPsec update message within 1511 which an upstream entity two or more hops away has set pCount to zero 1512 is unable to verify for themselves whether pCount was set to zero 1513 legitimately. 1515 There is a possibility of passing a BGPsec update via tunneling 1516 between colluding ASes. For example, say, AS-X does not peer with 1517 AS-Y, but colludes with AS-Y, signs and sends a BGPsec update to AS-Y 1518 by tunneling. AS-Y can then further sign and propagate the BGPsec 1519 update to its peers. It is beyond the scope of the BGPsec protocol 1520 to detect this form of malicious behavior. BGPsec is designed to 1521 protect messages sent within BGP (i.e. within the control plane) - 1522 not when the control plane in bypassed. 1524 A variant of the collusion by tunneling mentioned above can happen in 1525 the context of AS confederations. When a BGPsec router (outside of a 1526 confederation) is forwarding an update to a member of the 1527 confederation, it signs the update to the public ASN of the 1528 confederation and not to the member's ASN (see Section 4.3). Said 1529 member can tunnel the signed update to another member as is (i.e. 1530 without adding a signature). The update can then be propagated using 1531 BGPsec to other confederation members or to BGPsec neighbors outside 1532 of the confederation. This kind of operation is possible, but no 1533 grave security or reachability compromise is feared due to the 1534 following reasons: (1) The confederation members belong to one 1535 organization and strong internal trust is expected; and (2) Recall 1536 that the signatures that are internal to the confederation must be 1537 removed prior to forwarding the update to an outside BGPsec router 1538 (see Section 4.3). 1540 BGPsec does not provide protection against attacks at the transport 1541 layer. As with any BGP session, an adversary on the path between a 1542 BGPsec speaker and its peer is able to perform attacks such as 1543 modifying valid BGPsec updates to cause them to fail validation, 1544 injecting (unsigned) BGP update messages without BGPsec_Path 1545 attributes, injecting BGPsec update messages with BGPsec_Path 1546 attributes that fail validation, or causing the peer to tear-down the 1547 BGP session. The use of BGPsec does nothing to increase the power of 1548 an on-path adversary -- in particular, even an on-path adversary 1549 cannot cause a BGPsec speaker to believe a BGPsec-invalid route is 1550 valid. However, as with any BGP session, BGPsec sessions SHOULD be 1551 protected by appropriate transport security mechanisms (see the 1552 Security Considerations section in [RFC4271]). 1554 There is a possibility of replay attacks which are defined as 1555 follows. In the context of BGPsec, a replay attack occurs when a 1556 malicious BGPsec speaker in the AS path suppresses a prefix 1557 withdrawal (implicit or explicit). Further, a replay attack is said 1558 to occur also when a malicious BGPsec speaker replays a previously 1559 received BGPsec announcement for a prefix that has since been 1560 withdrawn. The mitigation strategy for replay attacks involves 1561 router certificate rollover; please see 1562 [I-D.ietf-sidr-bgpsec-rollover] for details. 1564 9. IANA Considerations 1566 IANA is requested to register a new BGP capability from Section 2.1 1567 in the BGP Capabilities Code registry's "IETF Review" range. The 1568 description for the new capability is "BGPsec Capability". The 1569 reference for the new capability is this document (i.e. the RFC that 1570 replaces draft-ietf-sidr-bgpsec-protocol). 1572 IANA is also requested to register a new path attribute from 1573 Section 3 in the BGP Path Attributes registry. The code for this new 1574 attribute is "BGPsec_Path". The reference for the new capability is 1575 this document (i.e. the RFC that replaces draft-ietf-sidr-bgpsec- 1576 protocol). 1578 IANA is requested to define the "BGPsec Capability" registry in the 1579 Resource Public Key Infrastructure (RPKI) group. The registry is as 1580 shown in Figure 10 with values assigned from Section 2.1: 1582 +------+---------------+------------+ 1583 | Bits | Field | Reference | 1584 +------+---------------+------------+ 1585 | 0-3 | Version | [This RFC] | 1586 | +---------------+------------+ 1587 | | Value = 0x0 | [This RFC] | 1588 +------+---------------+------------+ 1589 | 4 | Direction | [This RFC] | 1590 +------+---------------+------------+ 1591 | 5-7 | Unassigned | [This RFC] | 1592 +------+---------------+------------+ 1594 Figure 10: IANA registry for BGPsec Capability. 1596 Future Version values and future values of the Unassigned bits are 1597 assigned using the "Standards Action" registration procedures defined 1598 in RFC 5226 [RFC5226]. 1600 IANA is requested to define the "BGPsec_Path Flags" registry in the 1601 RPKI group. The registry is as shown in Figure 11 with one value 1602 assigned from Section 3.1: 1604 +------+---------------------------+------------+ 1605 | Flag | Description | Reference | 1606 +------+---------------------------+------------+ 1607 | 0 | Confed_Segment | [This RFC] | 1608 +------+---------------------------+------------+ 1609 | 1-7 | Unassigned (set to zeros) | | 1610 +------+---------------------------+------------+ 1612 Figure 11: IANA registry for BGPsec_Path Flags field. 1614 Future values of the Unassigned bits are assigned using the 1615 "Standards Action" registration procedures defined in RFC 5226 1616 [RFC5226]. 1618 10. Contributors 1620 10.1. Authors 1622 Rob Austein 1623 Dragon Research Labs 1624 sra@hactrn.net 1626 Steven Bellovin 1627 Columbia University 1628 smb@cs.columbia.edu 1629 Randy Bush 1630 Internet Initiative Japan 1631 randy@psg.com 1633 Russ Housley 1634 Vigil Security 1635 housley@vigilsec.com 1637 Matt Lepinski 1638 New College of Florida 1639 mlepinski@ncf.edu 1641 Stephen Kent 1642 BBN Technologies 1643 kent@bbn.com 1645 Warren Kumari 1646 Google 1647 warren@kumari.net 1649 Doug Montgomery 1650 USA National Institute of Standards and Technology 1651 dougm@nist.gov 1653 Kotikalapudi Sriram 1654 USA National Institute of Standards and Technology 1655 kotikalapudi.sriram@nist.gov 1657 Samuel Weiler 1658 Parsons 1659 weiler+ietf@watson.org 1661 10.2. Acknowledgements 1663 The authors would like to thank Michael Baer, Oliver Borchert, David 1664 Mandelberg, Sean Turner, John Scudder, Wes George, Jeff Haas, Keyur 1665 Patel, Sandy Murphy, Chris Morrow, Russ Mundy, Wes Hardaker, Sharon 1666 Goldberg, Ed Kern, Doug Maughan, Pradosh Mohapatra, Mark Reynolds, 1667 Heather Schiller, Jason Schiller, Ruediger Volk and David Ward for 1668 their review, comments, and suggestions during the course of this 1669 work. 1671 11. References 1672 11.1. Normative References 1674 [I-D.ietf-idr-bgp-extended-messages] 1675 Bush, R., Patel, K., and D. Ward, "Extended Message 1676 support for BGP", draft-ietf-idr-bgp-extended-messages-13 1677 (work in progress), June 2016. 1679 [I-D.ietf-sidr-bgpsec-algs] 1680 Turner, S., "BGPsec Algorithms, Key Formats, & Signature 1681 Formats", draft-ietf-sidr-bgpsec-algs-16 (work in 1682 progress), November 2016. 1684 [I-D.ietf-sidr-bgpsec-pki-profiles] 1685 Reynolds, M., Turner, S., and S. Kent, "A Profile for 1686 BGPsec Router Certificates, Certificate Revocation Lists, 1687 and Certification Requests", draft-ietf-sidr-bgpsec-pki- 1688 profiles-18 (work in progress), July 2016. 1690 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1691 Requirement Levels", BCP 14, RFC 2119, 1692 DOI 10.17487/RFC2119, March 1997, 1693 . 1695 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 1696 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 1697 DOI 10.17487/RFC4271, January 2006, 1698 . 1700 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 1701 "Multiprotocol Extensions for BGP-4", RFC 4760, 1702 DOI 10.17487/RFC4760, January 2007, 1703 . 1705 [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 1706 System Confederations for BGP", RFC 5065, 1707 DOI 10.17487/RFC5065, August 2007, 1708 . 1710 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1711 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 1712 DOI 10.17487/RFC5226, May 2008, 1713 . 1715 [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement 1716 with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 1717 2009, . 1719 [RFC6482] Lepinski, M., Kent, S., and D. Kong, "A Profile for Route 1720 Origin Authorizations (ROAs)", RFC 6482, 1721 DOI 10.17487/RFC6482, February 2012, 1722 . 1724 [RFC6487] Huston, G., Michaelson, G., and R. Loomans, "A Profile for 1725 X.509 PKIX Resource Certificates", RFC 6487, 1726 DOI 10.17487/RFC6487, February 2012, 1727 . 1729 [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet 1730 Autonomous System (AS) Number Space", RFC 6793, 1731 DOI 10.17487/RFC6793, December 2012, 1732 . 1734 [RFC7606] Chen, E., Ed., Scudder, J., Ed., Mohapatra, P., and K. 1735 Patel, "Revised Error Handling for BGP UPDATE Messages", 1736 RFC 7606, DOI 10.17487/RFC7606, August 2015, 1737 . 1739 11.2. Informative References 1741 [I-D.ietf-sidr-as-migration] 1742 George, W. and S. Murphy, "BGPSec Considerations for AS 1743 Migration", draft-ietf-sidr-as-migration-05 (work in 1744 progress), April 2016. 1746 [I-D.ietf-sidr-bgpsec-ops] 1747 Bush, R., "BGPsec Operational Considerations", draft-ietf- 1748 sidr-bgpsec-ops-11 (work in progress), December 2016. 1750 [I-D.ietf-sidr-bgpsec-rollover] 1751 Gagliano, R., Weis, B., and K. Patel, "BGPsec Router 1752 Certificate Rollover", draft-ietf-sidr-bgpsec-rollover-06 1753 (work in progress), October 2016. 1755 [I-D.ietf-sidr-rpki-rtr-rfc6810-bis] 1756 Bush, R. and R. Austein, "The Resource Public Key 1757 Infrastructure (RPKI) to Router Protocol", draft-ietf- 1758 sidr-rpki-rtr-rfc6810-bis-07 (work in progress), March 1759 2016. 1761 [RFC6472] Kumari, W. and K. Sriram, "Recommendation for Not Using 1762 AS_SET and AS_CONFED_SET in BGP", BCP 172, RFC 6472, 1763 DOI 10.17487/RFC6472, December 2011, 1764 . 1766 [RFC6480] Lepinski, M. and S. Kent, "An Infrastructure to Support 1767 Secure Internet Routing", RFC 6480, DOI 10.17487/RFC6480, 1768 February 2012, . 1770 [RFC6483] Huston, G. and G. Michaelson, "Validation of Route 1771 Origination Using the Resource Certificate Public Key 1772 Infrastructure (PKI) and Route Origin Authorizations 1773 (ROAs)", RFC 6483, DOI 10.17487/RFC6483, February 2012, 1774 . 1776 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 1777 Austein, "BGP Prefix Origin Validation", RFC 6811, 1778 DOI 10.17487/RFC6811, January 2013, 1779 . 1781 [RFC7132] Kent, S. and A. Chi, "Threat Model for BGP Path Security", 1782 RFC 7132, DOI 10.17487/RFC7132, February 2014, 1783 . 1785 Authors' Addresses 1787 Matthew Lepinski (editor) 1788 NCF 1789 5800 Bay Shore Road 1790 Sarasota FL 34243 1791 USA 1793 Email: mlepinski@ncf.edu 1795 Kotikalapudi Sriram (editor) 1796 NIST 1797 100 Bureau Drive 1798 Gaithersburg MD 20899 1799 USA 1801 Email: kotikalapudi.sriram@nist.gov