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