idnits 2.17.1 draft-ietf-dtn-bpsec-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 22, 2018) is 2011 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-31) exists of draft-ietf-dtn-bpbis-11 ** Downref: Normative reference to an Informational RFC: RFC 6255 -- Obsolete informational reference (is this intentional?): RFC 8152 (Obsoleted by RFC 9052, RFC 9053) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Delay-Tolerant Networking E. Birrane 3 Internet-Draft K. McKeever 4 Intended status: Standards Track JHU/APL 5 Expires: April 25, 2019 October 22, 2018 7 Bundle Protocol Security Specification 8 draft-ietf-dtn-bpsec-08 10 Abstract 12 This document defines a security protocol providing end to end data 13 integrity and confidentiality services for the Bundle Protocol. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at https://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on April 25, 2019. 32 Copyright Notice 34 Copyright (c) 2018 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (https://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 50 1.1. Supported Security Services . . . . . . . . . . . . . . . 3 51 1.2. Specification Scope . . . . . . . . . . . . . . . . . . . 4 52 1.3. Related Documents . . . . . . . . . . . . . . . . . . . . 5 53 1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 54 2. Design Decisions . . . . . . . . . . . . . . . . . . . . . . 7 55 2.1. Block-Level Granularity . . . . . . . . . . . . . . . . . 7 56 2.2. Multiple Security Sources . . . . . . . . . . . . . . . . 7 57 2.3. Mixed Security Policy . . . . . . . . . . . . . . . . . . 8 58 2.4. User-Selected Cipher Suites . . . . . . . . . . . . . . . 8 59 2.5. Deterministic Processing . . . . . . . . . . . . . . . . 9 60 3. Security Blocks . . . . . . . . . . . . . . . . . . . . . . . 9 61 3.1. Block Definitions . . . . . . . . . . . . . . . . . . . . 9 62 3.2. Uniqueness . . . . . . . . . . . . . . . . . . . . . . . 10 63 3.3. Target Multiplicity . . . . . . . . . . . . . . . . . . . 10 64 3.4. Target Identification . . . . . . . . . . . . . . . . . . 11 65 3.5. Block Representation . . . . . . . . . . . . . . . . . . 11 66 3.6. Security Association Block . . . . . . . . . . . . . . . 12 67 3.7. Abstract Security Block . . . . . . . . . . . . . . . . . 14 68 3.8. Block Integrity Block . . . . . . . . . . . . . . . . . . 17 69 3.9. Block Confidentiality Block . . . . . . . . . . . . . . . 18 70 3.10. Block Interactions . . . . . . . . . . . . . . . . . . . 19 71 3.11. SA Parameters and Result Identification . . . . . . . . . 20 72 3.12. BSP Block Examples . . . . . . . . . . . . . . . . . . . 21 73 3.12.1. Example 1: Constructing a Bundle with Security . . . 21 74 3.12.2. Example 2: Adding More Security At A New Node . . . 22 75 4. Canonical Forms . . . . . . . . . . . . . . . . . . . . . . . 24 76 5. Security Processing . . . . . . . . . . . . . . . . . . . . . 24 77 5.1. Bundles Received from Other Nodes . . . . . . . . . . . . 25 78 5.1.1. Receiving BCBs . . . . . . . . . . . . . . . . . . . 25 79 5.1.2. Receiving BIBs . . . . . . . . . . . . . . . . . . . 26 80 5.2. Bundle Fragmentation and Reassembly . . . . . . . . . . . 27 81 6. Key Management . . . . . . . . . . . . . . . . . . . . . . . 27 82 7. Security Policy Considerations . . . . . . . . . . . . . . . 27 83 8. Security Considerations . . . . . . . . . . . . . . . . . . . 29 84 8.1. Attacker Capabilities and Objectives . . . . . . . . . . 29 85 8.2. Attacker Behaviors and BPSec Mitigations . . . . . . . . 30 86 8.2.1. Eavesdropping Attacks . . . . . . . . . . . . . . . . 30 87 8.2.2. Modification Attacks . . . . . . . . . . . . . . . . 31 88 8.2.3. Topology Attacks . . . . . . . . . . . . . . . . . . 32 89 8.2.4. Message Injection . . . . . . . . . . . . . . . . . . 32 90 9. Cipher Suite Authorship Considerations . . . . . . . . . . . 33 91 10. Defining Other Security Blocks . . . . . . . . . . . . . . . 34 92 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 93 11.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 35 94 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 95 12.1. Normative References . . . . . . . . . . . . . . . . . . 36 96 12.2. Informative References . . . . . . . . . . . . . . . . . 36 97 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 37 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 100 1. Introduction 102 This document defines security features for the Bundle Protocol (BP) 103 [I-D.ietf-dtn-bpbis] and is intended for use in Delay Tolerant 104 Networks (DTNs) to provide end-to-end security services. 106 The Bundle Protocol specification [I-D.ietf-dtn-bpbis] defines DTN as 107 referring to "a networking architecture providing communications in 108 and/or through highly stressed environments" where "BP may be viewed 109 as sitting at the application layer of some number of constituent 110 networks, forming a store-carry-forward overlay network". The term 111 "stressed" environment refers to multiple challenging conditions 112 including intermittent connectivity, large and/or variable delays, 113 asymmetric data rates, and high bit error rates. 115 The BP might be deployed such that portions of the network cannot be 116 trusted, posing the usual security challenges related to 117 confidentiality and integrity. However, the stressed nature of the 118 BP operating environment imposes unique conditions where usual 119 transport security mechanisms may not be sufficient. For example, 120 the store-carry-forward nature of the network may require protecting 121 data at rest, preventing unauthorized consumption of critical 122 resources such as storage space, and operating without regular 123 contact with a centralized security oracle (such as a certificate 124 authority). 126 An end-to-end security service is needed that operates in all of the 127 environments where the BP operates. 129 1.1. Supported Security Services 131 BPSec provides end-to-end integrity and confidentiality services for 132 BP bundles, as defined in this section. 134 Integrity services ensure that target data within a bundle are not 135 changed from the time they are provided to the network to the time 136 they are delivered at their destination. Data changes may be caused 137 by processing errors, environmental conditions, or intentional 138 manipulation. In the context of BPSec, integrity services apply to 139 plain-text in the bundle. 141 Confidentiality services ensure that target data is unintelligible to 142 nodes in the DTN, except for authorized nodes possessing special 143 information. This generally means producing cipher-text from plain- 144 text and generating authentication information for that cipher-text. 145 Confidentiality, in this context, applies to the contents of target 146 data and does not extend to hiding the fact that confidentiality 147 exists in the bundle. 149 NOTE: Hop-by-hop authentication is NOT a supported security service 150 in this specification, for three reasons. 152 1. The term "hop-by-hop" is ambiguous in a BP overlay, as nodes that 153 are adjacent in the overlay may not be adjacent in physical 154 connectivity. This condition is difficult or impossible to 155 detect and therefore hop-by-hop authentication is difficult or 156 impossible to enforce. 158 2. Networks in which BPSec may be deployed may have a mixture of 159 security-aware and not-security-aware nodes. Hop-by-hop 160 authentication cannot be deployed in a network if adjacent nodes 161 in the network have different security capabilities. 163 3. Hop-by-hop authentication is a special case of data integrity and 164 can be achieved with the integrity mechanisms defined in this 165 specification. Therefore, a separate authentication service is 166 not necessary. 168 1.2. Specification Scope 170 This document defines the security services provided by the BPSec. 171 This includes the data specification for representing these services 172 as BP extension blocks, and the rules for adding, removing, and 173 processing these blocks at various points during the bundle's 174 traversal of the DTN. 176 BPSec applies only to those nodes that implement it, known as 177 "security-aware" nodes. There might be other nodes in the DTN that 178 do not implement BPSec. While all nodes in a BP overlay can exchange 179 bundles, BPSec security operations can only happen at BPSec security- 180 aware nodes. 182 BPSec addresses only the security of data traveling over the DTN, not 183 the underlying DTN itself. Furthermore, while the BPSec protocol can 184 provide security-at-rest in a store-carry-forward network, it does 185 not address threats which share computing resources with the DTN and/ 186 or BPSec software implementations. These threats may be malicious 187 software or compromised libraries which intend to intercept data or 188 recover cryptographic material. Here, it is the responsibility of 189 the BPSec implementer to ensure that any cryptographic material, 190 including shared secret or private keys, is protected against access 191 within both memory and storage devices. 193 This specification addresses neither the fitness of externally- 194 defined cryptographic methods nor the security of their 195 implementation. Different networking conditions and operational 196 considerations require varying strengths of security mechanism such 197 that mandating a cipher suite in this specification may result in too 198 much security for some networks and too little security in others. 199 It is expected that separate documents will be standardized to define 200 cipher suites compatible with BPSec, to include operational cipher 201 suites and interoperability cipher suites. 203 This specification does not address the implementation of security 204 policy and does not provide a security policy for the BPSec. Similar 205 to cipher suites, security policies are based on the nature and 206 capabilities of individual networks and network operational concepts. 207 This specification does provide policy considerations when building a 208 security policy. 210 With the exception of the Bundle Protocol, this specification does 211 not address how to combine the BPSec security blocks with other 212 protocols, other BP extension blocks, or other best practices to 213 achieve security in any particular network implementation. 215 1.3. Related Documents 217 This document is best read and understood within the context of the 218 following other DTN documents: 220 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 221 architecture for DTNs and identifies certain security assumptions 222 made by existing Internet protocols that are not valid in a DTN. 224 The Bundle Protocol [I-D.ietf-dtn-bpbis] defines the format and 225 processing of bundles, defines the extension block format used to 226 represent BPSec security blocks, and defines the canonicalization 227 algorithms used by this specification. 229 The Bundle Security Protocol [RFC6257] and Streamlined Bundle 230 Security Protocol [I-D.birrane-dtn-sbsp] documents introduced the 231 concepts of using BP extension blocks for security services in a DTN. 232 The BPSec is a continuation and refinement of these documents. 234 1.4. Terminology 236 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 237 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 238 "OPTIONAL" in this document are to be interpreted as described in 239 [RFC2119]. 241 This section defines terminology either unique to the BPSec or 242 otherwise necessary for understanding the concepts defined in this 243 specification. 245 o Bundle Source - the node which originates a bundle. The Node ID 246 of the BPA originating the bundle. 248 o Forwarder - any node that transmits a bundle in the DTN. The Node 249 ID of the Bundle Protocol Agent (BPA) that sent the bundle on its 250 most recent hop. 252 o Intermediate Receiver, Waypoint, or "Next Hop" - any node that 253 receives a bundle from a Forwarder that is not the Destination. 254 The Node ID of the BPA at any such node. 256 o Path - the ordered sequence of nodes through which a bundle passes 257 on its way from Source to Destination. The path is not 258 necessarily known in advance by the bundle or any BPAs in the DTN. 260 o Security Block - a BPSec extension block in a bundle. 262 o Security Operation - the application of a security service to a 263 security target, notated as OP(security service, security target). 264 For example, OP(confidentiality, payload). Every security 265 operation in a bundle MUST be unique, meaning that a security 266 service can only be applied to a security target once in a bundle. 267 A security operation is implemented by a security block. 269 o Security Service - the security features supported by this 270 specification: integrity and confidentiality. 272 o Security Source - a bundle node that adds a security block to a 273 bundle. The Node ID of that node. 275 o Security Target - the block within a bundle that receives a 276 security-service as part of a security-operation. 278 2. Design Decisions 280 The application of security services in a DTN is a complex endeavor 281 that must consider physical properties of the network, policies at 282 each node, and various application security requirements. This 283 section identifies those desirable properties that guide design 284 decisions for this specification and are necessary for understanding 285 the format and behavior of the BPSec protocol. 287 2.1. Block-Level Granularity 289 Security services within this specification must allow different 290 blocks within a bundle to have different security services applied to 291 them. 293 Blocks within a bundle represent different types of information. The 294 primary block contains identification and routing information. The 295 payload block carries application data. Extension blocks carry a 296 variety of data that may augment or annotate the payload, or 297 otherwise provide information necessary for the proper processing of 298 a bundle along a path. Therefore, applying a single level and type 299 of security across an entire bundle fails to recognize that blocks in 300 a bundle represent different types of information with different 301 security needs. 303 For example, a payload block might be encrypted to protect its 304 contents and an extension block containing summary information 305 related to the payload might be integrity signed but unencrypted to 306 provide waypoints access to payload-related data without providing 307 access to the payload. 309 2.2. Multiple Security Sources 311 A bundle can have multiple security blocks and these blocks can have 312 different security sources. BPSec implementations MUST NOT assume 313 that all blocks in a bundle have the same security operations and/or 314 security sources. 316 The Bundle Protocol allows extension blocks to be added to a bundle 317 at any time during its existence in the DTN. When a waypoint adds a 318 new extension block to a bundle, that extension block MAY have 319 security services applied to it by that waypoint. Similarly, a 320 waypoint MAY add a security service to an existing extension block, 321 consistent with its security policy. 323 When a waypoint adds a security service to the bundle, the waypoint 324 is the security source for that service. The security block(s) which 325 represent that service in the bundle may need to record this security 326 source as the bundle destination might need this information for 327 processing. For example, a destination node might interpret policy 328 as it related to security blocks as a function of the security source 329 for that block. 331 For example, a bundle source may choose to apply an integrity service 332 to its plain-text payload. Later a waypoint node, representing a 333 gateway to an insecure portion of the DTN, may receive the bundle and 334 choose to apply a confidentiality service. In this case, the 335 integrity security source is the bundle source and the 336 confidentiality security source is the waypoint node. 338 2.3. Mixed Security Policy 340 The security policy enforced by nodes in the DTN may differ. 342 Some waypoints might not be security aware and will not be able to 343 process security blocks. Therefore, security blocks must have their 344 processing flags set such that the block will be treated 345 appropriately by non-security-aware waypoints. 347 Some waypoints will have security policies that require evaluating 348 security services even if they are not the bundle destination or the 349 final intended destination of the service. For example, a waypoint 350 could choose to verify an integrity service even though the waypoint 351 is not the bundle destination and the integrity service will be 352 needed by other nodes along the bundle's path. 354 Some waypoints will determine, through policy, that they are the 355 intended recipient of the security service and terminate the security 356 service in the bundle. For example, a gateway node could determine 357 that, even though it is not the destination of the bundle, it should 358 verify and remove a particular integrity service or attempt to 359 decrypt a confidentiality service, before forwarding the bundle along 360 its path. 362 Some waypoints could understand security blocks but refuse to process 363 them unless they are the bundle destination. 365 2.4. User-Selected Cipher Suites 367 The security services defined in this specification rely on a variety 368 of cipher suites providing integrity signatures, cipher-text, and 369 other information necessary to populate security blocks. Users may 370 select different cipher suites to implement security services. For 371 example, some users might prefer a SHA2 hash function for integrity 372 whereas other users might prefer a SHA3 hash function instead. The 373 security services defined in this specification must provide a 374 mechanism for identifying what cipher suite has been used to populate 375 a security block. 377 2.5. Deterministic Processing 379 Whenever a node determines that it must process more than one 380 security block in a received bundle (either because the policy at a 381 waypoint states that it should process security blocks or because the 382 node is the bundle destination) the order in which security blocks 383 are processed must be deterministic. All nodes must impose this same 384 deterministic processing order for all security blocks. This 385 specification provides determinism in the application and evaluation 386 of security services, even when doing so results in a loss of 387 flexibility. 389 3. Security Blocks 391 3.1. Block Definitions 393 This specification defines three types of security block: the 394 Security Association Block (SAB), the Block Integrity Block (BIB) and 395 the Block Confidentiality Block (BCB). 397 The SAB is used to define security associations between two 398 messaging endpoints. In this sense, they are similar to security 399 associations used in other security protocols such as IPSec, with 400 the exception that these associations may be pre-negotiated as a 401 matter of policy, parameterized as part of their definition, or 402 otherwise made fit for use in a challenged networking scenario. 404 The BIB is used to ensure the integrity of its plain-text security 405 target(s). The integrity information in the BIB MAY be verified 406 by any node along the bundle path from the BIB security source to 407 the bundle destination. Security-aware waypoints add or remove 408 BIBs from bundles in accordance with their security policy. BIBs 409 are never used to sign the cipher-text provided by a BCB. 411 The BCB indicates that the security target(s) have been encrypted 412 at the BCB security source in order to protect their content while 413 in transit. The BCB is decrypted by security-aware nodes in the 414 network, up to and including the bundle destination, as a matter 415 of security policy. BCBs additionally provide authentication 416 mechanisms for the cipher-text they generate. 418 3.2. Uniqueness 420 Security operations in a bundle MUST be unique; the same security 421 service MUST NOT be applied to a security target more than once in a 422 bundle. Since a security operation is represented as a security 423 block, this limits what security blocks may be added to a bundle: if 424 adding a security block to a bundle would cause some other security 425 block to no longer represent a unique security operation then the new 426 block MUST NOT be added. It is important to note that any cipher- 427 text integrity mechanism supplied by the BCB is considered part of 428 the confidentiality service and, therefore, unique from the plain- 429 text integrity service provided by the BIB. 431 If multiple security blocks representing the same security operation 432 were allowed in a bundle at the same time, there would exist 433 ambiguity regarding block processing order and the property of 434 deterministic processing blocks would be lost. 436 Using the notation OP(service, target), several examples illustrate 437 this uniqueness requirement. 439 o Signing the payload twice: The two operations OP(integrity, 440 payload) and OP(integrity, payload) are redundant and MUST NOT 441 both be present in the same bundle at the same time. 443 o Signing different blocks: The two operations OP(integrity, 444 payload) and OP(integrity, extension_block_1) are not redundant 445 and both may be present in the same bundle at the same time. 446 Similarly, the two operations OP(integrity, extension_block_1) and 447 OP(integrity,extension_block_2) are also not redundant and may 448 both be present in the bundle at the same time. 450 o Different Services on same block: The two operations OP(integrity, 451 payload) and OP(confidentiality, payload) are not inherently 452 redundant and may both be present in the bundle at the same time, 453 pursuant to other processing rules in this specification. 455 3.3. Target Multiplicity 457 Under special circumstances, a single security block MAY represent 458 multiple security operations as a way of reducing the overall number 459 of security blocks present in a bundle. In these circumstances, 460 reducing the number of security blocks in the bundle reduces the 461 amount of redundant information in the bundle. 463 A set of security operations can be represented by a single security 464 block when all of the following conditions are true. 466 o The security operations apply the same security service. For 467 example, they are all integrity operations or all confidentiality 468 operations. 470 o The security association parameters and key information for the 471 security operations are identical. 473 o The security source for the security operations is the same. 474 Meaning the set of operations are being added/removed by the same 475 node. 477 o No security operations have the same security target, as that 478 would violate the need for security operations to be unique. 480 o None of the security operations conflict with security operations 481 already present in the bundle. 483 When representing multiple security operations in a single security 484 block, the information that is common across all operations is 485 represented once in the security block, and the information which is 486 different (e.g., the security targets) are represented individually. 487 When the security block is processed all security operations 488 represented by the security block MUST be applied/evaluated at that 489 time. 491 3.4. Target Identification 493 A security target is a block in the bundle to which a security 494 service applies. This target must be uniquely and unambiguously 495 identifiable when processing a security block. The definition of the 496 extension block header from [I-D.ietf-dtn-bpbis] provides a "Block 497 Number" field suitable for this purpose. Therefore, a security 498 target in a security block MUST be represented as the Block Number of 499 the target block. 501 3.5. Block Representation 503 Each security block uses the Canonical Bundle Block Format as defined 504 in [I-D.ietf-dtn-bpbis]. That is, each security block is comprised 505 of the following elements: 507 o Block Type Code 509 o Block Number 511 o Block Processing Control Flags 513 o CRC Type and CRC Field (if present) 514 o Block Data Length 516 o Block Type Specific Data Fields 518 Security-specific information for a security block is captured in the 519 "Block Type Specific Data Fields". 521 3.6. Security Association Block 523 The SAB defines a security association (SA) between bundle messaging 524 endpoints. This association captures the set of parameterized cipher 525 suite information, key information, and other annotative information 526 necessary to configure security services in the network. 528 In deployments where data communications are challenged, the SAB 529 block may be omitted in favor of negotiating SAs using out-of-band 530 mechanisms. 532 The Block Type Code of an SAB is as specified in Section 11.1. 534 The Block number, Block Processing Control Flags, CRC Type and CRC 535 Field, and Block Data Length may be set in any way that conforms with 536 security policy and in compliance with [I-D.ietf-dtn-bpbis]. 538 The Block Type Specific Data Fields of the SAB MUST be encoded as a 539 CBOR array, with each element of the array defining a unique SA. 541 An individual security association (SA) MUST be encoded as a CBOR 542 array comprising the following fields, listed in the order in which 543 they must appear. 545 Security Association Id: 546 This field identifies the identifier for the SA. This field 547 SHALL be represented by a CBOR unsigned integer. 549 Security Association Flags: 550 This field identifies which optional fields are present in the 551 security block. This field SHALL be represented as a CBOR 552 unsigned integer containing a bit field of 5 bits indicating 553 the presence or absence of other fields, as follows. 555 Bit 1 (the most-significant bit, 0x10): EID Scope Flag. 557 Bit 2 (0x08): Block Type Scope Flag. 559 Bit 3 (0x04): Cipher Suite Id Present Flag. 561 Bit 4 (0x02): Security Source Present Flag. 563 Bit 5 (the least-significant bit, 0x01): Security Association 564 Parameters Present Flag. 566 In this field, a value of 1 indicates that the associated 567 security block field MUST be included in the security block. A 568 value of 0 indicates that the associated security block field 569 MUST NOT be in the security block. 571 EID Scope (Optional Field): 572 This field identifies the message destinations (as a series of 573 Endpoints) for which this SA should be applied. If this field 574 is not present, the SA may be applied to any message endpoints 575 or may be filtered in some other way in accordance with 576 security policy. This field SHALL be represented by a CBOR 577 array with each element containing an EID encoded in accordance 578 with [I-D.ietf-dtn-bpbis] rules for representing Endpoint 579 Identifiers (EIDs). 581 Block Type Scope (Optional Field): 582 This field identifies the block types for which this SA should 583 be applied. If this field is not present, the SA may be 584 applied to any block type or may be filtered in some other way 585 in accordance with security policy. This field SHALL be 586 represented by a CBOR array with each element containing a 587 block type encoded in accordance with [I-D.ietf-dtn-bpbis] 588 rules for representing block types. 590 Cipher Suite Id (Optional Field): 591 This field identifies the cipher suite used by this SA. If 592 this field is not present, the cipher suite associated with 593 this SA MUST be known through some alternative mechanisms, such 594 as local security policy or out-of-band configuration. The 595 cipher suite Id SHALL be presented by a CBOR unsigned integer. 597 Security Source (Optional Field): 598 This field identifies the Endpoint that inserted the security 599 block in the bundle. If the security source field is not 600 present then the source MUST be inferred from other 601 information, such as the bundle source, previous hop, or other 602 values defined by security policy. This field SHALL be 603 represented by a CBOR array in accordance with 604 [I-D.ietf-dtn-bpbis] rules for representing Endpoint 605 Identifiers (EIDs). 607 Security Association Parameters (Optional Field): 608 This field captures one or more security association parameters 609 that should be provided to security-aware nodes when processing 610 the security service described by this security block. This 611 field SHALL be represented by a CBOR array. Each entry in this 612 array is a single SA parameter. A single SA parameter SHALL 613 also be represented as a CBOR array comprising a 2-tuple of the 614 id and value of the parameter, as follows. 616 * Parameter Id. This field identifies which SA parameter is 617 being specified. This field SHALL be represented as a CBOR 618 unsigned integer. Parameter ids are selected as described 619 in Section 3.11. 621 * Parameter Value. This field captures the value associated 622 with this parameter. This field SHALL be represented by the 623 applicable CBOR representation of the parameter, in 624 accordance with Section 3.11. 626 The logical layout of the security association parameters array 627 is illustrated in Figure 1. 629 +----------------+----------------+ +----------------+ 630 | Parameter 1 | Parameter 2 | ... | Parameter N | 631 +------+---------+------+---------+ +------+---------+ 632 | Id | Value | Id | Value | | Id | Value | 633 +------+---------+------+---------+ +------+---------+ 635 Figure 1: Security Association Parameters 637 Notes: 639 o It is RECOMMENDED that security association designers carefully 640 consider the effect of setting flags that either discard the block 641 or delete the bundle in the event that this block cannot be 642 processed. 644 3.7. Abstract Security Block 646 The structure of the security-specific portions of a security block 647 is identical for both the BIB and BCB Block Types. Therefore, this 648 section defines an Abstract Security Block (ASB) data structure and 649 discusses the definition, processing, and other constraints for using 650 this structure. An ASB is never directly instantiated within a 651 bundle, it is only a mechanism for discussing the common aspects of 652 BIB and BCB security blocks. 654 The fields of the ASB SHALL be as follows, listed in the order in 655 which they must appear. 657 Security Targets: 659 This field identifies the block(s) targeted by the security 660 operation(s) represented by this security block. Each target 661 block is represented by its unique Block Number. This field 662 SHALL be represented by a CBOR array of data items. Each 663 target within this CBOR array SHALL be represented by a CBOR 664 unsigned integer. This array MUST have at least 1 entry and 665 each entry MUST represent the Block Number of a block that 666 exists in the bundle. There MUST NOT be duplicate entries in 667 this array. 669 Security Association Id: 670 This field identifies the cipher suite used to implement the 671 security service represented by this block and applied to each 672 security target. This field SHALL be represented by a CBOR 673 unsigned integer. 675 Security Association Flags: 676 This field identifies which optional fields are present in the 677 security block. This field SHALL be represented as a CBOR 678 unsigned integer containing a bit field of 5 bits indicating 679 the presence or absence of other security block fields, as 680 follows. 682 Bit 1 (the most-significant bit, 0x10): reserved. 684 Bit 2 (0x08): reserved. 686 Bit 3 (0x04): reserved. 688 Bit 4 (0x02): Security Source Present Flag. 690 Bit 5 (the least-significant bit, 0x01): reserved. 692 In this field, a value of 1 indicates that the associated 693 security block field MUST be included in the security block. A 694 value of 0 indicates that the associated security block field 695 MUST NOT be in the security block. 697 Security Source (Optional Field): 698 This field identifies the Endpoint that inserted the security 699 block in the bundle. If the security source field is not 700 present then the source MUST be inferred from other 701 information, such as the bundle source, previous hop, or other 702 values defined by security policy. This field SHALL be 703 represented by a CBOR array in accordance with 704 [I-D.ietf-dtn-bpbis] rules for representing Endpoint 705 Identifiers (EIDs). 707 Security Results: 708 This field captures the results of applying a security service 709 to the security targets of the security block. This field 710 SHALL be represented as a CBOR array of target results. Each 711 entry in this array represents the set of security results for 712 a specific security target. The target results MUST be ordered 713 identically to the Security Targets field of the security 714 block. This means that the first set of target results in this 715 array corresponds to the first entry in the Security Targets 716 field of the security block, and so on. There MUST be one 717 entry in this array for each entry in the Security Targets 718 field of the security block. 720 The set of security results for a target is also represented as 721 a CBOR array of individual results. An individual result is 722 represented as a 2-tuple of a result id and a result value, 723 defined as follows. 725 * Result Id. This field identifies which security result is 726 being specified. Some security results capture the primary 727 output of a cipher suite. Other security results contain 728 additional annotative information from cipher suite 729 processing. This field SHALL be represented as a CBOR 730 unsigned integer. Security result ids will be as specified 731 in Section 3.11. 733 * Result Value. This field captures the value associated with 734 the result. This field SHALL be represented by the 735 applicable CBOR representation of the result value, in 736 accordance with Section 3.11. 738 The logical layout of the security results array is illustrated 739 in Figure 2. In this figure there are N security targets for 740 this security block. The first security target contains M 741 results and the Nth security target contains K results. 743 +------------------------------+ +------------------------------+ 744 | Target 1 | | Target N | 745 +------------+----+------------+ +------------------------------+ 746 | Result 1 | | Result M | ... | Result 1 | | Result K | 747 +----+-------+ .. +----+-------+ +----+-------+ .. +----+-------+ 748 | Id | Value | | Id | Value | | Id | Value | | Id | Value | 749 +----+-------+ +----+-------+ +----+-------+ +----+-------+ 751 Figure 2: Security Results 753 3.8. Block Integrity Block 755 A BIB is a bundle extension block with the following characteristics. 757 o The Block Type Code value is as specified in Section 11.1. 759 o The Block Type Specific Data Fields follow the structure of the 760 ASB. 762 o A security target listed in the Security Targets field MUST NOT 763 reference a security block defined in this specification (e.g., a 764 BIB or a BCB). 766 o The Security Association Id MUST refer to a known SA that supports 767 an end-to-end authentication-cipher suite or as an end-to-end 768 error-detection-cipher suite. 770 o An EID-reference to the security source MAY be present. If this 771 field is not present, then the security source of the block SHOULD 772 be inferred according to security policy and MAY default to the 773 bundle source. The security source MAY be specified as part of 774 key information described in Section 3.11. 776 Notes: 778 o It is RECOMMENDED that SA designers carefully consider the effect 779 of setting flags that either discard the block or delete the 780 bundle in the event that this block cannot be processed. 782 o Since OP(integrity, target) is allowed only once in a bundle per 783 target, it is RECOMMENDED that users wishing to support multiple 784 integrity signatures for the same target define a multi-signature 785 SA. 787 o For some SAs, (e.g., those using asymmetric keying to produce 788 signatures or those using symmetric keying with a group key), the 789 security information MAY be checked at any hop on the way to the 790 destination that has access to the required keying information, in 791 accordance with Section 3.10. 793 o The use of a generally available key is RECOMMENDED if custodial 794 transfer is employed and all nodes SHOULD verify the bundle before 795 accepting custody. 797 3.9. Block Confidentiality Block 799 A BCB is a bundle extension block with the following characteristics. 801 The Block Type Code value is as specified in Section 11.1. 803 The Block Processing Control flags value can be set to whatever 804 values are required by local policy, except that this block MUST 805 have the "replicate in every fragment" flag set if the target of 806 the BCB is the Payload Block. Having that BCB in each fragment 807 indicates to a receiving node that the payload portion of each 808 fragment represents cipher-text. 810 The Block Type Specific Data Fields follow the structure of the 811 ASB. 813 A security target listed in the Security Targets field can 814 reference the payload block, a non-security extension block, or a 815 BIB. A BCB MUST NOT include another BCB as a security target. A 816 BCB MUST NOT target the primary block. 818 The Security Association Id MUST refer to a known SA that supports 819 a confidentiality cipher suite that supports authenticated 820 encryption with associated data (AEAD). 822 Additional information created by the SA (such as additional 823 authenticated data) can be placed either in a security result 824 field or in the generated cipher-text. The determination of where 825 to place these data is a function of the cipher suite used. 827 An EID-reference to the security source MAY be present. If this 828 field is not present, then the security source of the block SHOULD 829 be inferred according to security policy and MAY default to the 830 bundle source. The security source MAY be specified as part of 831 key information described in Section 3.11. 833 The BCB modifies the contents of its security target(s). When a BCB 834 is applied, the security target body data are encrypted "in-place". 835 Following encryption, the security target Block Type Specific Data 836 field contains cipher-text, not plain-text. Other block fields 837 remain unmodified, with the exception of the Block Data Length field, 838 which MUST be updated to reflect the new length of the Block Type 839 Specific Data field. 841 Notes: 843 o It is RECOMMENDED that SA designers carefully consider the effect 844 of setting flags that either discard the block or delete the 845 bundle in the event that this block cannot be processed. 847 o The BCB block processing control flags can be set independently 848 from the processing control flags of the security target(s). The 849 setting of such flags SHOULD be an implementation/policy decision 850 for the encrypting node. 852 3.10. Block Interactions 854 The security block types defined in this specification are designed 855 to be as independent as possible. However, there are some cases 856 where security blocks may share a security target creating processing 857 dependencies. 859 If a security target of a BCB is also a security target of a BIB, an 860 undesirable condition occurs where a security aware waypoint would be 861 unable to validate the BIB because one of its security target's 862 contents have been encrypted by a BCB. To address this situation the 863 following processing rules MUST be followed. 865 o When adding a BCB to a bundle, if some (or all) of the security 866 targets of the BCB also match all of the security targets of an 867 existing BIB, then the existing BIB MUST also be encrypted. This 868 can be accomplished by either adding a new BCB that targets the 869 existing BIB, or by adding the BIB to the list of security targets 870 for the BCB. Deciding which way to represent this situation is a 871 matter of security policy. 873 o When adding a BCB to a bundle, if some (or all) of the security 874 targets of the BCB match some (but not all) of the security 875 targets of a BIB, then a new BIB MUST be created and all entries 876 relating to those BCB security targets MUST be moved from the 877 original BIB to the newly created BIB. The newly created BIB MUST 878 then be encrypted. This can be accomplished by either adding a 879 new BCB that targets the new BIB, or by adding the new BIB to the 880 list of security targets for the BCB. Deciding which way to 881 represent this situation is a matter of security policy. 883 o A BIB MUST NOT be added for a security target that is already the 884 security target of a BCB. In this instance, the BCB is already 885 providing authentication and integrity of the security target and 886 the BIB would be redundant, insecure, and cause ambiguity in block 887 processing order. 889 o A BIB integrity value MUST NOT be evaluated if the BIB is the 890 security target of an existing BCB. In this case, the BIB data is 891 encrypted. 893 o A BIB integrity value MUST NOT be evaluated if the security target 894 of the BIB is also the security target of a BCB. In such a case, 895 the security target data contains cipher-text as it has been 896 encrypted. 898 o As mentioned in Section 3.8, a BIB MUST NOT have a BCB as its 899 security target. 901 These restrictions on block interactions impose a necessary ordering 902 when applying security operations within a bundle. Specifically, for 903 a given security target, BIBs MUST be added before BCBs. This 904 ordering MUST be preserved in cases where the current BPA is adding 905 all of the security blocks for the bundle or whether the BPA is a 906 waypoint adding new security blocks to a bundle that already contains 907 security blocks. 909 NOTE: Since any cipher suite used with a BCB MUST be an AEAD cipher 910 suite, it is inefficient and possibly insecure for a single security 911 source to add both a BIB and a BCB for the same security target. In 912 cases where a security source wishes to calculate both a plain-text 913 integrity mechanism and encrypt a security target, a BCB with a 914 cipher suite that generates such signatures as additional security 915 results SHOULD be used instead. 917 3.11. SA Parameters and Result Identification 919 SA parameters and security results each represent multiple distinct 920 pieces of information in a security block. Each piece of information 921 is assigned an identifier and a CBOR encoding. Identifiers MUST be 922 unique for a given SA but do not need to be unique across all SAs. 923 Therefore, parameter ids and security result ids are specified in the 924 context of an SA definition. 926 Individual BPSec SAs SHOULD use existing registries of identifiers 927 and CBOR encodings, such as those defined in [RFC8152], whenever 928 possible. SAs SHOULD define their own identifiers and CBOR encodings 929 when necessary. 931 A SA can include multiple instances of the same identifier for a 932 parameter or result in the SAB. Parameters and results are 933 represented using CBOR, and any identification of a new parameter or 934 result must include how the value will be represented using the CBOR 935 specification. Ids themselves are always represented as a CBOR 936 unsigned integer. 938 3.12. BSP Block Examples 940 This section provides two examples of BPSec blocks applied to a 941 bundle. In the first example, a single node adds several security 942 operations to a bundle. In the second example, a waypoint node 943 received the bundle created in the first example and adds additional 944 security operations. In both examples, the first column represents 945 blocks within a bundle and the second column represents the Block 946 Number for the block, using the terminology B1...Bn for the purpose 947 of illustration. 949 3.12.1. Example 1: Constructing a Bundle with Security 951 In this example a bundle has four non-security-related blocks: the 952 primary block (B1), two extension blocks (B4,B5), and a payload block 953 (B6). The bundle source wishes to provide an integrity signature of 954 the plain-text associated with the primary block, one of the 955 extension blocks, and the payload. The resultant bundle is 956 illustrated in Figure 3 and the security actions are described below. 958 Block in Bundle ID 959 +======================================+====+ 960 | Primary Block | B1 | 961 +--------------------------------------+----+ 962 | BIB | B2 | 963 | OP(integrity, targets=B1, B5, B6) | | 964 +--------------------------------------+----+ 965 | BCB | B3 | 966 | OP(confidentiality, target=B4) | | 967 +--------------------------------------+----+ 968 | Extension Block (encrypted) | B4 | 969 +--------------------------------------+----+ 970 | Extension Block | B5 | 971 +--------------------------------------+----+ 972 | Payload Block | B6 | 973 +--------------------------------------+----+ 975 Figure 3: Security at Bundle Creation 977 The following security actions were applied to this bundle at its 978 time of creation. 980 o An integrity signature applied to the canonicalized primary block 981 (B1), the second extension block (B5) and the payload block (B6). 982 This is accomplished by a single BIB (B2) with multiple targets. 983 A single BIB is used in this case because all three targets share 984 a security source and policy has them share the same cipher suite, 985 key, and cipher suite parameters. Had this not been the case, 986 multiple BIBs could have been added instead. 988 o Confidentiality for the first extension block (B4). This is 989 accomplished by a BCB (B3). Once applied, the contents of 990 extension block B4 are encrypted. The BCB MUST hold an 991 authentication signature for the cipher-text either in the cipher- 992 text that now populated the first extension block or as a security 993 result in the BCB itself, depending on which cipher suite is used 994 to form the BCB. A plain-text integrity signature may also exist 995 as a security result in the BCB if one is provided by the selected 996 confidentiality cipher suite. 998 3.12.2. Example 2: Adding More Security At A New Node 1000 Consider that the bundle as it is illustrated in Figure 3 is now 1001 received by a waypoint node that wishes to encrypt the first 1002 extension block and the bundle payload. The waypoint security policy 1003 is to allow existing BIBs for these blocks to persist, as they may be 1004 required as part of the security policy at the bundle destination. 1006 The resultant bundle is illustrated in Figure 4 and the security 1007 actions are described below. Note that block IDs provided here are 1008 ordered solely for the purpose of this example and not meant to 1009 impose an ordering for block creation. The ordering of blocks added 1010 to a bundle MUST always be in compliance with [I-D.ietf-dtn-bpbis]. 1012 Block in Bundle ID 1013 +======================================+====+ 1014 | Primary Block | B1 | 1015 +--------------------------------------+----+ 1016 | BIB | B2 | 1017 | OP(integrity, targets=B1) | | 1018 +--------------------------------------+----+ 1019 | BIB (encrypted) | B7 | 1020 | OP(integrity, targets=B5, B6) | | 1021 +--------------------------------------+----+ 1022 | BCB | B8 | 1023 | OP(confidentiality, target=B4,B6,B7) | | 1024 +--------------------------------------+----+ 1025 | BCB | B3 | 1026 | OP(confidentiality, target=B4) | | 1027 +--------------------------------------+----+ 1028 | Extension Block (encrypted) | B4 | 1029 +--------------------------------------+----+ 1030 | Extension Block (encrypted) | B5 | 1031 +--------------------------------------+----+ 1032 | Payload Block (encrypted) | B6 | 1033 +--------------------------------------+----+ 1035 Figure 4: Security At Bundle Forwarding 1037 The following security actions were applied to this bundle prior to 1038 its forwarding from the waypoint node. 1040 o Since the waypoint node wishes to encrypt blocks B5 and B6, it 1041 MUST also encrypt the BIBs providing plain-text integrity over 1042 those blocks. However, BIB B2 could not be encrypted in its 1043 entirety because it also held a signature for the primary block 1044 (B1). Therefore, a new BIB (B7) is created and security results 1045 associated with B5 and B6 are moved out of BIB B2 and into BIB B7. 1047 o Now that there is no longer confusion of which plain-text 1048 integrity signatures must be encrypted, a BCB is added to the 1049 bundle with the security targets being the second extension block 1050 (B5) and the payload (B6) as well as the newly created BIB holding 1051 their plain-text integrity signatures (B7). A single new BCB is 1052 used in this case because all three targets share a security 1053 source and policy has them share the same cipher suite, key, and 1054 cipher suite parameters. Had this not been the case, multiple 1055 BCBs could have been added instead. 1057 4. Canonical Forms 1059 Security services require consistency and determinism in how 1060 information is presented to cipher suites at the security source and 1061 at a receiving node. For example, integrity services require that 1062 the same target information (e.g., the same bits in the same order) 1063 is provided to the cipher suite when generating an original signature 1064 and when generating a comparison signature. Canonicalization 1065 algorithms are used to construct a stable, end-to-end bit 1066 representation of a target block. 1068 Canonical forms are not transmitted, they are used to generate input 1069 to a cipher suite for security processing at a security-aware node. 1071 The canonicalization of the primary block is as specified in 1072 [I-D.ietf-dtn-bpbis]. 1074 All non-primary blocks share the same block structure and are 1075 canonicalized as specified in [I-D.ietf-dtn-bpbis] with the following 1076 exceptions. 1078 o If the service being applied is a confidentiality service, then 1079 the Block Type Code, Block Number, Block Processing Control Flags, 1080 CRC Type and CRC Field (if present), and Block Data Length fields 1081 MUST NOT be included in the canonicalization. Confidentiality 1082 services are used solely to convert the Block Type Specific Data 1083 Fields from plain-text to cipher-text. 1085 o Reserved flags MUST NOT be included in any canonicalization as it 1086 is not known if those flags will change in transit. 1088 These canonicalization algorithms assume that Endpoint IDs do not 1089 change from the time at which a security source adds a security block 1090 to a bundle and the time at which a node processes that security 1091 block. 1093 Cipher suites used by SAs MAY define their own canonicalization 1094 algorithms and require the use of those algorithms over the ones 1095 provided in this specification. In the event of conflicting 1096 canonicalization algorithms, cipher suite algorithms take precedence 1097 over this specification. 1099 5. Security Processing 1101 This section describes the security aspects of bundle processing. 1103 5.1. Bundles Received from Other Nodes 1105 Security blocks must be processed in a specific order when received 1106 by a security-aware node. The processing order is as follows. 1108 o When BIBs and BCBs share a security target, BCBs MUST be evaluated 1109 first and BIBs second. 1111 5.1.1. Receiving BCBs 1113 If a received bundle contains a BCB, the receiving node MUST 1114 determine whether it has the responsibility of decrypting the BCB 1115 security target and removing the BCB prior to delivering data to an 1116 application at the node or forwarding the bundle. 1118 If the receiving node is the destination of the bundle, the node MUST 1119 decrypt any BCBs remaining in the bundle. If the receiving node is 1120 not the destination of the bundle, the node MUST decrypt the BCB if 1121 directed to do so as a matter of security policy. 1123 If the security policy of a security-aware node specifies that a 1124 bundle should have applied confidentiality to a specific security 1125 target and no such BCB is present in the bundle, then the node MUST 1126 process this security target in accordance with the security policy. 1127 This may involve removing the security target from the bundle. If 1128 the removed security target is the payload block, the bundle MUST be 1129 discarded. 1131 If an encrypted payload block cannot be decrypted (i.e., the cipher- 1132 text cannot be authenticated), then the bundle MUST be discarded and 1133 processed no further. If an encrypted security target other than the 1134 payload block cannot be decrypted then the associated security target 1135 and all security blocks associated with that target MUST be discarded 1136 and processed no further. In both cases, requested status reports 1137 (see [I-D.ietf-dtn-bpbis]) MAY be generated to reflect bundle or 1138 block deletion. 1140 When a BCB is decrypted, the recovered plain-text MUST replace the 1141 cipher-text in the security target Block Type Specific Data Fields. 1142 If the Block Data Length field was modified at the time of encryption 1143 it MUST be updated to reflect the decrypted block length. 1145 If a BCB contains multiple security targets, all security targets 1146 MUST be processed when the BCB is processed. Errors and other 1147 processing steps SHALL be made as if each security target had been 1148 represented by an individual BCB with a single security target. 1150 5.1.2. Receiving BIBs 1152 If a received bundle contains a BIB, the receiving node MUST 1153 determine whether it has the final responsibility of verifying the 1154 BIB security target and removing it prior to delivering data to an 1155 application at the node or forwarding the bundle. If a BIB check 1156 fails, the security target has failed to authenticate and the 1157 security target SHALL be processed according to the security policy. 1158 A bundle status report indicating the failure MAY be generated. 1159 Otherwise, if the BIB verifies, the security target is ready to be 1160 processed for delivery. 1162 A BIB MUST NOT be processed if the security target of the BIB is also 1163 the security target of a BCB in the bundle. Given the order of 1164 operations mandated by this specification, when both a BIB and a BCB 1165 share a security target, it means that the security target must have 1166 been encrypted after it was integrity signed and, therefore, the BIB 1167 cannot be verified until the security target has been decrypted by 1168 processing the BCB. 1170 If the security policy of a security-aware node specifies that a 1171 bundle should have applied integrity to a specific security target 1172 and no such BIB is present in the bundle, then the node MUST process 1173 this security target in accordance with the security policy. This 1174 may involve removing the security target from the bundle. If the 1175 removed security target is the payload or primary block, the bundle 1176 MAY be discarded. This action can occur at any node that has the 1177 ability to verify an integrity signature, not just the bundle 1178 destination. 1180 If a receiving node does not have the final responsibility of 1181 verifying the BIB it MAY attempt to verify the BIB to prevent the 1182 needless forwarding of corrupt data. If the check fails, the node 1183 SHALL process the security target in accordance to local security 1184 policy. It is RECOMMENDED that if a payload integrity check fails at 1185 a waypoint that it is processed in the same way as if the check fails 1186 at the destination. If the check passes, the node MUST NOT remove 1187 the BIB prior to forwarding. 1189 If a BIB contains multiple security targets, all security targets 1190 MUST be processed if the BIB is processed by the Node. Errors and 1191 other processing steps SHALL be made as if each security target had 1192 been represented by an individual BIB with a single security target. 1194 5.2. Bundle Fragmentation and Reassembly 1196 If it is necessary for a node to fragment a bundle payload, and 1197 security services have been applied to that bundle, the fragmentation 1198 rules described in [I-D.ietf-dtn-bpbis] MUST be followed. As defined 1199 there and summarized here for completeness, only the payload block 1200 can be fragmented; security blocks, like all extension blocks, can 1201 never be fragmented. 1203 Due to the complexity of payload block fragmentation, including the 1204 possibility of fragmenting payload block fragments, integrity and 1205 confidentiality operations are not to be applied to a bundle 1206 representing a fragment. Specifically, a BCB or BIB MUST NOT be 1207 added to a bundle if the "Bundle is a Fragment" flag is set in the 1208 Bundle Processing Control Flags field. 1210 Security processing in the presence of payload block fragmentation 1211 may be handled by other mechanisms outside of the BPSec protocol or 1212 by applying BPSec blocks in coordination with an encapsulation 1213 mechanism. 1215 6. Key Management 1217 There exist a myriad of ways to establish, communicate, and otherwise 1218 manage key information in a DTN. Certain DTN deployments might 1219 follow established protocols for key management whereas other DTN 1220 deployments might require new and novel approaches. BPSec assumes 1221 that key management is handled as a separate part of network 1222 management and this specification neither defines nor requires a 1223 specific key management strategy. 1225 7. Security Policy Considerations 1227 When implementing BPSec, several policy decisions must be considered. 1228 This section describes key policies that affect the generation, 1229 forwarding, and receipt of bundles that are secured using this 1230 specification. No single set of policy decisions is envisioned to 1231 work for all secure DTN deployments. 1233 o If a bundle is received that contains more than one security 1234 operation, in violation of BPSec, then the BPA must determine how 1235 to handle this bundle. The bundle may be discarded, the block 1236 affected by the security operation may be discarded, or one 1237 security operation may be favored over another. 1239 o BPAs in the network must understand what security operations they 1240 should apply to bundles. This decision may be based on the source 1241 of the bundle, the destination of the bundle, or some other 1242 information related to the bundle. 1244 o If a waypoint has been configured to add a security operation to a 1245 bundle, and the received bundle already has the security operation 1246 applied, then the receiver must understand what to do. The 1247 receiver may discard the bundle, discard the security target and 1248 associated BPSec blocks, replace the security operation, or some 1249 other action. 1251 o It is recommended that security operations only be applied to the 1252 blocks that absolutely need them. If a BPA were to apply security 1253 operations such as integrity or confidentiality to every block in 1254 the bundle, regardless of need, there could be downstream errors 1255 processing blocks whose contents must be inspected or changed at 1256 every hop along the path. 1258 o It is recommended that BCBs be allowed to alter the size of 1259 extension blocks and the payload block. However, care must be 1260 taken to ensure that changing the size of the payload block while 1261 the bundle is in transit do not negatively affect bundle 1262 processing (e.g., calculating storage needs, scheduling 1263 transmission times, caching block byte offsets). 1265 o Adding a BIB to a security target that has already been encrypted 1266 by a BCB is not allowed. If this condition is likely to be 1267 encountered, there are (at least) three possible policies that 1268 could handle this situation. 1270 1. At the time of encryption, a plain-text integrity signature 1271 may be generated and added to the BCB for the security target 1272 as additional information in the security result field. 1274 2. The encrypted block may be replicated as a new block and 1275 integrity signed. 1277 3. An encapsulation scheme may be applied to encapsulate the 1278 security target (or the entire bundle) such that the 1279 encapsulating structure is, itself, no longer the security 1280 target of a BCB and may therefore be the security target of a 1281 BIB. 1283 o It is recommended that security policy address whether cipher 1284 suites whose cipher-text is larger (or smaller) than the initial 1285 plain-text are permitted and, if so, for what types of blocks. 1286 Changing the size of a block may cause processing difficulties for 1287 networks that calculate block offsets into bundles or predict 1288 transmission times or storage availability as a function of bundle 1289 size. In other cases, changing the size of a payload as part of 1290 encryption has no significant impact. 1292 8. Security Considerations 1294 Given the nature of DTN applications, it is expected that bundles may 1295 traverse a variety of environments and devices which each pose unique 1296 security risks and requirements on the implementation of security 1297 within BPSec. For these reasons, it is important to introduce key 1298 threat models and describe the roles and responsibilities of the 1299 BPSec protocol in protecting the confidentiality and integrity of the 1300 data against those threats. This section provides additional 1301 discussion on security threats that BPSec will face and describes how 1302 BPSec security mechanisms operate to mitigate these threats. 1304 The threat model described here is assumed to have a set of 1305 capabilities identical to those described by the Internet Threat 1306 Model in [RFC3552], but the BPSec threat model is scoped to 1307 illustrate threats specific to BPSec operating within DTN 1308 environments and therefore focuses on man-in-the-middle (MITM) 1309 attackers. In doing so, it is assumed that the DTN (or significant 1310 portions of the DTN) are completely under the control of an attacker. 1312 8.1. Attacker Capabilities and Objectives 1314 BPSec was designed to protect against MITM threats which may have 1315 access to a bundle during transit from its source, Alice, to its 1316 destination, Bob. A MITM node, Mallory, is a non-cooperative node 1317 operating on the DTN between Alice and Bob that has the ability to 1318 receive bundles, examine bundles, modify bundles, forward bundles, 1319 and generate bundles at will in order to compromise the 1320 confidentiality or integrity of data within the DTN. For the 1321 purposes of this section, any MITM node is assumed to effectively be 1322 security-aware even if it does not implement the BPSec protocol. 1323 There are three classes of MITM nodes which are differentiated based 1324 on their access to cryptographic material: 1326 o Unprivileged Node: Mallory has not been provisioned within the 1327 secure environment and only has access to cryptographic material 1328 which has been publicly-shared. 1330 o Legitimate Node: Mallory is within the secure environment and 1331 therefore has access to cryptographic material which has been 1332 provisioned to Mallory (i.e., K_M) as well as material which has 1333 been publicly-shared. 1335 o Privileged Node: Mallory is a privileged node within the secure 1336 environment and therefore has access to cryptographic material 1337 which has been provisioned to Mallory, Alice and/or Bob (i.e. 1338 K_M, K_A, and/or K_B) as well as material which has been publicly- 1339 shared. 1341 If Mallory is operating as a privileged node, this is tantamount to 1342 compromise; BPSec does not provide mechanisms to detect or remove 1343 Mallory from the DTN or BPSec secure environment. It is up to the 1344 BPSec implementer or the underlying cryptographic mechanisms to 1345 provide appropriate capabilities if they are needed. It should also 1346 be noted that if the implementation of BPSec uses a single set of 1347 shared cryptographic material for all nodes, a legitimate node is 1348 equivalent to a privileged node because K_M == K_A == K_B. 1350 A special case of the legitimate node is when Mallory is either Alice 1351 or Bob (i.e., K_M == K_A or K_M == K_B). In this case, Mallory is 1352 able to impersonate traffic as either Alice or Bob, which means that 1353 traffic to and from that node can be decrypted and encrypted, 1354 respectively. Additionally, messages may be signed as originating 1355 from one of the endpoints. 1357 8.2. Attacker Behaviors and BPSec Mitigations 1359 8.2.1. Eavesdropping Attacks 1361 Once Mallory has received a bundle, she is able to examine the 1362 contents of that bundle and attempt to recover any protected data or 1363 cryptographic keying material from the blocks contained within. The 1364 protection mechanism that BPSec provides against this action is the 1365 BCB, which encrypts the contents of its security target, providing 1366 confidentiality of the data. Of course, it should be assumed that 1367 Mallory is able to attempt offline recovery of encrypted data, so the 1368 cryptographic mechanisms selected to protect the data should provide 1369 a suitable level of protection. 1371 When evaluating the risk of eavesdropping attacks, it is important to 1372 consider the lifetime of bundles on a DTN. Depending on the network, 1373 bundles may persist for days or even years. Long-lived bundles imply 1374 that the data exists in the network for a longer period of time and, 1375 thus, there may be more opportunities to capture those bundles. 1376 Additionally, bundles that are long-lived imply that the information 1377 stored within them may remain relevant and sensitive for long enough 1378 that, once captured, there is sufficient time to crack encryption 1379 associated with the bundle. If a bundle does persist on the network 1380 for years and the cipher suite used for a BCB provides inadequate 1381 protection, Mallory may be able to recover the protected data either 1382 before that bundle reaches its intended destination or before the 1383 information in the bundle is no longer considered sensitive. 1385 8.2.2. Modification Attacks 1387 As a node participating in the DTN between Alice and Bob, Mallory 1388 will also be able to modify the received bundle, including non-BPSec 1389 data such as the primary block, payload blocks, or block processing 1390 control flags as defined in [I-D.ietf-dtn-bpbis]. Mallory will be 1391 able to undertake activities which include modification of data 1392 within the blocks, replacement of blocks, addition of blocks, or 1393 removal of blocks. Within BPSec, both the BIB and BCB provide 1394 integrity protection mechanisms to detect or prevent data 1395 manipulation attempts by Mallory. 1397 The BIB provides that protection to another block which is its 1398 security target. The cryptographic mechanisms used to generate the 1399 BIB should be strong against collision attacks and Mallory should not 1400 have access to the cryptographic material used by the originating 1401 node to generate the BIB (e.g., K_A). If both of these conditions 1402 are true, Mallory will be unable to modify the security target or the 1403 BIB and lead Bob to validate the security target as originating from 1404 Alice. 1406 Since BPSec security operations are implemented by placing blocks in 1407 a bundle, there is no in-band mechanism for detecting or correcting 1408 certain cases where Mallory removes blocks from a bundle. If Mallory 1409 removes a BCB, but keeps the security target, the security target 1410 remains encrypted and there is a possibility that there may no longer 1411 be sufficient information to decrypt the block at its destination. 1412 If Mallory removes both a BCB (or BIB) and its security target there 1413 is no evidence left in the bundle of the security operation. 1414 Similarly, if Mallory removes the BIB but not the security target 1415 there is no evidence left in the bundle of the security operation. 1416 In each of these cases, the implementation of BPSec must be combined 1417 with policy configuration at endpoints in the network which describe 1418 the expected and required security operations that must be applied on 1419 transmission and are expected to be present on receipt. This or 1420 other similar out-of-band information is required to correct for 1421 removal of security information in the bundle. 1423 A limitation of the BIB may exist within the implementation of BIB 1424 validation at the destination node. If Mallory is a legitimate node 1425 within the DTN, the BIB generated by Alice with K_A can be replaced 1426 with a new BIB generated with K_M and forwarded to Bob. If Bob is 1427 only validating that the BIB was generated by a legitimate user, Bob 1428 will acknowledge the message as originating from Mallory instead of 1429 Alice. In order to provide verifiable integrity checks, both a BIB 1430 and BCB should be used and the BCB should require an IND-CCA2 1431 encryption scheme. Such an encryption scheme will guard against 1432 signature substitution attempts by Mallory. In this case, Alice 1433 creates a BIB with the protected data block as the security target 1434 and then creates a BCB with both the BIB and protected data block as 1435 its security targets. 1437 8.2.3. Topology Attacks 1439 If Mallory is in a MITM position within the DTN, she is able to 1440 influence how any bundles that come to her may pass through the 1441 network. Upon receiving and processing a bundle that must be routed 1442 elsewhere in the network, Mallory has three options as to how to 1443 proceed: not forward the bundle, forward the bundle as intended, or 1444 forward the bundle to one or more specific nodes within the network. 1446 Attacks that involve re-routing the packets throughout the network 1447 are essentially a special case of the modification attacks described 1448 in this section where the attacker is modifying fields within the 1449 primary block of the bundle. Given that BPSec cannot encrypt the 1450 contents of the primary block, alternate methods must be used to 1451 prevent this situation. These methods may include requiring BIBs for 1452 primary blocks, using encapsulation, or otherwise strategically 1453 manipulating primary block data. The specifics of any such 1454 mitigation technique are specific to the implementation of the 1455 deploying network and outside of the scope of this document. 1457 Furthermore, routing rules and policies may be useful in enforcing 1458 particular traffic flows to prevent topology attacks. While these 1459 rules and policies may utilize some features provided by BPSec, their 1460 definition is beyond the scope of this specification. 1462 8.2.4. Message Injection 1464 Mallory is also able to generate new bundles and transmit them into 1465 the DTN at will. These bundles may either be copies or slight 1466 modifications of previously-observed bundles (i.e., a replay attack) 1467 or entirely new bundles generated based on the Bundle Protocol, 1468 BPSec, or other bundle-related protocols. With these attacks 1469 Mallory's objectives may vary, but may be targeting either the bundle 1470 protocol or application-layer protocols conveyed by the bundle 1471 protocol. 1473 BPSec relies on cipher suite capabilities to prevent replay or forged 1474 message attacks. A BCB used with appropriate cryptographic 1475 mechanisms (e.g., a counter-based cipher mode) may provide replay 1476 protection under certain circumstances. Alternatively, application 1477 data itself may be augmented to include mechanisms to assert data 1478 uniqueness and then protected with a BIB, a BCB, or both along with 1479 other block data. In such a case, the receiving node would be able 1480 to validate the uniqueness of the data. 1482 9. Cipher Suite Authorship Considerations 1484 Cipher suite developers or implementers should consider the diverse 1485 performance and conditions of networks on which the Bundle Protocol 1486 (and therefore BPSec) will operate. Specifically, the delay and 1487 capacity of delay-tolerant networks can vary substantially. Cipher 1488 suite developers should consider these conditions to better describe 1489 the conditions when those suites will operate or exhibit 1490 vulnerability, and selection of these suites for implementation 1491 should be made with consideration to the reality. There are key 1492 differences that may limit the opportunity to leverage existing 1493 cipher suites and technologies that have been developed for use in 1494 traditional, more reliable networks: 1496 o Data Lifetime: Depending on the application environment, bundles 1497 may persist on the network for extended periods of time, perhaps 1498 even years. Cryptographic algorithms should be selected to ensure 1499 protection of data against attacks for a length of time reasonable 1500 for the application. 1502 o One-Way Traffic: Depending on the application environment, it is 1503 possible that only a one-way connection may exist between two 1504 endpoints, or if a two-way connection does exist, the round-trip 1505 time may be extremely large. This may limit the utility of 1506 session key generation mechanisms, such as Diffie-Hellman, as a 1507 two-way handshake may not be feasible or reliable. 1509 o Opportunistic Access: Depending on the application environment, a 1510 given endpoint may not be guaranteed to be accessible within a 1511 certain amount of time. This may make asymmetric cryptographic 1512 architectures which rely on a key distribution center or other 1513 trust center impractical under certain conditions. 1515 When developing new cipher suites for use with BPSec, the following 1516 information SHOULD be considered for inclusion in these 1517 specifications. 1519 o Cipher Suite Parameters. Cipher suites MUST define their 1520 parameter ids, the data types of those parameters, and their CBOR 1521 encoding. 1523 o Security Results. Cipher suites MUST define their security result 1524 ids, the data types of those results, and their CBOR encoding. 1526 o New Canonicalizations. Cipher suites may define new 1527 canonicalization algorithms as necessary. 1529 o Cipher-Text Size. Cipher suites MUST state whether they generate 1530 cipher-text (to include any included authentication information) 1531 that is of a different size than the input plain-text. 1533 If a cipher suite does not wish to alter the size of the plain- 1534 text, it should consider the following. 1536 * Place overflow bytes, authentication signatures, and any 1537 additional authenticated data in security result fields rather 1538 than in the cipher-text itself. 1540 * Pad the cipher-text in cases where the cipher-text is smaller 1541 than the plain-text. 1543 o If a BCB cannot alter the size of the security target then 1544 differences in the size of the cipher-text and plain-text MUST be 1545 handled in the following way. If the cipher-text is shorter in 1546 length than the plain-text, padding MUST be used in accordance 1547 with the cipher suite policy. If the cipher-text is larger than 1548 the plain-text, overflow bytes MUST be placed in overflow 1549 parameters in the Security Result field. Any additional 1550 authentication information can be treated either as overflow 1551 cipher-text or represented separately in the BCB in a security 1552 result field, in accordance with cipher suite documentation and 1553 security policy. 1555 10. Defining Other Security Blocks 1557 Other security blocks (OSBs) may be defined and used in addition to 1558 the security blocks identified in this specification. Both the usage 1559 of BIB, BCB, and any future OSBs can co-exist within a bundle and can 1560 be considered in conformance with BPSec if each of the following 1561 requirements are met by any future identified security blocks. 1563 o Other security blocks (OSBs) MUST NOT reuse any enumerations 1564 identified in this specification, to include the block type codes 1565 for BIB and BCB. 1567 o An OSB definition MUST state whether it can be the target of a BIB 1568 or a BCB. The definition MUST also state whether the OSB can 1569 target a BIB or a BCB. 1571 o An OSB definition MUST provide a deterministic processing order in 1572 the event that a bundle is received containing BIBs, BCBs, and 1573 OSBs. This processing order MUST NOT alter the BIB and BCB 1574 processing orders identified in this specification. 1576 o An OSB definition MUST provide a canonicalization algorithm if the 1577 default non-primary-block canonicalization algorithm cannot be 1578 used to generate a deterministic input for a cipher suite. This 1579 requirement can be waived if the OSB is defined so as to never be 1580 the security target of a BIB or a BCB. 1582 o An OSB definition MUST NOT require any behavior of a BPSEC-BPA 1583 that is in conflict with the behavior identified in this 1584 specification. In particular, the security processing 1585 requirements imposed by this specification must be consistent 1586 across all BPSEC-BPAs in a network. 1588 o The behavior of an OSB when dealing with fragmentation must be 1589 specified and MUST NOT lead to ambiguous processing states. In 1590 particular, an OSB definition should address how to receive and 1591 process an OSB in a bundle fragment that may or may not also 1592 contain its security target. An OSB definition should also 1593 address whether an OSB may be added to a bundle marked as a 1594 fragment. 1596 Additionally, policy considerations for the management, monitoring, 1597 and configuration associated with blocks SHOULD be included in any 1598 OSB definition. 1600 NOTE: The burden of showing compliance with processing rules is 1601 placed upon the standards defining new security blocks and the 1602 identification of such blocks shall not, alone, require maintenance 1603 of this specification. 1605 11. IANA Considerations 1607 A registry of cipher suite identifiers will be required. 1609 11.1. Bundle Block Types 1611 This specification allocates three block types from the existing 1612 "Bundle Block Types" registry defined in [RFC6255]. 1614 Additional Entries for the Bundle Block-Type Codes Registry: 1616 +-------+-----------------------------+---------------+ 1617 | Value | Description | Reference | 1618 +-------+-----------------------------+---------------+ 1619 | TBD | Security Association Block | This document | 1620 | TBD | Block Integrity Block | This document | 1621 | TBD | Block Confidentiality Block | This document | 1622 +-------+-----------------------------+---------------+ 1624 Table 1 1626 12. References 1628 12.1. Normative References 1630 [I-D.ietf-dtn-bpbis] 1631 Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol 1632 Version 7", draft-ietf-dtn-bpbis-11 (work in progress), 1633 May 2018. 1635 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1636 Requirement Levels", BCP 14, RFC 2119, 1637 DOI 10.17487/RFC2119, March 1997, 1638 . 1640 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1641 Text on Security Considerations", BCP 72, RFC 3552, 1642 DOI 10.17487/RFC3552, July 2003, 1643 . 1645 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1646 IANA Registries", RFC 6255, DOI 10.17487/RFC6255, May 1647 2011, . 1649 12.2. Informative References 1651 [I-D.birrane-dtn-sbsp] 1652 Birrane, E., Pierce-Mayer, J., and D. Iannicca, 1653 "Streamlined Bundle Security Protocol Specification", 1654 draft-birrane-dtn-sbsp-01 (work in progress), October 1655 2015. 1657 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1658 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1659 Networking Architecture", RFC 4838, DOI 10.17487/RFC4838, 1660 April 2007, . 1662 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1663 "Bundle Security Protocol Specification", RFC 6257, 1664 DOI 10.17487/RFC6257, May 2011, 1665 . 1667 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 1668 RFC 8152, DOI 10.17487/RFC8152, July 2017, 1669 . 1671 Appendix A. Acknowledgements 1673 The following participants contributed technical material, use cases, 1674 and useful thoughts on the overall approach to this security 1675 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1676 Alford and Angela Hennessy of the Laboratory for Telecommunications 1677 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1678 University Applied Physics Laboratory. 1680 Authors' Addresses 1682 Edward J. Birrane, III 1683 The Johns Hopkins University Applied Physics Laboratory 1684 11100 Johns Hopkins Rd. 1685 Laurel, MD 20723 1686 US 1688 Phone: +1 443 778 7423 1689 Email: Edward.Birrane@jhuapl.edu 1691 Kenneth McKeever 1692 The Johns Hopkins University Applied Physics Laboratory 1693 11100 Johns Hopkins Rd. 1694 Laurel, MD 20723 1695 US 1697 Phone: +1 443 778 2237 1698 Email: Ken.McKeever@jhuapl.edu