idnits 2.17.1 draft-ietf-dtn-bpsec-00.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 (December 29, 2015) is 3038 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Unused Reference: 'RFC5652' is defined on line 1731, but no explicit reference was found in the text == Unused Reference: 'RFC5751' is defined on line 1748, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 5751 (Obsoleted by RFC 8551) Summary: 0 errors (**), 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 JHU/APL 4 Intended status: Experimental J. Mayer 5 Expires: July 1, 2016 INSYEN AG 6 D. Iannicca 7 NASA GRC 8 December 29, 2015 10 Bundle Protocol Security Specification 11 draft-ietf-dtn-bpsec-00 13 Abstract 15 This document defines a security protocol providing data 16 authentication, integrity, and confidentiality services for the 17 Bundle Protocol. Capabilities are provided to protect blocks in a 18 bundle along a single path 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 July 1, 2016. 37 Copyright Notice 39 Copyright (c) 2015 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 . . . . . . . . . . . . . . . . 7 60 2.3. Single Security Destinations . . . . . . . . . . . . . . 7 61 2.4. Mixed Security Policy . . . . . . . . . . . . . . . . . . 8 62 2.5. User-Selected Ciphersuites . . . . . . . . . . . . . . . 8 63 2.6. Deterministic Processing . . . . . . . . . . . . . . . . 8 64 3. Security Block Definitions . . . . . . . . . . . . . . . . . 9 65 3.1. Block Identification . . . . . . . . . . . . . . . . . . 10 66 3.2. Abstract Security Block . . . . . . . . . . . . . . . . . 11 67 3.3. Block Ordering . . . . . . . . . . . . . . . . . . . . . 14 68 3.4. Bundle Authentication Block . . . . . . . . . . . . . . . 15 69 3.5. Block Integrity Block . . . . . . . . . . . . . . . . . . 16 70 3.6. Block Confidentiality Block . . . . . . . . . . . . . . . 17 71 3.7. Cryptographic Message Syntax Block . . . . . . . . . . . 19 72 3.8. Block Interactions . . . . . . . . . . . . . . . . . . . 20 73 3.9. Parameters and Result Fields . . . . . . . . . . . . . . 22 74 3.10. BSP Block Example . . . . . . . . . . . . . . . . . . . . 24 75 4. Security Processing . . . . . . . . . . . . . . . . . . . . . 27 76 4.1. Canonical Forms . . . . . . . . . . . . . . . . . . . . . 27 77 4.1.1. Bundle Canonicalization . . . . . . . . . . . . . . . 27 78 4.1.2. Block Canonicalization . . . . . . . . . . . . . . . 28 79 4.1.3. Considerations . . . . . . . . . . . . . . . . . . . 31 80 4.2. Endpoint ID Confidentiality . . . . . . . . . . . . . . . 32 81 4.3. Bundles Received from Other Nodes . . . . . . . . . . . . 32 82 4.3.1. Receiving BAB Blocks . . . . . . . . . . . . . . . . 32 83 4.3.2. Receiving BCB Blocks . . . . . . . . . . . . . . . . 33 84 4.3.3. Receiving BIB Blocks . . . . . . . . . . . . . . . . 33 85 4.4. Receiving CMSB Blocks . . . . . . . . . . . . . . . . . . 34 86 4.5. Bundle Fragmentation and Reassembly . . . . . . . . . . . 34 87 4.6. Reactive Fragmentation . . . . . . . . . . . . . . . . . 35 88 5. Key Management . . . . . . . . . . . . . . . . . . . . . . . 35 89 6. Policy Considerations . . . . . . . . . . . . . . . . . . . . 35 90 7. Security Considerations . . . . . . . . . . . . . . . . . . . 36 91 8. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 37 92 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 93 9.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 37 94 9.2. Cipher Suite Flags . . . . . . . . . . . . . . . . . . . 37 95 9.3. Parameters and Results . . . . . . . . . . . . . . . . . 38 96 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 97 10.1. Normative References . . . . . . . . . . . . . . . . . . 39 98 10.2. Informative References . . . . . . . . . . . . . . . . . 39 99 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 40 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 40 102 1. Introduction 104 This document defines security features for the Bundle Protocol 105 [RFC5050] intended for use in delay-tolerant networks, in order to 106 provide Delay-Tolerant Networking (DTN) security services. 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, integrity, and 122 availability. 124 This document describes the Bundle Protocol Security Specification 125 (BPSec), which provides security services for blocks within a bundle 126 from the bundle source to the bundle destination. Specifically, 127 BPSec provides authentication, integrity, and confidentiality for 128 bundles along a path through a DTN. 130 BPSec applies, by definition, only to those nodes that implement it, 131 known as "security-aware" nodes. There MAY be other nodes in the DTN 132 that do not implement BPSec. All nodes can interoperate with the 133 exception that BPSec security operations can only happen at BPSec 134 security-aware nodes. 136 1.1. Related Documents 138 This document is best read and understood within the context of the 139 following other DTN documents: 141 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 142 architecture for delay-tolerant networks, but does not discuss 143 security at any length. 145 The DTN Bundle Protocol [RFC5050] defines the format and processing 146 of the blocks used to implement the Bundle Protocol, excluding the 147 security-specific blocks defined here. 149 The Bundle Security Protocol [RFC6257] and Streamlind Bundle Security 150 Protocol [SBSP] introduce the concepts of security blocks for 151 authentication, confidentiality, and integrity. BPSec is based off 152 of this document. 154 1.2. Terminology 156 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 157 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 158 "OPTIONAL" in this document are to be interpreted as described in 159 [RFC2119]. 161 We introduce the following terminology for purposes of clarity. 163 o Source - the bundle node from which a bundle originates. 165 o Destination - the bundle node to which a bundle is ultimately 166 destined. 168 o Forwarder - the bundle node that forwarded the bundle on its most 169 recent hop. 171 o Intermediate Receiver, Waypoint, or "Next Hop" - the neighboring 172 bundle node to which a forwarder forwards a bundle. 174 o Path - the ordered sequence of nodes through which a bundle passes 175 on its way from source to destination. The path is not 176 necessarily known by the bundle, or any bundle-aware nodes. 178 Figure 1 below is adapted from [RFC5050] and shows four bundle nodes 179 (denoted BN1, BN2, BN3, and BN4) that reside above some transport 180 layer(s). Three distinct transport and network protocols (denoted 181 T1/N1, T2/N2, and T3/N3) are also shown. 183 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 184 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 185 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 186 | T1 v | + ^ T1/T2 v | + ^ T2/T3 v | | ^ T3 | 187 +---------v-+ +-^---------v-+ +-^---------v + +-^---------+ 188 | N1 v | | ^ N1/N2 v | | ^ N2/N3 v | | ^ N3 | 189 +---------v-+ +-^---------v + +-^---------v-+ +-^---------+ 190 | >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ | 191 +-----------+ +------------+ +-------------+ +-----------+ 192 | | | | 193 |<-- An Internet --->| |<--- An Internet --->| 194 | | | | 196 Figure 1: Bundle Nodes Sit at the Application Layer of the Internet 197 Model 199 BN1 originates a bundle that it forwards to BN2. BN2 forwards the 200 bundle to BN3, and BN3 forwards the bundle to BN4. BN1 is the source 201 of the bundle and BN4 is the destination of the bundle. BN1 is the 202 first forwarder, and BN2 is the first intermediate receiver; BN2 then 203 becomes the forwarder, and BN3 the intermediate receiver; BN3 then 204 becomes the last forwarder, and BN4 the last intermediate receiver, 205 as well as the destination. 207 If node BN2 originates a bundle (for example, a bundle status report 208 or a custodial signal), which is then forwarded on to BN3, and then 209 to BN4, then BN2 is the source of the bundle (as well as being the 210 first forwarder of the bundle) and BN4 is the destination of the 211 bundle (as well as being the final intermediate receiver). 213 We introduce the following security-specific DTN terminology. 215 o Security-Service - the security features supported by this 216 specification: authentication, integrity, and confidentiality. 218 o Security-Source - a bundle node that adds a security block to a 219 bundle. 221 o Security-Destination - a bundle node that evaluates a security 222 block from a bundle. When a security-service is applied hop-by- 223 hop, the security-destination is the next intermediate receiver. 224 Otherwise, the security-destination is the same as the bundle 225 destination. 227 o Security-Target - the portion of a bundle (e.g., the primary 228 block, payload block, extension block, or entire bundle) that 229 receives a security-service as part of a security-operation. 231 o Security Block - a single instance of a BPSec extension block in a 232 bundle. 234 o Security-Operation - the application of a security-service to a 235 specific security-target, notated as OP(security-service, 236 security-target). For example, OP(authentication, bundle) or 237 OP(confidentiality, payload). Every security-operation in a 238 bundle MUST be unique, meaning that a security-service can only be 239 applied to a security-target once in a bundle. A security- 240 operation MAY be implemented by one or more security blocks. 242 2. Key Properties 244 The application of security services in a DTN is a complex endeavor 245 that must consider physical properties of the network, policies at 246 each node, and various application security requirements. Rather 247 than enumerate all potential security implementations in all 248 potential DTN topologies, this specification defines a set of key 249 properties of a security system. The security primitives outlined in 250 this document MUST enable the realization of these properties in a 251 DTN deploying the Bundle Protocol. 253 2.1. Block-Level Granularity 255 Blocks within a bundle represent different types of information. The 256 primary block contains identification and routing information. The 257 payload block carries application data. Extension blocks carry a 258 variety of data that may augment or annotate the payload, or 259 otherwise provide information necessary for the proper processing of 260 a bundle along a path. Therefore, applying a single level and type 261 of security across an entire bundle fails to recognize that blocks in 262 a bundle may represent different types of information with different 263 security needs. 265 Security services within this specification MUST provide block level 266 granularity where applicable such that different blocks within a 267 bundle may have different security services applied to them. 269 For example, within a bundle, a payload might be encrypted to protect 270 its contents, whereas an extension block containing summary 271 information related to the payload might be integrity signed but 272 otherwise unencrypted to provide certain nodes access to payload- 273 related data without providing access to the payload. 275 2.2. Multiple Security Sources 277 The Bundle Protocol allows extension blocks to be added to a bundle 278 at any time during its existence in the DTN. When a waypoint node 279 adds a new extension block to a bundle, that extension block may have 280 security services applied to it by that waypoint. Similarly, a 281 waypoint node may add a security service to an existing extension 282 block, consistent with its security policy. For example, a node 283 representing a boundary between a trusted part of the network and an 284 untrusted part of the network may wish to apply payload encryption 285 for bundles leaving the trusted portion of the network. 287 In each case, a node other than the bundle originator may be adding a 288 security service to the bundle and, as such, the source for the 289 security service will be different than the source of the bundle 290 itself. Security services MUST track their orginating node so as to 291 properly apply policy and key selection associated with processing 292 the security service at the bundle destination. 294 Referring to Figure 1, if the bundle that originates at BN1 is given 295 security blocks by BN1, then BN1 is the security-source for those 296 blocks as well as being the source of the bundle. If the bundle that 297 originates at BN1 is then given a security block by BN2, then BN2 is 298 the security-source for that block even though BN1 remains the bundle 299 source. 301 A bundle MAY have multiple security blocks and these blocks MAY have 302 different security-sources. Each security block in a bundle will be 303 associated with a specific security-operation. All security blocks 304 comprising a security-operation MUST have the same security-source 305 and security-destination. 307 As required in [RFC5050], forwarding nodes MUST transmit blocks in a 308 bundle in the same order in which they were received. This 309 requirement applies to all DTN nodes, not just ones that implement 310 security processing. Blocks in a bundle MAY be added or deleted 311 according to the applicable specification, but those blocks that are 312 both received and transmitted MUST be transmitted in the same order 313 that they were received. 315 2.3. Single Security Destinations 317 The destination of all security blocks in a bundle MUST be the bundle 318 destination, with the exception of authentication security blocks, 319 whose destination is the next hop along the bundle path. In a DTN, 320 there is typically no guarantee that a bundle will visit a particular 321 intermediate receiver during its journey, or that a particular series 322 of intermediate receivers will be visited in a particular order. 324 Security-destinations different from bundle destinations would place 325 a tight (and possibly intractable) coupling between security and 326 routing services in an overlay network. 328 2.4. Mixed Security Policy 330 Different nodes in a DTN may have different security-related 331 capabilities. Some nodes may not be security-aware and will not 332 understand any security-related extension blocks. Other nodes may 333 have security policies that require evaluation of security services 334 at places other than the bundle destination (such as verifying 335 integrity signatures at certain waypoint nodes). Other nodes may 336 ignore any security processing if they are not the destination of the 337 bundle. The security services described in this specification must 338 allow each of these scenarios. 340 Extension blocks representing security services MUST have their block 341 processing flags set such that the block (and bundle, where 342 applicable) will be treated appropriately by non-security-aware 343 nodes. 345 Extension blocks providing integrity and authentication services 346 within a bundle MUST support options to allow waypoint nodes to 347 evaluate these signatures if such nodes have the proper configuraton 348 to do so. 350 2.5. User-Selected Ciphersuites 352 The security services defined in this specification rely on a a 353 variety of ciphersuites providing integrity signatures, ciphertext, 354 and other information necessary to populate security blocks. Users 355 may wish to select differing ciphersuites to implement different 356 security services. For example, some users may wish to use a SHA-1 357 based hash for integrity whereas other users may require a SHA-2 hash 358 instead. The security services defined in this specification MUST 359 provide a mechanism for identifying what ciphersuite has been used to 360 populate a security block. 362 2.6. Deterministic Processing 364 In all cases, the processing order of security services within a 365 bundle must avoid ambiguity when evaluating security at the bundle 366 destination. This specification MUST provide determinism in the 367 application and evaluation of security services, even when doing so 368 results in a loss of flexibility. 370 3. Security Block Definitions 372 There are four types of security blocks that MAY be included in a 373 bundle. These are the Bundle Authentication Block (BAB), the Block 374 Integrity Block (BIB), the Block Confidentiality Block (BCB), and the 375 Cryptographic Messaging Syntax Block (CMSB). 377 The BAB is used to ensure the authenticity and integrity of the 378 bundle along a single hop from forwarder to intermediate receiver. 379 As such, BABs operate between topologically adjacent nodes. 380 Security-aware nodes MAY choose to require BABs from a given 381 neighbor in the network in order to receive and process a received 382 bundle. 384 The BIB is used to ensure the authenticity and integrity of its 385 security-target from the BIB security-source, which creates the 386 BIB, to the bundle destination, which verifies the BIB 387 authenticator. The authentication information in the BIB MAY 388 (when possible) be verified by any node in between the BIB 389 security-source and the bundle destination. 391 The BCB indicates that the security-target has been encrypted, in 392 whole or in part, at the BCB security-source in order to protect 393 its content while in transit to the bundle destination. 395 The CMSB contains a Cryptographic Message Syntax (CMS) payload 396 used to describe a security service applied to another extension 397 block. NOTE: Applications may choose to simply place CMS text as 398 the payload to the bundle. In such cases, security is considered 399 to be implemented at the application layer and CMSBs are not 400 required in that case. 402 Certain cipher suites may allow or require multiple instances of a 403 block to appear in the bundle. For example, an authentication cipher 404 suite may require two security blocks, one before the payload block 405 and one after. Despite the presence of two security blocks, they 406 both comprise the same security-operation - OP(authentication,bundle) 407 in this example. 409 A security-operation MUST NOT be applied more than once in a bundle. 410 For example, the two security-operations: OP(integrity, payload) and 411 OP(integrity, payload) are considered redundant and MUST NOT appear 412 together in a bundle. However, the two security operations 413 OP(integrity, payload) and OP(integrity, extension_block_1) MAY both 414 be present in the bundle. Also, the two security operations 415 OP(integrity, extension_block_1) and OP(integrity, extension_block_2) 416 are unique and may both appear in the same bundle. 418 Many of the fields in these block definitions use the Self-Delimiting 419 Numeric Value (SDNV) type whose format and encoding is as defined in 420 [RFC5050]. 422 3.1. Block Identification 424 This specification requires that every target block of a security 425 operation be uniquely identifiable. In cases where there can only be 426 a single instance of a block in the bundle (as is the case with the 427 primary block and the payload block) then the unique identifier is 428 simply the block type. These blocks are described as "singleton 429 blocks". It is possible that a bundle may contain multiple instances 430 of a block type. In such a case, each instance of the block type 431 must be uniquely identifiable and the block type itself is not 432 sufficient for this identification. These blocks are described as 433 "non-singleton blocks". 435 The definition of the extension block header from [RFC5050] does not 436 provide additional identifying information for a block beyond the 437 block type. The addition of an occurrence number to the block is 438 necessary to identify the block instance in the bundle. This section 439 describes the use of an Artificial EID (AEID) reference in a block 440 header to add unique identification for non-singleton blocks. 442 Figure 7 of [RFC5050] illustrates that an EID reference in a block 443 header is the 2-tuple of the reference scheme and the reference 444 scheme specific part (SSP), each of which are encoded as SDNVs. The 445 AEID MUST encode the occurrence number in the reference scheme SDNV 446 and MUST set the reference SSP to 0. A reference SSP value of 0 is 447 an invalid offset for an SSP in the bundle dictionary and, therefore, 448 the use of 0 in this field identifies the reference as an AEID. 450 The occurrence number MAY be any positive value that is not already 451 present as an occurrence number for the same block type in the 452 bundle. These numbers are independent of relative block position 453 within the bundle, and whether blocks of the same type have been 454 added or removed from the bundle. Once an AEID has been added to a 455 block instance, it MUST NOT be changed until all security operations 456 that target the block instance have been removed from the bundle. 458 If a node wishes to apply a security operation to a target block it 459 MUST determine whether the target block is a singleton block or a 460 non-singleton block. If the target block is non-singleton, then the 461 node MUST find the AEID for the target. If an AEID is not present in 462 the target block header then the node MAY choose to either cancel the 463 security operation or add an AEID to the block, in accordance with 464 security policy. 466 If a node chooses to add an AEID to a target block header it MUST 467 perform the following activities. 469 o The "Block contains an EID reference field" flag MUST be set for 470 the target block, if it is not already set. 472 o The EID reference count for the block MUST be updated to reflect 473 the addition of the AEID. 475 o The scheme offset of the AEID MUST be a value greater than 0. The 476 scheme offset MUST NOT be the same as any other AEID of any other 477 block in the bundle sharing the same block type. 479 o The SSP offset of the AEID MUST be the value 0. There MUST NOT be 480 any other EID in the block header that has a value of 0 for the 481 SSP offset. 483 If there is no AEID present in a block, and if a node is unable to 484 add an AEID by following the above process, then the block MUST NOT 485 have an BPSec security operation applied to it. 487 It is RECOMMENDED that every block in a bundle other than the primary 488 and payload blocks be treated as a non-singleton block. However, the 489 identification of singleton blocks SHOULD be in accordance with the 490 security policy of a node. 492 3.2. Abstract Security Block 494 Each security block uses the Canonical Bundle Block Format as defined 495 in [RFC5050]. That is, each security block is comprised of the 496 following elements: 498 o Block Type Code 500 o Block Processing Control Flags 502 o Block EID Reference List (OPTIONAL) 504 o Block Data Length 506 o Block Type Specific Data Fields 508 Since the four security block types have most fields in common, we 509 can shorten the description of the block type specific data fields if 510 we first define an abstract security block (ASB) and then specify 511 each of the real blocks in terms of the fields that are present/ 512 absent in an ASB. Note that no bundle ever contains an actual ASB, 513 which is simply a specification artifact. 515 The structure of an Abstract Security Block is given in Figure 2. 516 Although the diagram hints at a fixed-format layout, this is purely 517 for the purpose of exposition. Except for the "type" field, all 518 fields are variable in length. 520 +-----------------------------+----------------------------------+ 521 | Block Type Code (BYTE) | Processing Control Flags (SDNV) | 522 +-----------------------------+----------------------------------+ 523 | EID Reference Count and List (Compound List) | 524 +-----------------------------+----------------------------------+ 525 | Block Length (SDNV) | Security Target (Compound) | 526 +-----------------------------+----------------------------------+ 527 | Cipher suite ID (SDNV) | Cipher suite Flags (SDNV) | 528 +-----------------------------+----------------------------------+ 529 | Params Length (SDNV) | Params Data (Compound) | 530 +-----------------------------+----------------------------------+ 531 | Result Length (SDNV) | Result Data (Compound) | 532 +-----------------------------+----------------------------------+ 534 Figure 2: Abstract Security Block Structure 536 An ASB consists of the following fields, some of which are optional. 538 o Block-Type Code (Byte) - as described in [RFC5050]. The block- 539 type codes for security blocks are: 541 * BundleAuthenticationBlock - BAB: 0x02 543 * BlockIntegrityBlock - BIB: 0x03 545 * BlockConfidentialityBlock - BCB: 0x04 547 o Block Processing Control Flags (SDNV) - as described in [RFC5050]. 548 There are no general constraints on the use of the block 549 processing control flags, and some specific requirements are 550 discussed later. 552 o (OPTIONAL) EID Reference Count and List - as described in 553 [RFC5050]. Presence of the EID reference field is indicated by 554 the setting of the "Block contains an EID reference field" 555 (EID_REF) bit of the block processing control flags. If no EID 556 fields are present, then the composite field itself MUST be 557 omitted entirely and the EID_REF bit MUST be unset. A count field 558 of zero is not permitted. The possible EIDs are: 560 (OPTIONAL) Security-source - specifies the security-source for 561 the block. If this is omitted, then the source of the bundle 562 is assumed to be the security-source unless otherwise indicated 563 by policy or associated cipher suite definition. When present, 564 the security-source MUST be the first EID in the list. 566 (OPTIONAL) AEID - specifies an identifier that can be used to 567 uniquely identify an instance of a non-singleton block. This 568 field MUST be present for non-singleton blocks. This field 569 MUST NOT be present for singleton blocks, such as the primary 570 block and the payload block. The construction of the AEID is 571 discussed in Section 3.1. 573 o Block Length (SDNV) - as described in [RFC5050]. 575 o Block type specific data fields as follows: 577 * Security-Target (Compound) - Uniquely identifies the target of 578 the associated security-operation. 580 As discussed in Section 3.1 a singleton block is identified by 581 its block type and a non-singleton block is identified by the 582 combination of its block type and an occurrence number. The 583 security-target is a compound field that contains the block 584 type (as a byte) and occurrence number (as an SDNV). 586 The occurrence number of a singleton block MUST be set to 0. 587 The occurrence number of a non-singleton block MUST be set to 588 the scheme offset of the AEID associated with the block being 589 targeted by the security operation. 591 * (OPTIONAL) Cipher suite ID (SDNV) 593 * (OPTIONAL) Cipher suite flags (SDNV) 595 * (OPTIONAL) Cipher Suite Parameters - compound field of the next 596 two items. 598 + Cipher suite parameters length (SDNV) - specifies the length 599 of the next field, which is the cipher suite-parameters data 600 field. 602 + Cipher suite parameters data - parameters to be used with 603 the cipher suite in use, e.g., a key identifier or 604 initialization vector (IV). See Section 3.9 for a list of 605 potential parameters and their encoding rules. The 606 particular set of parameters that is included in this field 607 is defined as part of a cipher suite specification. 609 * (OPTIONAL) Security Result - compound field of the next two 610 items. 612 + Security result length (SDNV) - contains the length of the 613 next field, which is the security-result data field. 615 + Security result data - contains the results of the 616 appropriate cipher suite specific calculation (e.g., a 617 signature, Message Authentication Code (MAC), or cipher-text 618 block key). 620 The structure of the cipher suite flags field is shown in Figure 3. 621 In each case, the presence of an optional field is indicated by 622 setting the value of the corresponding flag to one. A value of zero 623 indicates the corresponding optional field is missing. Presently, 624 there are three flags defined for the field; for convenience, these 625 are shown as they would be extracted from a single-byte SDNV. Future 626 additions may cause the field to grow to the left so, as with the 627 flags fields defined in [RFC5050], the description below numbers the 628 bit positions from the right rather than the standard RFC definition, 629 which numbers bits from the left. 631 bits 6-3 are reserved for future use. 633 src - bit 2 indicates whether the EID-reference field of the ASB 634 contains the optional reference to the security-source. 636 parm - bit 1 indicates whether or not the cipher suite parameters 637 length and cipher suite parameters data fields are present. 639 res - bit 0 indicates whether or not the ASB contains the 640 security-result length and security-result data fields. 642 Bit Bit Bit Bit Bit Bit Bit 643 6 5 4 3 2 1 0 644 +-----+-----+-----+-----+-----+-----+-----+ 645 | reserved | src |parm | res | 646 +-----+-----+-----+-----+-----+-----+-----+ 648 Figure 3: Cipher Suite Flags 650 3.3. Block Ordering 652 A security-operation may be implemented in a bundle using either one 653 or two security blocks. For example, the operation 654 OP(authentication, bundle) MAY be accomplished by a single BAB block 655 in the bundle, or it MAY be accomplished by two BAB blocks in the 656 bundle. To avoid confusion, we use the following terminology to 657 identify the block or blocks comprising a security-operation. 659 The terms "First" and "Last" are used ONLY when describing multiple 660 security blocks comprising a single security-operation. A "First" 661 block refers to the security block that is closest to the primary 662 block in the canonical form of the bundle. A "Last" block refers to 663 the security block that is furthest from the primary block in the 664 canonical form of the bundle. 666 If a single security block implements the security-operation, then it 667 is referred to as a "Lone" block. For example, when a bundle 668 authentication cipher suite requires a single BAB block we refer to 669 it as a Lone BAB. When a bundle authentication cipher suite requires 670 two BAB blocks we refer to them as the First BAB and the Last BAB. 672 This specification and individual cipher suites impose restrictions 673 on what optional fields must and must not appear in First blocks, 674 Last blocks, and Lone blocks. 676 3.4. Bundle Authentication Block 678 This section describes typical field values for the BAB, which is 679 solely used to implement OP(authentication, bundle). 681 The block-type code field value MUST be 0x02. 683 The block processing control flags value can be set to whatever 684 values are required by local policy. Cipher suite designers 685 should carefully consider the effect of setting flags that either 686 discard the block or delete the bundle in the event that this 687 block cannot be processed. 689 The security-target MUST be the entire bundle, which MUST be 690 represented by a of <0x00><0x00>. 692 The cipher suite ID MUST be documented as a hop-by-hop 693 authentication cipher suite. When a Lone BAB is used, the cipher 694 suite MUST be documented as requiring one instance of the BAB. 695 When a First BAB and Last BAB are used, the cipher suite MUST be 696 documented as requiring two instances of the BAB. 698 The cipher suite parameters field MAY be present, if so specified 699 in the cipher suite specification. 701 An EID-reference to the security-source MAY be present in either a 702 First BAB or a Lone BAB. An EID-reference to the security-source 703 MUST NOT be present in a Last BAB. 705 The security-result captures the result of applying the cipher 706 suite calculation (e.g., the MAC or signature) to the relevant 707 parts of the bundle, as specified in the cipher suite definition. 708 This field MUST be present in either a Lone BAB or a Last BAB. 709 This field MUST NOT be present in a First BAB. 711 Notes: 713 o When multiple BAB blocks are used, the mandatory fields of the 714 Last BAB must match those of the First BAB. 716 o The First BAB or Lone BAB, when present, SHOULD immediately follow 717 the primary block. 719 o A Last BAB, when present, SHOULD be the last block in the bundle. 721 o Since OP(authentication, bundle) is allowed only once in a bundle, 722 it is RECOMMENDED that users wishing to support multiple 723 authentication signatures define a multi-target cipher suite, 724 capturing multiple security results in cipher suite parameters. 726 3.5. Block Integrity Block 728 A BIB is an ASB with the following additional restrictions: 730 The block-type code value MUST be 0x03. 732 The block processing control flags value can be set to whatever 733 values are required by local policy. Cipher suite designers 734 should carefully consider the effect of setting flags that either 735 discard the block or delete the bundle in the event that this 736 block cannot be processed. 738 The security-target MUST uniquely identify a block within the 739 bundle. The reserved block type 0x01 specifies the singleton 740 payload block. The reserved type 0x00 specifies the singleton 741 primary block. The security-target for a BIB MUST NOT reference a 742 security block defined in this specification (BAB, BIB, or BCB). 744 The cipher suite ID MUST be documented as an end-to-end 745 authentication-cipher suite or as an end-to-end error-detection- 746 cipher suite. 748 The cipher suite parameters field MAY be present in either a Lone 749 BIB or a First BIB. This field MUST NOT be present in a Last BIB. 751 An EID-reference to the security-source MAY be present in either a 752 Lone BIB or a First BIB. This field MUST NOT be present in a Last 753 BIB. 755 The security-result captures the result of applying the cipher 756 suite calculation (e.g., the MAC or signature) to the relevant 757 parts of the security-target, as specified in the cipher suite 758 definition. This field MUST be present in either a Lone BIB or a 759 Last BIB. This field MUST NOT be present in a First BIB. 761 The cipher suite MAY process less than the entire security-target. 762 If the cipher suite processes less than the complete, original 763 security-target, the cipher suite parameters MUST specify which 764 bytes of the security-target are protected. 766 Notes: 768 o Since OP(integrity, target) is allowed only once in a bundle per 769 target, it is RECOMMENDED that users wishing to support multiple 770 integrity signatures for the same target define a multi-signature 771 cipher suite, capturing multiple security results in cipher suite 772 parameters. 774 o For some cipher suites, (e.g., those using asymmetric keying to 775 produce signatures or those using symmetric keying with a group 776 key), the security information MAY be checked at any hop on the 777 way to the destination that has access to the required keying 778 information, in accordance with Section 3.8. 780 o The use of a generally available key is RECOMMENDED if custodial 781 transfer is employed and all nodes SHOULD verify the bundle before 782 accepting custody. 784 3.6. Block Confidentiality Block 786 A BCB is an ASB with the following additional restrictions: 788 The block-type code value MUST be 0x04. 790 The block processing control flags value can be set to whatever 791 values are required by local policy, except that a Lone BCB or 792 First BCB MUST have the "replicate in every fragment" flag set. 793 This indicates to a receiving node that the payload portion in 794 each fragment represents cipher-tex 796 t. This flag SHOULD NOT be set otherwise. Cipher suite designers 797 should carefully consider the effect of setting flags that either 798 discard the block or delete the bundle in the event that this 799 block cannot be processed. 801 The security-target MUST uniquely identify a block within the 802 bundle. The security-target for a BCB MAY reference the payload 803 block, a non-security extension block, or a BIB block. The 804 reserved type 0x01 specifies the singleton payload block. 806 The cipher suite ID MUST be documented as a confidentiality cipher 807 suite. 809 Key-information, if available, MUST appear only in a Lone BCB or a 810 First BCB. 812 Any additional bytes generated as a result of encryption and/or 813 authentication processing of the security-target SHOULD be placed 814 in an "integrity check value" field (see Section 3.9) in the 815 security-result of the Lone BCB or Last BCB. 817 The cipher suite parameters field MAY be present in either a Lone 818 BCB or a First BCB. This field MUST NOT be present in a Last BCB. 820 An EID-reference to the security-source MAY be present in either a 821 Lone BCB or a First BCB. This field MUST NOT be present in a Last 822 BCB. The security-source can also be specified as part of key- 823 information described in Section 3.9. 825 The security-result MAY be present in either a Lone BCB or a Last 826 BCB. This field MUST NOT be present in a First BCB. This 827 compound field normally contains fields such as an encrypted 828 bundle encryption key and/or authentication tag. 830 The BCB is the only security block that modifies the contents of its 831 security-target. When a BCB is applied, the security-target body 832 data are encrypted "in-place". Following encryption, the security- 833 target body data contains cipher-text, not plain-text. Other 834 security-target block fields (such as type, processing control flags, 835 and length) remain unmodified. 837 Fragmentation, reassembly, and custody transfer are adversely 838 affected by a change in size of the payload due to ambiguity about 839 what byte range of the block is actually in any particular fragment. 840 Therefore, when the security-target of a BCB is the bundle payload, 841 the BCB MUST NOT alter the size of the payload block body data. 842 Cipher suites SHOULD place any block expansion, such as 843 authentication tags (integrity check values) and any padding 844 generated by a block-mode cipher, into an integrity check value item 845 in the security-result field (see Section 3.9) of the BCB. This "in- 846 place" encryption allows fragmentation, reassembly, and custody 847 transfer to operate without knowledge of whether or not encryption 848 has occurred. 850 Notes: 852 o The cipher suite MAY process less than the entire original 853 security-target body data. If the cipher suite processes less 854 than the complete, original security-target body data, the BCB for 855 that security-target MUST specify, as part of the cipher suite 856 parameters, which bytes of the body data are protected. 858 o The BCB's "discard" flag may be set independently from its 859 security-target's "discard" flag. Whether or not the BCB's 860 "discard" flag is set is an implementation/policy decision for the 861 encrypting node. (The "discard" flag is more properly called the 862 "Discard if block cannot be processed" flag.) 864 o A BCB MAY include information as part of additional authenticated 865 data to address parts of the target block, such as EID references, 866 that are not converted to cipher-text. 868 3.7. Cryptographic Message Syntax Block 870 A CMSB is an ASB with the following additional restrictions: 872 The block-type code value MUST be 0x05. 874 The content of the block must contain valid CMS data, as defined 875 in RFC 5652, and encoded in X.690 BER or DER encoding. 877 The block processing control flags value can be set to whatever 878 values are required by local policy. This flag SHOULD NOT be set 879 otherwise. Cipher suite designers should carefully consider the 880 effect of setting flags that either discard the block or delete 881 the bundle in the event that this block cannot be processed. 883 The security-target MUST uniquely identify a block within the 884 bundle. The reserved block type 0x01 specifies the singleton 885 payload block. 887 The security operation(s) will be performed on the security-target 888 block's data and the resulting CMS content will be stored within 889 the CMSB block's security-result field. The security-target 890 block's data will then be removed. 892 A CMSB block MAY include multiple CMS security operations within a 893 single block to allow for multiple nested operations to be 894 performed on a bundle block. Multiple CMSB blocks MAY be included 895 in a bundle as long as the security-target for each is unique. 897 Key-information, if available, MUST appear within the CMS content 898 contained in the security-result field. 900 A CMSB block is created with its corresponding security-target field 901 pointing to a unique bundle block. The CMS security operations are 902 performed upon the security-target's data field and the resulting 903 encoded CMS content is stored within the CMS security-result field of 904 the CMSB's payload. The security-target block's data MAY be left 905 intact, replaced with alternate data, or completely erased based on 906 the specification of the utilized CMS ciphersuite definition and 907 applicable policy. 909 Multiple CMS operations may be nested within a single CMSB block to 910 allow more than one security operation to be performed upon a 911 security-target. 913 CMS Operations can be considered to have BPSec parallels: CMSB 914 Enveloped-Data content type SHALL be considered as equivalent to a 915 BPSec BCB block, and a CMSB Signed-Data type SHALL be considered as 916 equivalent to a BPSec BIB block. 918 3.8. Block Interactions 920 The four security-block types defined in this specification are 921 designed to be as independent as possible. However, there are some 922 cases where security blocks may share a security-target creating 923 processing dependencies. 925 If confidentiality is being applied to a target that already has 926 integrity applied to it, then an undesirable condition occurs where a 927 security-aware intermediate node would be unable to check the 928 integrity result of a block because the block contents have been 929 encrypted after the integrity signature was generated. To address 930 this concern, the following processing rules MUST be followed. 932 o If confidentiality is to be applied to a target, it MUST also be 933 applied to every integrity operation already defined for that 934 target. This means that if a BCB is added to encrypt a block, 935 another BCB MUST also be added to encrypt a BIB also targeting 936 that block. 938 o An integrity operation MUST NOT be applied to a security-target if 939 a BCB in the bundle shares the same security-target. This 940 prevents ambiguity in the order of evaluation when receiving a BIB 941 and a BCB for a given security-target. 943 o An integrity value MUST NOT be evaluated if the BIB providing the 944 integrity value is the security target of an existing BCB block in 945 the bundle. In such a case, the BIB data contains cipher-text as 946 it has been encrypted. 948 o An integrity value MUST NOT be evaluated if the security-target of 949 the BIB is also the security-target of a BCB in the bundle. In 950 such a case, the security-target data contains cipher-text as it 951 has been encrypted. 953 o As mentioned in Section 3.6, a BIB MUST NOT have a BCB as its 954 security target. BCBs may embed integrity results as part of 955 cipher suite parameters. 957 o As mentioned in Section 4.4, CMS operations are considered to have 958 operational parallels. When a CMSB is used, these parallels MUST 959 be considered for block interactions (e.g., a Signed-Data 960 structure MUST NOT be evaluated if the security-target of the 961 operation is also the security-target of a BCB) 963 o If a single bundle is going to contain a CMSB as well as other 964 security blocks, the CMS operations MUST be performed and the CMSB 965 MUST be created before any other security operation is applied. 967 o On reception of a bundle containing a CMSB and other security 968 blocks, the CMSB must be decoded last. 970 Additionally, since the CMSB block may contain either integrity or 971 confidentiality information in its encapsulated CMS, there is no way 972 to evaluate conflicts when a BIB/BCB and a CMSB have the same 973 security target. To address this concern, the following processing 974 rules MUST be followed. 976 o If an extension block is the target of a BIB or a BCB, then the 977 extension block MUST NOT also be the target of a CMSB, and vice- 978 versa. 980 o If a bundle is the target of a BAB block, then the bundle MUST NOT 981 also be the target of a CMSB, and vice-versa. 983 o Generally, a CMSB MUST be processed before any BIB or BCB blocks 984 are processed. 986 These restrictions on block interactions impose a necessary ordering 987 when applying security operations within a bundle. Specifically, for 988 a given security-target, BIBs MUST be added before BCBs, and BABs 989 MUST be added after all other security blocks. This ordering MUST be 990 preserved in cases where the current BPA is adding all of the 991 security blocks for the bundle or whether the BPA is a waypoint 992 adding new security blocks to a bundle that already contains security 993 blocks. 995 3.9. Parameters and Result Fields 997 Various cipher suites include several items in the cipher suite 998 parameters and/or security-result fields. Which items MAY appear is 999 defined by the particular cipher suite description. A cipher suite 1000 MAY support several instances of the same type within a single block. 1002 Each item is represented as a type-length-value. Type is a single 1003 byte indicating the item. Length is the count of data bytes to 1004 follow, and is an SDNV-encoded integer. Value is the data content of 1005 the item. 1007 Item types, name, and descriptions are defined as follows. 1009 Cipher suite parameters and result fields. 1011 +-------+----------------+------------------------------------------+ 1012 | Type | Name | Description | 1013 +-------+----------------+------------------------------------------+ 1014 | 0 | Reserved | | 1015 +-------+----------------+------------------------------------------+ 1016 | 1 | Initialization | A random value, typically eight to | 1017 | | Vector (IV) | sixteen bytes. | 1018 +-------+----------------+------------------------------------------+ 1019 | 2 | Reserved | | 1020 +-------+----------------+------------------------------------------+ 1021 | 3 | Key | Material encoded or protected by the key | 1022 | | Information | management system and used to transport | 1023 | | | an ephemeral key protected by a long- | 1024 | | | term key. | 1025 +-------+----------------+------------------------------------------+ 1026 | 4 | Content Range | Pair of SDNV values (offset,length) | 1027 | | | specifying the range of payload bytes to | 1028 | | | which an operation applies. The offset | 1029 | | | MUST be the offset within the original | 1030 | | | bundle, even if the current bundle is a | 1031 | | | fragment. | 1032 +-------+----------------+------------------------------------------+ 1033 | 5 | Integrity | Result of BAB or BIB digest or other | 1034 | | Signatures | signing operation. | 1035 +-------+----------------+------------------------------------------+ 1036 | 6 | Unassigned | | 1037 +-------+----------------+------------------------------------------+ 1038 | 7 | Salt | An IV-like value used by certain | 1039 | | | confidentiality suites. | 1040 +-------+----------------+------------------------------------------+ 1041 | 8 | BCB Integrity | Output from certain confidentiality | 1042 | | Check Value | cipher suite operations to be used at | 1043 | | (ICV) / | the destination to verify that the | 1044 | | Authentication | protected data has not been modified. | 1045 | | Tag | This value MAY contain padding if | 1046 | | | required by the cipher suite. | 1047 +-------+----------------+------------------------------------------+ 1048 | 9-255 | Reserved | | 1049 +-------+----------------+------------------------------------------+ 1051 Table 1 1053 3.10. BSP Block Example 1055 An example of BPSec blocks applied to a bundle is illustrated in 1056 Figure 4. In this figure the first column represents blocks within a 1057 bundle and the second column represents a unique identifier for each 1058 block, suitable for use as the security-target of a BPSec security- 1059 block. Since the mechanism and format of a security-target is not 1060 specified in this document, the terminology B1...Bn is used to 1061 identify blocks in the bundle for the purposes of illustration. 1063 Block in Bundle ID 1064 +=================================+====+ 1065 | Primary Block | B1 | 1066 +---------------------------------+----+ 1067 | First BAB | B2 | 1068 | OP(authentication, Bundle) | | 1069 +---------------------------------+----+ 1070 | Lone BIB | B3 | 1071 | OP(integrity, target=B1) | | 1072 +---------------------------------+----+ 1073 | Lone BCB | B4 | 1074 | OP(confidentiality, target=B5) | | 1075 +---------------------------------+----+ 1076 | Extension Block | B5 | 1077 +---------------------------------+----+ 1078 | Lone BIB | B6 | 1079 | OP(integrity, target=B7) | | 1080 +---------------------------------+----+ 1081 | Extension Block | B7 | 1082 +---------------------------------+----+ 1083 | Lone BCB | B8 | 1084 | OP(confidentiality, target=B9) | | 1085 +---------------------------------+----+ 1086 | Lone BIB (encrypted by B8) | B9 | 1087 | OP(integrity, target=B11) | | 1088 +---------------------------------+----+ 1089 | Lone BCB |B10 | 1090 | OP(confidentiality, target=B11) | | 1091 +---------------------------------+----+ 1092 | Payload Block |B11 | 1093 +---------------------------------+----+ 1094 | Last BAB |B12 | 1095 | OP(authentication, Bundle) | | 1096 +---------------------------------+----+ 1098 Figure 4: Sample Use of BSP Blocks 1100 In this example a bundle has four non-security-related blocks: the 1101 primary block (B1), two extension blocks (B5,B7), and a payload block 1102 (B11). The following security applications are applied to this 1103 bundle. 1105 o Authentication over the bundle. This is accomplished by two BAB 1106 blocks: B2 and B12. 1108 o An integrity signature applied to the canonicalized primary block. 1109 This is accomplished by a single BIB, B3. 1111 o Confidentiality for the first extension block. This is 1112 accomplished by a single BCB block, B4. 1114 o Integrity for the second extension block. This is accomplished by 1115 a single BIB block, B6. 1117 o An integrity signature on the payload. This is accomplished by a 1118 single BIB block, B9. 1120 o Confidentiality for the payload block and it's integrity 1121 signature. This is accomplished by two Lone BCB blocks: B8 1122 encrypting B9, and B10 encrypting B11. 1124 Block in Bundle ID 1125 +=========================================+====+ 1126 | Primary Block | B1 | 1127 +-----------------------------------------+----+ 1128 | First BAB | B2 | 1129 | OP(authentication, Bundle) | | 1130 +-----------------------------------------+----+ 1131 | Lone CMSB | B3 | 1132 | security-target=0x01 | | 1133 | security-result= | | 1134 | | | 1135 | Signed-Data { | | 1136 | Digest Algorithm(s), | | 1137 | Enveloped-Data { | | 1138 | Encrypted Data, | | 1139 | Encrypted Encryption Key(s) | | 1140 | }, | | 1141 | Signature(s) and Certificate Chain(s) | | 1142 | } | | 1143 | | | 1144 +-----------------------------------------+----+ 1145 | Payload Block | B4 | 1146 | (Empty Data Field) | | 1147 +-----------------------------------------+----+ 1148 | Last BAB | B5 | 1149 | OP(authentication, Bundle) | | 1150 +-----------------------------------------+----+ 1152 Figure 5: Sample Bundle With CMS Block 1154 In this example a bundle has two non-security-related blocks: the 1155 primary block (B1) and a payload block (B4). This method would allow 1156 for the bundle to carry multiple CMS payloads by utilizing a multiple 1157 CMSB ASBs. The following security applications are applied to this 1158 bundle. 1160 o Authentication over the bundle. This is accomplished by two BAB 1161 blocks: B2 and B5. 1163 o Encrypted and signed CMS content contained within the CMSB block. 1164 The first CMS operation, encryption, is performed on the data 1165 contained within the block the security-target points to, in this 1166 case, the payload block. The resulting encrypted data is then 1167 signed and the final CMS content is stored within the CMSB block's 1168 security-result field. The payload block's data is subsequently 1169 removed now that the original data has been encoded within the 1170 CMSB block. 1172 4. Security Processing 1174 This section describes the security aspects of bundle processing. 1176 4.1. Canonical Forms 1178 In order to verify a signature of a bundle, the exact same bits, in 1179 the exact same order, MUST be input to the calculation upon 1180 verification as were input upon initial computation of the original 1181 signature value. Consequently, a node MUST NOT change the encoding 1182 of any URI [RFC3986] in the dictionary field, e.g., changing the DNS 1183 part of some HTTP URL from lower case to upper case. Because bundles 1184 MAY be modified while in transit (either correctly or due to 1185 implementation errors), canonical forms of security-targets MUST be 1186 defined. 1188 Many fields in various blocks are stored as variable-length SDNVs. 1189 These are canonicalized into an "unpacked form" as eight-byte fixed- 1190 width fields in network byte order. The size of eight bytes is 1191 chosen because implementations MAY handle larger SDNV values as 1192 invalid, as noted in [RFC5050]. 1194 4.1.1. Bundle Canonicalization 1196 Bundle canonicalization permits no changes at all to the bundle 1197 between the security-source and the destination, with the exception 1198 of one of the Block Processing Control Flags, as described below. It 1199 is intended for use in BAB cipher suites. This algorithm 1200 conceptually catenates all blocks in the order presented, but omits 1201 all security-result data fields in security blocks having the bundle 1202 as their security-target. For example, when a BAB cipher suite 1203 specifies this algorithm, we omit the BAB security-result from the 1204 catenation. The inclusion of security-result length fields is as 1205 determined by the specified cipher suite. A security-result length 1206 field MAY be present even when the corresponding security-result data 1207 fields are omitted. 1209 Notes: 1211 o In the Block Processing Control Flags field the unpacked SDNV is 1212 ANDed with mask 0xFFFF FFFF FFFF FFDF to zero the flag at bit 5 1213 ("Block was forwarded without being processed"). If this flag is 1214 not zeroed out, then a bundle passing through a non-security aware 1215 node will set this flag which will change the message digest and 1216 the BAB block will fail to verify. 1218 o In the above, we specify that security-result data is omitted. 1219 This means that no bytes of the security-result data are input. 1221 If the security-result length is included in the catenation, we 1222 assume that the security-result length will be known to the module 1223 that implements the cipher suite before the security-result is 1224 calculated, and require that this value be in the security-result 1225 length field even though the security-result data itself will be 1226 omitted. 1228 o The 'res' bit of the cipher suite ID, which indicates whether or 1229 not the security-result length and security-result data field are 1230 present, is part of the canonical form. 1232 o The value of the block data length field, which indicates the 1233 length of the block, is also part of the canonical form. Its 1234 value indicates the length of the entire block when the block 1235 includes the security-result data field. 1237 4.1.2. Block Canonicalization 1239 This algorithm protects those parts of a block that SHOULD NOT be 1240 changed in transit. 1242 There are three types of blocks that may undergo block 1243 canonicalization: the primary block, the payload block, or an 1244 extension block. 1246 4.1.2.1. Primary Block Canonicalization 1248 The canonical form of the primary block is shown in Figure 6. 1249 Essentially, it de-references the dictionary block, adjusts lengths 1250 where necessary, and ignores flags that may change in transit. 1252 +----------------+----------------+----------------+----------------+ 1253 | Version | Processing flags (incl. COS and SRR) | 1254 +----------------+----------------+---------------------------------+ 1255 | Canonical primary block length | 1256 +----------------+----------------+---------------------------------+ 1257 | Destination endpoint ID length | 1258 +----------------+----------------+---------------------------------+ 1259 | Destination endpoint ID | 1260 +----------------+----------------+---------------------------------+ 1261 | Source endpoint ID length | 1262 +----------------+----------------+----------------+----------------+ 1263 | Source endpoint ID | 1264 +----------------+----------------+---------------------------------+ 1265 | Report-to endpoint ID length | 1266 +----------------+----------------+----------------+----------------+ 1267 | Report-to endpoint ID | 1268 +----------------+----------------+----------------+----------------+ 1269 + Creation Timestamp (2 x SDNV) + 1270 +---------------------------------+---------------------------------+ 1271 | Lifetime | 1272 +----------------+----------------+----------------+----------------+ 1274 Figure 6: The Canonical Form of the Primary Bundle Block 1276 The fields shown in Figure 6 are as follows: 1278 o The version value is the single-byte value in the primary block. 1280 o The processing flags value in the primary block is an SDNV, and 1281 includes the class-of-service (COS) and status report request 1282 (SRR) fields. For purposes of canonicalization, the unpacked SDNV 1283 is ANDed with mask 0x0000 0000 0007 C1BE to set to zero all 1284 reserved bits and the "bundle is a fragment" bit. 1286 o The canonical primary block length value is a four-byte value 1287 containing the length (in bytes) of this structure, in network 1288 byte order. 1290 o The destination endpoint ID length and value are the length (as a 1291 four-byte value in network byte order) and value of the 1292 destination endpoint ID from the primary bundle block. The URI is 1293 simply copied from the relevant part(s) of the dictionary block 1294 and is not itself canonicalized. Although the dictionary entries 1295 contain "null-terminators", the null-terminators are not included 1296 in the length or the canonicalization. 1298 o The source endpoint ID length and value are handled similarly to 1299 the destination. 1301 o The report-to endpoint ID length and value are handled similarly 1302 to the destination. 1304 o The unpacked SDNVs for the creation timestamp and lifetime are 1305 copied from the primary block. 1307 o Fragment offset and total application data unit length are 1308 ignored, as is the case for the "bundle is a fragment" bit 1309 mentioned above. If the payload data to be canonicalized is less 1310 than the complete, original bundle payload, the offset and length 1311 are specified in the cipher suite parameters. 1313 4.1.2.2. Payload Block Canonicalization 1315 When canonicalizing the payload block, the block processing control 1316 flags value used for canonicalization is the unpacked SDNV value with 1317 reserved and mutable bits masked to zero. The unpacked value is 1318 ANDed with mask 0x0000 0000 0000 0077 to zero reserved bits and the 1319 "last block" bit. The "last block" bit is ignored because BABs and 1320 other security blocks MAY be added for some parts of the journey but 1321 not others, so the setting of this bit might change from hop to hop. 1323 Payload blocks are canonicalized as-is, with the exception that, in 1324 some instances, only a portion of the payload data is to be 1325 protected. In such a case, only those bytes are included in the 1326 canonical form, and additional cipher suite parameters are required 1327 to specify which part of the payload is protected, as discussed 1328 further below. 1330 4.1.2.3. Extension Block Canonicalization 1332 When canonicalizing an extension block, the block processing control 1333 flags value used for canonicalization is the unpacked SDNV value with 1334 reserved and mutable bits masked to zero. The unpacked value is 1335 ANDed with mask 0x0000 0000 0000 0057 to zero reserved bits, the 1336 "last block" flag and the "Block was forwarded without being 1337 processed" bit. The "last block" flag is ignored because BABs and 1338 other security blocks MAY be added for some parts of the journey but 1339 not others, so the setting of this bit might change from hop to hop. 1341 The "Block was forwarded without being processed" flag is ignored 1342 because the bundle may pass through nodes that do not understand that 1343 extension block and this flag would be set. 1345 Endpoint ID references in blocks are canonicalized using the de- 1346 referenced text form in place of the reference pair. The reference 1347 count is not included, nor is the length of the endpoint ID text. 1349 The EID reference is, therefore, canonicalized as :, 1350 which includes the ":" character. 1352 Since neither the length of the canonicalized EID text nor a null- 1353 terminator is used in EID canonicalization, a separator token MUST be 1354 used to determine when one EID ends and another begins. When 1355 multiple EIDs are canonicalized together, the character "," SHALL be 1356 placed between adjacent instances of EID text. 1358 The block-length is canonicalized as its unpacked SDNV value. If the 1359 data to be canonicalized is less than the complete, original block 1360 data, this field contains the size of the data being canonicalized 1361 (the "effective block") rather than the actual size of the block. 1363 4.1.3. Considerations 1365 o The canonical forms for the bundle and various extension blocks is 1366 not transmitted. It is simply an artifact used as input to 1367 digesting. 1369 o We omit the reserved flags because we cannot determine if they 1370 will change in transit. The masks specified above will have to be 1371 revised if additional flags are defined and they need to be 1372 protected. 1374 o Our URI encoding does not preserve the null-termination convention 1375 from the dictionary field, nor do we canonicalize the scheme and 1376 scheme-specific part (SSP) separately. Instead, the byte array < 1377 scheme name > : < scheme-specific part (SSP)> is used in the 1378 canonicalization. 1380 o The URI encoding will cause errors if any node rewrites the 1381 dictionary content (e.g., changing the DNS part of an HTTP URL 1382 from lower case to upper case). This could happen transparently 1383 when a bundle is synched to disk using one set of software and 1384 then read from disk and forwarded by a second set of software. 1385 Because there are no general rules for canonicalizing URIs (or 1386 IRIs), this problem may be an unavoidable source of integrity 1387 failures. 1389 o All SDNV fields here are canonicalized as eight-byte unpacked 1390 values in network byte order. Length fields are canonicalized as 1391 four-byte values in network byte order. Encoding does not need 1392 optimization since the values are never sent over the network. 1394 o These canonicalization algorithms assume that endpoint IDs 1395 themselves are immutable and they are unsuitable for use in 1396 environments where that assumption might be violated. 1398 o Cipher suites MAY define their own canonicalization algorithms and 1399 require the use of those algorithms over the ones provided in this 1400 specification. 1402 4.2. Endpoint ID Confidentiality 1404 Every bundle has a primary block that contains the source and 1405 destination endpoint IDs, and possibly other EIDs (in the dictionary 1406 field) that cannot be encrypted. If endpoint ID confidentiality is 1407 required, then bundle-in-bundle encapsulation can solve this problem 1408 in some instances. 1410 Similarly, confidentiality requirements MAY also apply to other parts 1411 of the primary block (e.g., the current-custodian), and that is 1412 supported in the same manner. 1414 4.3. Bundles Received from Other Nodes 1416 Security blocks MUST be processed in a specific order when received 1417 by a security-aware node. The processing order is as follows. 1419 o All BAB blocks in the bundle MUST be evaluated prior to evaluating 1420 any other block in the bundle. 1422 o All BCB blocks in the bundle MUST be evaluated prior to evaluating 1423 any BIBs in the bundle. When BIBs and BCBs share a security- 1424 target, BCBs MUST be evaluated first and BIBs second. 1426 4.3.1. Receiving BAB Blocks 1428 Nodes implementing this specification SHALL consult their security 1429 policy to determine whether or not a received bundle is required by 1430 policy to include a BAB. 1432 If the bundle is not required to have a BAB then BAB processing on 1433 the received bundle is complete, and the bundle is ready to be 1434 further processed for BIB/BCB handling or delivery or forwarding. 1435 Security policy may provide a means to override this default behavior 1436 and require processing of a BAB if it exists. 1438 If the bundle is required to have a BAB but does not, then the bundle 1439 MUST be discarded and processed no further. If the bundle is 1440 required to have a BAB but the key information for the security- 1441 source cannot be determined or the security-result value check fails, 1442 then the bundle has failed to authenticate, and the bundle MUST be 1443 discarded and processed no further. 1445 If the bundle is required to have a BAB, and a BAB exists, and the 1446 BAB information is verified, then the BAB processing on the received 1447 bundle is complete, and the bundle is ready to be further processed 1448 for BIB/BCB handling or delivery or forwarding. 1450 A BAB received in a bundle MUST be stripped before the bundle is 1451 forwarded. A new BAB MAY be added as required by policy. This MAY 1452 require correcting the "last block" field of the to-be-forwarded 1453 bundle. 1455 4.3.2. Receiving BCB Blocks 1457 If the bundle has a BCB and the receiving node is the destination for 1458 the bundle, the node MUST decrypt the relevant parts of the security- 1459 target in accordance with the cipher suite specification. 1461 If the relevant parts of an encrypted payload cannot be decrypted 1462 (i.e., the decryption key cannot be deduced or decryption fails), 1463 then the bundle MUST be discarded and processed no further; in this 1464 case, a bundle deletion status report (see [RFC5050]) indicating the 1465 decryption failure MAY be generated. If any other encrypted 1466 security-target cannot be decrypted then the associated security- 1467 target and all security blocks associated with that target MUST be 1468 discarded and processed no further. 1470 When a BCB is decrypted, the recovered plain-text MUST replace the 1471 cipher-text in the security-target body data 1473 4.3.3. Receiving BIB Blocks 1475 A BIB MUST NOT be processed if the security-target of the BIB is also 1476 the security-target of a BCB in the bundle. Given the order of 1477 operations mandated by this specification, when both a BIB and a BCB 1478 share a security-target, it means that the security-target MUST have 1479 been encrypted after it was integrity signed and, therefore, the BIB 1480 cannot be verified until the security-target has been decrypted by 1481 processing the BCB. 1483 If the security policy of a security-aware node specifies that a 1484 bundle SHOULD apply integrity to a specific security-target and no 1485 such BIB is present in the bundle, then the node MUST process this 1486 security-target in accordance with the security policy. This MAY 1487 involve removing the security-target from the bundle. If the removed 1488 security-target is the payload or primary block, the bundle MAY be 1489 discarded. This action may occur at any node that has the ability to 1490 verify an integrity signature, not just the bundle destination. 1492 If the bundle has a BIB and the receiving node is the destination for 1493 the bundle, the node MUST verify the security-target in accordance 1494 with the cipher suite specification. If a BIB check fails, the 1495 security-target has failed to authenticate and the security-target 1496 SHALL be processed according to the security policy. A bundle status 1497 report indicating the failure MAY be generated. Otherwise, if the 1498 BIB verifies, the security-target is ready to be processed for 1499 delivery. 1501 If the bundle has a BIB and the receiving node is not the bundle 1502 destination, the receiving node MAY attempt to verify the value in 1503 the security-result field. If the check fails, the node SHALL 1504 process the security-target in accordance to local security policy. 1505 It is RECOMMENDED that if a payload integrity check fails at a 1506 waypoint that it is processed in the same way as if the check fails 1507 at the destination. 1509 4.4. Receiving CMSB Blocks 1511 A CMSB MUST NOT be processed if its security target is also the 1512 security target of any BAB, BIB, or BCB in the bundle. 1514 The security services provided by a CMSB will be considered 1515 successful if all services in the CMSB are validated. If any one 1516 service encapsulated in the CMSB fails to validate, then the CMSB 1517 MUST be considered as having failed to validate and MUST be 1518 dispositioned in accordance with security policy. 1520 4.5. Bundle Fragmentation and Reassembly 1522 If it is necessary for a node to fragment a bundle and security 1523 services have been applied to that bundle, the fragmentation rules 1524 described in [RFC5050] MUST be followed. As defined there and 1525 repeated here for completeness, only the payload may be fragmented; 1526 security blocks, like all extension blocks, can never be fragmented. 1527 In addition, the following security-specific processing is REQUIRED: 1529 o Due to the complexity of bundle fragmentation, including the 1530 possibility of fragmenting bundle fragments, integrity and 1531 confidentiality operations are not to be applied to a bundle 1532 fragment. Specifically, a BCB or BIB MUST NOT be added to a 1533 bundle fragment, even if the security-target of the security block 1534 is not the payload. When integrity and confidentiality must be 1535 applied to a fragment, we RECOMMEND that encapsulation be used 1536 instead. 1538 o The authentication security policy requirements for a bundle MUST 1539 be applied individually to all the bundles resulting from a 1540 fragmentation event. 1542 o A BAB cipher suite MAY specify that it only applies to non- 1543 fragmented bundles and not to bundle fragments. 1545 o The decision to fragment a bundle MUST be made prior to adding 1546 authentication to the bundle. The bundle MUST first be fragmented 1547 and authentication applied to each individual fragment. 1549 o If a bundle with a BAB is fragmented by a non-security-aware node, 1550 then the entire bundle must be re-assembled before being processed 1551 to allow for the proper verification of the BAB. 1553 4.6. Reactive Fragmentation 1555 When a partial bundle has been received, the receiving node SHALL 1556 consult its security policy to determine if it MAY fragment the 1557 bundle, converting the received portion into a bundle fragment for 1558 further forwarding. Whether or not reactive fragmentation is 1559 permitted SHALL depend on the security policy and the cipher suite 1560 used to calculate the BAB authentication information, if required. 1562 Specifically, if the security policy does not require authentication, 1563 then reactive fragmentation MAY be permitted. If the security policy 1564 does require authentication, then reactive fragmentation MUST NOT be 1565 permitted if the partial bundle is not sufficient to allow 1566 authentication. 1568 If reactive fragmentation is allowed, then all BAB blocks must be 1569 removed from created fragments. 1571 5. Key Management 1573 Key management in delay-tolerant networks is recognized as a 1574 difficult topic and is one that this specification does not attempt 1575 to solve. 1577 6. Policy Considerations 1579 When implementing BPSec, several policy decisions must be considered. 1580 This section describes key policies that affect the generation, 1581 forwarding, and receipt of bundles that are secured using this 1582 specification. 1584 o If a bundle is received that contains more than one security- 1585 operation, in violation of BPSec, then the BPA must determine how 1586 to handle this bundle. The bundle may be discarded, the block 1587 affected by the security-operation may be discarded, or one 1588 security-operation may be favored over another. 1590 o BPAs in the network MUST understand what security-operations they 1591 should apply to bundles. This decision may be based on the source 1592 of the bundle, the destination of the bundle, or some other 1593 information related to the bundle. 1595 o If an intermediate receiver has been configured to add a security- 1596 operation to a bundle, and the received bundle already has the 1597 security-operation applied, then the receiver MUST understand what 1598 to do. The receiver may discard the bundle, discard the security- 1599 target and associated BPSec blocks, replace the security- 1600 operation, or some other action. 1602 o It is recommended that security operations only be applied to the 1603 payload block, the primary block, and any block-types specifically 1604 identified in the security policy. If a BPA were to apply 1605 security operations such as integrity or confidentiality to every 1606 block in the bundle, regardless of the block type, there could be 1607 downstream errors processing blocks whose contents must be 1608 inspected at every hop in the network path. 1610 7. Security Considerations 1612 Certain applications of DTN need to both sign and encrypt a message, 1613 and there are security issues to consider with this. 1615 o To provide an assurance that a security-target came from a 1616 specific source and has not been changed, then it should be signed 1617 with a BIB. 1619 o To ensure that a security-target cannot be inspected during 1620 transit, it should be encrypted with a BCB. 1622 o Adding a BIB to a security-target that has already been encrypted 1623 by a BCB is not allowed. Therefore, we recommend three methods to 1624 add an integrity signature to an encrypted security-target. 1625 First, at the time of encryption, an integrity signature may be 1626 generated and added to the BCB for the security-target as 1627 additional information in the security-result field. Second, the 1628 encrypted block may be replicated as a new block and integrity 1629 signed. Third, an encapsulation scheme may be applied to 1630 encapsulate the security-target (or the entire bundle) such that 1631 the encapsulating structure is, itself, no longer the security- 1632 target of a BCB and may therefore be the security-target of a BIB. 1634 8. Conformance 1636 All implementations are strongly RECOMMENDED to provide at least a 1637 BAB cipher suite. A relay node, for example, might not deal with 1638 end-to-end confidentiality and data integrity, but it SHOULD exclude 1639 unauthorized traffic and perform hop-by-hop bundle verification. 1641 9. IANA Considerations 1643 This protocol has fields that have been registered by IANA. 1645 9.1. Bundle Block Types 1647 This specification allocates three block types from the existing 1648 "Bundle Block Types" registry defined in [RFC6255]. 1650 Additional Entries for the Bundle Block-Type Codes Registry: 1652 +-------+-----------------------------+---------------+ 1653 | Value | Description | Reference | 1654 +-------+-----------------------------+---------------+ 1655 | 2 | Bundle Authentication Block | This document | 1656 | 3 | Block Integrity Block | This document | 1657 | 4 | Block Confidentiality Block | This document | 1658 +-------+-----------------------------+---------------+ 1660 Table 2 1662 9.2. Cipher Suite Flags 1664 This protocol has a cipher suite flags field and certain flags are 1665 defined. An IANA registry has been set up as follows. 1667 The registration policy for this registry is: Specification Required 1669 The Value range is: Variable Length 1670 Cipher Suite Flag Registry: 1672 +--------------------------+-------------------------+--------------+ 1673 | Bit Position (right to | Description | Reference | 1674 | left) | | | 1675 +--------------------------+-------------------------+--------------+ 1676 | 0 | Block contains result | This | 1677 | | | document | 1678 | 1 | Block Contains | This | 1679 | | parameters | document | 1680 | 2 | Source EID ref present | This | 1681 | | | document | 1682 | >3 | Reserved | This | 1683 | | | document | 1684 +--------------------------+-------------------------+--------------+ 1686 Table 3 1688 9.3. Parameters and Results 1690 This protocol has fields for cipher suite parameters and results. 1691 The field is a type-length-value triple and a registry is required 1692 for the "type" sub-field. The values for "type" apply to both the 1693 cipher suite parameters and the cipher suite results fields. Certain 1694 values are defined. An IANA registry has been set up as follows. 1696 The registration policy for this registry is: Specification Required 1698 The Value range is: 8-bit unsigned integer. 1700 Cipher Suite Parameters and Results Type Registry: 1702 +---------+---------------------------------+---------------+ 1703 | Value | Description | Reference | 1704 +---------+---------------------------------+---------------+ 1705 | 0 | reserved | This document | 1706 | 1 | initialization vector (IV) | This document | 1707 | 2 | reserved | This document | 1708 | 3 | key-information | This document | 1709 | 4 | content-range (pair of SDNVs) | This document | 1710 | 5 | integrity signature | This document | 1711 | 6 | unassigned | This document | 1712 | 7 | salt | This document | 1713 | 8 | BCB integrity check value (ICV) | This document | 1714 | 9-191 | reserved | This document | 1715 | 192-250 | private use | This document | 1716 | 251-255 | reserved | This document | 1717 +---------+---------------------------------+---------------+ 1719 Table 4 1721 10. References 1723 10.1. Normative References 1725 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1726 Requirement Levels", BCP 14, RFC 2119, March 1997. 1728 [RFC5050] Scott, K. and S. Burleigh, "Bundle Protocol 1729 Specification", RFC 5050, November 2007. 1731 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 1732 RFC 5652, DOI 10.17487/RFC5652, September 2009, 1733 . 1735 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1736 IANA Registries", RFC 6255, May 2011. 1738 10.2. Informative References 1740 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1741 Resource Identifier (URI): Generic Syntax", STD 66, 1742 RFC 3986, January 2005. 1744 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1745 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1746 Networking Architecture", RFC 4838, April 2007. 1748 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 1749 Mail Extensions (S/MIME) Version 3.2 Message 1750 Specification", RFC 5751, January 2010. 1752 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1753 "Bundle Security Protocol Specification", RFC 6257, May 1754 2011. 1756 [SBSP] Birrane, E., "Streamlined Bundle Security Protocol", 1757 draft-birrane-dtn-sbsp-01 (work in progress), October 1758 2015. 1760 Appendix A. Acknowledgements 1762 The following participants contributed technical material, use cases, 1763 and useful thoughts on the overall approach to this security 1764 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1765 Alford and Angela Hennessy of the Laboratory for Telecommunications 1766 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1767 University Applied Physics Laboratory. 1769 Authors' Addresses 1771 Edward J. Birrane, III 1772 The Johns Hopkins University Applied Physics Laboratory 1773 11100 Johns Hopkins Rd. 1774 Laurel, MD 20723 1775 US 1777 Phone: +1 443 778 7423 1778 Email: Edward.Birrane@jhuapl.edu 1780 Jeremy Pierce-Mayer 1781 INSYEN AG 1782 Muenchner Str. 20 1783 Oberpfaffenhofen, Bavaria DE 1784 Germany 1786 Phone: +49 08153 28 2774 1787 Email: jeremy.mayer@insyen.com 1788 Dennis C. Iannicca 1789 NASA Glenn Research Center 1790 21000 Brookpark Rd. 1791 Brook Park, OH 44135 1792 US 1794 Phone: +1-216-433-6493 1795 Email: dennis.c.iannicca@nasa.gov