idnits 2.17.1 draft-ietf-dtn-bpsec-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 date (February 7, 2020) is 1540 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-22 ** Downref: Normative reference to an Informational RFC: RFC 6255 ** Obsolete normative reference: RFC 7049 (Obsoleted by RFC 8949) == Outdated reference: A later version (-02) exists of draft-ietf-dtn-bpsec-interop-sc-01 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). 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: August 10, 2020 February 7, 2020 7 Bundle Protocol Security Specification 8 draft-ietf-dtn-bpsec-20 10 Abstract 12 This document defines a security protocol providing data integrity 13 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 August 10, 2020. 32 Copyright Notice 34 Copyright (c) 2020 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 . . . . . . . . . . . . . . . . 8 57 2.3. Mixed Security Policy . . . . . . . . . . . . . . . . . . 8 58 2.4. User-Defined Security Contexts . . . . . . . . . . . . . 9 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 . . . . . . . . . . . . . . . . . . . 11 64 3.4. Target Identification . . . . . . . . . . . . . . . . . . 12 65 3.5. Block Representation . . . . . . . . . . . . . . . . . . 12 66 3.6. Abstract Security Block . . . . . . . . . . . . . . . . . 12 67 3.7. Block Integrity Block . . . . . . . . . . . . . . . . . . 15 68 3.8. Block Confidentiality Block . . . . . . . . . . . . . . . 16 69 3.9. Block Interactions . . . . . . . . . . . . . . . . . . . 17 70 3.10. Parameter and Result Identification . . . . . . . . . . . 18 71 3.11. BSP Block Examples . . . . . . . . . . . . . . . . . . . 19 72 3.11.1. Example 1: Constructing a Bundle with Security . . . 19 73 3.11.2. Example 2: Adding More Security At A New Node . . . 20 74 4. Canonical Forms . . . . . . . . . . . . . . . . . . . . . . . 22 75 5. Security Processing . . . . . . . . . . . . . . . . . . . . . 23 76 5.1. Bundles Received from Other Nodes . . . . . . . . . . . . 23 77 5.1.1. Receiving BCBs . . . . . . . . . . . . . . . . . . . 23 78 5.1.2. Receiving BIBs . . . . . . . . . . . . . . . . . . . 24 79 5.2. Bundle Fragmentation and Reassembly . . . . . . . . . . . 25 80 6. Key Management . . . . . . . . . . . . . . . . . . . . . . . 25 81 7. Security Policy Considerations . . . . . . . . . . . . . . . 25 82 8. Security Considerations . . . . . . . . . . . . . . . . . . . 27 83 8.1. Attacker Capabilities and Objectives . . . . . . . . . . 27 84 8.2. Attacker Behaviors and BPSec Mitigations . . . . . . . . 28 85 8.2.1. Eavesdropping Attacks . . . . . . . . . . . . . . . . 28 86 8.2.2. Modification Attacks . . . . . . . . . . . . . . . . 29 87 8.2.3. Topology Attacks . . . . . . . . . . . . . . . . . . 30 88 8.2.4. Message Injection . . . . . . . . . . . . . . . . . . 31 89 9. Security Context Considerations . . . . . . . . . . . . . . . 31 90 9.1. Mandating Security Contexts . . . . . . . . . . . . . . . 31 91 9.2. Identification and Configuration . . . . . . . . . . . . 32 92 9.3. Authorship . . . . . . . . . . . . . . . . . . . . . . . 33 93 10. Defining Other Security Blocks . . . . . . . . . . . . . . . 34 94 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 95 11.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 36 96 11.2. Security Context Identifiers . . . . . . . . . . . . . . 36 97 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 98 12.1. Normative References . . . . . . . . . . . . . . . . . . 36 99 12.2. Informative References . . . . . . . . . . . . . . . . . 37 100 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 38 101 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 38 103 1. Introduction 105 This document defines security features for the Bundle Protocol (BP) 106 [I-D.ietf-dtn-bpbis] and is intended for use in Delay Tolerant 107 Networks (DTNs) to provide security services between a security 108 source and a security acceptor. When the security source is the 109 bundle source and when the security acceptor is the bundle 110 destination, the security service provides end-to-end protection. 112 The Bundle Protocol specification [I-D.ietf-dtn-bpbis] defines DTN as 113 referring to "a networking architecture providing communications in 114 and/or through highly stressed environments" where "BP may be viewed 115 as sitting at the application layer of some number of constituent 116 networks, forming a store-carry-forward overlay network". The term 117 "stressed" environment refers to multiple challenging conditions 118 including intermittent connectivity, large and/or variable delays, 119 asymmetric data rates, and high bit error rates. 121 The BP might be deployed such that portions of the network cannot be 122 trusted, posing the usual security challenges related to 123 confidentiality and integrity. However, the stressed nature of the 124 BP operating environment imposes unique conditions where usual 125 transport security mechanisms may not be sufficient. For example, 126 the store-carry-forward nature of the network may require protecting 127 data at rest, preventing unauthorized consumption of critical 128 resources such as storage space, and operating without regular 129 contact with a centralized security oracle (such as a certificate 130 authority). 132 An end-to-end security service is needed that operates in all of the 133 environments where the BP operates. 135 1.1. Supported Security Services 137 BPSec provides integrity and confidentiality services for BP bundles, 138 as defined in this section. 140 Integrity services ensure that changes to target data within a bundle 141 can be discovered. Data changes may be caused by processing errors, 142 environmental conditions, or intentional manipulation. In the 143 context of BPSec, integrity services apply to plain text in the 144 bundle. 146 Confidentiality services ensure that target data is unintelligible to 147 nodes in the DTN, except for authorized nodes possessing special 148 information. This generally means producing cipher text from plain 149 text and generating authentication information for that cipher text. 150 Confidentiality, in this context, applies to the contents of target 151 data and does not extend to hiding the fact that confidentiality 152 exists in the bundle. 154 NOTE: Hop-by-hop authentication is NOT a supported security service 155 in this specification, for two reasons. 157 1. The term "hop-by-hop" is ambiguous in a BP overlay, as nodes that 158 are adjacent in the overlay may not be adjacent in physical 159 connectivity. This condition is difficult or impossible to 160 detect and therefore hop-by-hop authentication is difficult or 161 impossible to enforce. 163 2. Networks in which BPSec may be deployed may have a mixture of 164 security-aware and not-security-aware nodes. Hop-by-hop 165 authentication cannot be deployed in a network if adjacent nodes 166 in the network have different security capabilities. 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 security contexts and cipher suites compatible with BPSec, to include 201 those that should be used to assess interoperability and those fit 202 for operational use in various network scenarios. A sample security 203 context has been defined ([I-D.ietf-dtn-bpsec-interop-sc]) to support 204 interoperability testing and serve as an exemplar for how security 205 contexts should be defined for this specification. 207 This specification does not address the implementation of security 208 policy and does not provide a security policy for the BPSec. Similar 209 to cipher suites, security policies are based on the nature and 210 capabilities of individual networks and network operational concepts. 211 This specification does provide policy considerations when building a 212 security policy. 214 With the exception of the Bundle Protocol, this specification does 215 not address how to combine the BPSec security blocks with other 216 protocols, other BP extension blocks, or other best practices to 217 achieve security in any particular network implementation. 219 1.3. Related Documents 221 This document is best read and understood within the context of the 222 following other DTN documents: 224 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 225 architecture for DTNs and identifies certain security assumptions 226 made by existing Internet protocols that are not valid in a DTN. 228 The Bundle Protocol [I-D.ietf-dtn-bpbis] defines the format and 229 processing of bundles, defines the extension block format used to 230 represent BPSec security blocks, and defines the canonical block 231 structure used by this specification. 233 The Concise Binary Object Representation (CBOR) format [RFC7049] 234 defines a data format that allows for small code size, fairly small 235 message size, and extensibility without version negotiation. The 236 block-specific-data associated with BPSec security blocks are encoded 237 in this data format. 239 The Bundle Security Protocol [RFC6257] and Streamlined Bundle 240 Security Protocol [I-D.birrane-dtn-sbsp] documents introduced the 241 concepts of using BP extension blocks for security services in a DTN. 242 The BPSec is a continuation and refinement of these documents. 244 1.4. Terminology 246 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 247 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 248 "OPTIONAL" in this document are to be interpreted as described in BCP 249 14 [RFC2119] [RFC8174] when, and only when, they appear in all 250 capitals, as shown here. . 252 This section defines terminology either unique to the BPSec or 253 otherwise necessary for understanding the concepts defined in this 254 specification. 256 o Bundle Destination - the node which receives a bundle and delivers 257 the payload of the bundle to an application. Also, the Node ID of 258 the Bundle Protocol Agent (BPA) receiving the bundle. The bundle 259 destination acts as the security acceptor for every security 260 target in every security block in every bundle it receives. 262 o Bundle Source - the node which originates a bundle. Also, the 263 Node ID of the BPA originating the bundle. 265 o Cipher Suite - a set of one or more algorithms providing integrity 266 and/or confidentiality services. Cipher suites may define user 267 parameters (e.g. secret keys to use) but do not provide values for 268 those parameters. 270 o Forwarder - any node that transmits a bundle in the DTN. Also, 271 the Node ID of the BPA that sent the bundle on its most recent 272 hop. 274 o Intermediate Receiver, Waypoint, or Next Hop - any node that 275 receives a bundle from a Forwarder that is not the Bundle 276 Destination. Also, the Node ID of the BPA at any such node. 278 o Path - the ordered sequence of nodes through which a bundle passes 279 on its way from Source to Destination. The path is not 280 necessarily known in advance by the bundle or any BPAs in the DTN. 282 o Security Acceptor - a bundle node that processes and dispositions 283 one or more security blocks in a bundle. Also, the Node ID of 284 that node. 286 o Security Block - a BPSec extension block in a bundle. 288 o Security Context - the set of assumptions, algorithms, 289 configurations and policies used to implement security services. 291 o Security Operation - the application of a security service to a 292 security target, notated as OP(security service, security target). 293 For example, OP(confidentiality, payload). Every security 294 operation in a bundle MUST be unique, meaning that a security 295 service can only be applied to a security target once in a bundle. 296 A security operation is implemented by a security block. 298 o Security Service - a process that gives some protection to a 299 security target. For example, this specification defines security 300 services for plain text integrity, plain text confidentiality, and 301 cipher text integrity. 303 o Security Source - a bundle node that adds a security block to a 304 bundle. Also, the Node ID of that node. 306 o Security Target - the block within a bundle that receives a 307 security service as part of a security operation. 309 2. Design Decisions 311 The application of security services in a DTN is a complex endeavor 312 that must consider physical properties of the network, policies at 313 each node, application security requirements, and current and future 314 threat environments. This section identifies those desirable 315 properties that guide design decisions for this specification and are 316 necessary for understanding the format and behavior of the BPSec 317 protocol. 319 2.1. Block-Level Granularity 321 Security services within this specification must allow different 322 blocks within a bundle to have different security services applied to 323 them. 325 Blocks within a bundle represent different types of information. The 326 primary block contains identification and routing information. The 327 payload block carries application data. Extension blocks carry a 328 variety of data that may augment or annotate the payload, or 329 otherwise provide information necessary for the proper processing of 330 a bundle along a path. Therefore, applying a single level and type 331 of security across an entire bundle fails to recognize that blocks in 332 a bundle represent different types of information with different 333 security needs. 335 For example, a payload block might be encrypted to protect its 336 contents and an extension block containing summary information 337 related to the payload might be integrity signed but unencrypted to 338 provide waypoints access to payload-related data without providing 339 access to the payload. 341 2.2. Multiple Security Sources 343 A bundle can have multiple security blocks and these blocks can have 344 different security sources. BPSec implementations MUST NOT assume 345 that all blocks in a bundle have the same security operations applied 346 to them. 348 The Bundle Protocol allows extension blocks to be added to a bundle 349 at any time during its existence in the DTN. When a waypoint adds a 350 new extension block to a bundle, that extension block MAY have 351 security services applied to it by that waypoint. Similarly, a 352 waypoint MAY add a security service to an existing extension block, 353 consistent with its security policy. 355 When a waypoint adds a security service to the bundle, the waypoint 356 is the security source for that service. The security block(s) which 357 represent that service in the bundle may need to record this security 358 source as the bundle destination might need this information for 359 processing. 361 For example, a bundle source may choose to apply an integrity service 362 to its plain text payload. Later a waypoint node, representing a 363 gateway to an insecure portion of the DTN, may receive the bundle and 364 choose to apply a confidentiality service. In this case, the 365 integrity security source is the bundle source and the 366 confidentiality security source is the waypoint node. 368 2.3. Mixed Security Policy 370 The security policy enforced by nodes in the DTN may differ. 372 Some waypoints might not be security aware and will not be able to 373 process security blocks. Therefore, security blocks must have their 374 processing flags set such that the block will be treated 375 appropriately by non-security-aware waypoints. 377 Some waypoints will have security policies that require evaluating 378 security services even if they are not the bundle destination or the 379 final intended acceptor of the service. For example, a waypoint 380 could choose to verify an integrity service even though the waypoint 381 is not the bundle destination and the integrity service will be 382 needed by other nodes along the bundle's path. 384 Some waypoints will determine, through policy, that they are the 385 intended recipient of the security service and terminate the security 386 service in the bundle. For example, a gateway node could determine 387 that, even though it is not the destination of the bundle, it should 388 verify and remove a particular integrity service or attempt to 389 decrypt a confidentiality service, before forwarding the bundle along 390 its path. 392 Some waypoints could understand security blocks but refuse to process 393 them unless they are the bundle destination. 395 2.4. User-Defined Security Contexts 397 A security context is the union of security algorithms (cipher 398 suites), policies associated with the use of those algorithms, and 399 configuration values. Different contexts may specify different 400 algorithms, different polices, or different configuration values used 401 in the implementation of their security services. BPSec provides a 402 mechanism to define security contexts. Users may select from 403 registered security contexts and customize those contexts through 404 security context parameters. 406 For example, some users might prefer a SHA2 hash function for 407 integrity whereas other users might prefer a SHA3 hash function. 408 Providing either separate security contexts or a single, 409 parameterized security context allows users flexibility in applying 410 the desired cipher suite, policy, and configuration when populating a 411 security block. 413 2.5. Deterministic Processing 415 Whenever a node determines that it must process more than one 416 security block in a received bundle (either because the policy at a 417 waypoint states that it should process security blocks or because the 418 node is the bundle destination) the order in which security blocks 419 are processed must be deterministic. All nodes must impose this same 420 deterministic processing order for all security blocks. This 421 specification provides determinism in the application and evaluation 422 of security services, even when doing so results in a loss of 423 flexibility. 425 3. Security Blocks 427 3.1. Block Definitions 429 This specification defines two types of security block: the Block 430 Integrity Block (BIB) and the Block Confidentiality Block (BCB). 432 The BIB is used to ensure the integrity of its plain text security 433 target(s). The integrity information in the BIB MAY be verified 434 by any node along the bundle path from the BIB security source to 435 the bundle destination. Security-aware waypoints add or remove 436 BIBs from bundles in accordance with their security policy. BIBs 437 are never used for integrity protection of the cipher text 438 provided by a BCB. 440 The BCB indicates that the security target(s) have been encrypted 441 at the BCB security source in order to protect their content while 442 in transit. The BCB is decrypted by security-aware nodes in the 443 network, up to and including the bundle destination, as a matter 444 of security policy. BCBs additionally provide integrity 445 protection mechanisms for the cipher text they generate. 447 3.2. Uniqueness 449 Security operations in a bundle MUST be unique; the same security 450 service MUST NOT be applied to a security target more than once in a 451 bundle. Since a security operation is represented as a security 452 block, this limits what security blocks may be added to a bundle: if 453 adding a security block to a bundle would cause some other security 454 block to no longer represent a unique security operation then the new 455 block MUST NOT be added. 457 A security operation may be removed from a bundle as part of 458 processing a security block and, once removed, the same security 459 operation may be re-applied by adding a new security block into the 460 bundle. In this case, conflicting security blocks never co-exist in 461 the bundle at the same time. 463 It is important to note that any cipher text integrity mechanism 464 supplied by the BCB is considered part of the confidentiality service 465 and, therefore, unique from the plain text integrity service provided 466 by the BIB. 468 If multiple security blocks representing the same security operation 469 were allowed in a bundle at the same time, there would exist 470 ambiguity regarding block processing order and the property of 471 deterministic processing of blocks would be lost. 473 Using the notation OP(service, target), several examples illustrate 474 this uniqueness requirement. 476 o Signing the payload twice: The two operations OP(integrity, 477 payload) and OP(integrity, payload) are redundant and MUST NOT 478 both be present in the same bundle at the same time. 480 o Signing different blocks: The two operations OP(integrity, 481 payload) and OP(integrity, extension_block_1) are not redundant 482 and both may be present in the same bundle at the same time. 483 Similarly, the two operations OP(integrity, extension_block_1) and 484 OP(integrity,extension_block_2) are also not redundant and may 485 both be present in the bundle at the same time. 487 o Different Services on same block: The two operations OP(integrity, 488 payload) and OP(confidentiality, payload) are not inherently 489 redundant and may both be present in the bundle at the same time, 490 pursuant to other processing rules in this specification. 492 3.3. Target Multiplicity 494 A single security block MAY represent multiple security operations as 495 a way of reducing the overall number of security blocks present in a 496 bundle. In these circumstances, reducing the number of security 497 blocks in the bundle reduces the amount of redundant information in 498 the bundle. 500 A set of security operations can be represented by a single security 501 block when all of the following conditions are true. 503 o The security operations apply the same security service. For 504 example, they are all integrity operations or all confidentiality 505 operations. 507 o The security context parameters for the security operations are 508 identical. 510 o The security source for the security operations is the same, 511 meaning the set of operations are being added by the same node. 513 o No security operations have the same security target, as that 514 would violate the need for security operations to be unique. 516 o None of the security operations conflict with security operations 517 already present in the bundle. 519 When representing multiple security operations in a single security 520 block, the information that is common across all operations is 521 represented once in the security block, and the information which is 522 different (e.g., the security targets) are represented individually. 524 It is RECOMMENDED that if a node processes any security operation in 525 a security block that it process all security operations in the 526 security block. This allows security sources to assert that the set 527 of security operations in a security block are expected to be 528 processed by the same security acceptor. However, the determination 529 of whether a node actually is a security acceptor or not is a matter 530 of the policy of the node itself. In cases where a receiving node 531 determines that it is the security acceptor of only a subset of the 532 security operations in a security block, the node may choose to only 533 process that subset of security operations. 535 3.4. Target Identification 537 A security target is a block in the bundle to which a security 538 service applies. This target must be uniquely and unambiguously 539 identifiable when processing a security block. The definition of the 540 extension block header from [I-D.ietf-dtn-bpbis] provides a "Block 541 Number" field suitable for this purpose. Therefore, a security 542 target in a security block MUST be represented as the Block Number of 543 the target block. 545 3.5. Block Representation 547 Each security block uses the Canonical Bundle Block Format as defined 548 in [I-D.ietf-dtn-bpbis]. That is, each security block is comprised 549 of the following elements: 551 o block type code 553 o block number 555 o block processing control flags 557 o CRC type 559 o block-type-specific-data 561 o CRC field (if present) 563 Security-specific information for a security block is captured in the 564 block-type-specific-data field. 566 3.6. Abstract Security Block 568 The structure of the security-specific portions of a security block 569 is identical for both the BIB and BCB Block Types. Therefore, this 570 section defines an Abstract Security Block (ASB) data structure and 571 discusses the definition, processing, and other constraints for using 572 this structure. An ASB is never directly instantiated within a 573 bundle, it is only a mechanism for discussing the common aspects of 574 BIB and BCB security blocks. 576 The fields of the ASB SHALL be as follows, listed in the order in 577 which they must appear. 579 Security Targets: 580 This field identifies the block(s) targeted by the security 581 operation(s) represented by this security block. Each target 582 block is represented by its unique Block Number. This field 583 SHALL be represented by a CBOR array of data items. Each 584 target within this CBOR array SHALL be represented by a CBOR 585 unsigned integer. This array MUST have at least 1 entry and 586 each entry MUST represent the Block Number of a block that 587 exists in the bundle. There MUST NOT be duplicate entries in 588 this array. 590 Security Context Id: 591 This field identifies the security context used to implement 592 the security service represented by this block and applied to 593 each security target. This field SHALL be represented by a 594 CBOR unsigned integer. The values for this Id should come from 595 the registry defined in Section 11.2 597 Security Context Flags: 598 This field identifies which optional fields are present in the 599 security block. This field SHALL be represented as a CBOR 600 unsigned integer whose contents shall be interpreted as a bit 601 field. Each bit in this bit field indicates the presence (bit 602 set to 1) or absence (bit set to 0) of optional data in the 603 security block. The association of bits to security block data 604 is defined as follows. 606 Bit 0 (the least-significant bit, 0x01): Security Context 607 Parameters Present Flag. 609 Bit 1 (0x02): Security Source Present Flag. 611 Bit >1 Reserved 613 Implementations MUST set reserved bits to 0 when writing this 614 field and MUST ignore the values of reserved bits when reading 615 this field. For unreserved bits, a value of 1 indicates that 616 the associated security block field MUST be included in the 617 security block. A value of 0 indicates that the associated 618 security block field MUST NOT be in the security block. 620 Security Source (Optional): 621 This field identifies the Endpoint that inserted the security 622 block in the bundle. If the security source field is not 623 present then the source MUST be inferred from other 624 information, such as the bundle source, previous hop, or other 625 values defined by security policy. This field SHALL be 626 represented by a CBOR array in accordance with 627 [I-D.ietf-dtn-bpbis] rules for representing Endpoint 628 Identifiers (EIDs). 630 Security Context Parameters (Optional): 631 This field captures one or more security context parameters 632 that should be provided to security-aware nodes when processing 633 the security service described by this security block. This 634 field SHALL be represented by a CBOR array. Each entry in this 635 array is a single security context parameter. A single 636 parameter SHALL also be represented as a CBOR array comprising 637 a 2-tuple of the id and value of the parameter, as follows. 639 * Parameter Id. This field identifies which parameter is 640 being specified. This field SHALL be represented as a CBOR 641 unsigned integer. Parameter Ids are selected as described 642 in Section 3.10. 644 * Parameter Value. This field captures the value associated 645 with this parameter. This field SHALL be represented by the 646 applicable CBOR representation of the parameter, in 647 accordance with Section 3.10. 649 The logical layout of the parameters array is illustrated in 650 Figure 1. 652 +----------------+----------------+ +----------------+ 653 | Parameter 1 | Parameter 2 | ... | Parameter N | 654 +------+---------+------+---------+ +------+---------+ 655 | Id | Value | Id | Value | | Id | Value | 656 +------+---------+------+---------+ +------+---------+ 658 Figure 1: Security Context Parameters 660 Security Results: 661 This field captures the results of applying a security service 662 to the security targets of the security block. This field 663 SHALL be represented as a CBOR array of target results. Each 664 entry in this array represents the set of security results for 665 a specific security target. The target results MUST be ordered 666 identically to the Security Targets field of the security 667 block. This means that the first set of target results in this 668 array corresponds to the first entry in the Security Targets 669 field of the security block, and so on. There MUST be one 670 entry in this array for each entry in the Security Targets 671 field of the security block. 673 The set of security results for a target is also represented as 674 a CBOR array of individual results. An individual result is 675 represented as a 2-tuple of a result id and a result value, 676 defined as follows. 678 * Result Id. This field identifies which security result is 679 being specified. Some security results capture the primary 680 output of a cipher suite. Other security results contain 681 additional annotative information from cipher suite 682 processing. This field SHALL be represented as a CBOR 683 unsigned integer. Security result Ids will be as specified 684 in Section 3.10. 686 * Result Value. This field captures the value associated with 687 the result. This field SHALL be represented by the 688 applicable CBOR representation of the result value, in 689 accordance with Section 3.10. 691 The logical layout of the security results array is illustrated 692 in Figure 2. In this figure there are N security targets for 693 this security block. The first security target contains M 694 results and the Nth security target contains K results. 696 +------------------------------+ +------------------------------+ 697 | Target 1 | | Target N | 698 +------------+----+------------+ +------------------------------+ 699 | Result 1 | | Result M | ... | Result 1 | | Result K | 700 +----+-------+ .. +----+-------+ +----+-------+ .. +----+-------+ 701 | Id | Value | | Id | Value | | Id | Value | | Id | Value | 702 +----+-------+ +----+-------+ +----+-------+ +----+-------+ 704 Figure 2: Security Results 706 3.7. Block Integrity Block 708 A BIB is a bundle extension block with the following characteristics. 710 The Block Type Code value is as specified in Section 11.1. 712 The block-type-specific-data field follows the structure of the 713 ASB. 715 A security target listed in the Security Targets field MUST NOT 716 reference a security block defined in this specification (e.g., a 717 BIB or a BCB). 719 The Security Context MUST utilize an authentication mechanism or 720 an error detection mechanism. 722 The EID of the security source MAY be present. If this field is 723 not present, then the security source of the block SHOULD be 724 inferred according to security policy and MAY default to the 725 bundle source. The security source MAY be specified as part of 726 security context parameters described in Section 3.10. 728 Notes: 730 o It is recommended that designers carefully consider the effect of 731 setting flags that either discard the block or delete the bundle 732 in the event that this block cannot be processed. 734 o Since OP(integrity, target) is allowed only once in a bundle per 735 target, it is RECOMMENDED that users wishing to support multiple 736 integrity signatures for the same target define a multi-signature 737 security context. 739 o Security information MAY be checked at any hop on the way to the 740 bundle destination that has access to the required keying 741 information, in accordance with Section 3.9. 743 3.8. Block Confidentiality Block 745 A BCB is a bundle extension block with the following characteristics. 747 The Block Type Code value is as specified in Section 11.1. 749 The Block Processing Control flags value can be set to whatever 750 values are required by local policy with the following exceptions. 751 BCB blocks MUST have the "block must be replicated in every 752 fragment" flag set if one of the targets is the payload block. 753 Having that BCB in each fragment indicates to a receiving node 754 that the payload portion of each fragment represents cipher text. 755 BCB blocks MUST NOT have the "block must be removed from bundle if 756 it can't be processed" flag set. Removing a BCB from a bundle 757 without decrypting its security targets removes information from 758 the bundle necessary for their later decryption. 760 The block-type-specific-data fields follow the structure of the 761 ASB. 763 A security target listed in the Security Targets field can 764 reference the payload block, a non-security extension block, or a 765 BIB. A BCB MUST NOT include another BCB as a security target. A 766 BCB MUST NOT target the primary block. 768 The Security Context MUST utilize a confidentiality cipher that 769 provides authenticated encryption with associated data (AEAD). 771 Additional information created by a cipher suite (such as an 772 authentication tag) can be placed either in a security result 773 field or in the generated cipher text. The determination of where 774 to place this information is a function of the cipher suite and 775 security context used. 777 The EID of the security source MAY be present. If this field is 778 not present, then the security source of the block SHOULD be 779 inferred according to security policy and MAY default to the 780 bundle source. The security source MAY be specified as part of 781 security context parameters described in Section 3.10. 783 The BCB modifies the contents of its security target(s). When a BCB 784 is applied, the security target body data are encrypted "in-place". 785 Following encryption, the security target block-type-specific-data 786 field contains cipher text, not plain text. 788 Notes: 790 o It is RECOMMENDED that designers carefully consider the effect of 791 setting flags that delete the bundle in the event that this block 792 cannot be processed. 794 o The BCB block processing control flags can be set independently 795 from the processing control flags of the security target(s). The 796 setting of such flags should be an implementation/policy decision 797 for the encrypting node. 799 3.9. Block Interactions 801 The security block types defined in this specification are designed 802 to be as independent as possible. However, there are some cases 803 where security blocks may share a security target creating processing 804 dependencies. 806 If a security target of a BCB is also a security target of a BIB, an 807 undesirable condition occurs where a security aware waypoint would be 808 unable to validate the BIB because one of its security target's 809 contents have been encrypted by a BCB. To address this situation the 810 following processing rules MUST be followed. 812 o When adding a BCB to a bundle, if some (or all) of the security 813 targets of the BCB also match all of the security targets of an 814 existing BIB, then the existing BIB MUST also be encrypted. This 815 can be accomplished by either adding a new BCB that targets the 816 existing BIB, or by adding the BIB to the list of security targets 817 for the BCB. Deciding which way to represent this situation is a 818 matter of security policy. 820 o When adding a BCB to a bundle, if some (or all) of the security 821 targets of the BCB match some (but not all) of the security 822 targets of a BIB then that BIB MUST be altered in the following 823 way. Any security results in the BIB associated with the BCB 824 security targets MUST be removed from the BIB and placed in a new 825 BIB. This newly created BIB MUST then be encrypted. The 826 encryption of the new BIB can be accomplished by either adding a 827 new BCB that targets the new BIB, or by adding the new BIB to the 828 list of security targets for the BCB. Deciding which way to 829 represent this situation is a matter of security policy. 831 o A BIB MUST NOT be added for a security target that is already the 832 security target of a BCB as this would cause ambiguity in block 833 processing order. 835 o A BIB integrity value MUST NOT be checked if the BIB is the 836 security target of an existing BCB. In this case, the BIB data is 837 encrypted. 839 o A BIB integrity value MUST NOT be checked if the security target 840 associated with that value is also the security target of a BCB. 841 In such a case, the security target data contains cipher text as 842 it has been encrypted. 844 o As mentioned in Section 3.7, a BIB MUST NOT have a BCB as its 845 security target. 847 These restrictions on block interactions impose a necessary ordering 848 when applying security operations within a bundle. Specifically, for 849 a given security target, BIBs MUST be added before BCBs. This 850 ordering MUST be preserved in cases where the current BPA is adding 851 all of the security blocks for the bundle or whether the BPA is a 852 waypoint adding new security blocks to a bundle that already contains 853 security blocks. 855 In cases where a security source wishes to calculate both a plain 856 text integrity mechanism and encrypt a security target, a BCB with a 857 security context that generates such signatures as additional 858 security results MUST be used instead of adding both a BIB and then a 859 BCB for the security target at the security source. 861 3.10. Parameter and Result Identification 863 Each security context MUST define its own context parameters and 864 results. Each defined parameter and result is represented as the 865 tuple of an identifier and a value. Identifiers are always 866 represented as a CBOR unsigned integer. The CBOR encoding of values 867 is as defined by the security context specification. 869 Identifiers MUST be unique for a given security context but do not 870 need to be unique amongst all security contexts. 872 An example of a security context can be found at 873 [I-D.ietf-dtn-bpsec-interop-sc]. 875 3.11. BSP Block Examples 877 This section provides two examples of BPSec blocks applied to a 878 bundle. In the first example, a single node adds several security 879 operations to a bundle. In the second example, a waypoint node 880 received the bundle created in the first example and adds additional 881 security operations. In both examples, the first column represents 882 blocks within a bundle and the second column represents the Block 883 Number for the block, using the terminology B1...Bn for the purpose 884 of illustration. 886 3.11.1. Example 1: Constructing a Bundle with Security 888 In this example a bundle has four non-security-related blocks: the 889 primary block (B1), two extension blocks (B4,B5), and a payload block 890 (B6). The bundle source wishes to provide an integrity signature of 891 the plain text associated with the primary block, the second 892 extension block, and the payload. The bundle source also wishes to 893 provide confidentiality for the first extension block. The resultant 894 bundle is illustrated in Figure 3 and the security actions are 895 described below. 897 Block in Bundle ID 898 +======================================+====+ 899 | Primary Block | B1 | 900 +--------------------------------------+----+ 901 | BIB | B2 | 902 | OP(integrity, targets=B1, B5, B6) | | 903 +--------------------------------------+----+ 904 | BCB | B3 | 905 | OP(confidentiality, target=B4) | | 906 +--------------------------------------+----+ 907 | Extension Block (encrypted) | B4 | 908 +--------------------------------------+----+ 909 | Extension Block | B5 | 910 +--------------------------------------+----+ 911 | Payload Block | B6 | 912 +--------------------------------------+----+ 914 Figure 3: Security at Bundle Creation 916 The following security actions were applied to this bundle at its 917 time of creation. 919 o An integrity signature applied to the canonical form of the 920 primary block (B1), the canonical form of the block-type-specific- 921 data field of the second extension block (B5) and the canonical 922 form of the payload block (B6). This is accomplished by a single 923 BIB (B2) with multiple targets. A single BIB is used in this case 924 because all three targets share a security source, security 925 context, and security context parameters. Had this not been the 926 case, multiple BIBs could have been added instead. 928 o Confidentiality for the first extension block (B4). This is 929 accomplished by a BCB (B3). Once applied, the block-type- 930 specific-data field of extension block B4 is encrypted. The BCB 931 MUST hold an authentication tag for the cipher text either in the 932 cipher text that now populates the first extension block or as a 933 security result in the BCB itself, depending on which security 934 context is used to form the BCB. A plain text integrity signature 935 may also exist as a security result in the BCB if one is provided 936 by the selected confidentiality security context. 938 3.11.2. Example 2: Adding More Security At A New Node 940 Consider that the bundle as it is illustrated in Figure 3 is now 941 received by a waypoint node that wishes to encrypt the second 942 extension block and the bundle payload. The waypoint security policy 943 is to allow existing BIBs for these blocks to persist, as they may be 944 required as part of the security policy at the bundle destination. 946 The resultant bundle is illustrated in Figure 4 and the security 947 actions are described below. Note that block IDs provided here are 948 ordered solely for the purpose of this example and not meant to 949 impose an ordering for block creation. The ordering of blocks added 950 to a bundle MUST always be in compliance with [I-D.ietf-dtn-bpbis]. 952 Block in Bundle ID 953 +======================================+====+ 954 | Primary Block | B1 | 955 +--------------------------------------+----+ 956 | BIB | B2 | 957 | OP(integrity, targets=B1) | | 958 +--------------------------------------+----+ 959 | BIB (encrypted) | B7 | 960 | OP(integrity, targets=B5, B6) | | 961 +--------------------------------------+----+ 962 | BCB | B8 | 963 | OP(confidentiality, target=B5,B6,B7) | | 964 +--------------------------------------+----+ 965 | BCB | B3 | 966 | OP(confidentiality, target=B4) | | 967 +--------------------------------------+----+ 968 | Extension Block (encrypted) | B4 | 969 +--------------------------------------+----+ 970 | Extension Block (encrypted) | B5 | 971 +--------------------------------------+----+ 972 | Payload Block (encrypted) | B6 | 973 +--------------------------------------+----+ 975 Figure 4: Security At Bundle Forwarding 977 The following security actions were applied to this bundle prior to 978 its forwarding from the waypoint node. 980 o Since the waypoint node wishes to encrypt the block-type-specific- 981 data field of blocks B5 and B6, it MUST also encrypt the block- 982 type-specific-data field of the BIBs providing plain text 983 integrity over those blocks. However, BIB B2 could not be 984 encrypted in its entirety because it also held a signature for the 985 primary block (B1). Therefore, a new BIB (B7) is created and 986 security results associated with B5 and B6 are moved out of BIB B2 987 and into BIB B7. 989 o Now that there is no longer confusion of which plain text 990 integrity signatures must be encrypted, a BCB is added to the 991 bundle with the security targets being the second extension block 992 (B5) and the payload (B6) as well as the newly created BIB holding 993 their plain text integrity signatures (B7). A single new BCB is 994 used in this case because all three targets share a security 995 source, security context, and security context parameters. Had 996 this not been the case, multiple BCBs could have been added 997 instead. 999 4. Canonical Forms 1001 Security services require consistency and determinism in how 1002 information is presented to cipher suites at the security source and 1003 at a receiving node. For example, integrity services require that 1004 the same target information (e.g., the same bits in the same order) 1005 is provided to the cipher suite when generating an original signature 1006 and when validating a signature. Canonicalization algorithms are 1007 used to construct a stable, end-to-end bit representation of a target 1008 block. 1010 Canonical forms are used to generate input to a security context for 1011 security processing at a security-aware node. 1013 BPSec operates on data fields within bundle blocks (e.g., the block- 1014 type-specific-data field). In their canonical form, these fields 1015 MUST include their own CBOR encoding and MUST NOT include any other 1016 encapsulating CBOR encoding. For example, the canonical form of the 1017 block-type-specific-data field is a CBOR byte string existing within 1018 the CBOR array containing the fields of the extension block. The 1019 entire CBOR byte string is considered the canonical block-type- 1020 specific-data field. The CBOR array framing is not considered part 1021 of the field. 1023 The canonical form of the primary block is specified in 1024 [I-D.ietf-dtn-bpbis]. 1026 All non-primary blocks share the same block structure and are 1027 canonicalized as specified in [I-D.ietf-dtn-bpbis] with the following 1028 exceptions. 1030 o If the service being applied is a confidentiality service, then 1031 the block type code, block number, block processing control flags, 1032 CRC type and CRC field (if present), and the length indication of 1033 the block-type-specific-data field MUST NOT be included in a 1034 canonical form. Confidentiality services are used solely to 1035 convert block data in the block-type-specific-data field from 1036 plain text to cipher text. 1038 o Reserved flags in the block processing control flags field MUST 1039 NOT be included in a canonical form as it is not known if those 1040 flags will change in transit. 1042 Cipher suites and security contexts MAY define their own 1043 canonicalization algorithms and require the use of those algorithms 1044 over the ones provided in this specification. In the event of 1045 conflicting canonicalization algorithms, those algorithms take 1046 precedence over this specification. 1048 5. Security Processing 1050 This section describes the security aspects of bundle processing. 1052 5.1. Bundles Received from Other Nodes 1054 Security blocks must be processed in a specific order when received 1055 by a security-aware node. The processing order is as follows. 1057 o When BIBs and BCBs share a security target, BCBs MUST be evaluated 1058 first and BIBs second. 1060 5.1.1. Receiving BCBs 1062 If a received bundle contains a BCB, the receiving node MUST 1063 determine whether it is the security acceptor for any of the security 1064 operations in the BCB. If so, the node MUST process those operations 1065 and remove any operation-specific information from the BCB prior to 1066 delivering data to an application at the node or forwarding the 1067 bundle. If processing a security operation fails, the target SHALL 1068 be processed according to the security policy. A bundle status 1069 report indicating the failure MAY be generated. When all security 1070 operations for a BCB have been removed from the BCB, the BCB MUST be 1071 removed from the bundle. 1073 If the receiving node is the destination of the bundle, the node MUST 1074 decrypt any BCBs remaining in the bundle. If the receiving node is 1075 not the destination of the bundle, the node MUST process the BCB if 1076 directed to do so as a matter of security policy. 1078 If the security policy of a security-aware node specifies that a node 1079 should have applied confidentiality to a specific security target and 1080 no such BCB is present in the bundle, then the node MUST process this 1081 security target in accordance with the security policy. It is 1082 recommended that the node remove the security target from the bundle. 1083 If the removed security target is the payload block, the bundle MUST 1084 be discarded. 1086 If an encrypted payload block cannot be decrypted (i.e., the cipher 1087 text cannot be authenticated), then the bundle MUST be discarded and 1088 processed no further. If an encrypted security target other than the 1089 payload block cannot be decrypted then the associated security target 1090 and all security blocks associated with that target MUST be discarded 1091 and processed no further. In both cases, requested status reports 1092 (see [I-D.ietf-dtn-bpbis]) MAY be generated to reflect bundle or 1093 block deletion. 1095 When a BCB is decrypted, the recovered plain text for each security 1096 target MUST replace the cipher text in each of the security targets' 1097 block-type-specific-data fields. If the plain text is of different 1098 size than the cipher text, the CBOR byte string framing of this field 1099 must be updated to ensure this field remains a valid CBOR byte 1100 string. The length of the recovered plain text is known by the 1101 decrypting security context. 1103 If a BCB contains multiple security operations, each operation 1104 processed by the node MUST be treated as if the security operation 1105 has been represented by a single BCB with a single security operation 1106 for the purposes of report generation and policy processing. 1108 5.1.2. Receiving BIBs 1110 If a received bundle contains a BIB, the receiving node MUST 1111 determine whether it is the security acceptor for any of the security 1112 operations in the BIB. If so, the node MUST process those operations 1113 and remove any operation-specific information from the BIB prior to 1114 delivering data to an application at the node or forwarding the 1115 bundle. If processing a security operation fails, the target SHALL 1116 be processed according to the security policy. A bundle status 1117 report indicating the failure MAY be generated. When all security 1118 operations for a BIB have been removed from the BIB, the BIB MUST be 1119 removed from the bundle. 1121 A BIB MUST NOT be processed if the security target of the BIB is also 1122 the security target of a BCB in the bundle. Given the order of 1123 operations mandated by this specification, when both a BIB and a BCB 1124 share a security target, it means that the security target must have 1125 been encrypted after it was integrity signed and, therefore, the BIB 1126 cannot be verified until the security target has been decrypted by 1127 processing the BCB. 1129 If the security policy of a security-aware node specifies that a node 1130 should have applied integrity to a specific security target and no 1131 such BIB is present in the bundle, then the node MUST process this 1132 security target in accordance with the security policy. It is 1133 RECOMMENDED that the node remove the security target from the bundle 1134 if the security target is not the payload or primary block. If the 1135 security target is the payload or primary block, the bundle MAY be 1136 discarded. This action can occur at any node that has the ability to 1137 verify an integrity signature, not just the bundle destination. 1139 If a receiving node is not the security acceptor of a security 1140 operation in a BIB it MAY attempt to verify the security operation 1141 anyway to prevent forwarding corrupt data. If the verification 1142 fails, the node SHALL process the security target in accordance to 1143 local security policy. It is RECOMMENDED that if a payload integrity 1144 check fails at a waypoint that it is processed in the same way as if 1145 the check fails at the bundle destination. If the check passes, the 1146 node MUST NOT remove the security operation from the BIB prior to 1147 forwarding. 1149 If a BIB contains multiple security operations, each operation 1150 processed by the node MUST be treated as if the security operation 1151 has been represented by a single BIB with a single security operation 1152 for the purposes of report generation and policy processing. 1154 5.2. Bundle Fragmentation and Reassembly 1156 If it is necessary for a node to fragment a bundle payload, and 1157 security services have been applied to that bundle, the fragmentation 1158 rules described in [I-D.ietf-dtn-bpbis] MUST be followed. As defined 1159 there and summarized here for completeness, only the payload block 1160 can be fragmented; security blocks, like all extension blocks, can 1161 never be fragmented. 1163 Due to the complexity of payload block fragmentation, including the 1164 possibility of fragmenting payload block fragments, integrity and 1165 confidentiality operations are not to be applied to a bundle 1166 representing a fragment. Specifically, a BCB or BIB MUST NOT be 1167 added to a bundle if the "Bundle is a Fragment" flag is set in the 1168 Bundle Processing Control Flags field. 1170 Security processing in the presence of payload block fragmentation 1171 may be handled by other mechanisms outside of the BPSec protocol or 1172 by applying BPSec blocks in coordination with an encapsulation 1173 mechanism. A node should apply any confidentiality protection prior 1174 to performing any fragmentation. 1176 6. Key Management 1178 There exist a myriad of ways to establish, communicate, and otherwise 1179 manage key information in a DTN. Certain DTN deployments might 1180 follow established protocols for key management whereas other DTN 1181 deployments might require new and novel approaches. BPSec assumes 1182 that key management is handled as a separate part of network 1183 management and this specification neither defines nor requires a 1184 specific key management strategy. 1186 7. Security Policy Considerations 1188 When implementing BPSec, several policy decisions must be considered. 1189 This section describes key policies that affect the generation, 1190 forwarding, and receipt of bundles that are secured using this 1191 specification. No single set of policy decisions is envisioned to 1192 work for all secure DTN deployments. 1194 o If a bundle is received that contains combinations of security 1195 operations that are disallowed by this specification the BPA must 1196 determine how to handle the bundle. The bundle may be discarded, 1197 the block affected by the security operation may be discarded, or 1198 one security operation may be favored over another. 1200 o BPAs in the network must understand what security operations they 1201 should apply to bundles. This decision may be based on the source 1202 of the bundle, the destination of the bundle, or some other 1203 information related to the bundle. 1205 o If a waypoint has been configured to add a security operation to a 1206 bundle, and the received bundle already has the security operation 1207 applied, then the receiver must understand what to do. The 1208 receiver may discard the bundle, discard the security target and 1209 associated BPSec blocks, replace the security operation, or some 1210 other action. 1212 o It is recommended that security operations be considered for every 1213 block in a bundle and that the default behavior of a bundle agent 1214 is to use the security services defined in this specification. 1215 Designers should only deviate from the use of security operations 1216 when the deviation can be justified - such as when doing so causes 1217 downstream errors when processing blocks whose contents must be 1218 inspected or changed at one or more hops along the path. 1220 o It is recommended that BCBs be allowed to alter the size of 1221 extension blocks and the payload block. However, care must be 1222 taken to ensure that changing the size of the payload block while 1223 the bundle is in transit do not negatively affect bundle 1224 processing (e.g., calculating storage needs, scheduling 1225 transmission times). 1227 o Adding a BIB to a security target that has already been encrypted 1228 by a BCB is not allowed. If this condition is likely to be 1229 encountered, there are (at least) three possible policies that 1230 could handle this situation. 1232 1. At the time of encryption, a security context can be selected 1233 which computes a plain text integrity signature and included 1234 as a security context result field. 1236 2. The encrypted block may be replicated as a new block with a 1237 new block number and given integrity protection. 1239 3. An encapsulation scheme may be applied to encapsulate the 1240 security target (or the entire bundle) such that the 1241 encapsulating structure is, itself, no longer the security 1242 target of a BCB and may therefore be the security target of a 1243 BIB. 1245 o It is recommended that security policy address whether cipher 1246 suites whose cipher text is larger than the initial plain text are 1247 permitted and, if so, for what types of blocks. Changing the size 1248 of a block may cause processing difficulties for networks that 1249 calculate block offsets into bundles or predict transmission times 1250 or storage availability as a function of bundle size. In other 1251 cases, changing the size of a payload as part of encryption has no 1252 significant impact. 1254 8. Security Considerations 1256 Given the nature of DTN applications, it is expected that bundles may 1257 traverse a variety of environments and devices which each pose unique 1258 security risks and requirements on the implementation of security 1259 within BPSec. For these reasons, it is important to introduce key 1260 threat models and describe the roles and responsibilities of the 1261 BPSec protocol in protecting the confidentiality and integrity of the 1262 data against those threats. This section provides additional 1263 discussion on security threats that BPSec will face and describes how 1264 BPSec security mechanisms operate to mitigate these threats. 1266 The threat model described here is assumed to have a set of 1267 capabilities identical to those described by the Internet Threat 1268 Model in [RFC3552], but the BPSec threat model is scoped to 1269 illustrate threats specific to BPSec operating within DTN 1270 environments and therefore focuses on man-in-the-middle (MITM) 1271 attackers. In doing so, it is assumed that the DTN (or significant 1272 portions of the DTN) are completely under the control of an attacker. 1274 8.1. Attacker Capabilities and Objectives 1276 BPSec was designed to protect against MITM threats which may have 1277 access to a bundle during transit from its source, Alice, to its 1278 destination, Bob. A MITM node, Mallory, is a non-cooperative node 1279 operating on the DTN between Alice and Bob that has the ability to 1280 receive bundles, examine bundles, modify bundles, forward bundles, 1281 and generate bundles at will in order to compromise the 1282 confidentiality or integrity of data within the DTN. For the 1283 purposes of this section, any MITM node is assumed to effectively be 1284 security-aware even if it does not implement the BPSec protocol. 1285 There are three classes of MITM nodes which are differentiated based 1286 on their access to cryptographic material: 1288 o Unprivileged Node: Mallory has not been provisioned within the 1289 secure environment and only has access to cryptographic material 1290 which has been publicly-shared. 1292 o Legitimate Node: Mallory is within the secure environment and 1293 therefore has access to cryptographic material which has been 1294 provisioned to Mallory (i.e., K_M) as well as material which has 1295 been publicly-shared. 1297 o Privileged Node: Mallory is a privileged node within the secure 1298 environment and therefore has access to cryptographic material 1299 which has been provisioned to Mallory, Alice and/or Bob (i.e. 1300 K_M, K_A, and/or K_B) as well as material which has been publicly- 1301 shared. 1303 If Mallory is operating as a privileged node, this is tantamount to 1304 compromise; BPSec does not provide mechanisms to detect or remove 1305 Mallory from the DTN or BPSec secure environment. It is up to the 1306 BPSec implementer or the underlying cryptographic mechanisms to 1307 provide appropriate capabilities if they are needed. It should also 1308 be noted that if the implementation of BPSec uses a single set of 1309 shared cryptographic material for all nodes, a legitimate node is 1310 equivalent to a privileged node because K_M == K_A == K_B. For this 1311 reason, sharing cryptographic material in this way is not 1312 recommended. 1314 A special case of the legitimate node is when Mallory is either Alice 1315 or Bob (i.e., K_M == K_A or K_M == K_B). In this case, Mallory is 1316 able to impersonate traffic as either Alice or Bob, respectively, 1317 which means that traffic to and from that node can be decrypted and 1318 encrypted, respectively. Additionally, messages may be signed as 1319 originating from one of the endpoints. 1321 8.2. Attacker Behaviors and BPSec Mitigations 1323 8.2.1. Eavesdropping Attacks 1325 Once Mallory has received a bundle, she is able to examine the 1326 contents of that bundle and attempt to recover any protected data or 1327 cryptographic keying material from the blocks contained within. The 1328 protection mechanism that BPSec provides against this action is the 1329 BCB, which encrypts the contents of its security target, providing 1330 confidentiality of the data. Of course, it should be assumed that 1331 Mallory is able to attempt offline recovery of encrypted data, so the 1332 cryptographic mechanisms selected to protect the data should provide 1333 a suitable level of protection. 1335 When evaluating the risk of eavesdropping attacks, it is important to 1336 consider the lifetime of bundles on a DTN. Depending on the network, 1337 bundles may persist for days or even years. Long-lived bundles imply 1338 that the data exists in the network for a longer period of time and, 1339 thus, there may be more opportunities to capture those bundles. 1340 Additionally, bundles that are long-lived imply that the information 1341 stored within them may remain relevant and sensitive for long enough 1342 that, once captured, there is sufficient time to crack encryption 1343 associated with the bundle. If a bundle does persist on the network 1344 for years and the cipher suite used for a BCB provides inadequate 1345 protection, Mallory may be able to recover the protected data either 1346 before that bundle reaches its intended destination or before the 1347 information in the bundle is no longer considered sensitive. 1349 NOTE: Mallory is not limited by the bundle lifetime and may retain a 1350 given bundle indefinitely. 1352 NOTE: Irrespective of whether BPSec is used, traffic analysis will be 1353 possible. 1355 8.2.2. Modification Attacks 1357 As a node participating in the DTN between Alice and Bob, Mallory 1358 will also be able to modify the received bundle, including non-BPSec 1359 data such as the primary block, payload blocks, or block processing 1360 control flags as defined in [I-D.ietf-dtn-bpbis]. Mallory will be 1361 able to undertake activities which include modification of data 1362 within the blocks, replacement of blocks, addition of blocks, or 1363 removal of blocks. Within BPSec, both the BIB and BCB provide 1364 integrity protection mechanisms to detect or prevent data 1365 manipulation attempts by Mallory. 1367 The BIB provides that protection to another block which is its 1368 security target. The cryptographic mechanisms used to generate the 1369 BIB should be strong against collision attacks and Mallory should not 1370 have access to the cryptographic material used by the originating 1371 node to generate the BIB (e.g., K_A). If both of these conditions 1372 are true, Mallory will be unable to modify the security target or the 1373 BIB and lead Bob to validate the security target as originating from 1374 Alice. 1376 Since BPSec security operations are implemented by placing blocks in 1377 a bundle, there is no in-band mechanism for detecting or correcting 1378 certain cases where Mallory removes blocks from a bundle. If Mallory 1379 removes a BCB, but keeps the security target, the security target 1380 remains encrypted and there is a possibility that there may no longer 1381 be sufficient information to decrypt the block at its destination. 1382 If Mallory removes both a BCB (or BIB) and its security target there 1383 is no evidence left in the bundle of the security operation. 1384 Similarly, if Mallory removes the BIB but not the security target 1385 there is no evidence left in the bundle of the security operation. 1386 In each of these cases, the implementation of BPSec must be combined 1387 with policy configuration at endpoints in the network which describe 1388 the expected and required security operations that must be applied on 1389 transmission and are expected to be present on receipt. This or 1390 other similar out-of-band information is required to correct for 1391 removal of security information in the bundle. 1393 A limitation of the BIB may exist within the implementation of BIB 1394 validation at the destination node. If Mallory is a legitimate node 1395 within the DTN, the BIB generated by Alice with K_A can be replaced 1396 with a new BIB generated with K_M and forwarded to Bob. If Bob is 1397 only validating that the BIB was generated by a legitimate user, Bob 1398 will acknowledge the message as originating from Mallory instead of 1399 Alice. Validating a BIB indicates only that the BIB was generated by 1400 a holder of the relevant key; it does not provide any guarantee that 1401 the bundle or block was created by the same entity. In order to 1402 provide verifiable integrity checks BCB should require an encryption 1403 scheme that is Indistinguishable under adaptive Chosen Ciphertext 1404 Attack (IND-CCA2) secure. Such an encryption scheme will guard 1405 against signature substitution attempts by Mallory. In this case, 1406 Alice creates a BIB with the protected data block as the security 1407 target and then creates a BCB with both the BIB and protected data 1408 block as its security targets. 1410 8.2.3. Topology Attacks 1412 If Mallory is in a MITM position within the DTN, she is able to 1413 influence how any bundles that come to her may pass through the 1414 network. Upon receiving and processing a bundle that must be routed 1415 elsewhere in the network, Mallory has three options as to how to 1416 proceed: not forward the bundle, forward the bundle as intended, or 1417 forward the bundle to one or more specific nodes within the network. 1419 Attacks that involve re-routing the packets throughout the network 1420 are essentially a special case of the modification attacks described 1421 in this section where the attacker is modifying fields within the 1422 primary block of the bundle. Given that BPSec cannot encrypt the 1423 contents of the primary block, alternate methods must be used to 1424 prevent this situation. These methods may include requiring BIBs for 1425 primary blocks, using encapsulation, or otherwise strategically 1426 manipulating primary block data. The specifics of any such 1427 mitigation technique are specific to the implementation of the 1428 deploying network and outside of the scope of this document. 1430 Furthermore, routing rules and policies may be useful in enforcing 1431 particular traffic flows to prevent topology attacks. While these 1432 rules and policies may utilize some features provided by BPSec, their 1433 definition is beyond the scope of this specification. 1435 8.2.4. Message Injection 1437 Mallory is also able to generate new bundles and transmit them into 1438 the DTN at will. These bundles may either be copies or slight 1439 modifications of previously-observed bundles (i.e., a replay attack) 1440 or entirely new bundles generated based on the Bundle Protocol, 1441 BPSec, or other bundle-related protocols. With these attacks 1442 Mallory's objectives may vary, but may be targeting either the bundle 1443 protocol or application-layer protocols conveyed by the bundle 1444 protocol. The target could also be the storage and compute of the 1445 nodes running the bundle or application layer protocols (e.g., a 1446 denial of service to flood on the storage of the store-and-forward 1447 mechanism; or compute which would process the packets and perhaps 1448 prevent other activities). 1450 BPSec relies on cipher suite capabilities to prevent replay or forged 1451 message attacks. A BCB used with appropriate cryptographic 1452 mechanisms may provide replay protection under certain circumstances. 1453 Alternatively, application data itself may be augmented to include 1454 mechanisms to assert data uniqueness and then protected with a BIB, a 1455 BCB, or both along with other block data. In such a case, the 1456 receiving node would be able to validate the uniqueness of the data. 1458 9. Security Context Considerations 1460 9.1. Mandating Security Contexts 1462 Because of the diversity of networking scenarios and node 1463 capabilities that may utilize BPSec there is no one security context 1464 mandated for every possible BPSec implementation. For example, a 1465 security context appropriate for a resource-constrained node with 1466 limited connectivity may be inappropriate for use in a well- 1467 resourced, well connected node. 1469 This does not mean that the use of BPSec in a particular network is 1470 meant to be used without security contexts for interoperability and 1471 default behavior. Network designers must identify the minimal set of 1472 security contexts necessary for functions in their network. For 1473 example, a default set of security contexts could be created for use 1474 over the terrestrial Internet and required by any BPSec 1475 implementation communicating over the terrestrial Internet. 1477 Implementations of BPSec MUST support the mandated security contexts 1478 of the networks in which they are applied. If a node serves as a 1479 gateway amongst two or more networks, the BPSec implementation at 1480 that node MUST support the union of security contexts mandated in 1481 those networks. 1483 BPSec has been designed to allow for a diversity of security contexts 1484 and for new contexts to be defined over time. The use of different 1485 security contexts does not change the BPSec protocol itself and the 1486 definition of new security contexts MUST adhere to the requirements 1487 of such contexts as presented in this section and generally in this 1488 specification. 1490 9.2. Identification and Configuration 1492 Security blocks must uniquely define the security context for their 1493 services. This context MUST be uniquely identifiable and MAY use 1494 parameters for customization. Where policy and configuration 1495 decisions can be captured as parameters, the security context 1496 identifier may identify a cipher suite. In cases where the same 1497 cipher suites are used with differing predetermined configurations 1498 and policies, users can define multiple security contexts that use 1499 the same cipher suite. 1501 Network operators must determine the number, type, and configuration 1502 of security contexts in a system. Networks with rapidly changing 1503 configurations may define relatively few security contexts with each 1504 context customized with multiple parameters. For networks with more 1505 stability, or an increased need for confidentiality, a larger number 1506 of contexts can be defined with each context supporting few, if any, 1507 parameters. 1509 Security Context Examples 1511 +---------+------------+--------------------------------------------+ 1512 | Context | Parameters | Definition | 1513 | Id | | | 1514 +---------+------------+--------------------------------------------+ 1515 | 1 | Encrypted | AES-GCM-256 cipher suite with provided | 1516 | | Key, IV | ephemeral key encrypted with a | 1517 | | | predetermined key encryption key and clear | 1518 | | | text initialization vector. | 1519 | 2 | IV | AES-GCM-256 cipher suite with | 1520 | | | predetermined key and predetermined key | 1521 | | | rotation policy. | 1522 | 3 | Nil | AES-GCM-256 cipher suite with all info | 1523 | | | predetermined. | 1524 +---------+------------+--------------------------------------------+ 1526 Table 1 1528 9.3. Authorship 1530 Developers or implementers should consider the diverse performance 1531 and conditions of networks on which the Bundle Protocol (and 1532 therefore BPSec) will operate. Specifically, the delay and capacity 1533 of delay-tolerant networks can vary substantially. Developers should 1534 consider these conditions to better describe the conditions when 1535 those contexts will operate or exhibit vulnerability, and selection 1536 of these contexts for implementation should be made with 1537 consideration for this reality. There are key differences that may 1538 limit the opportunity for a security context to leverage existing 1539 cipher suites and technologies that have been developed for use in 1540 traditional, more reliable networks: 1542 o Data Lifetime: Depending on the application environment, bundles 1543 may persist on the network for extended periods of time, perhaps 1544 even years. Cryptographic algorithms should be selected to ensure 1545 protection of data against attacks for a length of time reasonable 1546 for the application. 1548 o One-Way Traffic: Depending on the application environment, it is 1549 possible that only a one-way connection may exist between two 1550 endpoints, or if a two-way connection does exist, the round- trip 1551 time may be extremely large. This may limit the utility of 1552 session key generation mechanisms, such as Diffie-Hellman, as a 1553 two-way handshake may not be feasible or reliable. 1555 o Opportunistic Access: Depending on the application environment, a 1556 given endpoint may not be guaranteed to be accessible within a 1557 certain amount of time. This may make asymmetric cryptographic 1558 architectures which rely on a key distribution center or other 1559 trust center impractical under certain conditions. 1561 When developing security contexts for use with BPSec, the following 1562 information SHOULD be considered for inclusion in these 1563 specifications. 1565 o Security Context Parameters. Security contexts MUST define their 1566 parameter Ids, the data types of those parameters, and their CBOR 1567 encoding. 1569 o Security Results. Security contexts MUST define their security 1570 result Ids, the data types of those results, and their CBOR 1571 encoding. 1573 o New Canonicalizations. Security contexts may define new 1574 canonicalization algorithms as necessary. 1576 o Cipher-Text Size. Security contexts MUST state whether their 1577 associated cipher suites generate cipher text (to include any 1578 authentication information) that is of a different size than the 1579 input plain text. 1581 If a security context does not wish to alter the size of the plain 1582 text it should place overflow bytes and authentication tags in 1583 security result fields. 1585 o Block Header Information. Security contexts SHOULD include block 1586 header information that is considered to be immutable for the 1587 block. This information MAY include the block type code, block 1588 number, CRC Type and CRC field (if present or if missing and 1589 unlikely to be added later), and possibly certain block processing 1590 control flags. Designers should input these fields as additional 1591 data for integrity protection when these fields are expected to 1592 remain unchanged over the path the block will take from the 1593 security source to the security acceptor. Security contexts 1594 considering block header information MUST describe expected 1595 behavior when these fields fail their integrity verification. 1597 10. Defining Other Security Blocks 1599 Other security blocks (OSBs) may be defined and used in addition to 1600 the security blocks identified in this specification. Both the usage 1601 of BIB, BCB, and any future OSBs can co-exist within a bundle and can 1602 be considered in conformance with BPSec if each of the following 1603 requirements are met by any future identified security blocks. 1605 o Other security blocks (OSBs) MUST NOT reuse any enumerations 1606 identified in this specification, to include the block type codes 1607 for BIB and BCB. 1609 o An OSB definition MUST state whether it can be the target of a BIB 1610 or a BCB. The definition MUST also state whether the OSB can 1611 target a BIB or a BCB. 1613 o An OSB definition MUST provide a deterministic processing order in 1614 the event that a bundle is received containing BIBs, BCBs, and 1615 OSBs. This processing order MUST NOT alter the BIB and BCB 1616 processing orders identified in this specification. 1618 o An OSB definition MUST provide a canonicalization algorithm if the 1619 default non-primary-block canonicalization algorithm cannot be 1620 used to generate a deterministic input for a cipher suite. This 1621 requirement can be waived if the OSB is defined so as to never be 1622 the security target of a BIB or a BCB. 1624 o An OSB definition MUST NOT require any behavior of a BPSEC-BPA 1625 that is in conflict with the behavior identified in this 1626 specification. In particular, the security processing 1627 requirements imposed by this specification must be consistent 1628 across all BPSEC-BPAs in a network. 1630 o The behavior of an OSB when dealing with fragmentation must be 1631 specified and MUST NOT lead to ambiguous processing states. In 1632 particular, an OSB definition should address how to receive and 1633 process an OSB in a bundle fragment that may or may not also 1634 contain its security target. An OSB definition should also 1635 address whether an OSB may be added to a bundle marked as a 1636 fragment. 1638 Additionally, policy considerations for the management, monitoring, 1639 and configuration associated with blocks SHOULD be included in any 1640 OSB definition. 1642 NOTE: The burden of showing compliance with processing rules is 1643 placed upon the specifications defining new security blocks and the 1644 identification of such blocks shall not, alone, require maintenance 1645 of this specification. 1647 11. IANA Considerations 1649 This specification includes fields requiring registries managed by 1650 IANA. 1652 11.1. Bundle Block Types 1654 This specification allocates two block types from the existing 1655 "Bundle Block Types" registry defined in [RFC6255]. 1657 Additional Entries for the Bundle Block-Type Codes Registry: 1659 +-------+-----------------------------+---------------+ 1660 | Value | Description | Reference | 1661 +-------+-----------------------------+---------------+ 1662 | TBA | Block Integrity Block | This document | 1663 | TBA | Block Confidentiality Block | This document | 1664 +-------+-----------------------------+---------------+ 1666 Table 2 1668 The Bundle Block Types namespace notes whether a block type is meant 1669 for use in BP version 6, BP version 7, or both. The two block types 1670 defined in this specification are meant for use with BP version 7. 1672 11.2. Security Context Identifiers 1674 BPSec has a Security Context Identifier field for which IANA is 1675 requested to create and maintain a new registry named "BPSec Security 1676 Context Identifiers". Initial values for this registry are given 1677 below. 1679 The registration policy for this registry is: Specification Required. 1681 The value range is: unsigned 16-bit integer. 1683 BPSec Security Context Identifier Registry 1685 +-------+-------------+---------------+ 1686 | Value | Description | Reference | 1687 +-------+-------------+---------------+ 1688 | 0 | Reserved | This document | 1689 +-------+-------------+---------------+ 1691 Table 3 1693 12. References 1695 12.1. Normative References 1697 [I-D.ietf-dtn-bpbis] 1698 Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol 1699 Version 7", draft-ietf-dtn-bpbis-22 (work in progress), 1700 February 2020. 1702 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1703 Requirement Levels", BCP 14, RFC 2119, 1704 DOI 10.17487/RFC2119, March 1997, 1705 . 1707 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1708 Text on Security Considerations", BCP 72, RFC 3552, 1709 DOI 10.17487/RFC3552, July 2003, 1710 . 1712 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1713 IANA Registries", RFC 6255, DOI 10.17487/RFC6255, May 1714 2011, . 1716 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 1717 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 1718 October 2013, . 1720 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1721 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1722 May 2017, . 1724 12.2. Informative References 1726 [I-D.birrane-dtn-sbsp] 1727 Birrane, E., Pierce-Mayer, J., and D. Iannicca, 1728 "Streamlined Bundle Security Protocol Specification", 1729 draft-birrane-dtn-sbsp-01 (work in progress), October 1730 2015. 1732 [I-D.ietf-dtn-bpsec-interop-sc] 1733 Birrane, E., "BPSec Interoperability Security Contexts", 1734 draft-ietf-dtn-bpsec-interop-sc-01 (work in progress), 1735 February 2020. 1737 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1738 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1739 Networking Architecture", RFC 4838, DOI 10.17487/RFC4838, 1740 April 2007, . 1742 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1743 "Bundle Security Protocol Specification", RFC 6257, 1744 DOI 10.17487/RFC6257, May 2011, 1745 . 1747 Appendix A. Acknowledgements 1749 The following participants contributed technical material, use cases, 1750 and useful thoughts on the overall approach to this security 1751 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1752 Alford and Angela Hennessy of the Laboratory for Telecommunications 1753 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1754 University Applied Physics Laboratory. 1756 Authors' Addresses 1758 Edward J. Birrane, III 1759 The Johns Hopkins University Applied Physics Laboratory 1760 11100 Johns Hopkins Rd. 1761 Laurel, MD 20723 1762 US 1764 Phone: +1 443 778 7423 1765 Email: Edward.Birrane@jhuapl.edu 1767 Kenneth McKeever 1768 The Johns Hopkins University Applied Physics Laboratory 1769 11100 Johns Hopkins Rd. 1770 Laurel, MD 20723 1771 US 1773 Phone: +1 443 778 2237 1774 Email: Ken.McKeever@jhuapl.edu