idnits 2.17.1 draft-ietf-dtn-bpsec-16.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 (January 21, 2020) is 1550 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-18 ** Obsolete normative reference: RFC 7049 (Obsoleted by RFC 8949) == Outdated reference: A later version (-02) exists of draft-ietf-dtn-bpsec-interop-sc-00 Summary: 1 error (**), 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 Obsoletes: 6257 (if approved) JHU/APL 5 Intended status: Standards Track January 21, 2020 6 Expires: July 24, 2020 8 Bundle Protocol Security Specification 9 draft-ietf-dtn-bpsec-16 11 Abstract 13 This document defines a security protocol providing end to end data 14 integrity and confidentiality services for the Bundle Protocol. 16 This document is an update of the protocol described in RFC 6257, 17 reflecting lessons learned. For this reason it obsoletes RFC 6257, 18 an IRTF-stream document. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on July 24, 2020. 37 Copyright Notice 39 Copyright (c) 2020 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.1. Supported Security Services . . . . . . . . . . . . . . . 4 56 1.2. Specification Scope . . . . . . . . . . . . . . . . . . . 4 57 1.3. Related Documents . . . . . . . . . . . . . . . . . . . . 5 58 1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 59 2. Design Decisions . . . . . . . . . . . . . . . . . . . . . . 7 60 2.1. Block-Level Granularity . . . . . . . . . . . . . . . . . 7 61 2.2. Multiple Security Sources . . . . . . . . . . . . . . . . 8 62 2.3. Mixed Security Policy . . . . . . . . . . . . . . . . . . 8 63 2.4. User-Defined Security Contexts . . . . . . . . . . . . . 9 64 2.5. Deterministic Processing . . . . . . . . . . . . . . . . 9 65 3. Security Blocks . . . . . . . . . . . . . . . . . . . . . . . 10 66 3.1. Block Definitions . . . . . . . . . . . . . . . . . . . . 10 67 3.2. Uniqueness . . . . . . . . . . . . . . . . . . . . . . . 10 68 3.3. Target Multiplicity . . . . . . . . . . . . . . . . . . . 11 69 3.4. Target Identification . . . . . . . . . . . . . . . . . . 12 70 3.5. Block Representation . . . . . . . . . . . . . . . . . . 12 71 3.6. Abstract Security Block . . . . . . . . . . . . . . . . . 12 72 3.7. Block Integrity Block . . . . . . . . . . . . . . . . . . 15 73 3.8. Block Confidentiality Block . . . . . . . . . . . . . . . 16 74 3.9. Block Interactions . . . . . . . . . . . . . . . . . . . 17 75 3.10. Parameter and Result Identification . . . . . . . . . . . 18 76 3.11. BSP Block Examples . . . . . . . . . . . . . . . . . . . 19 77 3.11.1. Example 1: Constructing a Bundle with Security . . . 19 78 3.11.2. Example 2: Adding More Security At A New Node . . . 20 79 4. Canonical Forms . . . . . . . . . . . . . . . . . . . . . . . 20 80 5. Security Processing . . . . . . . . . . . . . . . . . . . . . 21 81 5.1. Bundles Received from Other Nodes . . . . . . . . . . . . 21 82 5.1.1. Receiving BCBs . . . . . . . . . . . . . . . . . . . 21 83 5.1.2. Receiving BIBs . . . . . . . . . . . . . . . . . . . 22 84 5.2. Bundle Fragmentation and Reassembly . . . . . . . . . . . 23 85 6. Key Management . . . . . . . . . . . . . . . . . . . . . . . 24 86 7. Security Policy Considerations . . . . . . . . . . . . . . . 24 87 8. Security Considerations . . . . . . . . . . . . . . . . . . . 25 88 8.1. Attacker Capabilities and Objectives . . . . . . . . . . 26 89 8.2. Attacker Behaviors and BPSec Mitigations . . . . . . . . 27 90 8.2.1. Eavesdropping Attacks . . . . . . . . . . . . . . . . 27 91 8.2.2. Modification Attacks . . . . . . . . . . . . . . . . 27 92 8.2.3. Topology Attacks . . . . . . . . . . . . . . . . . . 28 93 8.2.4. Message Injection . . . . . . . . . . . . . . . . . . 29 94 9. Security Context Considerations . . . . . . . . . . . . . . . 29 95 9.1. Identification and Configuration . . . . . . . . . . . . 29 96 9.2. Authorship . . . . . . . . . . . . . . . . . . . . . . . 30 98 10. Defining Other Security Blocks . . . . . . . . . . . . . . . 32 99 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 100 11.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 33 101 11.2. Security Context Identifiers . . . . . . . . . . . . . . 33 102 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 103 12.1. Normative References . . . . . . . . . . . . . . . . . . 34 104 12.2. Informative References . . . . . . . . . . . . . . . . . 34 105 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 35 106 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 108 1. Introduction 110 This document defines security features for the Bundle Protocol (BP) 111 [I-D.ietf-dtn-bpbis] and is intended for use in Delay Tolerant 112 Networks (DTNs) to provide end-to-end security services. 114 The Bundle Protocol specification [I-D.ietf-dtn-bpbis] defines DTN as 115 referring to "a networking architecture providing communications in 116 and/or through highly stressed environments" where "BP may be viewed 117 as sitting at the application layer of some number of constituent 118 networks, forming a store-carry-forward overlay network". The term 119 "stressed" environment refers to multiple challenging conditions 120 including intermittent connectivity, large and/or variable delays, 121 asymmetric data rates, and high bit error rates. 123 The BP might be deployed such that portions of the network cannot be 124 trusted, posing the usual security challenges related to 125 confidentiality and integrity. However, the stressed nature of the 126 BP operating environment imposes unique conditions where usual 127 transport security mechanisms may not be sufficient. For example, 128 the store-carry-forward nature of the network may require protecting 129 data at rest, preventing unauthorized consumption of critical 130 resources such as storage space, and operating without regular 131 contact with a centralized security oracle (such as a certificate 132 authority). 134 An end-to-end security service is needed that operates in all of the 135 environments where the BP operates. 137 This document is an update of the protocol described in RFC 6257, 138 reflecting lessons learned. For this reason it obsoletes RFC 6257, 139 an IRTF-stream document. 141 Note to the RFC editor: Please delete below paragraph prior to RFC 142 publication. 144 The Internet Research Task Force will be requested to mark RFC6257 as 145 obsolete. 147 1.1. Supported Security Services 149 BPSec provides end-to-end integrity and confidentiality services for 150 BP bundles, as defined in this section. 152 Integrity services ensure that changes to target data within a bundle 153 can be discovered. Data changes may be caused by processing errors, 154 environmental conditions, or intentional manipulation. In the 155 context of BPSec, integrity services apply to plain-text in the 156 bundle. 158 Confidentiality services ensure that target data is unintelligible to 159 nodes in the DTN, except for authorized nodes possessing special 160 information. This generally means producing cipher-text from plain- 161 text and generating authentication information for that cipher-text. 162 Confidentiality, in this context, applies to the contents of target 163 data and does not extend to hiding the fact that confidentiality 164 exists in the bundle. 166 NOTE: Hop-by-hop authentication is NOT a supported security service 167 in this specification, for three reasons. 169 1. The term "hop-by-hop" is ambiguous in a BP overlay, as nodes that 170 are adjacent in the overlay may not be adjacent in physical 171 connectivity. This condition is difficult or impossible to 172 detect and therefore hop-by-hop authentication is difficult or 173 impossible to enforce. 175 2. Networks in which BPSec may be deployed may have a mixture of 176 security-aware and not-security-aware nodes. Hop-by-hop 177 authentication cannot be deployed in a network if adjacent nodes 178 in the network have different security capabilities. 180 3. Hop-by-hop authentication is a special case of data integrity and 181 can be achieved with the integrity mechanisms defined in this 182 specification. Therefore, a separate authentication service is 183 not necessary. 185 1.2. Specification Scope 187 This document defines the security services provided by the BPSec. 188 This includes the data specification for representing these services 189 as BP extension blocks, and the rules for adding, removing, and 190 processing these blocks at various points during the bundle's 191 traversal of the DTN. 193 BPSec applies only to those nodes that implement it, known as 194 "security-aware" nodes. There might be other nodes in the DTN that 195 do not implement BPSec. While all nodes in a BP overlay can exchange 196 bundles, BPSec security operations can only happen at BPSec security- 197 aware nodes. 199 BPSec addresses only the security of data traveling over the DTN, not 200 the underlying DTN itself. Furthermore, while the BPSec protocol can 201 provide security-at-rest in a store-carry-forward network, it does 202 not address threats which share computing resources with the DTN and/ 203 or BPSec software implementations. These threats may be malicious 204 software or compromised libraries which intend to intercept data or 205 recover cryptographic material. Here, it is the responsibility of 206 the BPSec implementer to ensure that any cryptographic material, 207 including shared secret or private keys, is protected against access 208 within both memory and storage devices. 210 This specification addresses neither the fitness of externally- 211 defined cryptographic methods nor the security of their 212 implementation. Different networking conditions and operational 213 considerations require varying strengths of security mechanism such 214 that mandating a cipher suite in this specification may result in too 215 much security for some networks and too little security in others. 216 It is expected that separate documents will be standardized to define 217 security contexts and cipher suites compatible with BPSec, to include 218 those that should be used to assess interoperability and those fit 219 for operational use in various network scenarios. A sample security 220 context has been defined ([I-D.ietf-dtn-bpsec-interop-sc]) to support 221 interoperability testing and serve as an exemplar for how security 222 contexts should be defined for this specification. 224 This specification does not address the implementation of security 225 policy and does not provide a security policy for the BPSec. Similar 226 to cipher suites, security policies are based on the nature and 227 capabilities of individual networks and network operational concepts. 228 This specification does provide policy considerations when building a 229 security policy. 231 With the exception of the Bundle Protocol, this specification does 232 not address how to combine the BPSec security blocks with other 233 protocols, other BP extension blocks, or other best practices to 234 achieve security in any particular network implementation. 236 1.3. Related Documents 238 This document is best read and understood within the context of the 239 following other DTN documents: 241 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 242 architecture for DTNs and identifies certain security assumptions 243 made by existing Internet protocols that are not valid in a DTN. 245 The Bundle Protocol [I-D.ietf-dtn-bpbis] defines the format and 246 processing of bundles, defines the extension block format used to 247 represent BPSec security blocks, and defines the canonicalization 248 algorithms used by this specification. 250 The Concise Binary Object Representation (CBOR) format [RFC7049] 251 defines a data format that allows for small code size, fairly small 252 message size, and extensibility without version negotiation. The 253 block-specific data associated with BPSec security blocks are encoded 254 in this data format. 256 The Bundle Security Protocol [RFC6257] and Streamlined Bundle 257 Security Protocol [I-D.birrane-dtn-sbsp] documents introduced the 258 concepts of using BP extension blocks for security services in a DTN. 259 The BPSec is a continuation and refinement of these documents. 261 1.4. Terminology 263 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 264 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 265 "OPTIONAL" in this document are to be interpreted as described in 266 [RFC2119]. 268 This section defines terminology either unique to the BPSec or 269 otherwise necessary for understanding the concepts defined in this 270 specification. 272 o Bundle Destination - the node which receives a bundle and delivers 273 the payload of the bundle to an application. Also, the Node ID of 274 the Bundle Protocol Agent (BPA) receiving the bundle. The bundle 275 destination acts as the security acceptor for every security 276 target in every security block in every bundle it receives. 278 o Bundle Source - the node which originates a bundle. Also, the 279 Node ID of the BPA originating the bundle. 281 o Cipher Suite - a set of one or more algorithms providing integrity 282 and confidentiality services. Cipher suites may define necessary 283 parameters but do not provide values for those parameters. 285 o Forwarder - any node that transmits a bundle in the DTN. Also, 286 the Node ID of the BPA that sent the bundle on its most recent 287 hop. 289 o Intermediate Receiver, Waypoint, or Next Hop - any node that 290 receives a bundle from a Forwarder that is not the Bundle 291 Destination. Also, the Node ID of the BPA at any such node. 293 o Path - the ordered sequence of nodes through which a bundle passes 294 on its way from Source to Destination. The path is not 295 necessarily known in advance by the bundle or any BPAs in the DTN. 297 o Security Acceptor - a bundle node that processes and dispositions 298 one or more security blocks in a bundle. Also, the Node ID of 299 that node. 301 o Security Block - a BPSec extension block in a bundle. 303 o Security Context - the set of assumptions, algorithms, 304 configurations and policies used to implement security services. 306 o Security Operation - the application of a security service to a 307 security target, notated as OP(security service, security target). 308 For example, OP(confidentiality, payload). Every security 309 operation in a bundle MUST be unique, meaning that a security 310 service can only be applied to a security target once in a bundle. 311 A security operation is implemented by a security block. 313 o Security Service - the security features supported by this 314 specification: either integrity or confidentiality. 316 o Security Source - a bundle node that adds a security block to a 317 bundle. Also, the Node ID of that node. 319 o Security Target - the block within a bundle that receives a 320 security service as part of a security operation. 322 2. Design Decisions 324 The application of security services in a DTN is a complex endeavor 325 that must consider physical properties of the network, policies at 326 each node, and application security requirements. This section 327 identifies those desirable properties that guide design decisions for 328 this specification and are necessary for understanding the format and 329 behavior of the BPSec protocol. 331 2.1. Block-Level Granularity 333 Security services within this specification must allow different 334 blocks within a bundle to have different security services applied to 335 them. 337 Blocks within a bundle represent different types of information. The 338 primary block contains identification and routing information. The 339 payload block carries application data. Extension blocks carry a 340 variety of data that may augment or annotate the payload, or 341 otherwise provide information necessary for the proper processing of 342 a bundle along a path. Therefore, applying a single level and type 343 of security across an entire bundle fails to recognize that blocks in 344 a bundle represent different types of information with different 345 security needs. 347 For example, a payload block might be encrypted to protect its 348 contents and an extension block containing summary information 349 related to the payload might be integrity signed but unencrypted to 350 provide waypoints access to payload-related data without providing 351 access to the payload. 353 2.2. Multiple Security Sources 355 A bundle can have multiple security blocks and these blocks can have 356 different security sources. BPSec implementations MUST NOT assume 357 that all blocks in a bundle have the same security operations and/or 358 security sources. 360 The Bundle Protocol allows extension blocks to be added to a bundle 361 at any time during its existence in the DTN. When a waypoint adds a 362 new extension block to a bundle, that extension block MAY have 363 security services applied to it by that waypoint. Similarly, a 364 waypoint MAY add a security service to an existing extension block, 365 consistent with its security policy. 367 When a waypoint adds a security service to the bundle, the waypoint 368 is the security source for that service. The security block(s) which 369 represent that service in the bundle may need to record this security 370 source as the bundle destination might need this information for 371 processing. 373 For example, a bundle source may choose to apply an integrity service 374 to its plain-text payload. Later a waypoint node, representing a 375 gateway to an insecure portion of the DTN, may receive the bundle and 376 choose to apply a confidentiality service. In this case, the 377 integrity security source is the bundle source and the 378 confidentiality security source is the waypoint node. 380 2.3. Mixed Security Policy 382 The security policy enforced by nodes in the DTN may differ. 384 Some waypoints might not be security aware and will not be able to 385 process security blocks. Therefore, security blocks must have their 386 processing flags set such that the block will be treated 387 appropriately by non-security-aware waypoints. 389 Some waypoints will have security policies that require evaluating 390 security services even if they are not the bundle destination or the 391 final intended acceptor of the service. For example, a waypoint 392 could choose to verify an integrity service even though the waypoint 393 is not the bundle destination and the integrity service will be 394 needed by other nodes along the bundle's path. 396 Some waypoints will determine, through policy, that they are the 397 intended recipient of the security service and terminate the security 398 service in the bundle. For example, a gateway node could determine 399 that, even though it is not the destination of the bundle, it should 400 verify and remove a particular integrity service or attempt to 401 decrypt a confidentiality service, before forwarding the bundle along 402 its path. 404 Some waypoints could understand security blocks but refuse to process 405 them unless they are the bundle destination. 407 2.4. User-Defined Security Contexts 409 A security context is the union of security algorithms (cipher 410 suites), policies associated with the use of those algorithms, and 411 configuration values. Different contexts may specify different 412 algorithms, different polices, or different configuration values used 413 in the implementation of their security services. BPSec must provide 414 a mechanism for users to define their own security contexts. 416 For example, some users might prefer a SHA2 hash function for 417 integrity whereas other users might prefer a SHA3 hash function. The 418 security services defined in this specification must provide a 419 mechanism for determining what cipher suite, policy, and 420 configuration has been used to populate a security block. 422 2.5. Deterministic Processing 424 Whenever a node determines that it must process more than one 425 security block in a received bundle (either because the policy at a 426 waypoint states that it should process security blocks or because the 427 node is the bundle destination) the order in which security blocks 428 are processed must be deterministic. All nodes must impose this same 429 deterministic processing order for all security blocks. This 430 specification provides determinism in the application and evaluation 431 of security services, even when doing so results in a loss of 432 flexibility. 434 3. Security Blocks 436 3.1. Block Definitions 438 This specification defines two types of security block: the Block 439 Integrity Block (BIB) and the Block Confidentiality Block (BCB). 441 The BIB is used to ensure the integrity of its plain-text security 442 target(s). The integrity information in the BIB MAY be verified 443 by any node along the bundle path from the BIB security source to 444 the bundle destination. Security-aware waypoints add or remove 445 BIBs from bundles in accordance with their security policy. BIBs 446 are never used to sign the cipher-text provided by a BCB. 448 The BCB indicates that the security target(s) have been encrypted 449 at the BCB security source in order to protect their content while 450 in transit. The BCB is decrypted by security-aware nodes in the 451 network, up to and including the bundle destination, as a matter 452 of security policy. BCBs additionally provide authentication 453 mechanisms for the cipher-text they generate. 455 3.2. Uniqueness 457 Security operations in a bundle MUST be unique; the same security 458 service MUST NOT be applied to a security target more than once in a 459 bundle. Since a security operation is represented as a security 460 block, this limits what security blocks may be added to a bundle: if 461 adding a security block to a bundle would cause some other security 462 block to no longer represent a unique security operation then the new 463 block MUST NOT be added. It is important to note that any cipher- 464 text integrity mechanism supplied by the BCB is considered part of 465 the confidentiality service and, therefore, unique from the plain- 466 text integrity service provided 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 Under special circumstances, a single security block MAY represent 495 multiple security operations as a way of reducing the overall number 496 of security blocks present in a bundle. In these circumstances, 497 reducing the number of security blocks in the bundle reduces the 498 amount of redundant information in 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 and CRC Field (if present) 559 o Block Data Length 561 o Block Type Specific Data Fields 563 Security-specific information for a security block is captured in the 564 "Block Type Specific Data Fields". 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. 596 Security Context Flags: 597 This field identifies which optional fields are present in the 598 security block. This field SHALL be represented as a CBOR 599 unsigned integer whose contents shall be interpreted as a bit 600 field. Each bit in this bit field indicates the presence (bit 601 set to 1) or absence (bit set to 0) of optional data in the 602 security block. The association of bits to security block data 603 is defined as follows. 605 Bit 1 (the least-significant bit, 0x01): Security Context 606 Parameters Present Flag. 608 Bit 2 (0x02): Security Source Present Flag. 610 Bit >2 Reserved 612 Implementations MUST set reserved bits to 0 when writing this 613 field and MUST ignore the values of reserved bits when reading 614 this field. For unreserved bits, a value of 1 indicates that 615 the associated security block field MUST be included in the 616 security block. A value of 0 indicates that the associated 617 security block field MUST NOT be in the security block. 619 Security Source (Optional): 620 This field identifies the Endpoint that inserted the security 621 block in the bundle. If the security source field is not 622 present then the source MUST be inferred from other 623 information, such as the bundle source, previous hop, or other 624 values defined by security policy. This field SHALL be 625 represented by a CBOR array in accordance with 626 [I-D.ietf-dtn-bpbis] rules for representing Endpoint 627 Identifiers (EIDs). 629 Security Context Parameters (Optional): 630 This field captures one or more security context parameters 631 that should be provided to security-aware nodes when processing 632 the security service described by this security block. This 633 field SHALL be represented by a CBOR array. Each entry in this 634 array is a single security context parameter. A single 635 parameter SHALL also be represented as a CBOR array comprising 636 a 2-tuple of the id and value of the parameter, as follows. 638 * Parameter Id. This field identifies which parameter is 639 being specified. This field SHALL be represented as a CBOR 640 unsigned integer. Parameter Ids are selected as described 641 in Section 3.10. 643 * Parameter Value. This field captures the value associated 644 with this parameter. This field SHALL be represented by the 645 applicable CBOR representation of the parameter, in 646 accordance with Section 3.10. 648 The logical layout of the parameters array is illustrated in 649 Figure 1. 651 Figure 1: Security Context Parameters 653 Security Results: 654 This field captures the results of applying a security service 655 to the security targets of the security block. This field 656 SHALL be represented as a CBOR array of target results. Each 657 entry in this array represents the set of security results for 658 a specific security target. The target results MUST be ordered 659 identically to the Security Targets field of the security 660 block. This means that the first set of target results in this 661 array corresponds to the first entry in the Security Targets 662 field of the security block, and so on. There MUST be one 663 entry in this array for each entry in the Security Targets 664 field of the security block. 666 The set of security results for a target is also represented as 667 a CBOR array of individual results. An individual result is 668 represented as a 2-tuple of a result id and a result value, 669 defined as follows. 671 * Result Id. This field identifies which security result is 672 being specified. Some security results capture the primary 673 output of a cipher suite. Other security results contain 674 additional annotative information from cipher suite 675 processing. This field SHALL be represented as a CBOR 676 unsigned integer. Security result Ids will be as specified 677 in Section 3.10. 679 * Result Value. This field captures the value associated with 680 the result. This field SHALL be represented by the 681 applicable CBOR representation of the result value, in 682 accordance with Section 3.10. 684 The logical layout of the security results array is illustrated 685 in Figure 2. In this figure there are N security targets for 686 this security block. The first security target contains M 687 results and the Nth security target contains K results. 689 Figure 2: Security Results 691 3.7. Block Integrity Block 693 A BIB is a bundle extension block with the following characteristics. 695 o The Block Type Code value is as specified in Section 11.1. 697 o The Block Type Specific Data Fields follow the structure of the 698 ASB. 700 o A security target listed in the Security Targets field MUST NOT 701 reference a security block defined in this specification (e.g., a 702 BIB or a BCB). 704 o The Security Context Id MUST utilize an end-to-end authentication 705 cipher or an end-to-end error detection cipher. 707 o The EID of the security source MAY be present. If this field is 708 not present, then the security source of the block SHOULD be 709 inferred according to security policy and MAY default to the 710 bundle source. The security source MAY be specified as part of 711 security context information described in Section 3.10. 713 Notes: 715 o It is RECOMMENDED that designers carefully consider the effect of 716 setting flags that either discard the block or delete the bundle 717 in the event that this block cannot be processed. 719 o Since OP(integrity, target) is allowed only once in a bundle per 720 target, it is RECOMMENDED that users wishing to support multiple 721 integrity signatures for the same target define a multi-signature 722 security context. 724 o For some security contexts, (e.g., those using asymmetric keying 725 to produce signatures or those using symmetric keying with a group 726 key), the security information MAY be checked at any hop on the 727 way to the bundle destination that has access to the required 728 keying information, in accordance with Section 3.9. 730 3.8. Block Confidentiality Block 732 A BCB is a bundle extension block with the following characteristics. 734 The Block Type Code value is as specified in Section 11.1. 736 The Block Processing Control flags value can be set to whatever 737 values are required by local policy, except that this block MUST 738 have the "replicate in every fragment" flag set if the target of 739 the BCB is the Payload Block. Having that BCB in each fragment 740 indicates to a receiving node that the payload portion of each 741 fragment represents cipher-text. 743 The Block Type Specific Data Fields follow the structure of the 744 ASB. 746 A security target listed in the Security Targets field can 747 reference the payload block, a non-security extension block, or a 748 BIB. A BCB MUST NOT include another BCB as a security target. A 749 BCB MUST NOT target the primary block. 751 The Security Context Id MUST utilize a confidentiality cipher that 752 provides authenticated encryption with associated data (AEAD). 754 Additional information created by a cipher suite (such as 755 additional authenticated data) can be placed either in a security 756 result field or in the generated cipher-text. The determination 757 of where to place these data is a function of the cipher suite and 758 security context used. 760 The EID of the security source MAY be present. If this field is 761 not present, then the security source of the block SHOULD be 762 inferred according to security policy and MAY default to the 763 bundle source. The security source MAY be specified as part of 764 security context information described in Section 3.10. 766 The BCB modifies the contents of its security target(s). When a BCB 767 is applied, the security target body data are encrypted "in-place". 768 Following encryption, the security target Block Type Specific Data 769 field contains cipher-text, not plain-text. Other block fields 770 remain unmodified, with the exception of the Block Data Length field, 771 which MUST be updated to reflect the new length of the Block Type 772 Specific Data field. 774 Notes: 776 o It is RECOMMENDED that designers carefully consider the effect of 777 setting flags that either discard the block or delete the bundle 778 in the event that this block cannot be processed. 780 o The BCB block processing control flags can be set independently 781 from the processing control flags of the security target(s). The 782 setting of such flags SHOULD be an implementation/policy decision 783 for the encrypting node. 785 3.9. Block Interactions 787 The security block types defined in this specification are designed 788 to be as independent as possible. However, there are some cases 789 where security blocks may share a security target creating processing 790 dependencies. 792 If a security target of a BCB is also a security target of a BIB, an 793 undesirable condition occurs where a security aware waypoint would be 794 unable to validate the BIB because one of its security target's 795 contents have been encrypted by a BCB. To address this situation the 796 following processing rules MUST be followed. 798 o When adding a BCB to a bundle, if some (or all) of the security 799 targets of the BCB also match all of the security targets of an 800 existing BIB, then the existing BIB MUST also be encrypted. This 801 can be accomplished by either adding a new BCB that targets the 802 existing BIB, or by adding the BIB to the list of security targets 803 for the BCB. Deciding which way to represent this situation is a 804 matter of security policy. 806 o When adding a BCB to a bundle, if some (or all) of the security 807 targets of the BCB match some (but not all) of the security 808 targets of a BIB then that BIB MUST be altered in the following 809 way. Any security results in the BIB associated with the BCB 810 security targets MUST be removed from the BIB and placed in a new 811 BIB. This newly created BIB MUST then be encrypted. The 812 encryption of the new BIB can be accomplished by either adding a 813 new BCB that targets the new BIB, or by adding the new BIB to the 814 list of security targets for the BCB. Deciding which way to 815 represent this situation is a matter of security policy. 817 o A BIB MUST NOT be added for a security target that is already the 818 security target of a BCB. In this instance, the BCB is already 819 providing authentication and integrity of the security target and 820 the BIB would be redundant, insecure, and cause ambiguity in block 821 processing order. 823 o A BIB integrity value MUST NOT be evaluated if the BIB is the 824 security target of an existing BCB. In this case, the BIB data is 825 encrypted. 827 o A BIB integrity value MUST NOT be evaluated if the security target 828 of the BIB is also the security target of a BCB. In such a case, 829 the security target data contains cipher-text as it has been 830 encrypted. 832 o As mentioned in Section 3.7, a BIB MUST NOT have a BCB as its 833 security target. 835 These restrictions on block interactions impose a necessary ordering 836 when applying security operations within a bundle. Specifically, for 837 a given security target, BIBs MUST be added before BCBs. This 838 ordering MUST be preserved in cases where the current BPA is adding 839 all of the security blocks for the bundle or whether the BPA is a 840 waypoint adding new security blocks to a bundle that already contains 841 security blocks. 843 Since any cipher suite used with a BCB MUST be an AEAD cipher suite, 844 it is inefficient and insecure for a single security source to add 845 both a BIB and a BCB for the same security target. In cases where a 846 security source wishes to calculate both a plain-text integrity 847 mechanism and encrypt a security target, a BCB with a security 848 context that generates such signatures as additional security results 849 MUST be used instead. 851 3.10. Parameter and Result Identification 853 Each security context MUST define its own context parameters and 854 results. Each defined parameter and result is represented as the 855 tuple of an identifier and a value. Identifiers are always 856 represented as a CBOR unsigned integer. The CBOR encoding of values 857 is as defined by the security context specification. 859 Identifiers MUST be unique for a given security context but do not 860 need to be unique amongst all security contexts. 862 3.11. BSP Block Examples 864 This section provides two examples of BPSec blocks applied to a 865 bundle. In the first example, a single node adds several security 866 operations to a bundle. In the second example, a waypoint node 867 received the bundle created in the first example and adds additional 868 security operations. In both examples, the first column represents 869 blocks within a bundle and the second column represents the Block 870 Number for the block, using the terminology B1...Bn for the purpose 871 of illustration. 873 3.11.1. Example 1: Constructing a Bundle with Security 875 In this example a bundle has four non-security-related blocks: the 876 primary block (B1), two extension blocks (B4,B5), and a payload block 877 (B6). The bundle source wishes to provide an integrity signature of 878 the plain-text associated with the primary block, the second 879 extension block, and the payload. The bundle source also wishes to 880 provide confidentiality for the first extension block. The resultant 881 bundle is illustrated in Figure 3 and the security actions are 882 described below. 884 Figure 3: Security at Bundle Creation 886 The following security actions were applied to this bundle at its 887 time of creation. 889 o An integrity signature applied to the canonicalized primary block 890 (B1), the second extension block (B5) and the payload block (B6). 891 This is accomplished by a single BIB (B2) with multiple targets. 892 A single BIB is used in this case because all three targets share 893 a security source, security context, and security context 894 parameters. Had this not been the case, multiple BIBs could have 895 been added instead. 897 o Confidentiality for the first extension block (B4). This is 898 accomplished by a BCB (B3). Once applied, the contents of 899 extension block B4 are encrypted. The BCB MUST hold an 900 authentication signature for the cipher-text either in the cipher- 901 text that now populates the first extension block or as a security 902 result in the BCB itself, depending on which security context is 903 used to form the BCB. A plain-text integrity signature may also 904 exist as a security result in the BCB if one is provided by the 905 selected confidentiality security context. 907 3.11.2. Example 2: Adding More Security At A New Node 909 Consider that the bundle as it is illustrated in Figure 3 is now 910 received by a waypoint node that wishes to encrypt the second 911 extension block and the bundle payload. The waypoint security policy 912 is to allow existing BIBs for these blocks to persist, as they may be 913 required as part of the security policy at the bundle destination. 915 The resultant bundle is illustrated in Figure 4 and the security 916 actions are described below. Note that block IDs provided here are 917 ordered solely for the purpose of this example and not meant to 918 impose an ordering for block creation. The ordering of blocks added 919 to a bundle MUST always be in compliance with [I-D.ietf-dtn-bpbis]. 921 Figure 4: Security At Bundle Forwarding 923 The following security actions were applied to this bundle prior to 924 its forwarding from the waypoint node. 926 o Since the waypoint node wishes to encrypt blocks B5 and B6, it 927 MUST also encrypt the BIBs providing plain-text integrity over 928 those blocks. However, BIB B2 could not be encrypted in its 929 entirety because it also held a signature for the primary block 930 (B1). Therefore, a new BIB (B7) is created and security results 931 associated with B5 and B6 are moved out of BIB B2 and into BIB B7. 933 o Now that there is no longer confusion of which plain-text 934 integrity signatures must be encrypted, a BCB is added to the 935 bundle with the security targets being the second extension block 936 (B5) and the payload (B6) as well as the newly created BIB holding 937 their plain-text integrity signatures (B7). A single new BCB is 938 used in this case because all three targets share a security 939 source, security context, and security context parameters. Had 940 this not been the case, multiple BCBs could have been added 941 instead. 943 4. Canonical Forms 945 Security services require consistency and determinism in how 946 information is presented to cipher suites at the security source and 947 at a receiving node. For example, integrity services require that 948 the same target information (e.g., the same bits in the same order) 949 is provided to the cipher suite when generating an original signature 950 and when generating a comparison signature. Canonicalization 951 algorithms are used to construct a stable, end-to-end bit 952 representation of a target block. 954 Canonical forms are not transmitted, they are used to generate input 955 to a cipher suite for security processing at a security-aware node. 957 The canonicalization of the primary block is as specified in 958 [I-D.ietf-dtn-bpbis]. 960 All non-primary blocks share the same block structure and are 961 canonicalized as specified in [I-D.ietf-dtn-bpbis] with the following 962 exceptions. 964 o If the service being applied is a confidentiality service, then 965 the Block Type Code, Block Number, Block Processing Control Flags, 966 CRC Type and CRC Field (if present), and Block Data Length fields 967 MUST NOT be included in the canonicalization. Confidentiality 968 services are used solely to convert the Block Type Specific Data 969 Fields from plain-text to cipher-text. 971 o Reserved flags MUST NOT be included in any canonicalization as it 972 is not known if those flags will change in transit. 974 These canonicalization algorithms assume that Endpoint IDs do not 975 change from the time at which a security source adds a security block 976 to a bundle and the time at which a node processes that security 977 block. 979 Cipher suites and security contexts MAY define their own 980 canonicalization algorithms and require the use of those algorithms 981 over the ones provided in this specification. In the event of 982 conflicting canonicalization algorithms, those algorithms take 983 precedence over this specification. 985 5. Security Processing 987 This section describes the security aspects of bundle processing. 989 5.1. Bundles Received from Other Nodes 991 Security blocks must be processed in a specific order when received 992 by a security-aware node. The processing order is as follows. 994 o When BIBs and BCBs share a security target, BCBs MUST be evaluated 995 first and BIBs second. 997 5.1.1. Receiving BCBs 999 If a received bundle contains a BCB, the receiving node MUST 1000 determine whether it is the security acceptor for any of the security 1001 operations in the BCB. If so, the node MUST process those operations 1002 and remove any operation-specific information from the BCB prior to 1003 delivering data to an application at the node or forwarding the 1004 bundle. If processing a security operation fails, the target SHALL 1005 be processed according to the security policy. A bundle status 1006 report indicating the failure MAY be generated. When all security 1007 operations for a BCB have been removed from the BCB, the BCB MUST be 1008 removed from the bundle. 1010 If the receiving node is the destination of the bundle, the node MUST 1011 decrypt any BCBs remaining in the bundle. If the receiving node is 1012 not the destination of the bundle, the node MUST process the BCB if 1013 directed to do so as a matter of security policy. 1015 If the security policy of a security-aware node specifies that a 1016 bundle should have applied confidentiality to a specific security 1017 target and no such BCB is present in the bundle, then the node MUST 1018 process this security target in accordance with the security policy. 1019 This may involve removing the security target from the bundle. If 1020 the removed security target is the payload block, the bundle MUST be 1021 discarded. 1023 If an encrypted payload block cannot be decrypted (i.e., the cipher- 1024 text cannot be authenticated), then the bundle MUST be discarded and 1025 processed no further. If an encrypted security target other than the 1026 payload block cannot be decrypted then the associated security target 1027 and all security blocks associated with that target MUST be discarded 1028 and processed no further. In both cases, requested status reports 1029 (see [I-D.ietf-dtn-bpbis]) MAY be generated to reflect bundle or 1030 block deletion. 1032 When a BCB is decrypted, the recovered plain-text MUST replace the 1033 cipher-text in the security target Block Type Specific Data Fields. 1034 If the Block Data Length field was modified at the time of encryption 1035 it MUST be updated to reflect the decrypted block length. 1037 If a BCB contains multiple security operations, each operation 1038 processed by the node MUST be be treated as if the security operation 1039 has been represented by a single BCB with a single security operation 1040 for the purposes of report generation and policy processing. 1042 5.1.2. Receiving BIBs 1044 If a received bundle contains a BIB, the receiving node MUST 1045 determine whether it is the security acceptor for any of the security 1046 operations in the BIB. If so, the node MUST process those operations 1047 and remove any operation-specific information from the BIB prior to 1048 delivering data to an application at the node or forwarding the 1049 bundle. If processing a security operation fails, the target SHALL 1050 be processed according to the security policy. A bundle status 1051 report indicating the failure MAY be generated. When all security 1052 operations for a BIB have been removed from the BIB, the BIB MUST be 1053 removed from the bundle. 1055 A BIB MUST NOT be processed if the security target of the BIB is also 1056 the security target of a BCB in the bundle. Given the order of 1057 operations mandated by this specification, when both a BIB and a BCB 1058 share a security target, it means that the security target must have 1059 been encrypted after it was integrity signed and, therefore, the BIB 1060 cannot be verified until the security target has been decrypted by 1061 processing the BCB. 1063 If the security policy of a security-aware node specifies that a 1064 bundle should have applied integrity to a specific security target 1065 and no such BIB is present in the bundle, then the node MUST process 1066 this security target in accordance with the security policy. This 1067 may involve removing the security target from the bundle. If the 1068 removed security target is the payload or primary block, the bundle 1069 MAY be discarded. This action can occur at any node that has the 1070 ability to verify an integrity signature, not just the bundle 1071 destination. 1073 If a receiving node is not the security acceptor of a security 1074 operation in a BIB it MAY attempt to verify the security operation 1075 anyway to prevent forwarding corrupt data. If the verification 1076 fails, the node SHALL process the security target in accordance to 1077 local security policy. It is RECOMMENDED that if a payload integrity 1078 check fails at a waypoint that it is processed in the same way as if 1079 the check fails at the bundle destination. If the check passes, the 1080 node MUST NOT remove the security operation from the BIB prior to 1081 forwarding. 1083 If a BIB contains multiple security operations, each operation 1084 processed by the node MUST be be treated as if the security operation 1085 has been represented by a single BIB with a single security operation 1086 for the purposes of report generation and policy processing. 1088 5.2. Bundle Fragmentation and Reassembly 1090 If it is necessary for a node to fragment a bundle payload, and 1091 security services have been applied to that bundle, the fragmentation 1092 rules described in [I-D.ietf-dtn-bpbis] MUST be followed. As defined 1093 there and summarized here for completeness, only the payload block 1094 can be fragmented; security blocks, like all extension blocks, can 1095 never be fragmented. 1097 Due to the complexity of payload block fragmentation, including the 1098 possibility of fragmenting payload block fragments, integrity and 1099 confidentiality operations are not to be applied to a bundle 1100 representing a fragment. Specifically, a BCB or BIB MUST NOT be 1101 added to a bundle if the "Bundle is a Fragment" flag is set in the 1102 Bundle Processing Control Flags field. 1104 Security processing in the presence of payload block fragmentation 1105 may be handled by other mechanisms outside of the BPSec protocol or 1106 by applying BPSec blocks in coordination with an encapsulation 1107 mechanism. 1109 6. Key Management 1111 There exist a myriad of ways to establish, communicate, and otherwise 1112 manage key information in a DTN. Certain DTN deployments might 1113 follow established protocols for key management whereas other DTN 1114 deployments might require new and novel approaches. BPSec assumes 1115 that key management is handled as a separate part of network 1116 management and this specification neither defines nor requires a 1117 specific key management strategy. 1119 7. Security Policy Considerations 1121 When implementing BPSec, several policy decisions must be considered. 1122 This section describes key policies that affect the generation, 1123 forwarding, and receipt of bundles that are secured using this 1124 specification. No single set of policy decisions is envisioned to 1125 work for all secure DTN deployments. 1127 o If a bundle is received that contains more than one security 1128 operation, in violation of BPSec, then the BPA must determine how 1129 to handle this bundle. The bundle may be discarded, the block 1130 affected by the security operation may be discarded, or one 1131 security operation may be favored over another. 1133 o BPAs in the network must understand what security operations they 1134 should apply to bundles. This decision may be based on the source 1135 of the bundle, the destination of the bundle, or some other 1136 information related to the bundle. 1138 o If a waypoint has been configured to add a security operation to a 1139 bundle, and the received bundle already has the security operation 1140 applied, then the receiver must understand what to do. The 1141 receiver may discard the bundle, discard the security target and 1142 associated BPSec blocks, replace the security operation, or some 1143 other action. 1145 o It is recommended that security operations only be applied to the 1146 blocks that absolutely need them. If a BPA were to apply security 1147 operations such as integrity or confidentiality to every block in 1148 the bundle, regardless of need, there could be downstream errors 1149 processing blocks whose contents must be inspected or changed at 1150 every hop along the path. 1152 o It is recommended that BCBs be allowed to alter the size of 1153 extension blocks and the payload block. However, care must be 1154 taken to ensure that changing the size of the payload block while 1155 the bundle is in transit do not negatively affect bundle 1156 processing (e.g., calculating storage needs, scheduling 1157 transmission times, caching block byte offsets). 1159 o Adding a BIB to a security target that has already been encrypted 1160 by a BCB is not allowed. If this condition is likely to be 1161 encountered, there are (at least) three possible policies that 1162 could handle this situation. 1164 1. At the time of encryption, a plain-text integrity signature 1165 may be generated and added to the BCB for the security target 1166 as additional information in the security result field. 1168 2. The encrypted block may be replicated as a new block and 1169 integrity signed. 1171 3. An encapsulation scheme may be applied to encapsulate the 1172 security target (or the entire bundle) such that the 1173 encapsulating structure is, itself, no longer the security 1174 target of a BCB and may therefore be the security target of a 1175 BIB. 1177 o It is recommended that security policy address whether cipher 1178 suites whose cipher-text is larger (or smaller) than the initial 1179 plain-text are permitted and, if so, for what types of blocks. 1180 Changing the size of a block may cause processing difficulties for 1181 networks that calculate block offsets into bundles or predict 1182 transmission times or storage availability as a function of bundle 1183 size. In other cases, changing the size of a payload as part of 1184 encryption has no significant impact. 1186 8. Security Considerations 1188 Given the nature of DTN applications, it is expected that bundles may 1189 traverse a variety of environments and devices which each pose unique 1190 security risks and requirements on the implementation of security 1191 within BPSec. For these reasons, it is important to introduce key 1192 threat models and describe the roles and responsibilities of the 1193 BPSec protocol in protecting the confidentiality and integrity of the 1194 data against those threats. This section provides additional 1195 discussion on security threats that BPSec will face and describes how 1196 BPSec security mechanisms operate to mitigate these threats. 1198 The threat model described here is assumed to have a set of 1199 capabilities identical to those described by the Internet Threat 1200 Model in [RFC3552], but the BPSec threat model is scoped to 1201 illustrate threats specific to BPSec operating within DTN 1202 environments and therefore focuses on man-in-the-middle (MITM) 1203 attackers. In doing so, it is assumed that the DTN (or significant 1204 portions of the DTN) are completely under the control of an attacker. 1206 8.1. Attacker Capabilities and Objectives 1208 BPSec was designed to protect against MITM threats which may have 1209 access to a bundle during transit from its source, Alice, to its 1210 destination, Bob. A MITM node, Mallory, is a non-cooperative node 1211 operating on the DTN between Alice and Bob that has the ability to 1212 receive bundles, examine bundles, modify bundles, forward bundles, 1213 and generate bundles at will in order to compromise the 1214 confidentiality or integrity of data within the DTN. For the 1215 purposes of this section, any MITM node is assumed to effectively be 1216 security-aware even if it does not implement the BPSec protocol. 1217 There are three classes of MITM nodes which are differentiated based 1218 on their access to cryptographic material: 1220 o Unprivileged Node: Mallory has not been provisioned within the 1221 secure environment and only has access to cryptographic material 1222 which has been publicly-shared. 1224 o Legitimate Node: Mallory is within the secure environment and 1225 therefore has access to cryptographic material which has been 1226 provisioned to Mallory (i.e., K_M) as well as material which has 1227 been publicly-shared. 1229 o Privileged Node: Mallory is a privileged node within the secure 1230 environment and therefore has access to cryptographic material 1231 which has been provisioned to Mallory, Alice and/or Bob (i.e. 1232 K_M, K_A, and/or K_B) as well as material which has been publicly- 1233 shared. 1235 If Mallory is operating as a privileged node, this is tantamount to 1236 compromise; BPSec does not provide mechanisms to detect or remove 1237 Mallory from the DTN or BPSec secure environment. It is up to the 1238 BPSec implementer or the underlying cryptographic mechanisms to 1239 provide appropriate capabilities if they are needed. It should also 1240 be noted that if the implementation of BPSec uses a single set of 1241 shared cryptographic material for all nodes, a legitimate node is 1242 equivalent to a privileged node because K_M == K_A == K_B. 1244 A special case of the legitimate node is when Mallory is either Alice 1245 or Bob (i.e., K_M == K_A or K_M == K_B). In this case, Mallory is 1246 able to impersonate traffic as either Alice or Bob, which means that 1247 traffic to and from that node can be decrypted and encrypted, 1248 respectively. Additionally, messages may be signed as originating 1249 from one of the endpoints. 1251 8.2. Attacker Behaviors and BPSec Mitigations 1253 8.2.1. Eavesdropping Attacks 1255 Once Mallory has received a bundle, she is able to examine the 1256 contents of that bundle and attempt to recover any protected data or 1257 cryptographic keying material from the blocks contained within. The 1258 protection mechanism that BPSec provides against this action is the 1259 BCB, which encrypts the contents of its security target, providing 1260 confidentiality of the data. Of course, it should be assumed that 1261 Mallory is able to attempt offline recovery of encrypted data, so the 1262 cryptographic mechanisms selected to protect the data should provide 1263 a suitable level of protection. 1265 When evaluating the risk of eavesdropping attacks, it is important to 1266 consider the lifetime of bundles on a DTN. Depending on the network, 1267 bundles may persist for days or even years. Long-lived bundles imply 1268 that the data exists in the network for a longer period of time and, 1269 thus, there may be more opportunities to capture those bundles. 1270 Additionally, bundles that are long-lived imply that the information 1271 stored within them may remain relevant and sensitive for long enough 1272 that, once captured, there is sufficient time to crack encryption 1273 associated with the bundle. If a bundle does persist on the network 1274 for years and the cipher suite used for a BCB provides inadequate 1275 protection, Mallory may be able to recover the protected data either 1276 before that bundle reaches its intended destination or before the 1277 information in the bundle is no longer considered sensitive. 1279 8.2.2. Modification Attacks 1281 As a node participating in the DTN between Alice and Bob, Mallory 1282 will also be able to modify the received bundle, including non-BPSec 1283 data such as the primary block, payload blocks, or block processing 1284 control flags as defined in [I-D.ietf-dtn-bpbis]. Mallory will be 1285 able to undertake activities which include modification of data 1286 within the blocks, replacement of blocks, addition of blocks, or 1287 removal of blocks. Within BPSec, both the BIB and BCB provide 1288 integrity protection mechanisms to detect or prevent data 1289 manipulation attempts by Mallory. 1291 The BIB provides that protection to another block which is its 1292 security target. The cryptographic mechanisms used to generate the 1293 BIB should be strong against collision attacks and Mallory should not 1294 have access to the cryptographic material used by the originating 1295 node to generate the BIB (e.g., K_A). If both of these conditions 1296 are true, Mallory will be unable to modify the security target or the 1297 BIB and lead Bob to validate the security target as originating from 1298 Alice. 1300 Since BPSec security operations are implemented by placing blocks in 1301 a bundle, there is no in-band mechanism for detecting or correcting 1302 certain cases where Mallory removes blocks from a bundle. If Mallory 1303 removes a BCB, but keeps the security target, the security target 1304 remains encrypted and there is a possibility that there may no longer 1305 be sufficient information to decrypt the block at its destination. 1306 If Mallory removes both a BCB (or BIB) and its security target there 1307 is no evidence left in the bundle of the security operation. 1308 Similarly, if Mallory removes the BIB but not the security target 1309 there is no evidence left in the bundle of the security operation. 1310 In each of these cases, the implementation of BPSec must be combined 1311 with policy configuration at endpoints in the network which describe 1312 the expected and required security operations that must be applied on 1313 transmission and are expected to be present on receipt. This or 1314 other similar out-of-band information is required to correct for 1315 removal of security information in the bundle. 1317 A limitation of the BIB may exist within the implementation of BIB 1318 validation at the destination node. If Mallory is a legitimate node 1319 within the DTN, the BIB generated by Alice with K_A can be replaced 1320 with a new BIB generated with K_M and forwarded to Bob. If Bob is 1321 only validating that the BIB was generated by a legitimate user, Bob 1322 will acknowledge the message as originating from Mallory instead of 1323 Alice. In order to provide verifiable integrity checks, both a BIB 1324 and BCB should be used and the BCB should require an IND-CCA2 1325 encryption scheme. Such an encryption scheme will guard against 1326 signature substitution attempts by Mallory. In this case, Alice 1327 creates a BIB with the protected data block as the security target 1328 and then creates a BCB with both the BIB and protected data block as 1329 its security targets. 1331 8.2.3. Topology Attacks 1333 If Mallory is in a MITM position within the DTN, she is able to 1334 influence how any bundles that come to her may pass through the 1335 network. Upon receiving and processing a bundle that must be routed 1336 elsewhere in the network, Mallory has three options as to how to 1337 proceed: not forward the bundle, forward the bundle as intended, or 1338 forward the bundle to one or more specific nodes within the network. 1340 Attacks that involve re-routing the packets throughout the network 1341 are essentially a special case of the modification attacks described 1342 in this section where the attacker is modifying fields within the 1343 primary block of the bundle. Given that BPSec cannot encrypt the 1344 contents of the primary block, alternate methods must be used to 1345 prevent this situation. These methods may include requiring BIBs for 1346 primary blocks, using encapsulation, or otherwise strategically 1347 manipulating primary block data. The specifics of any such 1348 mitigation technique are specific to the implementation of the 1349 deploying network and outside of the scope of this document. 1351 Furthermore, routing rules and policies may be useful in enforcing 1352 particular traffic flows to prevent topology attacks. While these 1353 rules and policies may utilize some features provided by BPSec, their 1354 definition is beyond the scope of this specification. 1356 8.2.4. Message Injection 1358 Mallory is also able to generate new bundles and transmit them into 1359 the DTN at will. These bundles may either be copies or slight 1360 modifications of previously-observed bundles (i.e., a replay attack) 1361 or entirely new bundles generated based on the Bundle Protocol, 1362 BPSec, or other bundle-related protocols. With these attacks 1363 Mallory's objectives may vary, but may be targeting either the bundle 1364 protocol or application-layer protocols conveyed by the bundle 1365 protocol. 1367 BPSec relies on cipher suite capabilities to prevent replay or forged 1368 message attacks. A BCB used with appropriate cryptographic 1369 mechanisms (e.g., a counter-based cipher mode) may provide replay 1370 protection under certain circumstances. Alternatively, application 1371 data itself may be augmented to include mechanisms to assert data 1372 uniqueness and then protected with a BIB, a BCB, or both along with 1373 other block data. In such a case, the receiving node would be able 1374 to validate the uniqueness of the data. 1376 9. Security Context Considerations 1378 9.1. Identification and Configuration 1380 Security blocks must uniquely define the security context for their 1381 services. This context MUST be uniquely identifiable and MAY use 1382 parameters for customization. Where policy and configuration 1383 decisions can be captured as parameters, the security context 1384 identifier may identify a cipher suite. In cases where the same 1385 cipher suites are used with differing predetermined configurations 1386 and policies, users can define multiple security contexts that use 1387 the same cipher suite. 1389 Network operators must determine the number, type, and configuration 1390 of security contexts in a system. Networks with rapidly changing 1391 configurations may define relatively few security contexts with each 1392 context customized with multiple parameters. For networks with more 1393 stability, or an increased need for confidentiality, a larger number 1394 of contexts can be defined with each context supporting few, if any, 1395 parameters. 1397 Security Context Examples 1399 +---------+------------+--------------------------------------------+ 1400 | Context | Parameters | Definition | 1401 | Id | | | 1402 +---------+------------+--------------------------------------------+ 1403 | 1 | Key, IV | AES-GCM-256 cipher suite with provided | 1404 | | | ephemeral key and | 1405 | | | initialization vector. | 1406 | 2 | IV | AES-GCM-256 cipher suite with | 1407 | | | predetermined key and predetermined | 1408 | | | key rotation policy. | 1409 | 3 | Nil | AES-GCM-256 cipher suite with all info | 1410 | | | predetermined. | 1411 +---------+------------+--------------------------------------------+ 1413 Table 1 1415 9.2. Authorship 1417 Developers or implementers should consider the diverse performance 1418 and conditions of networks on which the Bundle Protocol (and 1419 therefore BPSec) will operate. Specifically, the delay and capacity 1420 of delay-tolerant networks can vary substantially. Developers should 1421 consider these conditions to better describe the conditions when 1422 those contexts will operate or exhibit vulnerability, and selection 1423 of these contexts for implementation should be made with 1424 consideration for this reality. There are key differences that may 1425 limit the opportunity for a security context to leverage existing 1426 cipher suites and technologies that have been developed for use in 1427 traditional, more reliable networks: 1429 o Data Lifetime: Depending on the application environment, bundles 1430 may persist on the network for extended periods of time, perhaps 1431 even years. Cryptographic algorithms should be selected to ensure 1432 protection of data against attacks for a length of time reasonable 1433 for the application. 1435 o One-Way Traffic: Depending on the application environment, it is 1436 possible that only a one-way connection may exist between two 1437 endpoints, or if a two-way connection does exist, the round- trip 1438 time may be extremely large. This may limit the utility of 1439 session key generation mechanisms, such as Diffie-Hellman, as a 1440 two-way handshake may not be feasible or reliable. 1442 o Opportunistic Access: Depending on the application environment, a 1443 given endpoint may not be guaranteed to be accessible within a 1444 certain amount of time. This may make asymmetric cryptographic 1445 architectures which rely on a key distribution center or other 1446 trust center impractical under certain conditions. 1448 When developing new security contexts for use with BPSec, the 1449 following information SHOULD be considered for inclusion in these 1450 specifications. 1452 o Security Context Parameters. Security contexts MUST define their 1453 parameter Ids, the data types of those parameters, and their CBOR 1454 encoding. 1456 o Security Results. Security contexts MUST define their security 1457 result Ids, the data types of those results, and their CBOR 1458 encoding. 1460 o New Canonicalizations. Security contexts may define new 1461 canonicalization algorithms as necessary. 1463 o Cipher-Text Size. Security contexts MUST state whether their 1464 associated cipher suites generate cipher-text (to include any 1465 authentication information) that is of a different size than the 1466 input plain-text. 1468 If a security context does not wish to alter the size of the 1469 plain-text, it should consider defining the following policy. 1471 * Place overflow bytes, authentication signatures, and any 1472 additional authenticated data in security result fields rather 1473 than in the cipher-text itself. 1475 * Pad the cipher-text in cases where the cipher-text is smaller 1476 than the plain-text. 1478 10. Defining Other Security Blocks 1480 Other security blocks (OSBs) may be defined and used in addition to 1481 the security blocks identified in this specification. Both the usage 1482 of BIB, BCB, and any future OSBs can co-exist within a bundle and can 1483 be considered in conformance with BPSec if each of the following 1484 requirements are met by any future identified security blocks. 1486 o Other security blocks (OSBs) MUST NOT reuse any enumerations 1487 identified in this specification, to include the block type codes 1488 for BIB and BCB. 1490 o An OSB definition MUST state whether it can be the target of a BIB 1491 or a BCB. The definition MUST also state whether the OSB can 1492 target a BIB or a BCB. 1494 o An OSB definition MUST provide a deterministic processing order in 1495 the event that a bundle is received containing BIBs, BCBs, and 1496 OSBs. This processing order MUST NOT alter the BIB and BCB 1497 processing orders identified in this specification. 1499 o An OSB definition MUST provide a canonicalization algorithm if the 1500 default non-primary-block canonicalization algorithm cannot be 1501 used to generate a deterministic input for a cipher suite. This 1502 requirement can be waived if the OSB is defined so as to never be 1503 the security target of a BIB or a BCB. 1505 o An OSB definition MUST NOT require any behavior of a BPSEC-BPA 1506 that is in conflict with the behavior identified in this 1507 specification. In particular, the security processing 1508 requirements imposed by this specification must be consistent 1509 across all BPSEC-BPAs in a network. 1511 o The behavior of an OSB when dealing with fragmentation must be 1512 specified and MUST NOT lead to ambiguous processing states. In 1513 particular, an OSB definition should address how to receive and 1514 process an OSB in a bundle fragment that may or may not also 1515 contain its security target. An OSB definition should also 1516 address whether an OSB may be added to a bundle marked as a 1517 fragment. 1519 Additionally, policy considerations for the management, monitoring, 1520 and configuration associated with blocks SHOULD be included in any 1521 OSB definition. 1523 NOTE: The burden of showing compliance with processing rules is 1524 placed upon the standards defining new security blocks and the 1525 identification of such blocks shall not, alone, require maintenance 1526 of this specification. 1528 11. IANA Considerations 1530 This specification includes fields requiring registries managed by 1531 IANA. 1533 11.1. Bundle Block Types 1535 This specification allocates two block types from the existing 1536 "Bundle Block Types" registry defined in [I-D.ietf-dtn-bpbis]. 1538 Additional Entries for the Bundle Block-Type Codes Registry: 1540 +-------+-----------------------------+---------------+ 1541 | Value | Description | Reference | 1542 +-------+-----------------------------+---------------+ 1543 | TBA | Block Integrity Block | This document | 1544 | TBA | Block Confidentiality Block | This document | 1545 +-------+-----------------------------+---------------+ 1547 Table 2 1549 The Bundle Block Types namespace notes whether a block type is meant 1550 for use in BP version 6, BP version 7, or both. The two block types 1551 defined in this specification are meant for use with BP version 7. 1553 11.2. Security Context Identifiers 1555 BPSec has a Security Context Identifier field for which IANA is 1556 requested to create and maintain a new registry named "BPSec Security 1557 Context Identifiers". Initial values for this registry are given 1558 below. 1560 The registration policy for this registry is: Specification Required. 1562 The value range is: unsigned 16-bit integer. 1564 BPSec Security Context Identifier Registry 1566 +-------+-------------+---------------+ 1567 | Value | Description | Reference | 1568 +-------+-------------+---------------+ 1569 | 0 | Reserved | This document | 1570 +-------+-------------+---------------+ 1572 Table 3 1574 12. References 1576 12.1. Normative References 1578 [I-D.ietf-dtn-bpbis] 1579 Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol 1580 Version 7", draft-ietf-dtn-bpbis-18 (work in progress), 1581 January 2020. 1583 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1584 Requirement Levels", BCP 14, RFC 2119, 1585 DOI 10.17487/RFC2119, March 1997, 1586 . 1588 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1589 Text on Security Considerations", BCP 72, RFC 3552, 1590 DOI 10.17487/RFC3552, July 2003, 1591 . 1593 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 1594 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 1595 October 2013, . 1597 12.2. Informative References 1599 [I-D.birrane-dtn-sbsp] 1600 Birrane, E., Pierce-Mayer, J., and D. Iannicca, 1601 "Streamlined Bundle Security Protocol Specification", 1602 draft-birrane-dtn-sbsp-01 (work in progress), October 1603 2015. 1605 [I-D.ietf-dtn-bpsec-interop-sc] 1606 Birrane, E., "BPSec Interoperability Security Contexts", 1607 draft-ietf-dtn-bpsec-interop-sc-00 (work in progress), 1608 March 2019. 1610 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1611 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1612 Networking Architecture", RFC 4838, DOI 10.17487/RFC4838, 1613 April 2007, . 1615 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1616 "Bundle Security Protocol Specification", RFC 6257, 1617 DOI 10.17487/RFC6257, May 2011, 1618 . 1620 Appendix A. Acknowledgements 1622 The following participants contributed technical material, use cases, 1623 and useful thoughts on the overall approach to this security 1624 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1625 Alford and Angela Hennessy of the Laboratory for Telecommunications 1626 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1627 University Applied Physics Laboratory. 1629 Authors' Addresses 1631 Edward J. Birrane, III 1632 The Johns Hopkins University Applied 1633 Physics Laboratory 1634 11100 Johns Hopkins Rd. 1635 Laurel, MD 20723 1636 US 1638 Phone: +1 443 778 7423 1639 Email: Edward.Birrane@jhuapl.edu 1641 Kenneth McKeever 1642 The Johns Hopkins University Applied 1643 Physics Laboratory 1644 11100 Johns Hopkins Rd. 1645 Laurel, MD 20723 1646 US 1648 Phone: +1 443 778 2237 1649 Email: Ken.McKeever@jhuapl.edu