idnits 2.17.1 draft-ietf-dtn-bpsec-02.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 (July 6, 2016) is 2844 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: A later version (-31) exists of draft-ietf-dtn-bpbis-04 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Delay-Tolerant Networking E. Birrane 3 Internet-Draft K. McKeever 4 Intended status: Experimental JHU/APL 5 Expires: January 7, 2017 July 6, 2016 7 Bundle Protocol Security Specification 8 draft-ietf-dtn-bpsec-02 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 http://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 January 7, 2017. 32 Copyright Notice 34 Copyright (c) 2016 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 (http://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. Motivation . . . . . . . . . . . . . . . . . . . . . . . 3 51 1.2. Supported Security Services . . . . . . . . . . . . . . . 3 52 1.3. Specification Scope . . . . . . . . . . . . . . . . . . . 4 53 1.4. Related Documents . . . . . . . . . . . . . . . . . . . . 5 54 1.5. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 55 2. Key Properties . . . . . . . . . . . . . . . . . . . . . . . 7 56 2.1. Block-Level Granularity . . . . . . . . . . . . . . . . . 7 57 2.2. Multiple Security Sources . . . . . . . . . . . . . . . . 7 58 2.3. Mixed Security Policy . . . . . . . . . . . . . . . . . . 8 59 2.4. User-Selected Ciphersuites . . . . . . . . . . . . . . . 8 60 2.5. Deterministic Processing . . . . . . . . . . . . . . . . 9 61 3. Security Block Definitions . . . . . . . . . . . . . . . . . 9 62 3.1. Block Identification . . . . . . . . . . . . . . . . . . 10 63 3.2. Block Representation . . . . . . . . . . . . . . . . . . 10 64 3.3. Block Integrity Block . . . . . . . . . . . . . . . . . . 13 65 3.4. Block Confidentiality Block . . . . . . . . . . . . . . . 14 66 3.5. Block Interactions . . . . . . . . . . . . . . . . . . . 16 67 3.6. Multi-Target Block Definitions . . . . . . . . . . . . . 17 68 3.7. Parameters and Result Fields . . . . . . . . . . . . . . 17 69 3.8. BSP Block Example . . . . . . . . . . . . . . . . . . . . 18 70 4. Canonical Forms . . . . . . . . . . . . . . . . . . . . . . . 20 71 4.1. Technical Notes . . . . . . . . . . . . . . . . . . . . . 20 72 4.2. Primary Block Canonicalization . . . . . . . . . . . . . 21 73 4.3. Non-Primary-Block Canonicalization . . . . . . . . . . . 22 74 5. Security Processing . . . . . . . . . . . . . . . . . . . . . 22 75 5.1. Bundles Received from Other Nodes . . . . . . . . . . . . 23 76 5.1.1. Receiving BCB Blocks . . . . . . . . . . . . . . . . 23 77 5.1.2. Receiving BIB Blocks . . . . . . . . . . . . . . . . 23 78 5.2. Bundle Fragmentation and Reassembly . . . . . . . . . . . 24 79 6. Key Management . . . . . . . . . . . . . . . . . . . . . . . 25 80 7. Policy Considerations . . . . . . . . . . . . . . . . . . . . 25 81 8. Security Considerations . . . . . . . . . . . . . . . . . . . 26 82 8.1. Attacker Capabilities and Objectives . . . . . . . . . . 27 83 8.2. Attacker Behaviors and BPSec Mitigations . . . . . . . . 28 84 8.2.1. Eavesdropping Attacks . . . . . . . . . . . . . . . . 28 85 8.2.2. Modification Attacks . . . . . . . . . . . . . . . . 28 86 8.2.3. Topology Attacks . . . . . . . . . . . . . . . . . . 29 87 8.2.4. Message Injection . . . . . . . . . . . . . . . . . . 30 88 9. Ciphersuite Authorship Considerations . . . . . . . . . . . . 30 89 10. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 31 90 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 91 11.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 31 92 11.2. Cipher Suite Flags . . . . . . . . . . . . . . . . . . . 31 93 11.3. Parameters and Results . . . . . . . . . . . . . . . . . 32 94 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 95 12.1. Normative References . . . . . . . . . . . . . . . . . . 33 96 12.2. Informative References . . . . . . . . . . . . . . . . . 33 97 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 34 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34 100 1. Introduction 102 This document defines security features for the Bundle Protocol 103 [BPBIS] intended for use in delay-tolerant networks, in order to 104 provide Delay-Tolerant Networking (DTN) security services. 106 1.1. Motivation 108 The Bundle Protocol is used in DTNs that overlay multiple networks, 109 some of which may be challenged by limitations such as intermittent 110 and possibly unpredictable loss of connectivity, long or variable 111 delay, asymmetric data rates, and high error rates. The purpose of 112 the Bundle Protocol is to support interoperability across such 113 stressed networks. 115 The stressed environment of the underlying networks over which the 116 Bundle Protocol operates makes it important for the DTN to be 117 protected from unauthorized use, and this stressed environment poses 118 unique challenges for the mechanisms needed to secure the Bundle 119 Protocol. Furthermore, DTNs may be deployed in environments where a 120 portion of the network might become compromised, posing the usual 121 security challenges related to confidentiality and integrity. 123 1.2. Supported Security Services 125 This specification supports end-to-end integrity and confidentiality 126 services associated with BP bundles. 128 Integrity services ensure data within a bundle are not changed. Data 129 changes may be caused by processing errors, environmental conditions, 130 or intentional manipulation. An integrity service is one that 131 provides sufficient confidence to a data receiver that data has not 132 changed since its value was last asserted. 134 Confidentiality services ensure that the values of some data within a 135 bundle can only be determined by authorized receivers of the data. 136 When a bundle traverses a DTN, many nodes in the network other than 137 the destination node MAY see the contents of a bundle. A 138 confidentiality service allows a destination node to generate data 139 values from otherwise encrypted contents of a bundle. 141 NOTE: Hop-by-hop authentication is NOT a supported security service 142 in this specification, for three reasons. 144 1. The term "hop-by-hop" is ambiguous in a BP overlay, as nodes that 145 are adjacent in the overlay may not be adjacent in physical 146 connectivity. This condition is difficult or impossible to 147 predict in the overlay and therefore makes the concept of hop-by- 148 hop authentication difficult or impossible to enforce at the 149 overlay. 151 2. Networks in which BPSec may be deployed may have a mixture of 152 security-aware and not-security-aware nodes. Hop-by-hop 153 authentication cannot be deployed in a network if adjacent nodes 154 in the network have different security capabilities. 156 3. Hop-by-hop authentication can be viewed as a special case of data 157 integrity. As such, it is possible to develop policy that 158 provides a version of authentication using the integrity 159 mechanisms defined in this specification. 161 1.3. Specification Scope 163 This document describes the Bundle Protocol Security Specification 164 (BPSec), which provides security services for blocks within a bundle. 165 This includes the data specification for individual BP extension 166 blocks and the processing instructions for those blocks. 168 BPSec applies, by definition, only to those nodes that implement it, 169 known as "security-aware" nodes. There MAY be other nodes in the DTN 170 that do not implement BPSec. All nodes can interoperate with the 171 exception that BPSec security operations can only happen at BPSec 172 security-aware nodes. 174 This specification does not address individual cipher suite 175 implementations. The definition and enumeration of cipher suites 176 should be undertaken in separate specification documents. 178 This specification does not address the implementation of security 179 policy and does not provide a security policy for the BPSec. 180 Security policies are typically based on the nature and capabilities 181 of individual networks and network operational concepts. However, 182 this specification does recommend policy considerations when building 183 a security policy. 185 This specification does not address how to combine the BPSec security 186 blocks with other protocols, other BP extension blocks, or other best 187 practices to achieve security in any particular network 188 implementation. 190 1.4. Related Documents 192 This document is best read and understood within the context of the 193 following other DTN documents: 195 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 196 architecture for delay-tolerant networks, but does not discuss 197 security at any length. 199 The DTN Bundle Protocol [BPBIS] defines the format and processing of 200 the blocks used to implement the Bundle Protocol, excluding the 201 security-specific blocks defined here. 203 The Bundle Security Protocol [RFC6257] and Streamlind Bundle Security 204 Protocol [SBSP] introduce the concepts of security blocks for 205 security services. BPSec is based off of these documents. 207 1.5. Terminology 209 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 210 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 211 "OPTIONAL" in this document are to be interpreted as described in 212 [RFC2119]. 214 This section defines those terms whose definition is important to the 215 understanding of concepts within this specification. 217 o Source - the bundle node from which a bundle originates. 219 o Destination - the bundle node to which a bundle is ultimately 220 destined. 222 o Forwarder - the bundle node that forwarded the bundle on its most 223 recent hop. 225 o Intermediate Receiver, Waypoint, or "Next Hop" - the neighboring 226 bundle node to which a forwarder forwards a bundle. 228 o Path - the ordered sequence of nodes through which a bundle passes 229 on its way from source to destination. The path is not 230 necessarily known by the bundle, or any bundle-aware nodes. 232 The application of these terms applied to a sample network topology 233 is shown in Figure 1. This figure shows four bundle nodes (BN1, BN2, 234 BN3, BN4) residing above some transport layer(s). Three distinct 235 transport and network protocols (T1/N1, T2/N2, and T3/N3) are also 236 shown. 238 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 239 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 240 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 241 | T1 v | + ^ T1/T2 v | + ^ T2/T3 v | | ^ T3 | 242 +---------v-+ +-^---------v-+ +-^---------v + +-^---------+ 243 | N1 v | | ^ N1/N2 v | | ^ N2/N3 v | | ^ N3 | 244 +---------v-+ +-^---------v + +-^---------v-+ +-^---------+ 245 | >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ | 246 +-----------+ +------------+ +-------------+ +-----------+ 247 | | | | 248 |<-- An Internet --->| |<--- An Internet --->| 249 | | | | 251 Figure 1: Bundle Nodes Sitting Above the Transport Layer. 253 Consider the case where BN1 originates a bundle that it forwards to 254 BN2. BN2 forwards the bundle to BN3, and BN3 forwards the bundle to 255 BN4. BN1 is the source of the bundle and BN4 is the destination of 256 the bundle. BN1 is the first forwarder, and BN2 is the first 257 intermediate receiver; BN2 then becomes the forwarder, and BN3 the 258 intermediate receiver; BN3 then becomes the last forwarder, and BN4 259 the last intermediate receiver, as well as the destination. 261 If node BN2 originates a bundle (for example, a bundle status report 262 or a custodial signal), which is then forwarded on to BN3, and then 263 to BN4, then BN2 is the source of the bundle (as well as being the 264 first forwarder of the bundle) and BN4 is the destination of the 265 bundle (as well as being the final intermediate receiver). 267 The following security-specific terminology is also defined to 268 clarify security operations in this specifiation. 270 o Security-Service - the security features supported by this 271 specification: integrity and confidentiality. 273 o Security-Source - a bundle node that adds a security block to a 274 bundle. 276 o Security-Target - the block within a bundle that receives a 277 security-service as part of a security-operation. 279 o Security Block - a BPSec extension block in a bundle. 281 o Security-Operation - the application of a security-service to a 282 security-target, notated as OP(security-service, security-target). 283 For example, OP(confidentiality, payload). Every security- 284 operation in a bundle MUST be unique, meaning that a security- 285 service can only be applied to a security-target once in a bundle. 286 A security operation is implemented by a security block. 288 2. Key Properties 290 The application of security services in a DTN is a complex endeavor 291 that must consider physical properties of the network, policies at 292 each node, and various application security requirements. Rather 293 than enumerate all potential security implementations in all 294 potential DTN topologies, this specification defines a set of key 295 properties of a security system. The security primitives outlined in 296 this document MUST enable the realization of these properties in a 297 DTN deploying the Bundle Protocol. 299 2.1. Block-Level Granularity 301 Blocks within a bundle represent different types of information. The 302 primary block contains identification and routing information. The 303 payload block carries application data. Extension blocks carry a 304 variety of data that may augment or annotate the payload, or 305 otherwise provide information necessary for the proper processing of 306 a bundle along a path. Therefore, applying a single level and type 307 of security across an entire bundle fails to recognize that blocks in 308 a bundle may represent different types of information with different 309 security needs. 311 Security services within this specification MUST provide block level 312 granularity where applicable such that different blocks within a 313 bundle may have different security services applied to them. 315 For example, within a bundle, a payload might be encrypted to protect 316 its contents, whereas an extension block containing summary 317 information related to the payload might be integrity signed but 318 otherwise unencrypted to provide certain nodes access to payload- 319 related data without providing access to the payload. 321 Each security block in a bundle will be associated with a specific 322 security-operation. 324 2.2. Multiple Security Sources 326 A bundle MAY have multiple security blocks and these blocks MAY have 327 different security-sources. 329 The Bundle Protocol allows extension blocks to be added to a bundle 330 at any time during its existence in the DTN. When a waypoint node 331 adds a new extension block to a bundle, that extension block may have 332 security services applied to it by that waypoint. Similarly, a 333 waypoint node may add a security service to an existing extension 334 block, consistent with its security policy. For example, a node 335 representing a boundary between a trusted part of the network and an 336 untrusted part of the network may wish to apply payload encryption 337 for bundles leaving the trusted portion of the network. 339 In each case, a node other than the bundle originator may add a 340 security service to the bundle and, as such, the source for the 341 security service will be different than the source of the bundle 342 itself. Security services MUST track their orginating node so as to 343 properly apply policy and key selection associated with processing 344 the security service at the bundle destination. 346 Referring to Figure 1, if the bundle that originates at BN1 is given 347 security blocks by BN1, then BN1 is the security-source for those 348 blocks as well as being the source of the bundle. If the bundle that 349 originates at BN1 is then given a security block by BN2, then BN2 is 350 the security-source for that block even though BN1 remains the bundle 351 source. 353 2.3. Mixed Security Policy 355 Different nodes in a DTN may have different security-related 356 capabilities. Some nodes may not be security-aware and will not 357 understand any security-related extension blocks. Other nodes may 358 have security policies that require evaluation of security services 359 at places other than the bundle destination (such as verifying 360 integrity signatures at certain waypoint nodes). Other nodes may 361 ignore any security processing if they are not the destination of the 362 bundle. The security services described in this specification must 363 allow each of these scenarios. 365 Extension blocks representing security services MUST have their block 366 processing flags set such that the block will be treated 367 appropriately by non-security-aware nodes. 369 Extension blocks providing integrity services within a bundle MUST 370 support options to allow waypoint nodes to evaluate these signatures 371 if such nodes have the proper configuraton to do so. 373 2.4. User-Selected Ciphersuites 375 The security services defined in this specification rely on a variety 376 of cipher suites providing integrity signatures, ciphertext, and 377 other information necessary to populate security blocks. Users may 378 wish to select different cipher suites to implement different 379 security services. For example, some users may wish to use a SHA-256 380 based hash for integrity whereas other users may require a SHA-384 381 hash instead. The security services defined in this specification 382 MUST provide a mechanism for identifying what cipher suite has been 383 used to populate a security block. 385 2.5. Deterministic Processing 387 In all cases, the processing order of security services within a 388 bundle must avoid ambiguity when evaluating security at the bundle 389 destination. This specification MUST provide determinism in the 390 application and evaluation of security services, even when doing so 391 results in a loss of flexibility. 393 3. Security Block Definitions 395 There are two types of security blocks that may be included in a 396 bundle. These are the Block Integrity Block (BIB) and the Block 397 Confidentiality Block (BCB). 399 The BIB is used to ensure the integrity of its security-target(s). 400 The integrity information in the BIB MAY (when possible) be 401 verified by any node in between the BIB security-source and the 402 bundle destination. BIBs MAY be added to, and removed from, 403 bundles as a matter of security policy. 405 The BCB indicates that the security-target(s) has been encrypted, 406 in whole or in part, at the BCB security-source in order to 407 protect its content while in transit. The BCB may be decrypted by 408 appropriate nodes in the network, up to and including the bundle 409 destination, as a matter of security policy. 411 A security-operation MUST NOT be applied more than once in a bundle. 412 For example, the two security-operations: OP(integrity, payload) and 413 OP(integrity, payload) are considered redundant and MUST NOT appear 414 together in a bundle. However, the two security operations 415 OP(integrity, payload) and OP(integrity, extension_block_1) MAY both 416 be present in the bundle. Also, the two security operations 417 OP(integrity, extension_block_1) and OP(integrity, extension_block_2) 418 are unique and may both appear in the same bundle. 420 If the same security-service is to be applied to multiple security- 421 targets, and cipher suite parameters for each security service are 422 identical, then the set of security-operations can be represented as 423 a single security-block with multiple security-targets. In such a 424 case, all security-operations represented in the security-block MUST 425 be applied/evaluated together. 427 3.1. Block Identification 429 This specification requires that every target block of a security 430 operation be uniquely identifiable. The definition of the extension 431 block header from [BPBIS] provides such a mechanism in the "Block 432 Number" field, which provides a unique identifier for a block within 433 a bundle. Within this specification, a security-target will be 434 identified by its unique Block Number. 436 3.2. Block Representation 438 Each security block uses the Canonical Bundle Block Format as defined 439 in [BPBIS]. That is, each security block is comprised of the 440 following elements: 442 o Block Type Code 444 o Block Number 446 o Block Processing Control Flags 448 o CRC Type and CRC Field 450 o Block Data Length 452 o Block Type Specific Data Fields 454 The structure of the BIB and BCB Block Type Specific Data fields are 455 identifcal and illustrated in Figure 2. In this figure, field names 456 prefaced with an '*' are optional and their inclusion in the block is 457 indicated by the Cipher Suite Flags field. 459 +================================================= 460 | Field Name | Field Data Type | 461 +================================================= 462 | # Security Targets | Unsigned Integer | 463 +---------------------+--------------------------+ 464 | Security Targets | Array (Unsigned Integer) | 465 +---------------------+--------------------------+ 466 | Cipher Suite ID | Unsigned Integer | 467 +---------------------+--------------------------+ 468 | Cipher Suite Flags | Unsigned Integer | 469 +---------------------+--------------------------+ 470 | Security Source | URI - OPTIONAL | 471 +---------------------+--------------------------+ 472 | Cipher Parameters | Byte Array - OPTIONAL | 473 +---------------------+--------------------------+ 474 | Security Result | Byte Array | 475 +---------------------+--------------------------+ 477 Figure 2: BIB and BCB Block Structure 479 Where the block fields are identified as follows. 481 o # Security Targets - The number of security targets for this 482 security block. This value MUST be at least 1. 484 o Security-Targets - This array contains the unique identifier of 485 the blocks targetted by this security operation. Each security- 486 target MUST represent a block present in the bundle. A security- 487 target MUST NOT be repeated in this array. 489 o Cipher suite ID - Identifies the cipher suite used to implement 490 the security service represented by this block and applied to each 491 security-target. 493 o Cipher suite flags - Identifies which optional security block 494 fields are present in the block. The structure of the Cipher 495 Suite Flags field is shown in Figure 3. The presence of an 496 optional field is indicated by setting the value of the 497 corresponding flag to one. A value of zero indicates the 498 corresponding optional field is not present. The BPSEC Cipher 499 Suite Flags are defined as follows. 501 Bit Bit Bit Bit Bit Bit Bit Bit 502 7 6 5 4 3 2 1 0 503 +-----------------------------------+-----+-----+ 504 | reserved | src |parm | 505 +-----------------------------------+-----+-----+ 506 MSB LSB 508 Figure 3: Cipher Suite Flags 510 Where: 512 * bits 7-2 are reserved for future use. 514 * src - bit 1 indicates whether the Security Source EID is 515 present in the block. 517 * parm - bit 0 indicates whether or not the Cipher Suite 518 Parameters field is present in the block. 520 o (OPTIONAL) Security Source (URI) - This identifies the EID that 521 inserted the security service in the bundle. If the security 522 source is not present then the souce of the block MAY be taken to 523 be the bundle source, the previous hop, or some other EID as 524 defined by security policy. 526 o (OPTIONAL) Parameters (Byte Array) - Compound field of the 527 following two items. 529 * Length (Unsigned Integer) - specifies the length of the next 530 field, which captures the parameters data. 532 * Data (Byte Array) - A byte array encoding one or more cipher 533 suite parameters, with each parameter represented as a Type- 534 Length-Value (TLV) triplet, defined as follows. 536 + Type (Byte) - The parameter type. 538 + Length (Unsigned Integer) - The length of the parameter. 540 + Value (Byte Array) - The parameter value. 542 See Section 3.7 for a list of parameter types that MUST be 543 supported by BPSEC implementations. BPSEC cipher suite 544 specifications MAY define their own parameters to be 545 represented in this byte array. 547 o Security Result (Byte Array) - Compound field of the next two 548 items. 550 * Length (Unsigned Integer) - specifies the length of the next 551 field, which is the security-result data. 553 * Data (Byte Array) - A byte array encoding a security result for 554 each security-target covered by the security-block, with each 555 entry represented as a TLV and optionally prepended with 556 information on which security-target is referenced by the 557 result, as follows. 559 + Target (Optional Unsigned Integer) - If the security-block 560 has multiple security-targets, the target field is the Block 561 Number of the security-target to which this result field 562 applies. If the security-block only has a single security- 563 target, this field is omitted. 565 + Type (Unsigned Integer)(Byte) - The type of security result 566 field. 568 + Length (Unsigned Integer) - The length of the result field. 570 + Value (Byte Array) - The results of the appropriate cipher 571 suite specific calculation (e.g., a signature, Message 572 Authentication Code (MAC), or cipher-text block key). 574 3.3. Block Integrity Block 576 A BIB is an ASB with the following characteristics: 578 The Block Type Code value MUST be 0x02. 580 The Block Processing Control flags value can be set to whatever 581 values are required by local policy. Cipher suite designers 582 should carefully consider the effect of setting flags that either 583 discard the block or delete the bundle in the event that this 584 block cannot be processed. 586 A security-target for a BIB MUST NOT reference a security-block 587 defined in this specification (e.g., a BIB or a BCB). 589 The cipher suite ID MUST be documented as an end-to-end 590 authentication-cipher suite or as an end-to-end error-detection- 591 cipher suite. 593 An EID-reference to the security-source MAY be present. If this 594 field is not present, then the security-source of the block SHOULD 595 be inferred according to security policy and MAY default to the 596 bundle source. The security-source may also be specified as part 597 of key-information described in Section 3.7. 599 The security-result captures the result of applying the cipher 600 suite calculation (e.g., the MAC or signature) to the relevant 601 parts of the security-target, as specified in the cipher suite 602 definition. This field MUST be present. 604 The cipher suite MAY process less than the entire security-target. 605 If the cipher suite processes less than the complete, original 606 security-target, the cipher suite parameters MUST specify which 607 bytes of the security-target are protected. 609 Notes: 611 o Since OP(integrity, target) is allowed only once in a bundle per 612 target, it is RECOMMENDED that users wishing to support multiple 613 integrity signatures for the same target define a multi-signature 614 cipher suite. 616 o For some cipher suites, (e.g., those using asymmetric keying to 617 produce signatures or those using symmetric keying with a group 618 key), the security information MAY be checked at any hop on the 619 way to the destination that has access to the required keying 620 information, in accordance with Section 3.5. 622 o The use of a generally available key is RECOMMENDED if custodial 623 transfer is employed and all nodes SHOULD verify the bundle before 624 accepting custody. 626 3.4. Block Confidentiality Block 628 A BCB is an ASB with the following characteristics: 630 The Block Type Code value MUST be 0x03. 632 The Block Processing Control flags value can be set to whatever 633 values are required by local policy, except that this block MUST 634 have the "replicate in every fragment" flag set if the target of 635 the BCB is the Payload Block. Having that BCB in each fragment 636 indicates to a receiving node that the payload portion of each 637 fragment represents cipher-text. Cipher suite designers should 638 carefully consider the effect of setting flags that either discard 639 the block or delete the bundle in the event that this block cannot 640 be processed. 642 A security-target for a BCB MAY reference the payload block, a 643 non-security extension block, or a BIB block. A security-target 644 in a BCB MUST NOT be another BCB. 646 The cipher suite ID MUST be documented as a confidentiality cipher 647 suite. 649 Any additional bytes generated as a result of encryption and/or 650 authentication processing of the security-target SHOULD be placed 651 in an "integrity check value" field (see Section 3.7) or other 652 such appropriate area in the security-result of the BCB. 654 An EID-reference to the security-source MAY be present. If this 655 field is not present, then the security-source of the block SHOULD 656 be inferred according to security policy and MAY default to the 657 bundle source. The security-source may also be specified as part 658 of key-information described in Section 3.7. 660 The security-result MUST be present in the BCB. This compound 661 field normally contains fields such as an encrypted bundle 662 encryption key and/or authentication tag. 664 The BCB modifies the contents of its security-target. When a BCB is 665 applied, the security-target body data are encrypted "in-place". 666 Following encryption, the security-target body data contains cipher- 667 text, not plain-text. Other security-target block fields (such as 668 type, processing control flags, and length) remain unmodified. 670 Fragmentation, reassembly, and custody transfer are adversely 671 affected by a change in size of the payload due to ambiguity about 672 what byte range of the block is actually in any particular fragment. 673 Therefore, when the security-target of a BCB is the bundle payload, 674 the BCB MUST NOT alter the size of the payload block body data. 675 Cipher suites SHOULD place any block expansion, such as 676 authentication tags (integrity check values) and any padding 677 generated by a block-mode cipher, into an integrity check value item 678 in the security-result field (see Section 3.7) of the BCB. This "in- 679 place" encryption allows fragmentation, reassembly, and custody 680 transfer to operate without knowledge of whether or not encryption 681 has occurred. 683 Notes: 685 o The cipher suite MAY process less than the entire original 686 security-target body data. If the cipher suite processes less 687 than the complete, original security-target body data, the BCB for 688 that security-target MUST specify, as part of the cipher suite 689 parameters, which bytes of the body data are protected. 691 o The BCB's "discard" flag may be set independently from its 692 security-target's "discard" flag. Whether or not the BCB's 693 "discard" flag is set is an implementation/policy decision for the 694 encrypting node. (The "discard" flag is more properly called the 695 "Discard if block cannot be processed" flag.) 697 o A BCB MAY include information as part of additional authenticated 698 data to address parts of the target block, such as EID references, 699 that are not converted to cipher-text. 701 3.5. Block Interactions 703 The security-block types defined in this specification are designed 704 to be as independent as possible. However, there are some cases 705 where security blocks may share a security-target creating processing 706 dependencies. 708 If confidentiality is being applied to a target that already has 709 integrity applied to it, then an undesirable condition occurs where a 710 security-aware intermediate node would be unable to check the 711 integrity result of a block because the block contents have been 712 encrypted after the integrity signature was generated. To address 713 this concern, the following processing rules MUST be followed. 715 o If confidentiality is to be applied to a target, it MUST also be 716 applied to any integrity operation already defined for that 717 target. This means that if a BCB is added to encrypt a block, 718 another BCB MUST also be added to encrypt a BIB also targeting 719 that block. 721 o An integrity operation MUST NOT be applied to a security-target if 722 a BCB in the bundle shares the same security-target. This 723 prevents ambiguity in the order of evaluation when receiving a BIB 724 and a BCB for a given security-target. 726 o An integrity value MUST NOT be evaluated if the BIB providing the 727 integrity value is the security target of an existing BCB block in 728 the bundle. In such a case, the BIB data contains cipher-text as 729 it has been encrypted. 731 o An integrity value MUST NOT be evaluated if the security-target of 732 the BIB is also the security-target of a BCB in the bundle. In 733 such a case, the security-target data contains cipher-text as it 734 has been encrypted. 736 o As mentioned in Section 3.3, a BIB MUST NOT have a BCB as its 737 security target. BCBs may embed integrity results as part of 738 cipher suite parameters. 740 These restrictions on block interactions impose a necessary ordering 741 when applying security operations within a bundle. Specifically, for 742 a given security-target, BIBs MUST be added before BCBs. This 743 ordering MUST be preserved in cases where the current BPA is adding 744 all of the security blocks for the bundle or whether the BPA is a 745 waypoint adding new security blocks to a bundle that already contains 746 security blocks. 748 3.6. Multi-Target Block Definitions 750 A security-block MAY target multiple security-targets if and only if 751 all cipher suite parameters, security source, and key information are 752 common for each security operation. The following processing 753 directives apply for these multi-target blocks. 755 o If a security-block has more than one security-target, then each 756 type identifier in the security result TLV MUST be interpretted as 757 a tuple with the first entry being the security-target for which 758 the security result applies and the second entry being the type 759 value enumeration of the security result value. 761 o If the security-block has a single security-target, the type field 762 of every entry in the security result array MUST simply be the 763 type field and MUST NOT be a tuple as described above. 765 3.7. Parameters and Result Fields 767 Various cipher suites include several items in the cipher suite 768 parameters and/or security-result fields. Which items MAY appear is 769 defined by the particular cipher suite description. A cipher suite 770 MAY support several instances of the same type within a single block. 772 Each item is represented as a type-length-value. Type is a single 773 byte indicating the item. Length is the count of data bytes to 774 follow, and is an Unsigned Integer. Value is the data content of the 775 item. 777 Item types, name, and descriptions are defined as follows. 779 Cipher suite parameters and result fields. 781 +-------+----------------+-----------------------------+------------+ 782 | Type | Name | Description | Field | 783 +-------+----------------+-----------------------------+------------+ 784 | 0 | Reserved | | | 785 +-------+----------------+-----------------------------+------------+ 786 | 1 | Initialization | A random value, typically | Cipher | 787 | | Vector (IV) | eight to sixteen bytes. | Suite | 788 | | | | Parameters | 789 +-------+----------------+-----------------------------+------------+ 790 | 2 | Reserved | | | 791 +-------+----------------+-----------------------------+------------+ 792 | 3 | Key | Material encoded or | Cipher | 793 | | Information | protected by the key | Suite | 794 | | | management system and used | Parameters | 795 | | | to transport an ephemeral | | 796 | | | key protected by a long- | | 797 | | | term key. | | 798 +-------+----------------+-----------------------------+------------+ 799 | 4 | Content Range | Pair of Unsigned Integers | Cipher | 800 | | | (offset,length) specifying | Suite | 801 | | | the range of payload bytes | Parameters | 802 | | | to which an operation | | 803 | | | applies. The offset MUST be | | 804 | | | the offset within the | | 805 | | | original bundle, even if | | 806 | | | the current bundle is a | | 807 | | | fragment. | | 808 +-------+----------------+-----------------------------+------------+ 809 | 5 | Integrity | Result of BAB or BIB digest | Security | 810 | | Signatures | or other signing operation. | Results | 811 +-------+----------------+-----------------------------+------------+ 812 | 6 | Unassigned | | | 813 +-------+----------------+-----------------------------+------------+ 814 | 7 | Salt | An IV-like value used by | Cipher | 815 | | | certain confidentiality | Suite | 816 | | | suites. | Parameters | 817 +-------+----------------+-----------------------------+------------+ 818 | 8 | BCB Integrity | Output from certain | Security | 819 | | Check Value | confidentiality cipher | Results | 820 | | (ICV) / | suite operations to be used | | 821 | | Authentication | at the destination to | | 822 | | Tag | verify that the protected | | 823 | | | data has not been modified. | | 824 | | | This value MAY contain | | 825 | | | padding if required by the | | 826 | | | cipher suite. | | 827 +-------+----------------+-----------------------------+------------+ 828 | 9-255 | Reserved | | | 829 +-------+----------------+-----------------------------+------------+ 831 Table 1 833 3.8. BSP Block Example 835 An example of BPSec blocks applied to a bundle is illustrated in 836 Figure 4. In this figure the first column represents blocks within a 837 bundle and the second column represents a unique identifier for each 838 block, suitable for use as the security-target of a BPSec security- 839 block. Since the mechanism and format of a security-target is not 840 specified in this document, the terminology B1...Bn is used to 841 identify blocks in the bundle for the purposes of illustration. 843 Block in Bundle ID 844 +===================================+====+ 845 | Primary Block | B1 | 846 +-----------------------------------+----+ 847 | BIB | B2 | 848 | OP(integrity, target=B1) | | 849 +-----------------------------------+----+ 850 | BCB | B3 | 851 | OP(confidentiality, target=B4) | | 852 +-----------------------------------+----+ 853 | Extension Block | B4 | 854 +-----------------------------------+----+ 855 | BIB | B5 | 856 | OP(integrity, target=B6) | | 857 +-----------------------------------+----+ 858 | Extension Block | B6 | 859 +-----------------------------------+----+ 860 | BCB | B7 | 861 | OP(confidentiality,target=B8,B9) | | 862 +-----------------------------------+----+ 863 | BIB (encrypted by B7) | B8 | 864 | OP(integrity, target=B9) | | 865 +-----------------------------------+----| 866 | Payload Block | B9 | 867 +-----------------------------------+----+ 869 Figure 4: Sample Use of BSP Blocks 871 In this example a bundle has four non-security-related blocks: the 872 primary block (B1), three extension blocks (B4,B6), and a payload 873 block (B9). The following security applications are applied to this 874 bundle. 876 o An integrity signature applied to the canonicalized primary block. 877 This is accomplished by a single BIB (B2). 879 o Confidentiality for the first extension block (B4). This is 880 accomplished by a BCB block (B3). 882 o Integrity for the second extension block (B6). This is 883 accomplished by a BIB block (B5). NOTE: If the extension block B6 884 contains a representation of the serialized bundle (such as a hash 885 over all blocks in the bundle at the time of its last 886 transmission) then the BIB block is also providing an 887 authentication service from the prior BPSEC-BPA to this BPSEC-BPA. 889 o An integrity signature on the payload (B10). This is accomplished 890 by a BIB block (B8). 892 o Confidentiality for the payload block and it's integrity 893 signature. This is accomplished by a BCB block, B7, encrypting B8 894 and B9. 896 4. Canonical Forms 898 By definition, an integrity service determines whether any aspect of 899 a block was changed from the moment the security service was applied 900 at the security source until the point of current evaluation. To 901 successfully verify the integrity of a block, the data passed to the 902 verifying cipher suite MUST be the same bits, in the same order, as 903 those passed to the signature-generating cipher suite at the security 904 source. 906 However, [BPBIS] does not specify a single on-the-wire encoding of 907 bundles. In cases where a security source generates a different 908 encoding than that used at a receiving node, care MUST be taken to 909 ensure that the inputs to cipher suites at the receiving node is a 910 bitwise match to inputs provided at the security source. 912 This section provides guidance on how to create a canonical form for 913 each type of block in a bundle. This form MUST be used when 914 generating inputs to cipher suites for use by BPSec blocks. 916 This specification does not define any security operation over the 917 entire bundle and, therefore, provides no canonical form for a 918 serialized bundle. 920 4.1. Technical Notes 922 The following technical considerations hold for all canonicalizations 923 in this section. 925 o Any numeric fields defined as variable-length MUST be expanded to 926 their "unpacked" form. For example, a 32-bit integer value MUST 927 be unpacked to a four-byte representation. 929 o Each block encoding MUST follow the CBOR encodings provided in 930 [BPBISCBOR]. 932 o Canonical forms are not transmitted, they are used to generate 933 input to a cipher suite for secuity processing at a security-aware 934 node. 936 o Reserved flags MUST NOT be included in any canonicalization as it 937 is not known if those flags will chaneg in transit. 939 o These canonicalization algorithms assume that endpoint IDs 940 themselves are immutable and they are unsuitable for use in 941 environments where that assumption might be violated. 943 o Cipher suites MAY define their own canonicalization algorithms and 944 require the use of those algorithms over the ones provided in this 945 specification. In the event of conflicting canonicalization 946 algorithms, cipher suite algorithms take precedence over this 947 specification. 949 4.2. Primary Block Canonicalization 951 The primary block canonical form is the same as the CBOR encoding of 952 the block, with certain modifications to account for allowed block 953 changes as the bundle traverses the DTN. The fields that compromise 954 the primary block, and any special considerations for their 955 representation in a canonical form, are as follows. 957 o The Version field is included, without modification. 959 o The Bundle Processing Flags field is used, with modification. 960 Certain bundle processing flags MAY change as a bundle transits 961 the DTN without indicating an integrity error. These flags, which 962 are identified below, MUST NOT be represented in the canonicalized 963 form of the bundle processing flags and, instead, be represented 964 by the bit 0. 966 * Reserved flags. 968 * Bundle is a Fragment flag. 970 o The CRC Type, Destination EID, Source Node ID, Report-To EID, 971 Creation Timestamp, and Lifetime fields are included, without 972 modification. 974 o The fragment ID field MAY change if the bundle is fragmented in 975 transit and, as such, this field MUST NOT be included in the 976 canonicalization. 978 o The CRC field MAY change at each hop - for example, if a bundle 979 becomes fragmented, each fragment will have a different CRC value 980 from the original signed primary block. As such, this field MUST 981 NOT be included in the canonicalization. 983 4.3. Non-Primary-Block Canonicalization 985 All non-primary blocks (NPBs) in [BPBIS] share the same block 986 structure and should be canonicalized in the same way. 988 Canonicalization for NPBs is dependent on whether the security 989 operation being performed is integrity or confidentiality. Integrity 990 operations consider every field in the block, whereas confidentiality 991 operations only consider the block-type-specific data. Since 992 confidentiality is applied to hide information (replacing plaintext 993 with ciphertext) it provides no benefit to include in the 994 confidentiality calculation information that MUST remain readable, 995 such as block fields other than the block-type-specific data. 997 The fields that comprise a NPB, and any special considerations for 998 their representation in a canonical form, are as follows. 1000 o The Block Type Code field is included, without modification, for 1001 integrity operations and omitted for confidentiality operations. 1003 o The Block Number field is included, without modification, for 1004 integrity operations and omitted for confidentiality operations. 1006 o The Block Processing Control Flags field is included, without 1007 modification, for integrity operations and omitted for 1008 confidentiality operations, with the exception of reserved flags 1009 which are treated as 0 in both cases. 1011 o The CRC type and CRC fields are included, without modification, 1012 for integrity operations and omitted for confidentiality 1013 operations. 1015 o The Block Type Specific Data field is included, without 1016 modification, for both integrity and confidentiality operations, 1017 with the exception that in some cases only a portion of the 1018 payload data is to be processed. In such a case, only those bytes 1019 are included in the canonical form and additional cipher suite 1020 parameters are required to specify which part of the field is 1021 included. 1023 5. Security Processing 1025 This section describes the security aspects of bundle processing. 1027 5.1. Bundles Received from Other Nodes 1029 Security blocks MUST be processed in a specific order when received 1030 by a security-aware node. The processing order is as follows. 1032 o All BCB blocks in the bundle MUST be evaluated prior to evaluating 1033 any BIBs in the bundle. When BIBs and BCBs share a security- 1034 target, BCBs MUST be evaluated first and BIBs second. 1036 5.1.1. Receiving BCB Blocks 1038 If a received bundle contains a BCB, the receiving node MUST 1039 determine whether it has the responsibility of decrypting the BCB 1040 security target and removing the BCB prior to delivering data to an 1041 application at the node or forwarding the bundle. 1043 If the receiving node is the destination of the bundle, the node MUST 1044 decrypt any BCBs remaining in the bundle. If the receiving node is 1045 not the destination of the bundle, the node MAY decrypt the BCB if 1046 directed to do so as a matter of security policy. 1048 If the relevant parts of an encrypted payload block cannot be 1049 decrypted (i.e., the decryption key cannot be deduced or decryption 1050 fails), then the bundle MUST be discarded and processed no further. 1051 If an encrypted security-target other than the payload block cannot 1052 be decrypted then the associated security-target and all security 1053 blocks associated with that target MUST be discarded and processed no 1054 further. In both cases, requested status reports (see [BPBIS]) MAY 1055 be generated to reflect bundle or block deletion. 1057 When a BCB is decrypted, the recovered plain-text MUST replace the 1058 cipher-text in the security-target body data 1060 If a BCB contains multiple security-targets, all security-targets 1061 MUST be processed if the BCB is processed by the Node. The effect of 1062 this is to be the same as if each security-target had been 1063 represented by an individual BCB with a single security-target. 1065 5.1.2. Receiving BIB Blocks 1067 If a received bundle contains a BIB, the receiving node MUST 1068 determine whether it has the responsibility of verifying the BIB 1069 security target and whether to remove the BIB prior to delivering 1070 data to an application at the node or forwarding the bundle. 1072 A BIB MUST NOT be processed if the security-target of the BIB is also 1073 the security-target of a BCB in the bundle. Given the order of 1074 operations mandated by this specification, when both a BIB and a BCB 1075 share a security-target, it means that the security-target MUST have 1076 been encrypted after it was integrity signed and, therefore, the BIB 1077 cannot be verified until the security-target has been decrypted by 1078 processing the BCB. 1080 If the security policy of a security-aware node specifies that a 1081 bundle should have applied integrity to a specific security-target 1082 and no such BIB is present in the bundle, then the node MUST process 1083 this security-target in accordance with the security policy. This 1084 MAY involve removing the security-target from the bundle. If the 1085 removed security-target is the payload or primary block, the bundle 1086 MAY be discarded. This action may occur at any node that has the 1087 ability to verify an integrity signature, not just the bundle 1088 destination. 1090 If the bundle has a BIB and the receiving node is the destination for 1091 the bundle, the node MUST verify the security-target in accordance 1092 with the cipher suite specification. If a BIB check fails, the 1093 security-target has failed to authenticate and the security-target 1094 SHALL be processed according to the security policy. A bundle status 1095 report indicating the failure MAY be generated. Otherwise, if the 1096 BIB verifies, the security-target is ready to be processed for 1097 delivery. 1099 If the bundle has a BIB and the receiving node is not the bundle 1100 destination, the receiving node MAY attempt to verify the value in 1101 the security-result field. If the check fails, the node SHALL 1102 process the security-target in accordance to local security policy. 1103 It is RECOMMENDED that if a payload integrity check fails at a 1104 waypoint that it is processed in the same way as if the check fails 1105 at the destination. 1107 If a BIB contains multiple security-targets, all security-targets 1108 MUST be processed if the BIB is processed by the Node. The effect of 1109 this is to be the same as if each security-target had been 1110 represented by an individual BIB with a single security-target. 1112 5.2. Bundle Fragmentation and Reassembly 1114 If it is necessary for a node to fragment a bundle and security 1115 services have been applied to that bundle, the fragmentation rules 1116 described in [BPBIS] MUST be followed. As defined there and repeated 1117 here for completeness, only the payload may be fragmented; security 1118 blocks, like all extension blocks, can never be fragmented. 1120 Due to the complexity of bundle fragmentation, including the 1121 possibility of fragmenting bundle fragments, integrity and 1122 confidentiality operations are not to be applied to a bundle 1123 representing a fragment (i.e., a bundle whose "bundle is a Fragment" 1124 flag is set in the Bundle Processing Control Flags field). 1125 Specifically, a BCB or BIB MUST NOT be added to a bundle fragment, 1126 even if the security-target of the security block is not the payload. 1127 When integrity and confidentiality must be applied to a fragment, we 1128 RECOMMEND that encapsulation be used instead. 1130 6. Key Management 1132 Key management in delay-tolerant networks is recognized as a 1133 difficult topic and is one that this specification does not attempt 1134 to solve. 1136 7. Policy Considerations 1138 When implementing BPSec, several policy decisions must be considered. 1139 This section describes key policies that affect the generation, 1140 forwarding, and receipt of bundles that are secured using this 1141 specification. 1143 o If a bundle is received that contains more than one security- 1144 operation, in violation of BPSec, then the BPA must determine how 1145 to handle this bundle. The bundle may be discarded, the block 1146 affected by the security-operation may be discarded, or one 1147 security-operation may be favored over another. 1149 o BPAs in the network MUST understand what security-operations they 1150 should apply to bundles. This decision may be based on the source 1151 of the bundle, the destination of the bundle, or some other 1152 information related to the bundle. 1154 o If an intermediate receiver has been configured to add a security- 1155 operation to a bundle, and the received bundle already has the 1156 security-operation applied, then the receiver MUST understand what 1157 to do. The receiver may discard the bundle, discard the security- 1158 target and associated BPSec blocks, replace the security- 1159 operation, or some other action. 1161 o It is recommended that security operations only be applied to the 1162 payload block, the primary block, and any block-types specifically 1163 identified in the security policy. If a BPA were to apply 1164 security operations such as integrity or confidentiality to every 1165 block in the bundle, regardless of the block type, there could be 1166 downstream errors processing blocks whose contents must be 1167 inspected at every hop in the network path. 1169 o Adding a BIB to a security-target that has already been encrypted 1170 by a BCB is not allowed. Therefore, we recommend three methods to 1171 add an integrity signature to an encrypted security-target. 1173 1. At the time of encryption, an integrity signature may be 1174 generated and added to the BCB for the security-target as 1175 additional information in the security-result field. 1177 2. The encrypted block may be replicated as a new block and 1178 integrity signed. 1180 3. An encapsulation scheme may be applied to encapsulate the 1181 security-target (or the entire bundle) such that the 1182 encapsulating structure is, itself, no longer the security- 1183 target of a BCB and may therefore be the security-target of a 1184 BIB. 1186 8. Security Considerations 1188 Given the nature of delay-tolerant networking applications, it is 1189 expected that bundles may traverse a variety of environments and 1190 devices which each pose unique security risks and requirements on the 1191 implementation of security within BPSEC. For these reasons, it is 1192 important to introduce key threat models and describe the roles and 1193 responsibilities of the BPSEC protocol in protecting the 1194 confidentiality and integrity of the data against those threats 1195 throughout the DTN. This section provides additional discussion on 1196 security threats that BPSEC will face and describe in additional 1197 detail how BPSEC security mechanisms operate to mitigate these 1198 threats. 1200 It should be noted that BPSEC addresses only the security of data 1201 traveling over the DTN, not the underlying DTN itself. Additionally, 1202 BPSEC addresses neither the fitness of externally-defined 1203 cryptographic methods nor the security of their implementation. It 1204 is the responsibility of the BPSEC implementer that appropriate 1205 algorithms and methods are chosen. Furthermore, the BPSEC protocol 1206 does not address threats which share computing resources with the DTN 1207 and/or BPSEC software implementations. These threats may be 1208 malicious software or compromised libraries which intend to intercept 1209 data or recover cryptographic material. Here, it is the 1210 responsibility of the BPSEC implementer to ensure that any 1211 cryptographic material, including shared secret or private keys, is 1212 protected against access within both memory and storage devices. 1214 The threat model described here is assumed to have a set of 1215 capabilities identical to those described by the Internet Threat 1216 Model in [RFC3552], but the BPSEC threat model is scoped to 1217 illustrate threats specific to BPSEC operating within DTN 1218 environments and therefore focuses on man-in-the-middle (MITM) 1219 attackers. 1221 8.1. Attacker Capabilities and Objectives 1223 BPSEC was designed to protect against MITM threats which may have 1224 access to a bundle during transit from its source, Alice, to its 1225 destination, Bob. A MITM node, Mallory, is a non-cooperative node 1226 operating on the DTN between Alice and Bob that has the ability to 1227 receive bundles, examine bundles, modify bundles, forward bundles, 1228 and generate bundles at will in order to compromise the 1229 confidentiality or integrity of data within the DTN. For the 1230 purposes of this section, any MITM node is assumed to effectively be 1231 security-aware even if it does not implement the BPSec protocol. 1232 There are three classes of MITM nodes which are differentiated based 1233 on their access to cryptographic material: 1235 o Unprivileged Node: Mallory has not been provisioned within the 1236 secure environment and only has access to cryptographic material 1237 which has been publicly-shared. 1239 o Legitimate Node: Mallory is within the secure environment and 1240 therefore has access to cryptographic material which has been 1241 provisioned to Mallory (i.e., K_M) as well as material which has 1242 been publicly-shared. 1244 o Privileged Node: Mallory is a privileged node within the secure 1245 environment and therefore has access to cryptographic material 1246 which has been provisioned to Mallory, Alice and/or Bob (i.e. 1247 K_M, K_A, and/or K_B) as well as material which has been publicly- 1248 shared. 1250 If Mallory is operating as a privileged node, this is tantamount to 1251 compromise; BPSec does not provide mechanisms to detect or remove 1252 Mallory from the DTN or BPSec secure environment. It is up to the 1253 BPSec implementer or the underlying cryptographic mechanisms to 1254 provide appropriate capabilities if they are needed. It should also 1255 be noted that if the implementation of BPSec uses a single set of 1256 shared cryptographic material for all nodes, a legitimate node is 1257 equivalent to a privileged node because K_M == K_A == K_B. 1259 A special case of the legitimate node is when Mallory is either Alice 1260 or Bob (i.e., K_M == K_A or K_M == K_B). In this case, Mallory is 1261 able to impersonate traffic as either Alice or Bob, which means that 1262 traffic to and from that node can be decrypted and encrypted, 1263 respectively. Additionally, messages may be signed as originating 1264 from one of the endpoints. 1266 8.2. Attacker Behaviors and BPSec Mitigations 1268 8.2.1. Eavesdropping Attacks 1270 Once Mallory has received a bundle, she is able to examine the 1271 contents of that bundle and attempt to recover any protected data or 1272 cryptographic keying material from the blocks contained within. The 1273 protection mechanism that BPSec provides against this action is the 1274 BCB, which encrypts the contents of its security-target, providing 1275 confidentiality of the data. Of course, it should be assumed that 1276 Mallory is able to attempt offline recovery of encrypted data, so the 1277 cryptographic mechanisms selected to protect the data should provide 1278 a suitable level of protection. 1280 When evaluating the risk of eavesdropping attacks, it is important to 1281 consider the lifetime of bundles on a DTN. Depending on the network, 1282 bundles may persist for days or even years. If a bundle does persist 1283 on the network for years and the cipher suite used for a BCB provides 1284 inadequate protection, Mallory may be able to recover the protected 1285 data before that bundle reaches its intended destination. 1287 8.2.2. Modification Attacks 1289 As a node participating in the DTN between Alice and Bob, Mallory 1290 will also be able to modify the received bundle, including non-BPSec 1291 data such as the primary block, payload blocks, or block processing 1292 control flags as defined in [BPBIS]. Mallory will be able to 1293 undertake activities which include modification of data within the 1294 blocks, replacement of blocks, addition of blocks, or removal of 1295 blocks. Within BPSec, both the BIB and BCB provide integrity 1296 protection mechanisms to detect or prevent data manipulation attempts 1297 by Mallory. 1299 The BIB provides that protection to another block which is its 1300 security-target. The cryptographic mechansims used to generate the 1301 BIB should be strong against collision attacks and Mallory should not 1302 have access to the cryptographic material used by the originating 1303 node to generate the BIB (e.g., K_A). If both of these conditions 1304 are true, Mallory will be unable to modify the security-target or the 1305 BIB and lead Bob to validate the security-target as originating from 1306 Alice. 1308 Since BPSec security operations are implemented by placing blocks in 1309 a bundle, there is no in-band mechanism for detecting or correcting 1310 certain cases where Mallory removes blocks from a bundle. If Mallory 1311 removes a BCB block, but keeps the security-target, the security- 1312 target remains encrypted and there is a possibility that there may no 1313 longer be sufficient information to decrypt the block at its 1314 destination. If Mallory removes both a BCB (or BIB) and its 1315 security-target there is no evidence left in the bundle of the 1316 security operation. Similarly, if Mallory removes the BIB but not 1317 the security-target there is no evidence left in the bundle of the 1318 security operation. In each of these cases, the implementation of 1319 BPSec MUST be combined with policy configuration at endpoints in the 1320 network which describe the expected and required security operations 1321 that must be applied on transmission and are expected to be present 1322 on receipt. This or other similar out-of-band information is 1323 required to correct for removal of security information in the 1324 bundle. 1326 A limitation of the BIB may exist within the implementation of BIB 1327 validation at the destination node. If Mallory is a legitimate node 1328 within the DTN, the BIB generated by Alice with K_A can be replaced 1329 with a new BIB generated with K_M and forwarded to Bob. If Bob is 1330 only validating that the BIB was generated by a legitimate user, Bob 1331 will acknowledge the message as originating from Mallory instead of 1332 Alice. In order to provide verifiable integrity checks, both a BIB 1333 and BCB should be used. Alice creates a BIB with the protected data 1334 block as the security-target and then creates a BCB with both the BIB 1335 and protected data block as its security-targets. In this 1336 configuration, since Mallory is only a legitimate node and does not 1337 have access to Alice's key K_A, Mallory is unable to decrypt the BCB 1338 and replace the BIB. 1340 8.2.3. Topology Attacks 1342 If Mallory is in a MITM position within the DTN, she is able to 1343 influence how any bundles that come to her may pass through the 1344 network. Upon receiving and processing a bundle that must be routed 1345 elsewhere in the network, Mallory has three options as to how to 1346 proceed: not forward the bundle, forward the bundle as intended, or 1347 forward the bundle to one or more specific nodes within the network. 1349 Attacks that involve re-routing the packets throughout the network 1350 are essentially a special case of the modification attacks described 1351 in this section where the attacker is modifying fields within the 1352 primary block of the bundle. Given that BPSec cannot encrypt the 1353 contents of the primary block, alternate methods must be used to 1354 prevent this situation. These methods MAY include requiring BIBs for 1355 primary blocks, using encapsulation, or otherwise strategically 1356 manipulating primary block data. The specifics of any such 1357 mitigation technique are specific to the implementation of the 1358 deploying network and outside of the scope of this document. 1360 Furthermore, routing rules and policies may be useful in enforcing 1361 particular traffic flows to prevent topology attacks. While these 1362 rules and policies may utilize some features provided by BPSec, their 1363 definition is beyond the scope of this specification. 1365 8.2.4. Message Injection 1367 Mallory is also able to generate new bundles and transmit them into 1368 the DTN at will. These bundles may either be copies or slight 1369 modifications of previously-observed bundles (i.e., a replay attack) 1370 or entirely new bundles generated based on the Bundle Protocol, 1371 BPSec, or other bundle-related protocols. With these attacks 1372 Mallory's objectives may vary, but may be targeting either the bundle 1373 protocol or application-layer protocols conveyed by the bundle 1374 protocol. 1376 BPSec relies on cipher suite capabilities to prevent replay or forged 1377 message attacks. A BCB used with appropriate cryptographic 1378 mechanisms (e.g., a counter-based cipher mode) may provide replay 1379 protection under certain circumstances. Alternatively, application 1380 data itself may be augmented to include mechanisms to assert data 1381 uniqueness and then protected with a BIB, a BCB, or both along with 1382 other block data. In such a case, the receiving node would be able 1383 to validate the uniqueness of the data. 1385 9. Ciphersuite Authorship Considerations 1387 Cipher suite developers or implementers should consider the diverse 1388 performance and conditions of networks on which the Bundle Protocol 1389 (and therefore BPSec) will operate. Specifically, the delay and 1390 capacity of delay-tolerant networks can vary substantially. Cipher 1391 suite developers should consider these conditions to better describe 1392 the conditions when those suites will operate or exhibit 1393 vulnerability, and selection of these suites for implementation 1394 should be made with consideration to the reality. There are key 1395 differences that may limit the opportunity to leverage existing 1396 cipher suites and technologies that have been developed for use in 1397 traditional, more reliable networks: 1399 o Data Lifetime: Depending on the application environment, bundles 1400 may persist on the network for extended periods of time, perhaps 1401 even years. Cryptographic algorithms should be selected to ensure 1402 protection of data against attacks for a length of time reasonable 1403 for the application. 1405 o One-Way Traffic: Depending on the application environment, it is 1406 possible that only a one-way connection may exist between two 1407 endpoints, or if a two-way connection does exist, the round-trip 1408 time may be extremely large. This may limit the utility of 1409 session key generation mechanisms, such as Diffie-Hellman, as a 1410 two-way handshake may not be feasible or reliable. 1412 o Opportunistic Access: Depending on the application environment, a 1413 given endpoint may not be guaranteed to be accessible within a 1414 certain amount of time. This may make asymmetric cryptographic 1415 architectures which rely on a key distribution center or other 1416 trust center impractical under certain conditions. 1418 10. Conformance 1420 All implementations are strongly RECOMMENDED to provide some method 1421 of hop-by-hop verification by generating a hash to some canonical 1422 form of the bundle and placing an integrity signature on that form 1423 using a BIB. 1425 11. IANA Considerations 1427 This protocol has fields that have been registered by IANA. 1429 11.1. Bundle Block Types 1431 This specification allocates three block types from the existing 1432 "Bundle Block Types" registry defined in [RFC6255] . 1434 Additional Entries for the Bundle Block-Type Codes Registry: 1436 +-------+-----------------------------+---------------+ 1437 | Value | Description | Reference | 1438 +-------+-----------------------------+---------------+ 1439 | 2 | Block Integrity Block | This document | 1440 | 3 | Block Confidentiality Block | This document | 1441 +-------+-----------------------------+---------------+ 1443 Table 2 1445 11.2. Cipher Suite Flags 1447 This protocol has a cipher suite flags field and certain flags are 1448 defined. An IANA registry has been set up as follows. 1450 The registration policy for this registry is: Specification Required 1452 The Value range is: Variable Length 1453 Cipher Suite Flag Registry: 1455 +--------------------------+-------------------------+--------------+ 1456 | Bit Position (right to | Description | Reference | 1457 | left) | | | 1458 +--------------------------+-------------------------+--------------+ 1459 | 0 | Block contains result | This | 1460 | | | document | 1461 | 1 | Block Contains | This | 1462 | | parameters | document | 1463 | 2 | Source EID ref present | This | 1464 | | | document | 1465 | >3 | Reserved | This | 1466 | | | document | 1467 +--------------------------+-------------------------+--------------+ 1469 Table 3 1471 11.3. Parameters and Results 1473 This protocol has fields for cipher suite parameters and results. 1474 The field is a type-length-value triple and a registry is required 1475 for the "type" sub-field. The values for "type" apply to both the 1476 cipher suite parameters and the cipher suite results fields. Certain 1477 values are defined. An IANA registry has been set up as follows. 1479 The registration policy for this registry is: Specification Required 1481 The Value range is: 8-bit unsigned integer. 1483 Cipher Suite Parameters and Results Type Registry: 1485 +---------+-------------------------------------------+-------------+ 1486 | Value | Description | Reference | 1487 +---------+-------------------------------------------+-------------+ 1488 | 0 | reserved | Section 3.7 | 1489 | 1 | initialization vector (IV) | Section 3.7 | 1490 | 2 | reserved | Section 3.7 | 1491 | 3 | key-information | Section 3.7 | 1492 | 4 | content-range (pair of Unsigned Integers) | Section 3.7 | 1493 | 5 | integrity signature | Section 3.7 | 1494 | 6 | unassigned | Section 3.7 | 1495 | 7 | salt | Section 3.7 | 1496 | 8 | BCB integrity check value (ICV) | Section 3.7 | 1497 | 9-191 | reserved | Section 3.7 | 1498 | 192-250 | private use | Section 3.7 | 1499 | 251-255 | reserved | Section 3.7 | 1500 +---------+-------------------------------------------+-------------+ 1502 Table 4 1504 12. References 1506 12.1. Normative References 1508 [BPBIS] Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol", 1509 draft-ietf-dtn-bpbis-04 (work in progress), July 2016. 1511 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1512 Requirement Levels", BCP 14, RFC 2119, March 1997. 1514 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1515 Text on Security Considerations", BCP 72, RFC 3552, 1516 DOI 10.17487/RFC3552, July 2003, 1517 . 1519 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1520 IANA Registries", RFC 6255, May 2011. 1522 12.2. Informative References 1524 [BPBISCBOR] 1525 Burleigh, S., "Bundle Protocol CBOR Representation 1526 Specification", draft-burleigh-dtn-rs-cbor-01 (work in 1527 progress), April 2016. 1529 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1530 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1531 Networking Architecture", RFC 4838, April 2007. 1533 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1534 "Bundle Security Protocol Specification", RFC 6257, May 1535 2011. 1537 [SBSP] Birrane, E., "Streamlined Bundle Security Protocol", 1538 draft-birrane-dtn-sbsp-01 (work in progress), October 1539 2015. 1541 Appendix A. Acknowledgements 1543 The following participants contributed technical material, use cases, 1544 and useful thoughts on the overall approach to this security 1545 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1546 Alford and Angela Hennessy of the Laboratory for Telecommunications 1547 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1548 University Applied Physics Laboratory. 1550 Authors' Addresses 1552 Edward J. Birrane, III 1553 The Johns Hopkins University Applied Physics Laboratory 1554 11100 Johns Hopkins Rd. 1555 Laurel, MD 20723 1556 US 1558 Phone: +1 443 778 7423 1559 Email: Edward.Birrane@jhuapl.edu 1561 Kenneth McKeever 1562 The Johns Hopkins University Applied Physics Laboratory 1563 11100 Johns Hopkins Rd. 1564 Laurel, MD 20723 1565 US 1567 Phone: +1 443 778 2237 1568 Email: Ken.McKeever@jhuapl.edu