idnits 2.17.1 draft-ietf-dtn-bpsec-03.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 exact meaning of the all-uppercase expression 'MAY NOT' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: o An OSB definition MAY NOT require any behavior of a BPSEC-BPA that is in conflict with the behavior identified in this specification. In particular, the security processing requirements imposed by this specification MUST be consistent across all BPSEC-BPAs in a network. -- The document date (October 30, 2016) is 2735 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-04 ** Downref: Normative reference to an Informational RFC: RFC 6255 Summary: 1 error (**), 0 flaws (~~), 3 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: May 3, 2017 October 30, 2016 7 Bundle Protocol Security Specification 8 draft-ietf-dtn-bpsec-03 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 May 3, 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. Parameters and Result Fields . . . . . . . . . . . . . . 17 68 3.7. BSP Block Example . . . . . . . . . . . . . . . . . . . . 18 69 4. Canonical Forms . . . . . . . . . . . . . . . . . . . . . . . 20 70 4.1. Technical Notes . . . . . . . . . . . . . . . . . . . . . 20 71 4.2. Primary Block Canonicalization . . . . . . . . . . . . . 21 72 4.3. Non-Primary-Block Canonicalization . . . . . . . . . . . 22 73 5. Security Processing . . . . . . . . . . . . . . . . . . . . . 22 74 5.1. Bundles Received from Other Nodes . . . . . . . . . . . . 23 75 5.1.1. Receiving BCB Blocks . . . . . . . . . . . . . . . . 23 76 5.1.2. Receiving BIB Blocks . . . . . . . . . . . . . . . . 23 77 5.2. Bundle Fragmentation and Reassembly . . . . . . . . . . . 24 78 6. Key Management . . . . . . . . . . . . . . . . . . . . . . . 25 79 7. Policy Considerations . . . . . . . . . . . . . . . . . . . . 25 80 8. Security Considerations . . . . . . . . . . . . . . . . . . . 26 81 8.1. Attacker Capabilities and Objectives . . . . . . . . . . 27 82 8.2. Attacker Behaviors and BPSec Mitigations . . . . . . . . 28 83 8.2.1. Eavesdropping Attacks . . . . . . . . . . . . . . . . 28 84 8.2.2. Modification Attacks . . . . . . . . . . . . . . . . 28 85 8.2.3. Topology Attacks . . . . . . . . . . . . . . . . . . 29 86 8.2.4. Message Injection . . . . . . . . . . . . . . . . . . 30 87 9. Ciphersuite Authorship Considerations . . . . . . . . . . . . 30 88 10. Defining Other Security Blocks . . . . . . . . . . . . . . . 31 89 11. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 32 90 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 91 12.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 32 92 12.2. Cipher Suite Flags . . . . . . . . . . . . . . . . . . . 32 93 12.3. Parameters and Results . . . . . . . . . . . . . . . . . 33 94 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 95 13.1. Normative References . . . . . . . . . . . . . . . . . . 34 96 13.2. Informative References . . . . . . . . . . . . . . . . . 34 97 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 35 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 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 A security block MAY apply to multiple security targets if and only 437 if all cipher suite parameters, security source, and key information 438 are common for the security operation. In such a case, the security 439 block MUST contain security results for each covered security target. 440 The use of multiple security targets in a security block provides an 441 efficiency mechanism so that identical ciphersuite information does 442 not need to be repeated across multiple security blocks. 444 3.2. Block Representation 446 Each security block uses the Canonical Bundle Block Format as defined 447 in [BPBIS]. That is, each security block is comprised of the 448 following elements: 450 o Block Type Code 452 o Block Number 454 o Block Processing Control Flags 456 o CRC Type and CRC Field 458 o Block Data Length 460 o Block Type Specific Data Fields 462 The structure of the BIB and BCB Block Type Specific Data fields are 463 identifcal and illustrated in Figure 2. In this figure, field names 464 prefaced with an '*' are optional and their inclusion in the block is 465 indicated by the Cipher Suite Flags field. 467 +================================================= 468 | Field Name | Field Data Type | 469 +================================================= 470 | # Security Targets | Unsigned Integer | 471 +---------------------+--------------------------+ 472 | Security Targets | Array (Unsigned Integer) | 473 +---------------------+--------------------------+ 474 | Cipher Suite ID | Unsigned Integer | 475 +---------------------+--------------------------+ 476 | Cipher Suite Flags | Unsigned Integer | 477 +---------------------+--------------------------+ 478 | Security Source | URI - OPTIONAL | 479 +---------------------+--------------------------+ 480 | Cipher Parameters | Byte Array - OPTIONAL | 481 +---------------------+--------------------------+ 482 | Security Result | Byte Array | 483 +---------------------+--------------------------+ 485 Figure 2: BIB and BCB Block Structure 487 Where the block fields are identified as follows. 489 o # Security Targets - The number of security targets for this 490 security block. This value MUST be at least 1. 492 o Security Targets - This array contains the unique identifier of 493 the blocks targetted by this security operation. Each security 494 target MUST represent a block present in the bundle. A security 495 target MUST NOT be repeated in this array. 497 o Cipher suite ID - Identifies the cipher suite used to implement 498 the security service represented by this block and applied to each 499 security target. 501 o Cipher suite flags - Identifies which optional security block 502 fields are present in the block. The structure of the Cipher 503 Suite Flags field is shown in Figure 3. The presence of an 504 optional field is indicated by setting the value of the 505 corresponding flag to one. A value of zero indicates the 506 corresponding optional field is not present. The BPSEC Cipher 507 Suite Flags are defined as follows. 509 Bit Bit Bit Bit Bit Bit Bit Bit 510 7 6 5 4 3 2 1 0 511 +-----------------------------------+-----+-----+ 512 | reserved | src |parm | 513 +-----------------------------------+-----+-----+ 514 MSB LSB 516 Figure 3: Cipher Suite Flags 518 Where: 520 * bits 7-2 are reserved for future use. 522 * src - bit 1 indicates whether the Security Source is present in 523 the block. 525 * parm - bit 0 indicates whether or not the Cipher Suite 526 Parameters field is present in the block. 528 o (OPTIONAL) Security Source (URI) - This identifies the node that 529 inserted the security service in the bundle. If the security 530 source is not present then the source MAY be inferred from the 531 bundle source, the previous hop, or some other node as defined by 532 security policy. 534 o (OPTIONAL) Parameters (Byte Array) - Compound field of the 535 following two items. 537 * Length (Unsigned Integer) - specifies the length of the next 538 field, which captures the parameters data. 540 * Data (Byte Array) - A byte array encoding one or more cipher 541 suite parameters, with each parameter represented as a Type- 542 Length-Value (TLV) triplet, defined as follows. 544 + Type (Byte) - The parameter type. 546 + Length (Unsigned Integer) - The length of the parameter. 548 + Value (Byte Array) - The parameter value. 550 See Section 3.6 for a list of parameter types that MUST be 551 supported by BPSEC implementations. BPSEC cipher suite 552 specifications MAY define their own parameters to be 553 represented in this byte array. 555 o Security Result (Byte Array) - A security result is the output of 556 an appropriate cipher suite specific calculation (e.g., a 557 signature, Message Authentication Code (MAC), or cipher-text block 558 key). There MUST exist one security result for each security 559 target in the security block. A security result is a multi-field 560 component, described as follows. 562 * Total Length (Unsigned Integer) - specifies the length, in 563 bytes, of the remaining security result information. 565 * Results (Byte Array) - This field captures each of the security 566 results, catenated together, one for each security target 567 covered by the security block. Each result is captured by the 568 four-tuple of (Target, Type, Len, Value). The meaning of each 569 is given below. 571 + Target (Optional) (Unsigned Integer) - If the security block 572 has multiple security targets, the target field is the Block 573 Number of the security target to which this result field 574 applies. If the security block only has a single security 575 target, this field is omitted. 577 + Type (Unsigned Integer) - The type of security result field. 579 + Length (Unsigned Integer) - The length of the result field. 581 + Value (Byte Array) - The results of the cipher suite 582 specific calculation. 584 3.3. Block Integrity Block 586 A BIB is an ASB with the following characteristics: 588 The Block Type Code value MUST be 0x02. 590 The Block Processing Control flags value can be set to whatever 591 values are required by local policy. Cipher suite designers 592 should carefully consider the effect of setting flags that either 593 discard the block or delete the bundle in the event that this 594 block cannot be processed. 596 A security target for a BIB MUST NOT reference a security block 597 defined in this specification (e.g., a BIB or a BCB). 599 The cipher suite ID MUST be documented as an end-to-end 600 authentication-cipher suite or as an end-to-end error-detection- 601 cipher suite. 603 An EID-reference to the security source MAY be present. If this 604 field is not present, then the security source of the block SHOULD 605 be inferred according to security policy and MAY default to the 606 bundle source. The security source may also be specified as part 607 of key information described in Section 3.6. 609 The security result captures the result of applying the cipher 610 suite calculation (e.g., the MAC or signature) to the relevant 611 parts of the security target, as specified in the cipher suite 612 definition. This field MUST be present. 614 The cipher suite MAY process less than the entire security target. 615 If the cipher suite processes less than the complete, original 616 security target, the cipher suite parameters MUST specify which 617 bytes of the security target are protected. 619 Notes: 621 o Since OP(integrity, target) is allowed only once in a bundle per 622 target, it is RECOMMENDED that users wishing to support multiple 623 integrity signatures for the same target define a multi-signature 624 cipher suite. 626 o For some cipher suites, (e.g., those using asymmetric keying to 627 produce signatures or those using symmetric keying with a group 628 key), the security information MAY be checked at any hop on the 629 way to the destination that has access to the required keying 630 information, in accordance with Section 3.5. 632 o The use of a generally available key is RECOMMENDED if custodial 633 transfer is employed and all nodes SHOULD verify the bundle before 634 accepting custody. 636 3.4. Block Confidentiality Block 638 A BCB is an ASB with the following characteristics: 640 The Block Type Code value MUST be 0x03. 642 The Block Processing Control flags value can be set to whatever 643 values are required by local policy, except that this block MUST 644 have the "replicate in every fragment" flag set if the target of 645 the BCB is the Payload Block. Having that BCB in each fragment 646 indicates to a receiving node that the payload portion of each 647 fragment represents cipher-text. Cipher suite designers should 648 carefully consider the effect of setting flags that either discard 649 the block or delete the bundle in the event that this block cannot 650 be processed. 652 A security target for a BCB MAY reference the payload block, a 653 non-security extension block, or a BIB block. A security target 654 in a BCB MUST NOT be another BCB. 656 The cipher suite ID MUST be documented as a confidentiality cipher 657 suite. 659 Any additional bytes generated as a result of encryption and/or 660 authentication processing of the security target SHOULD be placed 661 in an "integrity check value" field (see Section 3.6) or other 662 such appropriate area in the security result of the BCB. 664 An EID-reference to the security source MAY be present. If this 665 field is not present, then the security source of the block SHOULD 666 be inferred according to security policy and MAY default to the 667 bundle source. The security source may also be specified as part 668 of key information described in Section 3.6. 670 The security result MUST be present in the BCB. This compound 671 field normally contains fields such as an encrypted bundle 672 encryption key and/or authentication tag. 674 The BCB modifies the contents of its security target. When a BCB is 675 applied, the security target body data are encrypted "in-place". 676 Following encryption, the security target body data contains cipher- 677 text, not plain-text. Other security target block fields (such as 678 type, processing control flags, and length) remain unmodified. 680 Fragmentation, reassembly, and custody transfer are adversely 681 affected by a change in size of the payload due to ambiguity about 682 what byte range of the block is actually in any particular fragment. 683 Therefore, when the security target of a BCB is the bundle payload, 684 the BCB MUST NOT alter the size of the payload block body data. 685 Cipher suites SHOULD place any block expansion, such as 686 authentication tags (integrity check values) and any padding 687 generated by a block-mode cipher, into an integrity check value item 688 in the security result field (see Section 3.6) of the BCB. This "in- 689 place" encryption allows fragmentation, reassembly, and custody 690 transfer to operate without knowledge of whether or not encryption 691 has occurred. 693 Notes: 695 o The cipher suite MAY process less than the entire original 696 security target body data. If the cipher suite processes less 697 than the complete, original security target body data, the BCB for 698 that security target MUST specify, as part of the cipher suite 699 parameters, which bytes of the body data are protected. 701 o The BCB's "discard" flag may be set independently from its 702 security target's "discard" flag. Whether or not the BCB's 703 "discard" flag is set is an implementation/policy decision for the 704 encrypting node. (The "discard" flag is more properly called the 705 "Discard if block cannot be processed" flag.) 707 o A BCB MAY include information as part of additional authenticated 708 data to address parts of the target block, such as EID references, 709 that are not converted to cipher-text. 711 3.5. Block Interactions 713 The security block types defined in this specification are designed 714 to be as independent as possible. However, there are some cases 715 where security blocks may share a security target creating processing 716 dependencies. 718 If confidentiality is being applied to a target that already has 719 integrity applied to it, then an undesirable condition occurs where a 720 security aware intermediate node would be unable to check the 721 integrity result of a block because the block contents have been 722 encrypted after the integrity signature was generated. To address 723 this concern, the following processing rules MUST be followed. 725 o If confidentiality is to be applied to a target, it MUST also be 726 applied to any integrity operation already defined for that 727 target. This means that if a BCB is added to encrypt a block, 728 another BCB MUST also be added to encrypt a BIB also targeting 729 that block. 731 o An integrity operation MUST NOT be applied to a security target if 732 a BCB in the bundle shares the same security target. This 733 prevents ambiguity in the order of evaluation when receiving a BIB 734 and a BCB for a given security target. 736 o An integrity value MUST NOT be evaluated if the BIB providing the 737 integrity value is the security target of an existing BCB block in 738 the bundle. In such a case, the BIB data contains cipher-text as 739 it has been encrypted. 741 o An integrity value MUST NOT be evaluated if the security target of 742 the BIB is also the security target of a BCB in the bundle. In 743 such a case, the security target data contains cipher-text as it 744 has been encrypted. 746 o As mentioned in Section 3.3, a BIB MUST NOT have a BCB as its 747 security target. BCBs may embed integrity results as part of 748 cipher suite parameters. 750 These restrictions on block interactions impose a necessary ordering 751 when applying security operations within a bundle. Specifically, for 752 a given security target, BIBs MUST be added before BCBs. This 753 ordering MUST be preserved in cases where the current BPA is adding 754 all of the security blocks for the bundle or whether the BPA is a 755 waypoint adding new security blocks to a bundle that already contains 756 security blocks. 758 3.6. Parameters and Result Fields 760 Various cipher suites include several items in the cipher suite 761 parameters and/or security result fields. Which items MAY appear is 762 defined by the particular cipher suite description. A cipher suite 763 MAY support several instances of the same type within a single block. 765 Each item is represented as a type-length-value. Type is a single 766 byte indicating the item. Length is the count of data bytes to 767 follow, and is an Unsigned Integer. Value is the data content of the 768 item. 770 Item types, name, and descriptions are defined as follows. 772 Cipher suite parameters and result fields. 774 +-------+----------------+-----------------------------+------------+ 775 | Type | Name | Description | Field | 776 +-------+----------------+-----------------------------+------------+ 777 | 0 | Reserved | | | 778 +-------+----------------+-----------------------------+------------+ 779 | 1 | Initialization | A random value, typically | Cipher | 780 | | Vector (IV) | eight to sixteen bytes. | Suite | 781 | | | | Parameters | 782 +-------+----------------+-----------------------------+------------+ 783 | 2 | Reserved | | | 784 +-------+----------------+-----------------------------+------------+ 785 | 3 | Key | Material encoded or | Cipher | 786 | | Information | protected by the key | Suite | 787 | | | management system and used | Parameters | 788 | | | to transport an ephemeral | | 789 | | | key protected by a long- | | 790 | | | term key. | | 791 +-------+----------------+-----------------------------+------------+ 792 | 4 | Content Range | Pair of Unsigned Integers | Cipher | 793 | | | (offset,length) specifying | Suite | 794 | | | the range of payload bytes | Parameters | 795 | | | to which an operation | | 796 | | | applies. The offset MUST be | | 797 | | | the offset within the | | 798 | | | original bundle, even if | | 799 | | | the current bundle is a | | 800 | | | fragment. | | 801 +-------+----------------+-----------------------------+------------+ 802 | 5 | Integrity | Result of BIB digest or | Security | 803 | | Signatures | other signing operation. | Results | 804 +-------+----------------+-----------------------------+------------+ 805 | 6 | Unassigned | | | 806 +-------+----------------+-----------------------------+------------+ 807 | 7 | Salt | An IV-like value used by | Cipher | 808 | | | certain confidentiality | Suite | 809 | | | suites. | Parameters | 810 +-------+----------------+-----------------------------+------------+ 811 | 8 | BCB Integrity | Output from certain | Security | 812 | | Check Value | confidentiality cipher | Results | 813 | | (ICV) / | suite operations to be used | | 814 | | Authentication | at the destination to | | 815 | | Tag | verify that the protected | | 816 | | | data has not been modified. | | 817 | | | This value MAY contain | | 818 | | | padding if required by the | | 819 | | | cipher suite. | | 820 +-------+----------------+-----------------------------+------------+ 821 | 9-255 | Reserved | | | 822 +-------+----------------+-----------------------------+------------+ 824 Table 1 826 3.7. BSP Block Example 828 An example of BPSec blocks applied to a bundle is illustrated in 829 Figure 4. In this figure the first column represents blocks within a 830 bundle and the second column represents a unique identifier for each 831 block, suitable for use as the security target of a BPSec security 832 block. Since the mechanism and format of a security target is not 833 specified in this document, the terminology B1...Bn is used to 834 identify blocks in the bundle for the purposes of illustration. 836 Block in Bundle ID 837 +===================================+====+ 838 | Primary Block | B1 | 839 +-----------------------------------+----+ 840 | BIB | B2 | 841 | OP(integrity, target=B1) | | 842 +-----------------------------------+----+ 843 | BCB | B3 | 844 | OP(confidentiality, target=B4) | | 845 +-----------------------------------+----+ 846 | Extension Block | B4 | 847 +-----------------------------------+----+ 848 | BIB | B5 | 849 | OP(integrity, target=B6) | | 850 +-----------------------------------+----+ 851 | Extension Block | B6 | 852 +-----------------------------------+----+ 853 | BCB | B7 | 854 | OP(confidentiality,target=B8,B9) | | 855 +-----------------------------------+----+ 856 | BIB (encrypted by B7) | B8 | 857 | OP(integrity, target=B9) | | 858 +-----------------------------------+----| 859 | Payload Block | B9 | 860 +-----------------------------------+----+ 862 Figure 4: Sample Use of BSP Blocks 864 In this example a bundle has four non-security-related blocks: the 865 primary block (B1), three extension blocks (B4,B6), and a payload 866 block (B9). The following security applications are applied to this 867 bundle. 869 o An integrity signature applied to the canonicalized primary block. 870 This is accomplished by a single BIB (B2). 872 o Confidentiality for the first extension block (B4). This is 873 accomplished by a BCB block (B3). 875 o Integrity for the second extension block (B6). This is 876 accomplished by a BIB block (B5). NOTE: If the extension block B6 877 contains a representation of the serialized bundle (such as a hash 878 over all blocks in the bundle at the time of its last 879 transmission) then the BIB block is also providing an 880 authentication service from the prior BPSEC-BPA to this BPSEC-BPA. 882 o An integrity signature on the payload (B10). This is accomplished 883 by a BIB block (B8). 885 o Confidentiality for the payload block and it's integrity 886 signature. This is accomplished by a BCB block, B7, encrypting B8 887 and B9. 889 4. Canonical Forms 891 By definition, an integrity service determines whether any aspect of 892 a block was changed from the moment the security service was applied 893 at the security source until the point of current evaluation. To 894 successfully verify the integrity of a block, the data passed to the 895 verifying cipher suite MUST be the same bits, in the same order, as 896 those passed to the signature-generating cipher suite at the security 897 source. 899 However, [BPBIS] does not specify a single on-the-wire encoding of 900 bundles. In cases where a security source generates a different 901 encoding than that used at a receiving node, care MUST be taken to 902 ensure that the inputs to cipher suites at the receiving node is a 903 bitwise match to inputs provided at the security source. 905 This section provides guidance on how to create a canonical form for 906 each type of block in a bundle. This form MUST be used when 907 generating inputs to cipher suites for use by BPSec blocks. 909 This specification does not define any security operation over the 910 entire bundle and, therefore, provides no canonical form for a 911 serialized bundle. 913 4.1. Technical Notes 915 The following technical considerations hold for all canonicalizations 916 in this section. 918 o Any numeric fields defined as variable-length MUST be expanded to 919 their "unpacked" form. For example, a 32-bit integer value MUST 920 be unpacked to a four-byte representation. 922 o Each block encoding MUST follow the CBOR encodings provided in 923 [BPBISCBOR]. 925 o Canonical forms are not transmitted, they are used to generate 926 input to a cipher suite for secuity processing at a security-aware 927 node. 929 o Reserved flags MUST NOT be included in any canonicalization as it 930 is not known if those flags will chaneg in transit. 932 o These canonicalization algorithms assume that endpoint IDs 933 themselves are immutable and they are unsuitable for use in 934 environments where that assumption might be violated. 936 o Cipher suites MAY define their own canonicalization algorithms and 937 require the use of those algorithms over the ones provided in this 938 specification. In the event of conflicting canonicalization 939 algorithms, cipher suite algorithms take precedence over this 940 specification. 942 4.2. Primary Block Canonicalization 944 The primary block canonical form is the same as the CBOR encoding of 945 the block, with certain modifications to account for allowed block 946 changes as the bundle traverses the DTN. The fields that compromise 947 the primary block, and any special considerations for their 948 representation in a canonical form, are as follows. 950 o The Version field is included, without modification. 952 o The Bundle Processing Flags field is used, with modification. 953 Certain bundle processing flags MAY change as a bundle transits 954 the DTN without indicating an integrity error. These flags, which 955 are identified below, MUST NOT be represented in the canonicalized 956 form of the bundle processing flags and, instead, be represented 957 by the bit 0. 959 * Reserved flags. 961 * Bundle is a Fragment flag. 963 o The CRC Type, Destination EID, Source Node ID, Report-To EID, 964 Creation Timestamp, and Lifetime fields are included, without 965 modification. 967 o The fragment ID field MAY change if the bundle is fragmented in 968 transit and, as such, this field MUST NOT be included in the 969 canonicalization. 971 o The CRC field MAY change at each hop - for example, if a bundle 972 becomes fragmented, each fragment will have a different CRC value 973 from the original signed primary block. As such, this field MUST 974 NOT be included in the canonicalization. 976 4.3. Non-Primary-Block Canonicalization 978 All non-primary blocks (NPBs) in [BPBIS] share the same block 979 structure and should be canonicalized in the same way. 981 Canonicalization for NPBs is dependent on whether the security 982 operation being performed is integrity or confidentiality. Integrity 983 operations consider every field in the block, whereas confidentiality 984 operations only consider the block-type-specific data. Since 985 confidentiality is applied to hide information (replacing plaintext 986 with ciphertext) it provides no benefit to include in the 987 confidentiality calculation information that MUST remain readable, 988 such as block fields other than the block-type-specific data. 990 The fields that comprise a NPB, and any special considerations for 991 their representation in a canonical form, are as follows. 993 o The Block Type Code field is included, without modification, for 994 integrity operations and omitted for confidentiality operations. 996 o The Block Number field is included, without modification, for 997 integrity operations and omitted for confidentiality operations. 999 o The Block Processing Control Flags field is included, without 1000 modification, for integrity operations and omitted for 1001 confidentiality operations, with the exception of reserved flags 1002 which are treated as 0 in both cases. 1004 o The CRC type and CRC fields are included, without modification, 1005 for integrity operations and omitted for confidentiality 1006 operations. 1008 o The Block Type Specific Data field is included, without 1009 modification, for both integrity and confidentiality operations, 1010 with the exception that in some cases only a portion of the 1011 payload data is to be processed. In such a case, only those bytes 1012 are included in the canonical form and additional cipher suite 1013 parameters are required to specify which part of the field is 1014 included. 1016 5. Security Processing 1018 This section describes the security aspects of bundle processing. 1020 5.1. Bundles Received from Other Nodes 1022 Security blocks MUST be processed in a specific order when received 1023 by a security-aware node. The processing order is as follows. 1025 o All BCB blocks in the bundle MUST be evaluated prior to evaluating 1026 any BIBs in the bundle. When BIBs and BCBs share a security 1027 target, BCBs MUST be evaluated first and BIBs second. 1029 5.1.1. Receiving BCB Blocks 1031 If a received bundle contains a BCB, the receiving node MUST 1032 determine whether it has the responsibility of decrypting the BCB 1033 security target and removing the BCB prior to delivering data to an 1034 application at the node or forwarding the bundle. 1036 If the receiving node is the destination of the bundle, the node MUST 1037 decrypt any BCBs remaining in the bundle. If the receiving node is 1038 not the destination of the bundle, the node MAY decrypt the BCB if 1039 directed to do so as a matter of security policy. 1041 If the relevant parts of an encrypted payload block cannot be 1042 decrypted (i.e., the decryption key cannot be deduced or decryption 1043 fails), then the bundle MUST be discarded and processed no further. 1044 If an encrypted security target other than the payload block cannot 1045 be decrypted then the associated security target and all security 1046 blocks associated with that target MUST be discarded and processed no 1047 further. In both cases, requested status reports (see [BPBIS]) MAY 1048 be generated to reflect bundle or block deletion. 1050 When a BCB is decrypted, the recovered plain-text MUST replace the 1051 cipher-text in the security target body data 1053 If a BCB contains multiple security targets, all security targets 1054 MUST be processed if the BCB is processed by the Node. The effect of 1055 this is to be the same as if each security target had been 1056 represented by an individual BCB with a single security target. 1058 5.1.2. Receiving BIB Blocks 1060 If a received bundle contains a BIB, the receiving node MUST 1061 determine whether it has the responsibility of verifying the BIB 1062 security target and whether to remove the BIB prior to delivering 1063 data to an application at the node or forwarding the bundle. 1065 A BIB MUST NOT be processed if the security target of the BIB is also 1066 the security target of a BCB in the bundle. Given the order of 1067 operations mandated by this specification, when both a BIB and a BCB 1068 share a security target, it means that the security target MUST have 1069 been encrypted after it was integrity signed and, therefore, the BIB 1070 cannot be verified until the security target has been decrypted by 1071 processing the BCB. 1073 If the security policy of a security-aware node specifies that a 1074 bundle should have applied integrity to a specific security target 1075 and no such BIB is present in the bundle, then the node MUST process 1076 this security target in accordance with the security policy. This 1077 MAY involve removing the security target from the bundle. If the 1078 removed security target is the payload or primary block, the bundle 1079 MAY be discarded. This action may occur at any node that has the 1080 ability to verify an integrity signature, not just the bundle 1081 destination. 1083 If the bundle has a BIB and the receiving node is the destination for 1084 the bundle, the node MUST verify the security target in accordance 1085 with the cipher suite specification. If a BIB check fails, the 1086 security target has failed to authenticate and the security target 1087 SHALL be processed according to the security policy. A bundle status 1088 report indicating the failure MAY be generated. Otherwise, if the 1089 BIB verifies, the security target is ready to be processed for 1090 delivery. 1092 If the bundle has a BIB and the receiving node is not the bundle 1093 destination, the receiving node MAY attempt to verify the value in 1094 the security result field. If the check fails, the node SHALL 1095 process the security target in accordance to local security policy. 1096 It is RECOMMENDED that if a payload integrity check fails at a 1097 waypoint that it is processed in the same way as if the check fails 1098 at the destination. 1100 If a BIB contains multiple security targets, all security targets 1101 MUST be processed if the BIB is processed by the Node. The effect of 1102 this is to be the same as if each security target had been 1103 represented by an individual BIB with a single security target. 1105 5.2. Bundle Fragmentation and Reassembly 1107 If it is necessary for a node to fragment a bundle and security 1108 services have been applied to that bundle, the fragmentation rules 1109 described in [BPBIS] MUST be followed. As defined there and repeated 1110 here for completeness, only the payload may be fragmented; security 1111 blocks, like all extension blocks, can never be fragmented. 1113 Due to the complexity of bundle fragmentation, including the 1114 possibility of fragmenting bundle fragments, integrity and 1115 confidentiality operations are not to be applied to a bundle 1116 representing a fragment (i.e., a bundle whose "bundle is a Fragment" 1117 flag is set in the Bundle Processing Control Flags field). 1118 Specifically, a BCB or BIB MUST NOT be added to a bundle fragment, 1119 even if the security target of the security block is not the payload. 1120 When integrity and confidentiality must be applied to a fragment, we 1121 RECOMMEND that encapsulation be used instead. 1123 6. Key Management 1125 Key management in delay-tolerant networks is recognized as a 1126 difficult topic and is one that this specification does not attempt 1127 to solve. 1129 7. Policy Considerations 1131 When implementing BPSec, several policy decisions must be considered. 1132 This section describes key policies that affect the generation, 1133 forwarding, and receipt of bundles that are secured using this 1134 specification. 1136 o If a bundle is received that contains more than one security 1137 operation, in violation of BPSec, then the BPA must determine how 1138 to handle this bundle. The bundle may be discarded, the block 1139 affected by the security operation may be discarded, or one 1140 security operation may be favored over another. 1142 o BPAs in the network MUST understand what security operations they 1143 should apply to bundles. This decision may be based on the source 1144 of the bundle, the destination of the bundle, or some other 1145 information related to the bundle. 1147 o If an intermediate receiver has been configured to add a security 1148 operation to a bundle, and the received bundle already has the 1149 security operation applied, then the receiver MUST understand what 1150 to do. The receiver may discard the bundle, discard the security 1151 target and associated BPSec blocks, replace the security 1152 operation, or some other action. 1154 o It is recommended that security operations only be applied to the 1155 payload block, the primary block, and any block-types specifically 1156 identified in the security policy. If a BPA were to apply 1157 security operations such as integrity or confidentiality to every 1158 block in the bundle, regardless of the block type, there could be 1159 downstream errors processing blocks whose contents must be 1160 inspected at every hop in the network path. 1162 o Adding a BIB to a security target that has already been encrypted 1163 by a BCB is not allowed. Therefore, we recommend three methods to 1164 add an integrity signature to an encrypted security target. 1166 1. At the time of encryption, an integrity signature may be 1167 generated and added to the BCB for the security target as 1168 additional information in the security result field. 1170 2. The encrypted block may be replicated as a new block and 1171 integrity signed. 1173 3. An encapsulation scheme may be applied to encapsulate the 1174 security target (or the entire bundle) such that the 1175 encapsulating structure is, itself, no longer the security 1176 target of a BCB and may therefore be the security target of a 1177 BIB. 1179 8. Security Considerations 1181 Given the nature of delay-tolerant networking applications, it is 1182 expected that bundles may traverse a variety of environments and 1183 devices which each pose unique security risks and requirements on the 1184 implementation of security within BPSEC. For these reasons, it is 1185 important to introduce key threat models and describe the roles and 1186 responsibilities of the BPSEC protocol in protecting the 1187 confidentiality and integrity of the data against those threats 1188 throughout the DTN. This section provides additional discussion on 1189 security threats that BPSEC will face and describe in additional 1190 detail how BPSEC security mechanisms operate to mitigate these 1191 threats. 1193 It should be noted that BPSEC addresses only the security of data 1194 traveling over the DTN, not the underlying DTN itself. Additionally, 1195 BPSEC addresses neither the fitness of externally-defined 1196 cryptographic methods nor the security of their implementation. It 1197 is the responsibility of the BPSEC implementer that appropriate 1198 algorithms and methods are chosen. Furthermore, the BPSEC protocol 1199 does not address threats which share computing resources with the DTN 1200 and/or BPSEC software implementations. These threats may be 1201 malicious software or compromised libraries which intend to intercept 1202 data or recover cryptographic material. Here, it is the 1203 responsibility of the BPSEC implementer to ensure that any 1204 cryptographic material, including shared secret or private keys, is 1205 protected against access within both memory and storage devices. 1207 The threat model described here is assumed to have a set of 1208 capabilities identical to those described by the Internet Threat 1209 Model in [RFC3552], but the BPSEC threat model is scoped to 1210 illustrate threats specific to BPSEC operating within DTN 1211 environments and therefore focuses on man-in-the-middle (MITM) 1212 attackers. 1214 8.1. Attacker Capabilities and Objectives 1216 BPSEC was designed to protect against MITM threats which may have 1217 access to a bundle during transit from its source, Alice, to its 1218 destination, Bob. A MITM node, Mallory, is a non-cooperative node 1219 operating on the DTN between Alice and Bob that has the ability to 1220 receive bundles, examine bundles, modify bundles, forward bundles, 1221 and generate bundles at will in order to compromise the 1222 confidentiality or integrity of data within the DTN. For the 1223 purposes of this section, any MITM node is assumed to effectively be 1224 security-aware even if it does not implement the BPSec protocol. 1225 There are three classes of MITM nodes which are differentiated based 1226 on their access to cryptographic material: 1228 o Unprivileged Node: Mallory has not been provisioned within the 1229 secure environment and only has access to cryptographic material 1230 which has been publicly-shared. 1232 o Legitimate Node: Mallory is within the secure environment and 1233 therefore has access to cryptographic material which has been 1234 provisioned to Mallory (i.e., K_M) as well as material which has 1235 been publicly-shared. 1237 o Privileged Node: Mallory is a privileged node within the secure 1238 environment and therefore has access to cryptographic material 1239 which has been provisioned to Mallory, Alice and/or Bob (i.e. 1240 K_M, K_A, and/or K_B) as well as material which has been publicly- 1241 shared. 1243 If Mallory is operating as a privileged node, this is tantamount to 1244 compromise; BPSec does not provide mechanisms to detect or remove 1245 Mallory from the DTN or BPSec secure environment. It is up to the 1246 BPSec implementer or the underlying cryptographic mechanisms to 1247 provide appropriate capabilities if they are needed. It should also 1248 be noted that if the implementation of BPSec uses a single set of 1249 shared cryptographic material for all nodes, a legitimate node is 1250 equivalent to a privileged node because K_M == K_A == K_B. 1252 A special case of the legitimate node is when Mallory is either Alice 1253 or Bob (i.e., K_M == K_A or K_M == K_B). In this case, Mallory is 1254 able to impersonate traffic as either Alice or Bob, which means that 1255 traffic to and from that node can be decrypted and encrypted, 1256 respectively. Additionally, messages may be signed as originating 1257 from one of the endpoints. 1259 8.2. Attacker Behaviors and BPSec Mitigations 1261 8.2.1. Eavesdropping Attacks 1263 Once Mallory has received a bundle, she is able to examine the 1264 contents of that bundle and attempt to recover any protected data or 1265 cryptographic keying material from the blocks contained within. The 1266 protection mechanism that BPSec provides against this action is the 1267 BCB, which encrypts the contents of its security target, providing 1268 confidentiality of the data. Of course, it should be assumed that 1269 Mallory is able to attempt offline recovery of encrypted data, so the 1270 cryptographic mechanisms selected to protect the data should provide 1271 a suitable level of protection. 1273 When evaluating the risk of eavesdropping attacks, it is important to 1274 consider the lifetime of bundles on a DTN. Depending on the network, 1275 bundles may persist for days or even years. If a bundle does persist 1276 on the network for years and the cipher suite used for a BCB provides 1277 inadequate protection, Mallory may be able to recover the protected 1278 data before that bundle reaches its intended destination. 1280 8.2.2. Modification Attacks 1282 As a node participating in the DTN between Alice and Bob, Mallory 1283 will also be able to modify the received bundle, including non-BPSec 1284 data such as the primary block, payload blocks, or block processing 1285 control flags as defined in [BPBIS]. Mallory will be able to 1286 undertake activities which include modification of data within the 1287 blocks, replacement of blocks, addition of blocks, or removal of 1288 blocks. Within BPSec, both the BIB and BCB provide integrity 1289 protection mechanisms to detect or prevent data manipulation attempts 1290 by Mallory. 1292 The BIB provides that protection to another block which is its 1293 security target. The cryptographic mechansims used to generate the 1294 BIB should be strong against collision attacks and Mallory should not 1295 have access to the cryptographic material used by the originating 1296 node to generate the BIB (e.g., K_A). If both of these conditions 1297 are true, Mallory will be unable to modify the security target or the 1298 BIB and lead Bob to validate the security target as originating from 1299 Alice. 1301 Since BPSec security operations are implemented by placing blocks in 1302 a bundle, there is no in-band mechanism for detecting or correcting 1303 certain cases where Mallory removes blocks from a bundle. If Mallory 1304 removes a BCB block, but keeps the security target, the security 1305 target remains encrypted and there is a possibility that there may no 1306 longer be sufficient information to decrypt the block at its 1307 destination. If Mallory removes both a BCB (or BIB) and its security 1308 target there is no evidence left in the bundle of the security 1309 operation. Similarly, if Mallory removes the BIB but not the 1310 security target there is no evidence left in the bundle of the 1311 security operation. In each of these cases, the implementation of 1312 BPSec MUST be combined with policy configuration at endpoints in the 1313 network which describe the expected and required security operations 1314 that must be applied on transmission and are expected to be present 1315 on receipt. This or other similar out-of-band information is 1316 required to correct for removal of security information in the 1317 bundle. 1319 A limitation of the BIB may exist within the implementation of BIB 1320 validation at the destination node. If Mallory is a legitimate node 1321 within the DTN, the BIB generated by Alice with K_A can be replaced 1322 with a new BIB generated with K_M and forwarded to Bob. If Bob is 1323 only validating that the BIB was generated by a legitimate user, Bob 1324 will acknowledge the message as originating from Mallory instead of 1325 Alice. In order to provide verifiable integrity checks, both a BIB 1326 and BCB should be used. Alice creates a BIB with the protected data 1327 block as the security target and then creates a BCB with both the BIB 1328 and protected data block as its security targets. In this 1329 configuration, since Mallory is only a legitimate node and does not 1330 have access to Alice's key K_A, Mallory is unable to decrypt the BCB 1331 and replace the BIB. 1333 8.2.3. Topology Attacks 1335 If Mallory is in a MITM position within the DTN, she is able to 1336 influence how any bundles that come to her may pass through the 1337 network. Upon receiving and processing a bundle that must be routed 1338 elsewhere in the network, Mallory has three options as to how to 1339 proceed: not forward the bundle, forward the bundle as intended, or 1340 forward the bundle to one or more specific nodes within the network. 1342 Attacks that involve re-routing the packets throughout the network 1343 are essentially a special case of the modification attacks described 1344 in this section where the attacker is modifying fields within the 1345 primary block of the bundle. Given that BPSec cannot encrypt the 1346 contents of the primary block, alternate methods must be used to 1347 prevent this situation. These methods MAY include requiring BIBs for 1348 primary blocks, using encapsulation, or otherwise strategically 1349 manipulating primary block data. The specifics of any such 1350 mitigation technique are specific to the implementation of the 1351 deploying network and outside of the scope of this document. 1353 Furthermore, routing rules and policies may be useful in enforcing 1354 particular traffic flows to prevent topology attacks. While these 1355 rules and policies may utilize some features provided by BPSec, their 1356 definition is beyond the scope of this specification. 1358 8.2.4. Message Injection 1360 Mallory is also able to generate new bundles and transmit them into 1361 the DTN at will. These bundles may either be copies or slight 1362 modifications of previously-observed bundles (i.e., a replay attack) 1363 or entirely new bundles generated based on the Bundle Protocol, 1364 BPSec, or other bundle-related protocols. With these attacks 1365 Mallory's objectives may vary, but may be targeting either the bundle 1366 protocol or application-layer protocols conveyed by the bundle 1367 protocol. 1369 BPSec relies on cipher suite capabilities to prevent replay or forged 1370 message attacks. A BCB used with appropriate cryptographic 1371 mechanisms (e.g., a counter-based cipher mode) may provide replay 1372 protection under certain circumstances. Alternatively, application 1373 data itself may be augmented to include mechanisms to assert data 1374 uniqueness and then protected with a BIB, a BCB, or both along with 1375 other block data. In such a case, the receiving node would be able 1376 to validate the uniqueness of the data. 1378 9. Ciphersuite Authorship Considerations 1380 Cipher suite developers or implementers should consider the diverse 1381 performance and conditions of networks on which the Bundle Protocol 1382 (and therefore BPSec) will operate. Specifically, the delay and 1383 capacity of delay-tolerant networks can vary substantially. Cipher 1384 suite developers should consider these conditions to better describe 1385 the conditions when those suites will operate or exhibit 1386 vulnerability, and selection of these suites for implementation 1387 should be made with consideration to the reality. There are key 1388 differences that may limit the opportunity to leverage existing 1389 cipher suites and technologies that have been developed for use in 1390 traditional, more reliable networks: 1392 o Data Lifetime: Depending on the application environment, bundles 1393 may persist on the network for extended periods of time, perhaps 1394 even years. Cryptographic algorithms should be selected to ensure 1395 protection of data against attacks for a length of time reasonable 1396 for the application. 1398 o One-Way Traffic: Depending on the application environment, it is 1399 possible that only a one-way connection may exist between two 1400 endpoints, or if a two-way connection does exist, the round-trip 1401 time may be extremely large. This may limit the utility of 1402 session key generation mechanisms, such as Diffie-Hellman, as a 1403 two-way handshake may not be feasible or reliable. 1405 o Opportunistic Access: Depending on the application environment, a 1406 given endpoint may not be guaranteed to be accessible within a 1407 certain amount of time. This may make asymmetric cryptographic 1408 architectures which rely on a key distribution center or other 1409 trust center impractical under certain conditions. 1411 10. Defining Other Security Blocks 1413 Other security blocks (OSBs) may be defined and used in addition to 1414 the security blocks identified in this specification. Both the usage 1415 of BIB, BCB, and any future OSBs MAY co-exist within a bundle and MAY 1416 be considered in conformance with BPSec if each of the following 1417 requirements are met by any future identified security blocks. 1419 o Other security blocks (OSBs) MUST NOT reuse any enumerations 1420 identified in this specification, to include the block type codes 1421 for BIB and BCB. 1423 o An OSB definition MUST state whether it can be the target of a BIB 1424 or a BCB. The definition MUST also state whether the OSB can 1425 target a BIB or a BCB. 1427 o An OSB definition MUST provide a deterinistic processing order in 1428 the event that a bundle is received containing BIBs, BCBs, and 1429 OSBs. This processing order MUST NOT alter the BIB and BCB 1430 processing orders identified in this specification. 1432 o An OSB definition MUST provide a canonicalization algorithm if the 1433 default non-primary-block canonicalization algorithm cannot be 1434 used to generate a deterministic input for a cipher suite. This 1435 requirement MAY be waived if the OSB is defined so as to never be 1436 the security target of a BIB or a BCB. 1438 o An OSB definition MAY NOT require any behavior of a BPSEC-BPA that 1439 is in conflict with the behavior identified in this specification. 1440 In particular, the security processing requirements imposed by 1441 this specification MUST be consistent across all BPSEC-BPAs in a 1442 network. 1444 o The behavior of an OSB when dealing with fragmentation MUST be 1445 specified and MUST NOT lead to ambiguous processing states. In 1446 particular, an OSB definition should address how to receive and 1447 process an OSB in a bundle fragment that may or may not also 1448 contain its security target. An OSB definition should also 1449 address whether an OSB may be added to a bundle marked as a 1450 fragment. 1452 Additionally, policy considerations for the management, monitoring, 1453 and configuration associated with blocks SHOULD be included in any 1454 OSB definition. 1456 NOTE: The burden of showing compliance with processing rules is 1457 placed upon the standards defining new security blocks and the 1458 identification of such blocks shall not, alone, require maintenance 1459 of this specification. 1461 11. Conformance 1463 All implementations are strongly RECOMMENDED to provide some method 1464 of hop-by-hop verification by generating a hash to some canonical 1465 form of the bundle and placing an integrity signature on that form 1466 using a BIB. 1468 12. IANA Considerations 1470 This protocol has fields that have been registered by IANA. 1472 12.1. Bundle Block Types 1474 This specification allocates three block types from the existing 1475 "Bundle Block Types" registry defined in [RFC6255] . 1477 Additional Entries for the Bundle Block-Type Codes Registry: 1479 +-------+-----------------------------+---------------+ 1480 | Value | Description | Reference | 1481 +-------+-----------------------------+---------------+ 1482 | 2 | Block Integrity Block | This document | 1483 | 3 | Block Confidentiality Block | This document | 1484 +-------+-----------------------------+---------------+ 1486 Table 2 1488 12.2. Cipher Suite Flags 1490 This protocol has a cipher suite flags field and certain flags are 1491 defined. An IANA registry has been set up as follows. 1493 The registration policy for this registry is: Specification Required 1495 The Value range is: Variable Length 1496 Cipher Suite Flag Registry: 1498 +--------------------------+-------------------------+--------------+ 1499 | Bit Position (right to | Description | Reference | 1500 | left) | | | 1501 +--------------------------+-------------------------+--------------+ 1502 | 0 | Block contains result | This | 1503 | | | document | 1504 | 1 | Block Contains | This | 1505 | | parameters | document | 1506 | 2 | Source EID ref present | This | 1507 | | | document | 1508 | >3 | Reserved | This | 1509 | | | document | 1510 +--------------------------+-------------------------+--------------+ 1512 Table 3 1514 12.3. Parameters and Results 1516 This protocol has fields for cipher suite parameters and results. 1517 The field is a type-length-value triple and a registry is required 1518 for the "type" sub-field. The values for "type" apply to both the 1519 cipher suite parameters and the cipher suite results fields. Certain 1520 values are defined. An IANA registry has been set up as follows. 1522 The registration policy for this registry is: Specification Required 1524 The Value range is: 8-bit unsigned integer. 1526 Cipher Suite Parameters and Results Type Registry: 1528 +---------+-------------------------------------------+-------------+ 1529 | Value | Description | Reference | 1530 +---------+-------------------------------------------+-------------+ 1531 | 0 | reserved | Section 3.6 | 1532 | 1 | initialization vector (IV) | Section 3.6 | 1533 | 2 | reserved | Section 3.6 | 1534 | 3 | key information | Section 3.6 | 1535 | 4 | content-range (pair of Unsigned Integers) | Section 3.6 | 1536 | 5 | integrity signature | Section 3.6 | 1537 | 6 | unassigned | Section 3.6 | 1538 | 7 | salt | Section 3.6 | 1539 | 8 | BCB integrity check value (ICV) | Section 3.6 | 1540 | 9-191 | reserved | Section 3.6 | 1541 | 192-250 | private use | Section 3.6 | 1542 | 251-255 | reserved | Section 3.6 | 1543 +---------+-------------------------------------------+-------------+ 1545 Table 4 1547 13. References 1549 13.1. Normative References 1551 [BPBIS] Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol", 1552 draft-ietf-dtn-bpbis-04 (work in progress), July 2016. 1554 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1555 Requirement Levels", BCP 14, RFC 2119, March 1997. 1557 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1558 Text on Security Considerations", BCP 72, RFC 3552, 1559 DOI 10.17487/RFC3552, July 2003, 1560 . 1562 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1563 IANA Registries", RFC 6255, May 2011. 1565 13.2. Informative References 1567 [BPBISCBOR] 1568 Burleigh, S., "Bundle Protocol CBOR Representation 1569 Specification", draft-burleigh-dtn-rs-cbor-01 (work in 1570 progress), April 2016. 1572 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1573 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1574 Networking Architecture", RFC 4838, April 2007. 1576 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1577 "Bundle Security Protocol Specification", RFC 6257, May 1578 2011. 1580 [SBSP] Birrane, E., "Streamlined Bundle Security Protocol", 1581 draft-birrane-dtn-sbsp-01 (work in progress), October 1582 2015. 1584 Appendix A. Acknowledgements 1586 The following participants contributed technical material, use cases, 1587 and useful thoughts on the overall approach to this security 1588 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1589 Alford and Angela Hennessy of the Laboratory for Telecommunications 1590 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1591 University Applied Physics Laboratory. 1593 Authors' Addresses 1595 Edward J. Birrane, III 1596 The Johns Hopkins University Applied Physics Laboratory 1597 11100 Johns Hopkins Rd. 1598 Laurel, MD 20723 1599 US 1601 Phone: +1 443 778 7423 1602 Email: Edward.Birrane@jhuapl.edu 1604 Kenneth McKeever 1605 The Johns Hopkins University Applied Physics Laboratory 1606 11100 Johns Hopkins Rd. 1607 Laurel, MD 20723 1608 US 1610 Phone: +1 443 778 2237 1611 Email: Ken.McKeever@jhuapl.edu