idnits 2.17.1 draft-ietf-dtn-bpsec-01.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 (March 19, 2016) is 2959 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-03 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 JHU/APL 4 Intended status: Experimental J. Mayer 5 Expires: September 20, 2016 INSYEN AG 6 D. Iannicca 7 NASA GRC 8 March 19, 2016 10 Bundle Protocol Security Specification 11 draft-ietf-dtn-bpsec-01 13 Abstract 15 This document defines a security protocol providing data integrity 16 and confidentiality services for the Bundle Protocol. Capabilities 17 are provided to protect blocks in a bundle along a single path 18 through a network. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on September 20, 2016. 37 Copyright Notice 39 Copyright (c) 2016 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.1. Related Documents . . . . . . . . . . . . . . . . . . . . 3 56 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 57 2. Key Properties . . . . . . . . . . . . . . . . . . . . . . . 6 58 2.1. Block-Level Granularity . . . . . . . . . . . . . . . . . 6 59 2.2. Multiple Security Sources . . . . . . . . . . . . . . . . 6 60 2.3. Mixed Security Policy . . . . . . . . . . . . . . . . . . 7 61 2.4. User-Selected Ciphersuites . . . . . . . . . . . . . . . 8 62 2.5. Deterministic Processing . . . . . . . . . . . . . . . . 8 63 3. Security Block Definitions . . . . . . . . . . . . . . . . . 8 64 3.1. Block Identification . . . . . . . . . . . . . . . . . . 9 65 3.2. Block Representation . . . . . . . . . . . . . . . . . . 9 66 3.2.1. CMS Block Type-Specific Data Fields . . . . . . . . . 10 67 3.2.2. BIB and BCB Block Type-Specific Data Fields . . . . . 10 68 3.3. Block Ordering . . . . . . . . . . . . . . . . . . . . . 11 69 3.4. Block Integrity Block . . . . . . . . . . . . . . . . . . 12 70 3.5. Block Confidentiality Block . . . . . . . . . . . . . . . 13 71 3.6. Cryptographic Message Syntax Block . . . . . . . . . . . 15 72 3.7. Block Interactions . . . . . . . . . . . . . . . . . . . 16 73 3.8. Parameters and Result Fields . . . . . . . . . . . . . . 17 74 3.9. BSP Block Example . . . . . . . . . . . . . . . . . . . . 19 75 4. Security Processing . . . . . . . . . . . . . . . . . . . . . 22 76 4.1. Canonical Forms . . . . . . . . . . . . . . . . . . . . . 22 77 4.1.1. Block Canonicalization . . . . . . . . . . . . . . . 22 78 4.1.2. Considerations . . . . . . . . . . . . . . . . . . . 25 79 4.2. Endpoint ID Confidentiality . . . . . . . . . . . . . . . 25 80 4.3. Bundles Received from Other Nodes . . . . . . . . . . . . 26 81 4.3.1. Receiving BCB Blocks . . . . . . . . . . . . . . . . 26 82 4.3.2. Receiving BIB Blocks . . . . . . . . . . . . . . . . 26 83 4.4. Receiving CMSB Blocks . . . . . . . . . . . . . . . . . . 27 84 4.5. Bundle Fragmentation and Reassembly . . . . . . . . . . . 27 85 4.6. Reactive Fragmentation . . . . . . . . . . . . . . . . . 28 86 5. Key Management . . . . . . . . . . . . . . . . . . . . . . . 28 87 6. Policy Considerations . . . . . . . . . . . . . . . . . . . . 28 88 7. Security Considerations . . . . . . . . . . . . . . . . . . . 29 89 8. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 29 90 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 91 9.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 30 92 9.2. Cipher Suite Flags . . . . . . . . . . . . . . . . . . . 30 93 9.3. Parameters and Results . . . . . . . . . . . . . . . . . 31 94 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 95 10.1. Normative References . . . . . . . . . . . . . . . . . . 31 96 10.2. Informative References . . . . . . . . . . . . . . . . . 32 98 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 32 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 101 1. Introduction 103 This document defines security features for the Bundle Protocol 104 [BPBIS] intended for use in delay-tolerant networks, in order to 105 provide Delay-Tolerant Networking (DTN) security services. 107 The Bundle Protocol is used in DTNs that overlay multiple networks, 108 some of which may be challenged by limitations such as intermittent 109 and possibly unpredictable loss of connectivity, long or variable 110 delay, asymmetric data rates, and high error rates. The purpose of 111 the Bundle Protocol is to support interoperability across such 112 stressed networks. 114 The stressed environment of the underlying networks over which the 115 Bundle Protocol operates makes it important for the DTN to be 116 protected from unauthorized use, and this stressed environment poses 117 unique challenges for the mechanisms needed to secure the Bundle 118 Protocol. Furthermore, DTNs may be deployed in environments where a 119 portion of the network might become compromised, posing the usual 120 security challenges related to confidentiality, integrity, and 121 availability. 123 This document describes the Bundle Protocol Security Specification 124 (BPSec), which provides security services for blocks within a bundle 125 from the bundle source to the bundle destination. Specifically, 126 BPSec provides integrity and confidentiality for bundles along a path 127 through a DTN. 129 BPSec applies, by definition, only to those nodes that implement it, 130 known as "security-aware" nodes. There MAY be other nodes in the DTN 131 that do not implement BPSec. All nodes can interoperate with the 132 exception that BPSec security operations can only happen at BPSec 133 security-aware nodes. 135 1.1. Related Documents 137 This document is best read and understood within the context of the 138 following other DTN documents: 140 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 141 architecture for delay-tolerant networks, but does not discuss 142 security at any length. 144 The DTN Bundle Protocol [BPBIS] defines the format and processing of 145 the blocks used to implement the Bundle Protocol, excluding the 146 security-specific blocks defined here. 148 The Bundle Security Protocol [RFC6257] and Streamlind Bundle Security 149 Protocol [SBSP] introduce the concepts of security blocks for 150 security services. BPSec is based off of these documents. 152 1.2. Terminology 154 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 155 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 156 "OPTIONAL" in this document are to be interpreted as described in 157 [RFC2119]. 159 We introduce the following terminology for purposes of clarity. 161 o Source - the bundle node from which a bundle originates. 163 o Destination - the bundle node to which a bundle is ultimately 164 destined. 166 o Forwarder - the bundle node that forwarded the bundle on its most 167 recent hop. 169 o Intermediate Receiver, Waypoint, or "Next Hop" - the neighboring 170 bundle node to which a forwarder forwards a bundle. 172 o Path - the ordered sequence of nodes through which a bundle passes 173 on its way from source to destination. The path is not 174 necessarily known by the bundle, or any bundle-aware nodes. 176 Figure 1 below is adapted from [BPBIS] and shows four bundle nodes 177 (denoted BN1, BN2, BN3, and BN4) that reside above some transport 178 layer(s). Three distinct transport and network protocols (denoted 179 T1/N1, T2/N2, and T3/N3) are also shown. 181 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 182 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 183 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 184 | T1 v | + ^ T1/T2 v | + ^ T2/T3 v | | ^ T3 | 185 +---------v-+ +-^---------v-+ +-^---------v + +-^---------+ 186 | N1 v | | ^ N1/N2 v | | ^ N2/N3 v | | ^ N3 | 187 +---------v-+ +-^---------v + +-^---------v-+ +-^---------+ 188 | >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ | 189 +-----------+ +------------+ +-------------+ +-----------+ 190 | | | | 191 |<-- An Internet --->| |<--- An Internet --->| 192 | | | | 194 Figure 1: Bundle Nodes Sitting at the Application Layer of the 195 Internet Model 197 BN1 originates a bundle that it forwards to BN2. BN2 forwards the 198 bundle to BN3, and BN3 forwards the bundle to BN4. BN1 is the source 199 of the bundle and BN4 is the destination of the bundle. BN1 is the 200 first forwarder, and BN2 is the first intermediate receiver; BN2 then 201 becomes the forwarder, and BN3 the intermediate receiver; BN3 then 202 becomes the last forwarder, and BN4 the last intermediate receiver, 203 as well as the destination. 205 If node BN2 originates a bundle (for example, a bundle status report 206 or a custodial signal), which is then forwarded on to BN3, and then 207 to BN4, then BN2 is the source of the bundle (as well as being the 208 first forwarder of the bundle) and BN4 is the destination of the 209 bundle (as well as being the final intermediate receiver). 211 We introduce the following security-specific DTN terminology. 213 o Security-Service - the security features supported by this 214 specification: authentication, integrity, and confidentiality. 216 o Security-Source - a bundle node that adds a security block to a 217 bundle. 219 o Security-Target - the portion of a bundle (e.g., the primary 220 block, payload block, extension block, or entire bundle) that 221 receives a security-service as part of a security-operation. 223 o Security Block - a single instance of a BPSec extension block in a 224 bundle. 226 o Security-Operation - the application of a security-service to a 227 specific security-target, notated as OP(security-service, 228 security-target). For example, OP(authentication, bundle) or 229 OP(confidentiality, payload). Every security-operation in a 230 bundle MUST be unique, meaning that a security-service can only be 231 applied to a security-target once in a bundle. A security- 232 operation MAY be implemented by one or more security blocks. 234 2. Key Properties 236 The application of security services in a DTN is a complex endeavor 237 that must consider physical properties of the network, policies at 238 each node, and various application security requirements. Rather 239 than enumerate all potential security implementations in all 240 potential DTN topologies, this specification defines a set of key 241 properties of a security system. The security primitives outlined in 242 this document MUST enable the realization of these properties in a 243 DTN deploying the Bundle Protocol. 245 2.1. Block-Level Granularity 247 Blocks within a bundle represent different types of information. The 248 primary block contains identification and routing information. The 249 payload block carries application data. Extension blocks carry a 250 variety of data that may augment or annotate the payload, or 251 otherwise provide information necessary for the proper processing of 252 a bundle along a path. Therefore, applying a single level and type 253 of security across an entire bundle fails to recognize that blocks in 254 a bundle may represent different types of information with different 255 security needs. 257 Security services within this specification MUST provide block level 258 granularity where applicable such that different blocks within a 259 bundle may have different security services applied to them. 261 For example, within a bundle, a payload might be encrypted to protect 262 its contents, whereas an extension block containing summary 263 information related to the payload might be integrity signed but 264 otherwise unencrypted to provide certain nodes access to payload- 265 related data without providing access to the payload. 267 2.2. Multiple Security Sources 269 The Bundle Protocol allows extension blocks to be added to a bundle 270 at any time during its existence in the DTN. When a waypoint node 271 adds a new extension block to a bundle, that extension block may have 272 security services applied to it by that waypoint. Similarly, a 273 waypoint node may add a security service to an existing extension 274 block, consistent with its security policy. For example, a node 275 representing a boundary between a trusted part of the network and an 276 untrusted part of the network may wish to apply payload encryption 277 for bundles leaving the trusted portion of the network. 279 In each case, a node other than the bundle originator may be adding a 280 security service to the bundle and, as such, the source for the 281 security service will be different than the source of the bundle 282 itself. Security services MUST track their orginating node so as to 283 properly apply policy and key selection associated with processing 284 the security service at the bundle destination. 286 Referring to Figure 1, if the bundle that originates at BN1 is given 287 security blocks by BN1, then BN1 is the security-source for those 288 blocks as well as being the source of the bundle. If the bundle that 289 originates at BN1 is then given a security block by BN2, then BN2 is 290 the security-source for that block even though BN1 remains the bundle 291 source. 293 A bundle MAY have multiple security blocks and these blocks MAY have 294 different security-sources. Each security block in a bundle will be 295 associated with a specific security-operation. All security blocks 296 comprising a security-operation MUST have the same security-source. 298 As required in [BPBIS], forwarding nodes MUST transmit blocks in a 299 bundle in the same order in which they were received. This 300 requirement applies to all DTN nodes, not just ones that implement 301 security processing. Blocks in a bundle MAY be added or deleted 302 according to the applicable specification, but those blocks that are 303 both received and transmitted MUST be transmitted in the same order 304 that they were received. 306 2.3. Mixed Security Policy 308 Different nodes in a DTN may have different security-related 309 capabilities. Some nodes may not be security-aware and will not 310 understand any security-related extension blocks. Other nodes may 311 have security policies that require evaluation of security services 312 at places other than the bundle destination (such as verifying 313 integrity signatures at certain waypoint nodes). Other nodes may 314 ignore any security processing if they are not the destination of the 315 bundle. The security services described in this specification must 316 allow each of these scenarios. 318 Extension blocks representing security services MUST have their block 319 processing flags set such that the block (and bundle, where 320 applicable) will be treated appropriately by non-security-aware 321 nodes. 323 Extension blocks providing integrity services within a bundle MUST 324 support options to allow waypoint nodes to evaluate these signatures 325 if such nodes have the proper configuraton to do so. 327 2.4. User-Selected Ciphersuites 329 The security services defined in this specification rely on a a 330 variety of ciphersuites providing integrity signatures, ciphertext, 331 and other information necessary to populate security blocks. Users 332 may wish to select differing ciphersuites to implement different 333 security services. For example, some users may wish to use a SHA-1 334 based hash for integrity whereas other users may require a SHA-2 hash 335 instead. The security services defined in this specification MUST 336 provide a mechanism for identifying what ciphersuite has been used to 337 populate a security block. 339 2.5. Deterministic Processing 341 In all cases, the processing order of security services within a 342 bundle must avoid ambiguity when evaluating security at the bundle 343 destination. This specification MUST provide determinism in the 344 application and evaluation of security services, even when doing so 345 results in a loss of flexibility. 347 3. Security Block Definitions 349 There are three types of security blocks that MAY be included in a 350 bundle. These are the Block Integrity Block (BIB), the Block 351 Confidentiality Block (BCB), and the Cryptographic Messaging Syntax 352 Block (CMSB). 354 The BIB is used to ensure the integrity of its security-target. 355 The integrity information in the BIB MAY (when possible) be 356 verified by any node in between the BIB security-source and the 357 bundle destination. BIBs MAY be added to, and removed from, 358 bundles as a matter of security policy. 360 The BCB indicates that the security-target has been encrypted, in 361 whole or in part, at the BCB security-source in order to protect 362 its content while in transit. The BCB may be decrypted by 363 appropriate nodes in the network, up to and including the bundle 364 destination, as a matter of security policy. 366 The CMSB contains a Cryptographic Message Syntax (CMS) payload 367 used to describe a security service applied to another extension 368 block. NOTE: Applications may choose to simply place CMS text as 369 the payload to the bundle. In such cases, security is considered 370 to be implemented at the application layer and CMSBs are not 371 required in that case. 373 Certain cipher suites may allow or require multiple instances of a 374 block to appear in the bundle. For example, an integrity cipher 375 suite may require two security blocks, one before the payload block 376 and one after. Despite the presence of two security blocks, they 377 both comprise the same security-operation - OP(integirty, target) in 378 this example. 380 A security-operation MUST NOT be applied more than once in a bundle. 381 For example, the two security-operations: OP(integrity, payload) and 382 OP(integrity, payload) are considered redundant and MUST NOT appear 383 together in a bundle. However, the two security operations 384 OP(integrity, payload) and OP(integrity, extension_block_1) MAY both 385 be present in the bundle. Also, the two security operations 386 OP(integrity, extension_block_1) and OP(integrity, extension_block_2) 387 are unique and may both appear in the same bundle. 389 Many of the fields in these block definitions use the Self-Delimiting 390 Numeric Value (SDNV) type whose format and encoding is as defined in 391 [BPBIS]. 393 3.1. Block Identification 395 This specification requires that every target block of a security 396 operation be uniquely identifiable. The definition of the extension 397 block header from [BPBIS] provides such a mechanism in the "block 398 number", which provides a unique identifier for a block within a 399 bundle. Within this specification, a target block will be identified 400 by its unique block number. 402 3.2. Block Representation 404 Each security block uses the Canonical Bundle Block Format as defined 405 in [BPBIS]. That is, each security block is comprised of the 406 following elements: 408 o Block Type Code 410 o Block Number 412 o Block Processing Control Flags 414 o Block Data Length 416 o Block Type Specific Data Fields 418 3.2.1. CMS Block Type-Specific Data Fields 420 The contents of the CMS block is a single field of CMS data whose 421 length is specified by the BLock Data Length parameter. 423 3.2.2. BIB and BCB Block Type-Specific Data Fields 425 The structure of the BIB and BCB type-specific data fields are 426 identifcal and given in Figure 2. Although the diagram hints at a 427 fixed-format layout, this is purely for the purpose of exposition. 428 Except for the "type" field, all fields are variable in length. 429 Fields annotated with an '*' are optional, with their inclusion in 430 the block indicated by the cipher suite flags field. 432 +---------------------------+-------------------------+ 433 | Security Target (SDNV) | Cipher suite ID (SDNV) | 434 +---------------------------+-------------------------+ 435 | Cipher suite Flags (SDNV) | *Source EID (Compound) | 436 +---------------------------+-------------------------+ 437 | *Parameters (Compound) | *Sec. Result (Compound) | 438 +---------------------------+-------------------------+ 440 Figure 2: BIB and BCB Block Structure 442 The BIB and BCB type-specific data fields consist of the following 443 fields, some of which are optional. 445 o Security-Target (SDNV) - Uniquely identifies the target of the 446 associated security-operation. This MUST be the block number of a 447 block in the bundle. 449 o Cipher suite ID (SDNV) - Identifies the ciphersuite used to 450 implement the security service reprsented by this block. 452 o Cipher suite flags (SDNV) - Identifies which optional security 453 block fields are present in the block. The structure of the 454 cipher suite flags field is shown in Figure 3. The presence of an 455 optional field is indicated by setting the value of the 456 corresponding flag to one. A value of zero indicates the 457 corresponding optional field is not present. The BPSEC cipher 458 suite flags are defined as follows. 460 * bits 6-3 are reserved for future use. 462 * src - bit 2 indicates whether the security source EID is 463 present in the block. This identifief the EID that inserted 464 the security service in the bundle. If the security source is 465 not present then the souce of the block MAY be taken to be the 466 bundle source, the previous hop, or some other EID as defined 467 by security policy. 469 * parm - bit 1 indicates whether or not the cipher suite 470 parameters fields are present in the block. 472 * res - bit 0 indicates whether or not the security result fields 473 are present in the block. 475 Bit Bit Bit Bit Bit Bit Bit 476 6 5 4 3 2 1 0 477 +-----+-----+-----+-----+-----+-----+-----+ 478 | reserved | src |parm | res | 479 +-----+-----+-----+-----+-----+-----+-----+ 481 Figure 3: Cipher suite flags 483 o (OPTIONAL) Parameters - compound field of the following two items. 485 * Length (SDNV) - specifies the length of the next field, which 486 captures the parameters data. 488 * Data - A byte array encoding one or more cipher suite 489 parameters, with each parameter represented as a Type-Length- 490 Value (TLV) triplet. In this triplet, the type and length are 491 represented as SDNVs and the value is a byte array holding the 492 parmeter. See Section 3.8 for a list of parameter types that 493 MUST be supported by BPSEC implementations. BPSEC cipher suite 494 specifications MAY define their own parameters to be 495 represented in this byte array. 497 o (OPTIONAL) Security Result - compound field of the next two items. 499 * Length (SDNV) - specifies the length of the next field, which 500 is the security-result data. 502 * Data - A byte array containing the results of the appropriate 503 cipher suite specific calculation (e.g., a signature, Message 504 Authentication Code (MAC), or cipher-text block key). 506 3.3. Block Ordering 508 A security-operation may be implemented in a bundle using either one 509 or two security blocks. For example, the operation OP(integrity, 510 block) MAY be accomplished by a single BIB block in the bundle, or it 511 MAY be accomplished by two BIB blocks in the bundle. To avoid 512 confusion, we use the following terminology to identify the block or 513 blocks comprising a security-operation. 515 The terms "First" and "Last" are used ONLY when describing multiple 516 security blocks comprising a single security-operation. A "First" 517 block refers to the security block that is closest to the primary 518 block in the canonical form of the bundle. A "Last" block refers to 519 the security block that is furthest from the primary block in the 520 canonical form of the bundle. 522 If a single security block implements the security-operation, then it 523 is referred to as a "Lone" block. For example, when a bundle 524 authentication cipher suite requires a single BIB block we refer to 525 it as a Lone BAB. When a bundle authentication cipher suite requires 526 two BIB blocks we refer to them as the First BIB and the Last BIB. 528 This specification and individual cipher suites impose restrictions 529 on what optional fields must and must not appear in First blocks, 530 Last blocks, and Lone blocks. 532 3.4. Block Integrity Block 534 A BIB is an ASB with the following additional restrictions: 536 The block-type code value MUST be 0x02. 538 The block processing control flags value can be set to whatever 539 values are required by local policy. Cipher suite designers 540 should carefully consider the effect of setting flags that either 541 discard the block or delete the bundle in the event that this 542 block cannot be processed. 544 The security-target MUST match the BLock Number of a block within 545 the bundle. The security-target for a BIB MUST NOT reference a 546 security block defined in this specification (BIB, BCB, or CMSB). 548 The cipher suite ID MUST be documented as an end-to-end 549 authentication-cipher suite or as an end-to-end error-detection- 550 cipher suite. 552 The cipher suite parameters field MAY be present in either a Lone 553 BIB or a First BIB. This field MUST NOT be present in a Last BIB. 555 An EID-reference to the security-source MAY be present in either a 556 Lone BIB or a First BIB. This field MUST NOT be present in a Last 557 BIB. 559 The security-result captures the result of applying the cipher 560 suite calculation (e.g., the MAC or signature) to the relevant 561 parts of the security-target, as specified in the cipher suite 562 definition. This field MUST be present in either a Lone BIB or a 563 Last BIB. This field MUST NOT be present in a First BIB. 565 The cipher suite MAY process less than the entire security-target. 566 If the cipher suite processes less than the complete, original 567 security-target, the cipher suite parameters MUST specify which 568 bytes of the security-target are protected. 570 Notes: 572 o Since OP(integrity, target) is allowed only once in a bundle per 573 target, it is RECOMMENDED that users wishing to support multiple 574 integrity signatures for the same target define a multi-signature 575 cipher suite, capturing multiple security results in cipher suite 576 parameters. 578 o For some cipher suites, (e.g., those using asymmetric keying to 579 produce signatures or those using symmetric keying with a group 580 key), the security information MAY be checked at any hop on the 581 way to the destination that has access to the required keying 582 information, in accordance with Section 3.7. 584 o The use of a generally available key is RECOMMENDED if custodial 585 transfer is employed and all nodes SHOULD verify the bundle before 586 accepting custody. 588 3.5. Block Confidentiality Block 590 A BCB is an ASB with the following additional restrictions: 592 The block-type code value MUST be 0x03. 594 The block processing control flags value can be set to whatever 595 values are required by local policy, except that a Lone BCB or 596 First BCB MUST have the "replicate in every fragment" flag set. 597 This indicates to a receiving node that the payload portion in 598 each fragment represents cipher-text. This flag SHOULD NOT be set 599 otherwise. Cipher suite designers should carefully consider the 600 effect of setting flags that either discard the block or delete 601 the bundle in the event that this block cannot be processed. 603 The security-target MUST match the BLock Number of a block within 604 the bundle. The security-target for a BCB MAY reference the 605 payload block, a non-security extension block, or a BIB block. 607 The cipher suite ID MUST be documented as a confidentiality cipher 608 suite. 610 Key-information, if available, MUST appear only in a Lone BCB or a 611 First BCB. 613 Any additional bytes generated as a result of encryption and/or 614 authentication processing of the security-target SHOULD be placed 615 in an "integrity check value" field (see Section 3.8) in the 616 security-result of the Lone BCB or Last BCB. 618 The cipher suite parameters field MAY be present in either a Lone 619 BCB or a First BCB. This field MUST NOT be present in a Last BCB. 621 An EID-reference to the security-source MAY be present in either a 622 Lone BCB or a First BCB. This field MUST NOT be present in a Last 623 BCB. The security-source can also be specified as part of key- 624 information described in Section 3.8. 626 The security-result MAY be present in either a Lone BCB or a Last 627 BCB. This field MUST NOT be present in a First BCB. This 628 compound field normally contains fields such as an encrypted 629 bundle encryption key and/or authentication tag. 631 The BCB is the only security block that modifies the contents of its 632 security-target. When a BCB is applied, the security-target body 633 data are encrypted "in-place". Following encryption, the security- 634 target body data contains cipher-text, not plain-text. Other 635 security-target block fields (such as type, processing control flags, 636 and length) remain unmodified. 638 Fragmentation, reassembly, and custody transfer are adversely 639 affected by a change in size of the payload due to ambiguity about 640 what byte range of the block is actually in any particular fragment. 641 Therefore, when the security-target of a BCB is the bundle payload, 642 the BCB MUST NOT alter the size of the payload block body data. 643 Cipher suites SHOULD place any block expansion, such as 644 authentication tags (integrity check values) and any padding 645 generated by a block-mode cipher, into an integrity check value item 646 in the security-result field (see Section 3.8) of the BCB. This "in- 647 place" encryption allows fragmentation, reassembly, and custody 648 transfer to operate without knowledge of whether or not encryption 649 has occurred. 651 Notes: 653 o The cipher suite MAY process less than the entire original 654 security-target body data. If the cipher suite processes less 655 than the complete, original security-target body data, the BCB for 656 that security-target MUST specify, as part of the cipher suite 657 parameters, which bytes of the body data are protected. 659 o The BCB's "discard" flag may be set independently from its 660 security-target's "discard" flag. Whether or not the BCB's 661 "discard" flag is set is an implementation/policy decision for the 662 encrypting node. (The "discard" flag is more properly called the 663 "Discard if block cannot be processed" flag.) 665 o A BCB MAY include information as part of additional authenticated 666 data to address parts of the target block, such as EID references, 667 that are not converted to cipher-text. 669 3.6. Cryptographic Message Syntax Block 671 A CMSB is an ASB with the following additional restrictions: 673 The block-type code value MUST be 0x04. 675 The content of the block must contain valid CMS data, as defined 676 in [RFC5652] , and encoded in X.690 BER or DER encoding. 678 The block processing control flags value can be set to whatever 679 values are required by local policy. This flag SHOULD NOT be set 680 otherwise. Cipher suite designers should carefully consider the 681 effect of setting flags that either discard the block or delete 682 the bundle in the event that this block cannot be processed. 684 The security-target MUST uniquely identify a block within the 685 bundle. The reserved block type 0x01 specifies the singleton 686 payload block. 688 The security operation(s) will be performed on the security-target 689 block's data and the resulting CMS content will be stored within 690 the CMSB block's security-result field. The security-target 691 block's data will then be removed. 693 A CMSB block MAY include multiple CMS security operations within a 694 single block to allow for multiple nested operations to be 695 performed on a bundle block. Multiple CMSB blocks MAY be included 696 in a bundle as long as the security-target for each is unique. 698 Key-information, if available, MUST appear within the CMS content 699 contained in the security-result field. 701 A CMSB block is created with its corresponding security-target field 702 pointing to a unique bundle block. The CMS security operations are 703 performed upon the security-target's data field and the resulting 704 encoded CMS content is stored within the CMS security-result field of 705 the CMSB's payload. The security-target block's data MAY be left 706 intact, replaced with alternate data, or completely erased based on 707 the specification of the utilized CMS ciphersuite definition and 708 applicable policy. 710 Multiple CMS operations may be nested within a single CMSB block to 711 allow more than one security operation to be performed upon a 712 security-target. 714 CMS Operations can be considered to have BPSec parallels: CMSB 715 Enveloped-Data content type SHALL be considered as equivalent to a 716 BPSec BCB block, and a CMSB Signed-Data type SHALL be considered as 717 equivalent to a BPSec BIB block. 719 3.7. Block Interactions 721 The security-block types defined in this specification are designed 722 to be as independent as possible. However, there are some cases 723 where security blocks may share a security-target creating processing 724 dependencies. 726 If confidentiality is being applied to a target that already has 727 integrity applied to it, then an undesirable condition occurs where a 728 security-aware intermediate node would be unable to check the 729 integrity result of a block because the block contents have been 730 encrypted after the integrity signature was generated. To address 731 this concern, the following processing rules MUST be followed. 733 o If confidentiality is to be applied to a target, it MUST also be 734 applied to every integrity operation already defined for that 735 target. This means that if a BCB is added to encrypt a block, 736 another BCB MUST also be added to encrypt a BIB also targeting 737 that block. 739 o An integrity operation MUST NOT be applied to a security-target if 740 a BCB in the bundle shares the same security-target. This 741 prevents ambiguity in the order of evaluation when receiving a BIB 742 and a BCB for a given security-target. 744 o An integrity value MUST NOT be evaluated if the BIB providing the 745 integrity value is the security target of an existing BCB block in 746 the bundle. In such a case, the BIB data contains cipher-text as 747 it has been encrypted. 749 o An integrity value MUST NOT be evaluated if the security-target of 750 the BIB is also the security-target of a BCB in the bundle. In 751 such a case, the security-target data contains cipher-text as it 752 has been encrypted. 754 o As mentioned in Section 3.5, a BIB MUST NOT have a BCB as its 755 security target. BCBs may embed integrity results as part of 756 cipher suite parameters. 758 o As mentioned in Section 4.4, CMS operations are considered to have 759 operational parallels. When a CMSB is used, these parallels MUST 760 be considered for block interactions (e.g., a Signed-Data 761 structure MUST NOT be evaluated if the security-target of the 762 operation is also the security-target of a BCB) 764 o If a single bundle is going to contain a CMSB as well as other 765 security blocks, the CMS operations MUST be performed and the CMSB 766 MUST be created before any other security operation is applied. 768 Additionally, since the CMSB block may contain either integrity or 769 confidentiality information in its encapsulated CMS, there is no way 770 to evaluate conflicts when a BIB/BCB and a CMSB have the same 771 security target. To address this concern, the following processing 772 rules MUST be followed. 774 o If an extension block is the target of a BIB or a BCB, then the 775 extension block MUST NOT also be the target of a CMSB, and vice- 776 versa. 778 o Generally, a CMSB MUST be processed before any BIB or BCB blocks 779 are processed. 781 These restrictions on block interactions impose a necessary ordering 782 when applying security operations within a bundle. Specifically, for 783 a given security-target, BIBs MUST be added before BCBs. This 784 ordering MUST be preserved in cases where the current BPA is adding 785 all of the security blocks for the bundle or whether the BPA is a 786 waypoint adding new security blocks to a bundle that already contains 787 security blocks. 789 3.8. Parameters and Result Fields 791 Various cipher suites include several items in the cipher suite 792 parameters and/or security-result fields. Which items MAY appear is 793 defined by the particular cipher suite description. A cipher suite 794 MAY support several instances of the same type within a single block. 796 Each item is represented as a type-length-value. Type is a single 797 byte indicating the item. Length is the count of data bytes to 798 follow, and is an SDNV-encoded integer. Value is the data content of 799 the item. 801 Item types, name, and descriptions are defined as follows. 803 Cipher suite parameters and result fields. 805 +-------+----------------+------------------------------------------+ 806 | Type | Name | Description | 807 +-------+----------------+------------------------------------------+ 808 | 0 | Reserved | | 809 +-------+----------------+------------------------------------------+ 810 | 1 | Initialization | A random value, typically eight to | 811 | | Vector (IV) | sixteen bytes. | 812 +-------+----------------+------------------------------------------+ 813 | 2 | Reserved | | 814 +-------+----------------+------------------------------------------+ 815 | 3 | Key | Material encoded or protected by the key | 816 | | Information | management system and used to transport | 817 | | | an ephemeral key protected by a long- | 818 | | | term key. | 819 +-------+----------------+------------------------------------------+ 820 | 4 | Content Range | Pair of SDNV values (offset,length) | 821 | | | specifying the range of payload bytes to | 822 | | | which an operation applies. The offset | 823 | | | MUST be the offset within the original | 824 | | | bundle, even if the current bundle is a | 825 | | | fragment. | 826 +-------+----------------+------------------------------------------+ 827 | 5 | Integrity | Result of BAB or BIB digest or other | 828 | | Signatures | signing operation. | 829 +-------+----------------+------------------------------------------+ 830 | 6 | Unassigned | | 831 +-------+----------------+------------------------------------------+ 832 | 7 | Salt | An IV-like value used by certain | 833 | | | confidentiality suites. | 834 +-------+----------------+------------------------------------------+ 835 | 8 | BCB Integrity | Output from certain confidentiality | 836 | | Check Value | cipher suite operations to be used at | 837 | | (ICV) / | the destination to verify that the | 838 | | Authentication | protected data has not been modified. | 839 | | Tag | This value MAY contain padding if | 840 | | | required by the cipher suite. | 841 +-------+----------------+------------------------------------------+ 842 | 9-255 | Reserved | | 843 +-------+----------------+------------------------------------------+ 845 Table 1 847 3.9. BSP Block Example 849 An example of BPSec blocks applied to a bundle is illustrated in 850 Figure 4. In this figure the first column represents blocks within a 851 bundle and the second column represents a unique identifier for each 852 block, suitable for use as the security-target of a BPSec security- 853 block. Since the mechanism and format of a security-target is not 854 specified in this document, the terminology B1...Bn is used to 855 identify blocks in the bundle for the purposes of illustration. 857 Block in Bundle ID 858 +=================================+====+ 859 | Primary Block | B1 | 860 +---------------------------------+----+ 861 | Lone BIB | B2 | 862 | OP(integrity, target=B1) | | 863 +---------------------------------+----+ 864 | Lone BCB | B3 | 865 | OP(confidentiality, target=B4) | | 866 +---------------------------------+----+ 867 | Extension Block | B4 | 868 +---------------------------------+----+ 869 | Lone BIB | B5 | 870 | OP(integrity, target=B6) | | 871 +---------------------------------+----+ 872 | Extension Block | B6 | 873 +---------------------------------+----+ 874 | Lone BCB | B7 | 875 | OP(confidentiality, target=B8) | | 876 +---------------------------------+----+ 877 | Lone BIB (encrypted by B7) | B8 | 878 | OP(integrity, target=B10) | | 879 +---------------------------------+----| 880 | Lone BCB | B9 | 881 | OP(confidentiality, target=B10) | | 882 +---------------------------------+----+ 883 | Payload Block |B10 | 884 +---------------------------------+----+ 886 Figure 4: Sample Use of BSP Blocks 888 In this example a bundle has five non-security-related blocks: the 889 primary block (B1), three extension blocks (B4,B6,B9), and a payload 890 block (B11). The following security applications are applied to this 891 bundle. 893 o An integrity signature applied to the canonicalized primary block. 894 This is accomplished by a single BIB (B2). 896 o Confidentiality for the first extension block (B4). This is 897 accomplished by a single BCB block (B3). 899 o Integrity for the second extension block (B6). This is 900 accomplished by a single BIB block (B5). NOTE: If the extension 901 block B6 contains a representation of the serialized bundle (such 902 as a hash over all blocks in the bundle at the time of its last 903 transmission) then the BIB block is also providing an 904 authentication service from the prior BPSEC-BPA to this BPSEC-BPA. 906 o An integrity signature on the payload (B10). This is accomplished 907 by a single BIB block (B8). 909 o Confidentiality for the payload block and it's integrity 910 signature. This is accomplished by two Lone BCB blocks: B7 911 encrypting B8, and B9 encrypting B10. 913 Block in Bundle ID 914 +=========================================+====+ 915 | Primary Block | B1 | 916 +-----------------------------------------+----+ 917 | First BAB | B2 | 918 | OP(authentication, Bundle) | | 919 +-----------------------------------------+----+ 920 | Lone CMSB | B3 | 921 | security-target=0x01 | | 922 | security-result= | | 923 | | | 924 | Signed-Data { | | 925 | Digest Algorithm(s), | | 926 | Enveloped-Data { | | 927 | Encrypted Data, | | 928 | Encrypted Encryption Key(s) | | 929 | }, | | 930 | Signature(s) and Certificate Chain(s) | | 931 | } | | 932 | | | 933 +-----------------------------------------+----+ 934 | Payload Block | B4 | 935 | (Empty Data Field) | | 936 +-----------------------------------------+----+ 937 | Last BAB | B5 | 938 | OP(authentication, Bundle) | | 939 +-----------------------------------------+----+ 941 Figure 5: Sample Bundle With CMS Block 943 In this example a bundle has two non-security-related blocks: the 944 primary block (B1) and a payload block (B4). This method would allow 945 for the bundle to carry multiple CMS payloads by utilizing a multiple 946 CMSB ASBs. The following security applications are applied to this 947 bundle. 949 o Authentication over the bundle. This is accomplished by two BAB 950 blocks: B2 and B5. 952 o Encrypted and signed CMS content contained within the CMSB block. 953 The first CMS operation, encryption, is performed on the data 954 contained within the block the security-target points to, in this 955 case, the payload block. The resulting encrypted data is then 956 signed and the final CMS content is stored within the CMSB block's 957 security-result field. The payload block's data is subsequently 958 removed now that the original data has been encoded within the 959 CMSB block. 961 4. Security Processing 963 This section describes the security aspects of bundle processing. 965 4.1. Canonical Forms 967 In order to verify a signature of a block, the exact same bits, in 968 the exact same order, MUST be input to the calculation upon 969 verification as were input upon initial computation of the original 970 signature value. 972 Many fields in various blocks are stored as variable-length SDNVs. 973 These are canonicalized into an "unpacked form" as eight-byte fixed- 974 width fields in network byte order. 976 4.1.1. Block Canonicalization 978 This algorithm protects those parts of a block that SHOULD NOT be 979 changed in transit. 981 There are three types of blocks that may undergo block 982 canonicalization: the primary block, the payload block, or an 983 extension block. 985 4.1.1.1. Primary Block Canonicalization 987 The canonical form of the primary block is shown in Figure 6. 988 Essentially, it de-references the dictionary block, adjusts lengths 989 where necessary, and ignores flags that may change in transit. 991 +----------------+----------------+----------------+----------------+ 992 | Version | Processing flags (incl. COS and SRR) | 993 +----------------+----------------+---------------------------------+ 994 | Canonical primary block length | 995 +----------------+----------------+---------------------------------+ 996 | Destination endpoint ID length | 997 +----------------+----------------+---------------------------------+ 998 | Destination endpoint ID | 999 +----------------+----------------+---------------------------------+ 1000 | Source endpoint ID length | 1001 +----------------+----------------+----------------+----------------+ 1002 | Source endpoint ID | 1003 +----------------+----------------+---------------------------------+ 1004 | Report-to endpoint ID length | 1005 +----------------+----------------+----------------+----------------+ 1006 | Report-to endpoint ID | 1007 +----------------+----------------+----------------+----------------+ 1008 + Creation Timestamp (2 x SDNV) + 1009 +---------------------------------+---------------------------------+ 1010 | Lifetime | 1011 +----------------+----------------+----------------+----------------+ 1013 Figure 6: The Canonical Form of the Primary Bundle Block 1015 The fields shown in Figure 6 are as follows: 1017 o The version value is the single-byte value in the primary block. 1019 o The processing flags value in the primary block is an SDNV, and 1020 includes the class-of-service (COS) and status report request 1021 (SRR) fields. For purposes of canonicalization, the unpacked SDNV 1022 is ANDed with mask 0x0000 0000 0007 C1BE to set to zero all 1023 reserved bits and the "bundle is a fragment" bit. 1025 o The canonical primary block length value is a four-byte value 1026 containing the length (in bytes) of this structure, in network 1027 byte order. 1029 o The destination endpoint ID length and value are the length (as a 1030 four-byte value in network byte order) and value of the 1031 destination endpoint ID from the primary bundle block. The URI is 1032 simply copied from the relevant part(s) of the dictionary block 1033 and is not itself canonicalized. Although the dictionary entries 1034 contain "null-terminators", the null-terminators are not included 1035 in the length or the canonicalization. 1037 o The source endpoint ID length and value are handled similarly to 1038 the destination. 1040 o The report-to endpoint ID length and value are handled similarly 1041 to the destination. 1043 o The unpacked SDNVs for the creation timestamp and lifetime are 1044 copied from the primary block. 1046 o Fragment offset and total application data unit length are 1047 ignored, as is the case for the "bundle is a fragment" bit 1048 mentioned above. If the payload data to be canonicalized is less 1049 than the complete, original bundle payload, the offset and length 1050 are specified in the cipher suite parameters. 1052 4.1.1.2. Payload Block Canonicalization 1054 When canonicalizing the payload block, the block processing control 1055 flags value used for canonicalization is the unpacked SDNV value with 1056 reserved and mutable bits masked to zero. The unpacked value is 1057 ANDed with mask 0x0000 0000 0000 0077 to zero reserved bits and the 1058 "last block" bit. The "last block" bit is ignored because BABs and 1059 other security blocks MAY be added for some parts of the journey but 1060 not others, so the setting of this bit might change from hop to hop. 1062 Payload blocks are canonicalized as-is, with the exception that, in 1063 some instances, only a portion of the payload data is to be 1064 protected. In such a case, only those bytes are included in the 1065 canonical form, and additional cipher suite parameters are required 1066 to specify which part of the payload is protected, as discussed 1067 further below. 1069 4.1.1.3. Extension Block Canonicalization 1071 When canonicalizing an extension block, the block processing control 1072 flags value used for canonicalization is the unpacked SDNV value with 1073 reserved and mutable bits masked to zero. The unpacked value is 1074 ANDed with mask 0x0000 0000 0000 0057 to zero reserved bits, the 1075 "last block" flag and the "Block was forwarded without being 1076 processed" bit. The "last block" flag is ignored because BABs and 1077 other security blocks MAY be added for some parts of the journey but 1078 not others, so the setting of this bit might change from hop to hop. 1080 The "Block was forwarded without being processed" flag is ignored 1081 because the bundle may pass through nodes that do not understand that 1082 extension block and this flag would be set. 1084 Endpoint ID references in blocks are canonicalized using the de- 1085 referenced text form in place of the reference pair. The reference 1086 count is not included, nor is the length of the endpoint ID text. 1088 The EID reference is, therefore, canonicalized as :, 1089 which includes the ":" character. 1091 Since neither the length of the canonicalized EID text nor a null- 1092 terminator is used in EID canonicalization, a separator token MUST be 1093 used to determine when one EID ends and another begins. When 1094 multiple EIDs are canonicalized together, the character "," SHALL be 1095 placed between adjacent instances of EID text. 1097 The block-length is canonicalized as its unpacked SDNV value. If the 1098 data to be canonicalized is less than the complete, original block 1099 data, this field contains the size of the data being canonicalized 1100 (the "effective block") rather than the actual size of the block. 1102 4.1.2. Considerations 1104 o The canonical forms for the bundle and various extension blocks is 1105 not transmitted. It is simply an artifact used as input to 1106 digesting. 1108 o We omit the reserved flags because we cannot determine if they 1109 will change in transit. The masks specified above will have to be 1110 revised if additional flags are defined and they need to be 1111 protected. 1113 o All SDNV fields here are canonicalized as eight-byte unpacked 1114 values in network byte order. Length fields are canonicalized as 1115 four-byte values in network byte order. Encoding does not need 1116 optimization since the values are never sent over the network. 1118 o These canonicalization algorithms assume that endpoint IDs 1119 themselves are immutable and they are unsuitable for use in 1120 environments where that assumption might be violated. 1122 o Cipher suites MAY define their own canonicalization algorithms and 1123 require the use of those algorithms over the ones provided in this 1124 specification. 1126 4.2. Endpoint ID Confidentiality 1128 Every bundle has a primary block that contains the source and 1129 destination endpoint IDs, and possibly other EIDs (in the dictionary 1130 field) that cannot be encrypted. If endpoint ID confidentiality is 1131 required, then bundle-in-bundle encapsulation can solve this problem 1132 in some instances. 1134 Similarly, confidentiality requirements MAY also apply to other parts 1135 of the primary block (e.g., the current-custodian), and that is 1136 supported in the same manner. 1138 4.3. Bundles Received from Other Nodes 1140 Security blocks MUST be processed in a specific order when received 1141 by a security-aware node. The processing order is as follows. 1143 o All BCB blocks in the bundle MUST be evaluated prior to evaluating 1144 any BIBs in the bundle. When BIBs and BCBs share a security- 1145 target, BCBs MUST be evaluated first and BIBs second. 1147 4.3.1. Receiving BCB Blocks 1149 If the bundle has a BCB and the receiving node is the destination for 1150 the bundle, the node MUST decrypt the relevant parts of the security- 1151 target in accordance with the cipher suite specification. 1153 If the relevant parts of an encrypted payload cannot be decrypted 1154 (i.e., the decryption key cannot be deduced or decryption fails), 1155 then the bundle MUST be discarded and processed no further; in this 1156 case, a bundle deletion status report (see [BPBIS]) indicating the 1157 decryption failure MAY be generated. If any other encrypted 1158 security-target cannot be decrypted then the associated security- 1159 target and all security blocks associated with that target MUST be 1160 discarded and processed no further. 1162 When a BCB is decrypted, the recovered plain-text MUST replace the 1163 cipher-text in the security-target body data 1165 4.3.2. Receiving BIB Blocks 1167 A BIB MUST NOT be processed if the security-target of the BIB is also 1168 the security-target of a BCB in the bundle. Given the order of 1169 operations mandated by this specification, when both a BIB and a BCB 1170 share a security-target, it means that the security-target MUST have 1171 been encrypted after it was integrity signed and, therefore, the BIB 1172 cannot be verified until the security-target has been decrypted by 1173 processing the BCB. 1175 If the security policy of a security-aware node specifies that a 1176 bundle SHOULD apply integrity to a specific security-target and no 1177 such BIB is present in the bundle, then the node MUST process this 1178 security-target in accordance with the security policy. This MAY 1179 involve removing the security-target from the bundle. If the removed 1180 security-target is the payload or primary block, the bundle MAY be 1181 discarded. This action may occur at any node that has the ability to 1182 verify an integrity signature, not just the bundle destination. 1184 If the bundle has a BIB and the receiving node is the destination for 1185 the bundle, the node MUST verify the security-target in accordance 1186 with the cipher suite specification. If a BIB check fails, the 1187 security-target has failed to authenticate and the security-target 1188 SHALL be processed according to the security policy. A bundle status 1189 report indicating the failure MAY be generated. Otherwise, if the 1190 BIB verifies, the security-target is ready to be processed for 1191 delivery. 1193 If the bundle has a BIB and the receiving node is not the bundle 1194 destination, the receiving node MAY attempt to verify the value in 1195 the security-result field. If the check fails, the node SHALL 1196 process the security-target in accordance to local security policy. 1197 It is RECOMMENDED that if a payload integrity check fails at a 1198 waypoint that it is processed in the same way as if the check fails 1199 at the destination. 1201 4.4. Receiving CMSB Blocks 1203 A CMSB MUST NOT be processed if its security target is also the 1204 security target of any BIB or BCB in the bundle. 1206 The security services provided by a CMSB will be considered 1207 successful if all services in the CMSB are validated. If any one 1208 service encapsulated in the CMSB fails to validate, then the CMSB 1209 MUST be considered as having failed to validate and MUST be 1210 dispositioned in accordance with security policy. 1212 4.5. Bundle Fragmentation and Reassembly 1214 If it is necessary for a node to fragment a bundle and security 1215 services have been applied to that bundle, the fragmentation rules 1216 described in [BPBIS] MUST be followed. As defined there and repeated 1217 here for completeness, only the payload may be fragmented; security 1218 blocks, like all extension blocks, can never be fragmented. In 1219 addition, the following security-specific processing is REQUIRED: 1221 o Due to the complexity of bundle fragmentation, including the 1222 possibility of fragmenting bundle fragments, integrity and 1223 confidentiality operations are not to be applied to a bundle 1224 fragment. Specifically, a BCB or BIB MUST NOT be added to a 1225 bundle fragment, even if the security-target of the security block 1226 is not the payload. When integrity and confidentiality must be 1227 applied to a fragment, we RECOMMEND that encapsulation be used 1228 instead. 1230 o The authentication security policy requirements for a bundle MUST 1231 be applied individually to all the bundles resulting from a 1232 fragmentation event. 1234 o The decision to fragment a bundle MUST be made prior to adding 1235 authentication to the bundle. The bundle MUST first be fragmented 1236 and authentication applied to each individual fragment. 1238 4.6. Reactive Fragmentation 1240 When a partial bundle has been received, the receiving node SHALL 1241 consult its security policy to determine if it MAY fragment the 1242 bundle, converting the received portion into a bundle fragment for 1243 further forwarding. Whether or not reactive fragmentation is 1244 permitted SHALL depend on the security policy and the cipher suite 1245 used to calculate the BAB authentication information, if required. 1247 Specifically, if the security policy does not require authentication, 1248 then reactive fragmentation MAY be permitted. If the security policy 1249 does require authentication, then reactive fragmentation MUST NOT be 1250 permitted if the partial bundle is not sufficient to allow 1251 authentication. 1253 If reactive fragmentation is allowed, then all BAB blocks must be 1254 removed from created fragments. 1256 5. Key Management 1258 Key management in delay-tolerant networks is recognized as a 1259 difficult topic and is one that this specification does not attempt 1260 to solve. 1262 6. Policy Considerations 1264 When implementing BPSec, several policy decisions must be considered. 1265 This section describes key policies that affect the generation, 1266 forwarding, and receipt of bundles that are secured using this 1267 specification. 1269 o If a bundle is received that contains more than one security- 1270 operation, in violation of BPSec, then the BPA must determine how 1271 to handle this bundle. The bundle may be discarded, the block 1272 affected by the security-operation may be discarded, or one 1273 security-operation may be favored over another. 1275 o BPAs in the network MUST understand what security-operations they 1276 should apply to bundles. This decision may be based on the source 1277 of the bundle, the destination of the bundle, or some other 1278 information related to the bundle. 1280 o If an intermediate receiver has been configured to add a security- 1281 operation to a bundle, and the received bundle already has the 1282 security-operation applied, then the receiver MUST understand what 1283 to do. The receiver may discard the bundle, discard the security- 1284 target and associated BPSec blocks, replace the security- 1285 operation, or some other action. 1287 o It is recommended that security operations only be applied to the 1288 payload block, the primary block, and any block-types specifically 1289 identified in the security policy. If a BPA were to apply 1290 security operations such as integrity or confidentiality to every 1291 block in the bundle, regardless of the block type, there could be 1292 downstream errors processing blocks whose contents must be 1293 inspected at every hop in the network path. 1295 7. Security Considerations 1297 Certain applications of DTN need to both sign and encrypt a message, 1298 and there are security issues to consider with this. 1300 o To provide an assurance that a security-target came from a 1301 specific source and has not been changed, then it should be signed 1302 with a BIB. 1304 o To ensure that a security-target cannot be inspected during 1305 transit, it should be encrypted with a BCB. 1307 o Adding a BIB to a security-target that has already been encrypted 1308 by a BCB is not allowed. Therefore, we recommend three methods to 1309 add an integrity signature to an encrypted security-target. 1310 First, at the time of encryption, an integrity signature may be 1311 generated and added to the BCB for the security-target as 1312 additional information in the security-result field. Second, the 1313 encrypted block may be replicated as a new block and integrity 1314 signed. Third, an encapsulation scheme may be applied to 1315 encapsulate the security-target (or the entire bundle) such that 1316 the encapsulating structure is, itself, no longer the security- 1317 target of a BCB and may therefore be the security-target of a BIB. 1319 8. Conformance 1321 All implementations are strongly RECOMMENDED to provide some method 1322 of hop-by-hop verification by generating a hash to some canonical 1323 form of the bundle and placing an integrity signature on that form 1324 using a BIB. 1326 9. IANA Considerations 1328 This protocol has fields that have been registered by IANA. 1330 9.1. Bundle Block Types 1332 This specification allocates three block types from the existing 1333 "Bundle Block Types" registry defined in [RFC6255] . 1335 Additional Entries for the Bundle Block-Type Codes Registry: 1337 +-------+-----------------------------+---------------+ 1338 | Value | Description | Reference | 1339 +-------+-----------------------------+---------------+ 1340 | 2 | Block Integrity Block | This document | 1341 | 3 | Block Confidentiality Block | This document | 1342 | 4 | CMS Block | This document | 1343 +-------+-----------------------------+---------------+ 1345 Table 2 1347 9.2. Cipher Suite Flags 1349 This protocol has a cipher suite flags field and certain flags are 1350 defined. An IANA registry has been set up as follows. 1352 The registration policy for this registry is: Specification Required 1354 The Value range is: Variable Length 1356 Cipher Suite Flag Registry: 1358 +--------------------------+-------------------------+--------------+ 1359 | Bit Position (right to | Description | Reference | 1360 | left) | | | 1361 +--------------------------+-------------------------+--------------+ 1362 | 0 | Block contains result | This | 1363 | | | document | 1364 | 1 | Block Contains | This | 1365 | | parameters | document | 1366 | 2 | Source EID ref present | This | 1367 | | | document | 1368 | >3 | Reserved | This | 1369 | | | document | 1370 +--------------------------+-------------------------+--------------+ 1372 Table 3 1374 9.3. Parameters and Results 1376 This protocol has fields for cipher suite parameters and results. 1377 The field is a type-length-value triple and a registry is required 1378 for the "type" sub-field. The values for "type" apply to both the 1379 cipher suite parameters and the cipher suite results fields. Certain 1380 values are defined. An IANA registry has been set up as follows. 1382 The registration policy for this registry is: Specification Required 1384 The Value range is: 8-bit unsigned integer. 1386 Cipher Suite Parameters and Results Type Registry: 1388 +---------+---------------------------------+---------------+ 1389 | Value | Description | Reference | 1390 +---------+---------------------------------+---------------+ 1391 | 0 | reserved | This document | 1392 | 1 | initialization vector (IV) | This document | 1393 | 2 | reserved | This document | 1394 | 3 | key-information | This document | 1395 | 4 | content-range (pair of SDNVs) | This document | 1396 | 5 | integrity signature | This document | 1397 | 6 | unassigned | This document | 1398 | 7 | salt | This document | 1399 | 8 | BCB integrity check value (ICV) | This document | 1400 | 9-191 | reserved | This document | 1401 | 192-250 | private use | This document | 1402 | 251-255 | reserved | This document | 1403 +---------+---------------------------------+---------------+ 1405 Table 4 1407 10. References 1409 10.1. Normative References 1411 [BPBIS] Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol", 1412 draft-ietf-dtn-bpbis-03 (work in progress), March 2016. 1414 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1415 Requirement Levels", BCP 14, RFC 2119, March 1997. 1417 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 1418 RFC 5652, DOI 10.17487/RFC5652, September 2009, 1419 . 1421 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1422 IANA Registries", RFC 6255, May 2011. 1424 10.2. Informative References 1426 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1427 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1428 Networking Architecture", RFC 4838, April 2007. 1430 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1431 "Bundle Security Protocol Specification", RFC 6257, May 1432 2011. 1434 [SBSP] Birrane, E., "Streamlined Bundle Security Protocol", 1435 draft-birrane-dtn-sbsp-01 (work in progress), October 1436 2015. 1438 Appendix A. Acknowledgements 1440 The following participants contributed technical material, use cases, 1441 and useful thoughts on the overall approach to this security 1442 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1443 Alford and Angela Hennessy of the Laboratory for Telecommunications 1444 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1445 University Applied Physics Laboratory. 1447 Authors' Addresses 1449 Edward J. Birrane, III 1450 The Johns Hopkins University Applied Physics Laboratory 1451 11100 Johns Hopkins Rd. 1452 Laurel, MD 20723 1453 US 1455 Phone: +1 443 778 7423 1456 Email: Edward.Birrane@jhuapl.edu 1458 Jeremy Pierce-Mayer 1459 INSYEN AG 1460 Muenchner Str. 20 1461 Oberpfaffenhofen, Bavaria DE 1462 Germany 1464 Phone: +49 08153 28 2774 1465 Email: jeremy.mayer@insyen.com 1466 Dennis C. Iannicca 1467 NASA Glenn Research Center 1468 21000 Brookpark Rd. 1469 Brook Park, OH 44135 1470 US 1472 Phone: +1-216-433-6493 1473 Email: dennis.c.iannicca@nasa.gov