idnits 2.17.1 draft-irtf-dtnrg-sbsp-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 (May 27, 2014) is 3620 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Unused Reference: 'RFC5751' is defined on line 1495, 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 (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Delay-Tolerant Networking Research Group E. Birrane 3 Internet-Draft JHU/APL 4 Intended status: Experimental May 27, 2014 5 Expires: November 28, 2014 7 Streamlined Bundle Security Protocol Specification 8 draft-irtf-dtnrg-sbsp-01 10 Abstract 12 This document defines a streamlined bundle security protocol, which 13 provides data authentication, integrity, and confidentiality services 14 for the Bundle Protocol. Capabilities are provided to protect the 15 bundle payload, and additional data that may be included within the 16 bundle, along a single path through a network. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on November 28, 2014. 35 Copyright Notice 37 Copyright (c) 2014 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.1. Related Documents . . . . . . . . . . . . . . . . . . . . 3 54 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 55 2. Security Block Definitions . . . . . . . . . . . . . . . . . 6 56 2.1. Block Identification . . . . . . . . . . . . . . . . . . 7 57 2.2. Abstract Security Block . . . . . . . . . . . . . . . . . 9 58 2.3. Block Ordering . . . . . . . . . . . . . . . . . . . . . 12 59 2.4. Bundle Authentication Block . . . . . . . . . . . . . . . 12 60 2.5. Block Integrity Block . . . . . . . . . . . . . . . . . . 14 61 2.6. Block Confidentiality Block . . . . . . . . . . . . . . . 15 62 2.7. Block Interactions . . . . . . . . . . . . . . . . . . . 16 63 2.8. Parameters and Result Fields . . . . . . . . . . . . . . 18 64 2.9. BSP Block Example . . . . . . . . . . . . . . . . . . . . 20 65 3. Security Processing . . . . . . . . . . . . . . . . . . . . . 21 66 3.1. Canonical Forms . . . . . . . . . . . . . . . . . . . . . 21 67 3.1.1. Bundle Canonicalization . . . . . . . . . . . . . . . 22 68 3.1.2. Block Canonicalization . . . . . . . . . . . . . . . 22 69 3.1.3. Considerations . . . . . . . . . . . . . . . . . . . 25 70 3.2. Endpoint ID Confidentiality . . . . . . . . . . . . . . . 26 71 3.3. Bundles Received from Other Nodes . . . . . . . . . . . . 26 72 3.3.1. Receiving BAB Blocks . . . . . . . . . . . . . . . . 26 73 3.3.2. Receiving BCB Blocks . . . . . . . . . . . . . . . . 27 74 3.3.3. Receiving BIB Blocks . . . . . . . . . . . . . . . . 27 75 3.4. Bundle Fragmentation and Reassembly . . . . . . . . . . . 28 76 3.5. Reactive Fragmentation . . . . . . . . . . . . . . . . . 29 77 4. Key Management . . . . . . . . . . . . . . . . . . . . . . . 29 78 5. Policy Considerations . . . . . . . . . . . . . . . . . . . . 29 79 6. Security Considerations . . . . . . . . . . . . . . . . . . . 30 80 7. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 31 81 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 82 8.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . 31 83 8.2. Cipher Suite Flags . . . . . . . . . . . . . . . . . . . 31 84 8.3. Parameters and Results . . . . . . . . . . . . . . . . . 32 85 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 86 9.1. Normative References . . . . . . . . . . . . . . . . . . 33 87 9.2. Informative References . . . . . . . . . . . . . . . . . 33 88 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 34 89 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 34 91 1. Introduction 93 This document defines security features for the Bundle Protocol 94 [RFC5050] intended for use in delay-tolerant networks, in order to 95 provide Delay-Tolerant Networking (DTN) security services. 97 The Bundle Protocol is used in DTNs that overlay multiple networks, 98 some of which may be challenged by limitations such as intermittent 99 and possibly unpredictable loss of connectivity, long or variable 100 delay, asymmetric data rates, and high error rates. The purpose of 101 the Bundle Protocol is to support interoperability across such 102 stressed networks. 104 The stressed environment of the underlying networks over which the 105 Bundle Protocol operates makes it important for the DTN to be 106 protected from unauthorized use, and this stressed environment poses 107 unique challenges for the mechanisms needed to secure the Bundle 108 Protocol. Furthermore, DTNs may be deployed in environments where a 109 portion of the network might become compromised, posing the usual 110 security challenges related to confidentiality, integrity, and 111 availability. 113 This document describes the Streamlined Bundle Security Protocol 114 (SBSP), which provides security services for blocks within a bundle 115 from the bundle source to the bundle destination. Specifically, the 116 SBSP provides authentication, integrity, and confidentiality for 117 bundles along a path through a DTN. 119 SBSP applies, by definition, only to those nodes that implement it, 120 known as "security-aware" nodes. There MAY be other nodes in the DTN 121 that do not implement SBSP. All nodes can interoperate with the 122 exception that SBSP security operations can only happen at SBSP 123 security-aware nodes. 125 1.1. Related Documents 127 This document is best read and understood within the context of the 128 following other DTN documents: 130 "Delay-Tolerant Networking Architecture" [RFC4838] defines the 131 architecture for delay-tolerant networks, but does not discuss 132 security at any length. 134 The DTN Bundle Protocol [RFC5050] defines the format and processing 135 of the blocks used to implement the Bundle Protocol, excluding the 136 security-specific blocks defined here. 138 The Bundle Security Protocol [RFC6257] introduces the concepts of 139 security blocks for authentication, confidentiality, and integrity. 140 The SBSP is based off of this document. 142 1.2. Terminology 144 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 145 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 146 "OPTIONAL" in this document are to be interpreted as described in 147 [RFC2119]. 149 We introduce the following terminology for purposes of clarity. 151 o Source - the bundle node from which a bundle originates. 153 o Destination - the bundle node to which a bundle is ultimately 154 destined. 156 o Forwarder - the bundle node that forwarded the bundle on its most 157 recent hop. 159 o Intermediate Receiver, Waypoint, or "Next Hop" - the neighboring 160 bundle node to which a forwarder forwards a bundle. 162 o Path - the ordered sequence of nodes through which a bundle passes 163 on its way from source to destination. The path is not 164 necessarily known by the bundle, or any bundle-aware nodes. 166 Figure 1 below is adapted from [RFC5050] and shows four bundle nodes 167 (denoted BN1, BN2, BN3, and BN4) that reside above some transport 168 layer(s). Three distinct transport and network protocols (denoted 169 T1/N1, T2/N2, and T3/N3) are also shown. 171 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 172 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 173 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 174 | T1 v | + ^ T1/T2 v | + ^ T2/T3 v | | ^ T3 | 175 +---------v-+ +-^---------v-+ +-^---------v + +-^---------+ 176 | N1 v | | ^ N1/N2 v | | ^ N2/N3 v | | ^ N3 | 177 +---------v-+ +-^---------v + +-^---------v-+ +-^---------+ 178 | >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ | 179 +-----------+ +------------+ +-------------+ +-----------+ 180 | | | | 181 |<-- An Internet --->| |<--- An Internet --->| 182 | | | | 184 Figure 1: Bundle Nodes Sit at the Application Layer of the Internet 185 Model 187 BN1 originates a bundle that it forwards to BN2. BN2 forwards the 188 bundle to BN3, and BN3 forwards the bundle to BN4. BN1 is the source 189 of the bundle and BN4 is the destination of the bundle. BN1 is the 190 first forwarder, and BN2 is the first intermediate receiver; BN2 then 191 becomes the forwarder, and BN3 the intermediate receiver; BN3 then 192 becomes the last forwarder, and BN4 the last intermediate receiver, 193 as well as the destination. 195 If node BN2 originates a bundle (for example, a bundle status report 196 or a custodial signal), which is then forwarded on to BN3, and then 197 to BN4, then BN2 is the source of the bundle (as well as being the 198 first forwarder of the bundle) and BN4 is the destination of the 199 bundle (as well as being the final intermediate receiver). 201 We introduce the following security-specific DTN terminology. 203 o Security-Service - the security features supported by this 204 specification: authentication, integrity, and confidentiality. 206 o Security-Source - a bundle node that adds a security block to a 207 bundle. 209 o Security-Destination - a bundle node that evaluates a security 210 block from a bundle. When a security-service is applied hop-by- 211 hop, the security-destination is the next intermediate receiver. 212 Otherwise, the security-destination is the same as the bundle 213 destination. 215 o Security-Target - the portion of a bundle (e.g., the primary 216 block, payload block, extension block, or entire bundle) that 217 receives a security-service as part of a security-operation. 219 o Security Block - a single instance of a SBSP extension block in a 220 bundle. 222 o Security-Operation - the application of a security-service to a 223 specific security-target, notated as OP(security-service, 224 security-target). For example, OP(authentication, bundle) or 225 OP(confidentiality, payload). Every security-operation in a 226 bundle MUST be unique, meaning that a security-service can only be 227 applied to a security-target once in a bundle. A security- 228 operation MAY be implemented by one or more security blocks. 230 Referring to Figure 1 again: 232 If the bundle that originates at BN1 is given security blocks by BN1, 233 then BN1 is the security-source for those blocks as well as being the 234 source of the bundle. If the bundle that originates at BN1 is then 235 given a security block by BN2, then BN2 is the security-source for 236 that block even though BN1 remains the bundle source. 238 A bundle MAY have multiple security blocks and these blocks MAY have 239 different security-sources. Each security block in a bundle will be 240 associated with a specific security-operation. All security blocks 241 comprising a security-operation MUST have the same security-source 242 and security-destination. 244 The destination of all security blocks in a bundle MUST be the bundle 245 destination, with the exception of authentication security blocks, 246 whose destination is the next hop along the bundle path. In a DTN, 247 there is typically no guarantee that a bundle will visit a particular 248 intermediate receiver during its journey, or that a particular series 249 of intermediate receivers will be visited in a particular order. 250 Security-destinations different from bundle destinations would place 251 a tight (and possibly intractable) coupling between security and 252 routing services in an overlay network. 254 As required in [RFC5050], forwarding nodes MUST transmit blocks in a 255 bundle in the same order in which they were received. This 256 requirement applies to all DTN nodes, not just ones that implement 257 security processing. Blocks in a bundle MAY be added or deleted 258 according to the applicable specification, but those blocks that are 259 both received and transmitted MUST be transmitted in the same order 260 that they were received. 262 If a node is not security-aware, then it forwards the security blocks 263 in the bundle unchanged unless the bundle's block processing flags 264 specify otherwise. If a network has some nodes that are not 265 security-aware, then the block processing flags SHOULD be set such 266 that security blocks are not discarded at those nodes solely because 267 they cannot be processed there. Except for this, the non-security- 268 aware nodes are transparent relay points and are invisible as far as 269 security processing is concerned. 271 2. Security Block Definitions 273 There are three types of security blocks that MAY be included in a 274 bundle. These are the Bundle Authentication Block (BAB), the Block 275 Integrity Block (BIB), and the Block Confidentiality Block (BCB). 277 The BAB is used to ensure the authenticity and integrity of the 278 bundle along a single hop from forwarder to intermediate receiver. 279 As such, BABs operate between topologically adjacent nodes. 280 Security-aware nodes MAY choose to require BABs from a given 281 neighbor in the network in order to receive and process a received 282 bundle. 284 The BIB is used to ensure the authenticity and integrity of its 285 security-target from the BIB security-source, which creates the 286 BIB, to the bundle destination, which verifies the BIB 287 authenticator. The authentication information in the BIB MAY 288 (when possible) be verified by any node in between the BIB 289 security-source and the bundle destination. 291 The BCB indicates that the security-target has been encrypted, in 292 whole or in part, at the BCB security-source in order to protect 293 its content while in transit to the bundle destination. 295 Certain cipher suites may allow or require multiple instances of a 296 block to appear in the bundle. For example, an authentication cipher 297 suite may require two security blocks, one before the payload block 298 and one after. Despite the presence of two security blocks, they 299 both comprise the same security-operation - OP(authentication,bundle) 300 in this example. 302 A security-operation MUST NOT be applied more than once in a bundle. 303 For example, the two security-operations: OP(integrity, payload) and 304 OP(integrity, payload) are considered redundant and MUST NOT appear 305 together in a bundle. However, the two security operations 306 OP(integrity, payload) and OP(integrity, extension_block_1) MAY both 307 be present in the bundle. Also, the two security operations 308 OP(integrity, extension_block_1) and OP(integrity, extension_block_2) 309 are unique and may both appear in the same bundle. 311 Many of the fields in these block definitions use the Self-Delimiting 312 Numeric Value (SDNV) type whose format and encoding is as defined in 313 [RFC5050]. 315 2.1. Block Identification 317 This specification requires that every target block of a security 318 operation be uniquely identifiable. In cases where there can only be 319 a single instance of a block in the bundle (as is the case with the 320 primary block and the payload block) then the unique identifier is 321 simply the block type. These blocks are described as "singleton 322 blocks". It is possible that a bundle may contain multiple instances 323 of a block type. In such a case, each instance of the block type 324 must be uniquely identifiable and the block type itself is not 325 sufficient for this identification. These blocks are described as 326 "non-singleton blocks". 328 The definition of the extension block header from [RFC5050] does not 329 provide additional identifying information for a block beyond the 330 block type. The addition of an occurrence number to the block is 331 necessary to identify the block instance in the bundle. This section 332 describes the use of an Artificial EID (AEID) reference in a block 333 header to add unique identification for non-singleton blocks. 335 Figure 7 of [RFC5050] illustrates that an EID reference in a block 336 header is the 2-tuple of the reference scheme and the reference 337 scheme specific part (SSP), each of which are encoded as SDNVs. The 338 AEID MUST encode the occurrence number in the reference scheme SDNV 339 and MUST set the reference SSP to 0. A reference SSP value of 0 is 340 an invalid offset for an SSP in the bundle dictionary and, therefore, 341 the use of 0 in this field identifies the reference as an AEID. 343 The occurrence number MAY be any positive value that is not already 344 present as an occurrence number for the same block type in the 345 bundle. These numbers are independent of relative block position 346 within the bundle, and whether blocks of the same type have been 347 added or removed from the bundle. Once an AEID has been added to a 348 block instance, it MUST NOT be changed until all security operations 349 that target the block instance have been removed from the bundle. 351 If a node wishes to apply a security operation to a target block it 352 MUST determine whether the target block is a singleton block or a 353 non-singleton block. If the target block is non-singleton, then the 354 node MUST find the AEID for the target. If an AEID is not present in 355 the target block header then the node MAY choose to either cancel the 356 security operation or add an AEID to the block, in accordance with 357 security policy. 359 If a node chooses to add an AEID to a target block header it MUST 360 perform the following activities. 362 o The "Block contains an EID reference field" flag MUST be set for 363 the target block, if it is not already set. 365 o The EID reference count for the block MUST be updated to reflect 366 the addition of the AEID. 368 o The scheme offset of the AEID MUST be a value greater than 0. The 369 scheme offset MUST NOT be the same as any other AEID of any other 370 block in the bundle sharing the same block type. 372 o The SSP offset of the AEID MUST be the value 0. There MUST NOT be 373 any other EID in the block header that has a value of 0 for the 374 SSP offset. 376 If there is no AEID present in a block, and if a node is unable to 377 add an AEID by following the above process, then the block MUST NOT 378 have an SBSP security operation applied to it. 380 It is RECOMMENDED that every block in a bundle other than the primary 381 and payload blocks be treated as a non-singleton block. However, the 382 identification of singleton blocks SHOULD be in accordance with the 383 security policy of a node. 385 2.2. Abstract Security Block 387 Each security block uses the Canonical Bundle Block Format as defined 388 in [RFC5050]. That is, each security block is comprised of the 389 following elements: 391 o Block Type Code 393 o Block Processing Control Flags 395 o Block EID Reference List (OPTIONAL) 397 o Block Data Length 399 o Block Type Specific Data Fields 401 Since the three security block types have most fields in common, we 402 can shorten the description of the block type specific data fields if 403 we first define an abstract security block (ASB) and then specify 404 each of the real blocks in terms of the fields that are present/ 405 absent in an ASB. Note that no bundle ever contains an actual ASB, 406 which is simply a specification artifact. 408 The structure of an Abstract Security Block is given in Figure 2. 409 Although the diagram hints at a fixed-format layout, this is purely 410 for the purpose of exposition. Except for the "type" field, all 411 fields are variable in length. 413 +-----------------------------+----------------------------------+ 414 | Block Type Code (BYTE) | Processing Control Flags (SDNV) | 415 +-----------------------------+----------------------------------+ 416 | EID Reference Count and List (Compound List) | 417 +-----------------------------+----------------------------------+ 418 | Block Length (SDNV) | Security Target (Compound) | 419 +-----------------------------+----------------------------------+ 420 | Cipher suite ID (SDNV) | Cipher suite Flags (SDNV) | 421 +-----------------------------+----------------------------------+ 422 | Params Length (SDNV) | Params Data (Compound) | 423 +-----------------------------+----------------------------------+ 424 | Result Length (SDNV) | Result Data (Compound) | 425 +-----------------------------+----------------------------------+ 427 Figure 2: Abstract Security Block Structure 429 An ASB consists of the following fields, some of which are optional. 431 o Block-Type Code (Byte) - as described in [RFC5050]. The block- 432 type codes for security blocks are: 434 * BundleAuthenticationBlock - BAB: 0x02 436 * BlockIntegrityBlock - BIB: 0x03 438 * BlockConfidentialityBlock - BCB: 0x04 440 o Block Processing Control Flags (SDNV) - as described in [RFC5050]. 441 There are no general constraints on the use of the block 442 processing control flags, and some specific requirements are 443 discussed later. 445 o (OPTIONAL) EID Reference Count and List - as described in 446 [RFC5050]. Presence of the EID reference field is indicated by 447 the setting of the "Block contains an EID reference field" 448 (EID_REF) bit of the block processing control flags. If no EID 449 fields are present, then the composite field itself MUST be 450 omitted entirely and the EID_REF bit MUST be unset. A count field 451 of zero is not permitted. The possible EIDs are: 453 (OPTIONAL) Security-source - specifies the security-source for 454 the block. If this is omitted, then the source of the bundle 455 is assumed to be the security-source unless otherwise indicated 456 by policy or associated cipher suite definition. When present, 457 the security-source MUST be the first EID in the list. 459 (OPTIONAL) AEID - specifies an identifier that can be used to 460 uniquely identify an instance of a non-singleton block. This 461 field MUST be present for non-singleton blocks. This field 462 MUST NOT be present for singleton blocks, such as the primary 463 block and the payload block. The construction of the AEID is 464 discussed in Section 2.1. 466 o Block Length (SDNV) - as described in [RFC5050]. 468 o Block type specific data fields as follows: 470 * Security-Target (Compound) - Uniquely identifies the target of 471 the associated security-operation. 473 As discussed in Section 2.1 a singleton block is identified by 474 its block type and a non-singleton block is identified by the 475 combination of its block type and an occurrence number. The 476 security-target is a compound field that contains the block 477 type (as a byte) and occurrence number (as an SDNV). 479 The occurrence number of a singleton block MUST be set to 0. 480 The occurrence number of a non-singleton block MUST be set to 481 the scheme offset of the AEID associated with the block being 482 targeted by the security operation. 484 * Cipher suite ID (SDNV) 486 * Cipher suite flags (SDNV) 488 * (OPTIONAL) Cipher Suite Parameters - compound field of the next 489 two items. 491 + Cipher suite parameters length (SDNV) - specifies the length 492 of the next field, which is the cipher suite-parameters data 493 field. 495 + Cipher suite parameters data - parameters to be used with 496 the cipher suite in use, e.g., a key identifier or 497 initialization vector (IV). See Section 2.8 for a list of 498 potential parameters and their encoding rules. The 499 particular set of parameters that is included in this field 500 is defined as part of a cipher suite specification. 502 * (OPTIONAL) Security Result - compound field of the next two 503 items. 505 + Security result length (SDNV) - contains the length of the 506 next field, which is the security-result data field. 508 + Security result data - contains the results of the 509 appropriate cipher suite specific calculation (e.g., a 510 signature, Message Authentication Code (MAC), or cipher-text 511 block key). 513 The structure of the cipher suite flags field is shown in Figure 3. 514 In each case, the presence of an optional field is indicated by 515 setting the value of the corresponding flag to one. A value of zero 516 indicates the corresponding optional field is missing. Presently, 517 there are three flags defined for the field; for convenience, these 518 are shown as they would be extracted from a single-byte SDNV. Future 519 additions may cause the field to grow to the left so, as with the 520 flags fields defined in [RFC5050], the description below numbers the 521 bit positions from the right rather than the standard RFC definition, 522 which numbers bits from the left. 524 bits 6-3 are reserved for future use. 526 src - bit 2 indicates whether the EID-reference field of the ASB 527 contains the optional reference to the security-source. 529 parm - bit 1 indicates whether or not the cipher suite parameters 530 length and cipher suite parameters data fields are present. 532 res - bit 0 indicates whether or not the ASB contains the 533 security-result length and security-result data fields. 535 Bit Bit Bit Bit Bit Bit Bit 536 6 5 4 3 2 1 0 537 +-----+-----+-----+-----+-----+-----+-----+ 538 | reserved | src |parm | res | 539 +-----+-----+-----+-----+-----+-----+-----+ 541 Figure 3: Cipher Suite Flags 543 2.3. Block Ordering 545 A security-operation may be implemented in a bundle using either one 546 or two security blocks. For example, the operation 547 OP(authentication, bundle) MAY be accomplished by a single BAB block 548 in the bundle, or it MAY be accomplished by two BAB blocks in the 549 bundle. To avoid confusion, we use the following terminology to 550 identify the block or blocks comprising a security-operation. 552 The terms "First" and "Last" are used ONLY when describing multiple 553 security blocks comprising a single security-operation. A "First" 554 block refers to the security block that is closest to the primary 555 block in the canonical form of the bundle. A "Last" block refers to 556 the security block that is furthest from the primary block in the 557 canonical form of the bundle. 559 If a single security block implements the security-operation, then it 560 is referred to as a "Lone" block. For example, when a bundle 561 authentication cipher suite requires a single BAB block we refer to 562 it as a Lone BAB. When a bundle authentication cipher suite requires 563 two BAB blocks we refer to them as the First BAB and the Last BAB. 565 This specification and individual cipher suites impose restrictions 566 on what optional fields must and must not appear in First blocks, 567 Last blocks, and Lone blocks. 569 2.4. Bundle Authentication Block 571 This section describes typical field values for the BAB, which is 572 solely used to implement OP(authentication, bundle). 574 The block-type code field value MUST be 0x02. 576 The block processing control flags value can be set to whatever 577 values are required by local policy. Cipher suite designers 578 should carefully consider the effect of setting flags that either 579 discard the block or delete the bundle in the event that this 580 block cannot be processed. 582 The security-target MUST be the entire bundle, which MUST be 583 represented by a of <0x00><0x00>. 585 The cipher suite ID MUST be documented as a hop-by-hop 586 authentication cipher suite. When a Lone BAB is used, the cipher 587 suite MUST be documented as requiring one instance of the BAB. 588 When a First BAB and Last BAB are used, the cipher suite MUST be 589 documented as requiring two instances of the BAB. 591 The cipher suite parameters field MAY be present, if so specified 592 in the cipher suite specification. 594 An EID-reference to the security-source MAY be present in either a 595 First BAB or a Lone BAB. An EID-reference to the security-source 596 MUST NOT be present in a Last BAB. 598 The security-result captures the result of applying the cipher 599 suite calculation (e.g., the MAC or signature) to the relevant 600 parts of the bundle, as specified in the cipher suite definition. 601 This field MUST be present in either a Lone BAB or a Last BAB. 602 This field MUST NOT be present in a First BAB. 604 Notes: 606 o When multiple BAB blocks are used, the mandatory fields of the 607 Last BAB must match those of the First BAB. 609 o The First BAB or Lone BAB, when present, SHOULD immediately follow 610 the primary block. 612 o A Last BAB, when present, SHOULD be the last block in the bundle. 614 o Since OP(authentication, bundle) is allowed only once in a bundle, 615 it is RECOMMENDED that users wishing to support multiple 616 authentication signatures define a multi-target cipher suite, 617 capturing multiple security results in cipher suite parameters. 619 2.5. Block Integrity Block 621 A BIB is an ASB with the following additional restrictions: 623 The block-type code value MUST be 0x03. 625 The block processing control flags value can be set to whatever 626 values are required by local policy. Cipher suite designers 627 should carefully consider the effect of setting flags that either 628 discard the block or delete the bundle in the event that this 629 block cannot be processed. 631 The security-target MUST uniquely identify a block within the 632 bundle. The reserved block type 0x01 specifies the singleton 633 payload block. The reserved type 0x00 specifies the singleton 634 primary block. The security-target for a BIB MUST NOT reference a 635 security block defined in this specification (BAB, BIB, or BCB). 637 The cipher suite ID MUST be documented as an end-to-end 638 authentication-cipher suite or as an end-to-end error-detection- 639 cipher suite. 641 The cipher suite parameters field MAY be present in either a Lone 642 BIB or a First BIB. This field MUST NOT be present in a Last BIB. 644 An EID-reference to the security-source MAY be present in either a 645 Lone BIB or a First BIB. This field MUST NOT be present in a Last 646 BIB. 648 The security-result captures the result of applying the cipher 649 suite calculation (e.g., the MAC or signature) to the relevant 650 parts of the security-target, as specified in the cipher suite 651 definition. This field MUST be present in either a Lone BIB or a 652 Last BIB. This field MUST NOT be present in a First BIB. 654 The cipher suite MAY process less than the entire security-target. 655 If the cipher suite processes less than the complete, original 656 security-target, the cipher suite parameters MUST specify which 657 bytes of the security-target are protected. 659 Notes: 661 o Since OP(integrity, target) is allowed only once in a bundle per 662 target, it is RECOMMENDED that users wishing to support multiple 663 integrity signatures for the same target define a multi-signature 664 cipher suite, capturing multiple security results in cipher suite 665 parameters. 667 o For some cipher suites, (e.g., those using asymmetric keying to 668 produce signatures or those using symmetric keying with a group 669 key), the security information MAY be checked at any hop on the 670 way to the destination that has access to the required keying 671 information, in accordance with Section 2.7. 673 o The use of a generally available key is RECOMMENDED if custodial 674 transfer is employed and all nodes SHOULD verify the bundle before 675 accepting custody. 677 2.6. Block Confidentiality Block 679 A BCB is an ASB with the following additional restrictions: 681 The block-type code value MUST be 0x04. 683 The block processing control flags value can be set to whatever 684 values are required by local policy, except that a Lone BCB or 685 First BCB MUST have the "replicate in every fragment" flag set. 686 This indicates to a receiving node that the payload portion in 687 each fragment represents cipher-text. This flag SHOULD NOT be set 688 otherwise. Cipher suite designers should carefully consider the 689 effect of setting flags that either discard the block or delete 690 the bundle in the event that this block cannot be processed. 692 The security-target MUST uniquely identify a block within the 693 bundle. The security-target for a BCB MAY reference the payload 694 block, a non-security extension block, or a BIB block. The 695 reserved type 0x01 specifies the singleton payload block. 697 The cipher suite ID MUST be documented as a confidentiality cipher 698 suite. 700 Key-information, if available, MUST appear only in a Lone BCB or a 701 First BCB. 703 Any additional bytes generated as a result of encryption and/or 704 authentication processing of the security-target SHOULD be placed 705 in an "integrity check value" field (see Section 2.8) in the 706 security-result of the Lone BCB or Last BCB. 708 The cipher suite parameters field MAY be present in either a Lone 709 BCB or a First BCB. This field MUST NOT be present in a Last BCB. 711 An EID-reference to the security-source MAY be present in either a 712 Lone BCB or a First BCB. This field MUST NOT be present in a Last 713 BCB. The security-source can also be specified as part of key- 714 information described in Section 2.8. 716 The security-result MAY be present in either a Lone BCB or a Last 717 BCB. This field MUST NOT be present in a First BCB. This 718 compound field normally contains fields such as an encrypted 719 bundle encryption key and/or authentication tag. 721 The BCB is the only security block that modifies the contents of its 722 security-target. When a BCB is applied, the security-target body 723 data are encrypted "in-place". Following encryption, the security- 724 target body data contains cipher-text, not plain-text. Other 725 security-target block fields (such as type, processing control flags, 726 and length) remain unmodified. 728 Fragmentation, reassembly, and custody transfer are adversely 729 affected by a change in size of the payload due to ambiguity about 730 what byte range of the block is actually in any particular fragment. 731 Therefore, when the security-target of a BCB is the bundle payload, 732 the BCB MUST NOT alter the size of the payload block body data. 733 Cipher suites SHOULD place any block expansion, such as 734 authentication tags (integrity check values) and any padding 735 generated by a block-mode cipher, into an integrity check value item 736 in the security-result field (see Section 2.8) of the BCB. This "in- 737 place" encryption allows fragmentation, reassembly, and custody 738 transfer to operate without knowledge of whether or not encryption 739 has occurred. 741 Notes: 743 o The cipher suite MAY process less than the entire original 744 security-target body data. If the cipher suite processes less 745 than the complete, original security-target body data, the BCB for 746 that security-target MUST specify, as part of the cipher suite 747 parameters, which bytes of the body data are protected. 749 o The BCB's "discard" flag may be set independently from its 750 security-target's "discard" flag. Whether or not the BCB's 751 "discard" flag is set is an implementation/policy decision for the 752 encrypting node. (The "discard" flag is more properly called the 753 "Discard if block cannot be processed" flag.) 755 o A BCB MAY include information as part of additional authenticated 756 data to address parts of the target block, such as EID references, 757 that are not converted to cipher-text. 759 2.7. Block Interactions 761 The three security-block types defined in this specification are 762 designed to be as independent as possible. However, there are some 763 cases where security blocks may share a security-target creating 764 processing dependencies. 766 If confidentiality is being applied to a target that already has 767 integrity applied to it, then an undesirable condition occurs where a 768 security-aware intermediate node would be unable to check the 769 integrity result of a block because the block contents have been 770 encrypted after the integrity signature was generated. To address 771 this concern, the following processing rules MUST be followed. 773 o If confidentiality is to be applied to a target, it MUST also be 774 applied to every integrity operation already defined for that 775 target. This means that if a BCB is added to encrypt a block, 776 another BCB MUST also be added to encrypt a BIB also targeting 777 that block. 779 o An integrity operation MUST NOT be applied to a security-target if 780 a BCB in the bundle shares the same security-target. This 781 prevents ambiguity in the order of evaluation when receiving a BIB 782 and a BCB for a given security-target. 784 o An integrity value MUST NOT be evaluated if the BIB providing the 785 integrity value is the security target of an existing BCB block in 786 the bundle. In such a case, the BIB data contains cipher-text as 787 it has been encrypted. 789 o An integrity value MUST NOT be evaluated if the security-target of 790 the BIB is also the security-target of a BCB in the bundle. In 791 such a case, the security-target data contains cipher-text as it 792 has been encrypted. 794 o As mentioned in Section 2.6, a BIB MUST NOT have a BCB as its 795 security target. BCBs may embed integrity results as part of 796 cipher suite parameters. 798 These restrictions on block interactions impose a necessary ordering 799 when applying security operations within a bundle. Specifically, for 800 a given security-target, BIBs MUST be added before BCBs, and BABs 801 MUST be added after all other security blocks. This ordering MUST be 802 preserved in cases where the current BPA is adding all of the 803 security blocks for the bundle or whether the BPA is a waypoint 804 adding new security blocks to a bundle that already contains security 805 blocks. 807 2.8. Parameters and Result Fields 809 Various cipher suites include several items in the cipher suite 810 parameters and/or security-result fields. Which items MAY appear is 811 defined by the particular cipher suite description. A cipher suite 812 MAY support several instances of the same type within a single block. 814 Each item is represented as a type-length-value. Type is a single 815 byte indicating the item. Length is the count of data bytes to 816 follow, and is an SDNV-encoded integer. Value is the data content of 817 the item. 819 Item types, name, and descriptions are defined as follows. 821 Cipher suite parameters and result fields. 823 +-------+----------------+------------------------------------------+ 824 | Type | Name | Description | 825 +-------+----------------+------------------------------------------+ 826 | 0 | Reserved | | 827 +-------+----------------+------------------------------------------+ 828 | 1 | Initialization | A random value, typically eight to | 829 | | Vector (IV) | sixteen bytes. | 830 +-------+----------------+------------------------------------------+ 831 | 2 | Reserved | | 832 +-------+----------------+------------------------------------------+ 833 | 3 | Key | Material encoded or protected by the key | 834 | | Information | management system and used to transport | 835 | | | an ephemeral key protected by a long- | 836 | | | term key. | 837 +-------+----------------+------------------------------------------+ 838 | 4 | Content Range | Pair of SDNV values (offset,length) | 839 | | | specifying the range of payload bytes to | 840 | | | which an operation applies. The offset | 841 | | | MUST be the offset within the original | 842 | | | bundle, even if the current bundle is a | 843 | | | fragment. | 844 +-------+----------------+------------------------------------------+ 845 | 5 | Integrity | Result of BAB or BIB digest or other | 846 | | Signatures | signing operation. | 847 +-------+----------------+------------------------------------------+ 848 | 6 | Unassigned | | 849 +-------+----------------+------------------------------------------+ 850 | 7 | Salt | An IV-like value used by certain | 851 | | | confidentiality suites. | 852 +-------+----------------+------------------------------------------+ 853 | 8 | BCB Integrity | Output from certain confidentiality | 854 | | Check Value | cipher suite operations to be used at | 855 | | (ICV) / | the destination to verify that the | 856 | | Authentication | protected data has not been modified. | 857 | | Tag | This value MAY contain padding if | 858 | | | required by the cipher suite. | 859 +-------+----------------+------------------------------------------+ 860 | 9-255 | Reserved | | 861 +-------+----------------+------------------------------------------+ 863 Table 1 865 2.9. BSP Block Example 867 An example of SBSP blocks applied to a bundle is illustrated in 868 Figure 4. In this figure the first column represents blocks within a 869 bundle and the second column represents a unique identifier for each 870 block, suitable for use as the security-target of a SBSP security- 871 block. Since the mechanism and format of a security-target is not 872 specified in this document, the terminology B1...Bn is used to 873 identify blocks in the bundle for the purposes of illustration. 875 Block in Bundle ID 876 +=================================+====+ 877 | Primary Block | B1 | 878 +---------------------------------+----+ 879 | First BAB | B2 | 880 | OP(authentication, Bundle) | | 881 +---------------------------------+----+ 882 | Lone BIB | B3 | 883 | OP(integrity, target=B1) | | 884 +---------------------------------+----+ 885 | Lone BCB | B4 | 886 | OP(confidentiality, target=B5) | | 887 +---------------------------------+----+ 888 | Extension Block | B5 | 889 +---------------------------------+----+ 890 | Lone BIB | B6 | 891 | OP(integrity, target=B7) | | 892 +---------------------------------+----+ 893 | Extension Block | B7 | 894 +---------------------------------+----+ 895 | Lone BCB | B8 | 896 | OP(confidentiality, target=B9) | | 897 +---------------------------------+----+ 898 | Lone BIB (encrypted by B8) | B9 | 899 | OP(integrity, target=B11) | | 900 +---------------------------------+----+ 901 | Lone BCB |B10 | 902 | OP(confidentiality, target=B11) | | 903 +---------------------------------+----+ 904 | Payload Block |B11 | 905 +---------------------------------+----+ 906 | Last BAB |B12 | 907 | OP(authentication, Bundle) | | 908 +---------------------------------+----+ 910 Figure 4: Sample Use of BSP Blocks 912 In this example a bundle has four non-security-related blocks: the 913 primary block (B1), two extension blocks (B5,B7), and a payload block 914 (B11). The following security applications are applied to this 915 bundle. 917 o Authentication over the bundle. This is accomplished by two BAB 918 blocks: B2 and B12. 920 o An integrity signature applied to the canonicalized primary block. 921 This is accomplished by a single BIB, B3. 923 o Confidentiality for the first extension block. This is 924 accomplished by a single BCB block, B4. 926 o Integrity for the second extension block. This is accomplished by 927 a single BIB block, B6. 929 o An integrity signature on the payload. This is accomplished by a 930 single BIB block, B9. 932 o Confidentiality for the payload block and it's integrity 933 signature. This is accomplished by two Lone BCB blocks: B8 934 encrypting B9, and B10 encrypting B11. 936 3. Security Processing 938 This section describes the security aspects of bundle processing. 940 3.1. Canonical Forms 942 In order to verify a signature of a bundle, the exact same bits, in 943 the exact same order, MUST be input to the calculation upon 944 verification as were input upon initial computation of the original 945 signature value. Consequently, a node MUST NOT change the encoding 946 of any URI [RFC3986] in the dictionary field, e.g., changing the DNS 947 part of some HTTP URL from lower case to upper case. Because bundles 948 MAY be modified while in transit (either correctly or due to 949 implementation errors), canonical forms of security-targets MUST be 950 defined. 952 Many fields in various blocks are stored as variable-length SDNVs. 953 These are canonicalized into an "unpacked form" as eight-byte fixed- 954 width fields in network byte order. The size of eight bytes is 955 chosen because implementations MAY handle larger SDNV values as 956 invalid, as noted in [RFC5050]. 958 3.1.1. Bundle Canonicalization 960 Bundle canonicalization permits no changes at all to the bundle 961 between the security-source and the destination, with the exception 962 of one of the Block Processing Control Flags, as described below. It 963 is intended for use in BAB cipher suites. This algorithm 964 conceptually catenates all blocks in the order presented, but omits 965 all security-result data fields in security blocks having the bundle 966 as their security-target. For example, when a BAB cipher suite 967 specifies this algorithm, we omit the BAB security-result from the 968 catenation. The inclusion of security-result length fields is as 969 determined by the specified cipher suite. A security-result length 970 field MAY be present even when the corresponding security-result data 971 fields are omitted. 973 Notes: 975 o In the Block Processing Control Flags field the unpacked SDNV is 976 ANDed with mask 0xFFFF FFFF FFFF FFDF to zero the flag at bit 5 977 ("Block was forwarded without being processed"). If this flag is 978 not zeroed out, then a bundle passing through a non-security aware 979 node will set this flag which will change the message digest and 980 the BAB block will fail to verify. 982 o In the above, we specify that security-result data is omitted. 983 This means that no bytes of the security-result data are input. 984 If the security-result length is included in the catenation, we 985 assume that the security-result length will be known to the module 986 that implements the cipher suite before the security-result is 987 calculated, and require that this value be in the security-result 988 length field even though the security-result data itself will be 989 omitted. 991 o The 'res' bit of the cipher suite ID, which indicates whether or 992 not the security-result length and security-result data field are 993 present, is part of the canonical form. 995 o The value of the block data length field, which indicates the 996 length of the block, is also part of the canonical form. Its 997 value indicates the length of the entire block when the block 998 includes the security-result data field. 1000 3.1.2. Block Canonicalization 1002 This algorithm protects those parts of a block that SHOULD NOT be 1003 changed in transit. 1005 There are three types of blocks that may undergo block 1006 canonicalization: the primary block, the payload block, or an 1007 extension block. 1009 3.1.2.1. Primary Block Canonicalization 1011 The canonical form of the primary block is shown in Figure 5. 1012 Essentially, it de-references the dictionary block, adjusts lengths 1013 where necessary, and ignores flags that may change in transit. 1015 +----------------+----------------+----------------+----------------+ 1016 | Version | Processing flags (incl. COS and SRR) | 1017 +----------------+----------------+---------------------------------+ 1018 | Canonical primary block length | 1019 +----------------+----------------+---------------------------------+ 1020 | Destination endpoint ID length | 1021 +----------------+----------------+---------------------------------+ 1022 | Destination endpoint ID | 1023 +----------------+----------------+---------------------------------+ 1024 | Source endpoint ID length | 1025 +----------------+----------------+----------------+----------------+ 1026 | Source endpoint ID | 1027 +----------------+----------------+---------------------------------+ 1028 | Report-to endpoint ID length | 1029 +----------------+----------------+----------------+----------------+ 1030 | Report-to endpoint ID | 1031 +----------------+----------------+----------------+----------------+ 1032 + Creation Timestamp (2 x SDNV) + 1033 +---------------------------------+---------------------------------+ 1034 | Lifetime | 1035 +----------------+----------------+----------------+----------------+ 1037 Figure 5: The Canonical Form of the Primary Bundle Block 1039 The fields shown in Figure 5 are as follows: 1041 o The version value is the single-byte value in the primary block. 1043 o The processing flags value in the primary block is an SDNV, and 1044 includes the class-of-service (COS) and status report request 1045 (SRR) fields. For purposes of canonicalization, the unpacked SDNV 1046 is ANDed with mask 0x0000 0000 0007 C1BE to set to zero all 1047 reserved bits and the "bundle is a fragment" bit. 1049 o The canonical primary block length value is a four-byte value 1050 containing the length (in bytes) of this structure, in network 1051 byte order. 1053 o The destination endpoint ID length and value are the length (as a 1054 four-byte value in network byte order) and value of the 1055 destination endpoint ID from the primary bundle block. The URI is 1056 simply copied from the relevant part(s) of the dictionary block 1057 and is not itself canonicalized. Although the dictionary entries 1058 contain "null-terminators", the null-terminators are not included 1059 in the length or the canonicalization. 1061 o The source endpoint ID length and value are handled similarly to 1062 the destination. 1064 o The report-to endpoint ID length and value are handled similarly 1065 to the destination. 1067 o The unpacked SDNVs for the creation timestamp and lifetime are 1068 copied from the primary block. 1070 o Fragment offset and total application data unit length are 1071 ignored, as is the case for the "bundle is a fragment" bit 1072 mentioned above. If the payload data to be canonicalized is less 1073 than the complete, original bundle payload, the offset and length 1074 are specified in the cipher suite parameters. 1076 3.1.2.2. Payload Block Canonicalization 1078 When canonicalizing the payload block, the block processing control 1079 flags value used for canonicalization is the unpacked SDNV value with 1080 reserved and mutable bits masked to zero. The unpacked value is 1081 ANDed with mask 0x0000 0000 0000 0077 to zero reserved bits and the 1082 "last block" bit. The "last block" bit is ignored because BABs and 1083 other security blocks MAY be added for some parts of the journey but 1084 not others, so the setting of this bit might change from hop to hop. 1086 Payload blocks are canonicalized as-is, with the exception that, in 1087 some instances, only a portion of the payload data is to be 1088 protected. In such a case, only those bytes are included in the 1089 canonical form, and additional cipher suite parameters are required 1090 to specify which part of the payload is protected, as discussed 1091 further below. 1093 3.1.2.3. Extension Block Canonicalization 1095 When canonicalizing an extension block, the block processing control 1096 flags value used for canonicalization is the unpacked SDNV value with 1097 reserved and mutable bits masked to zero. The unpacked value is 1098 ANDed with mask 0x0000 0000 0000 0057 to zero reserved bits, the 1099 "last block" flag and the "Block was forwarded without being 1100 processed" bit. The "last block" flag is ignored because BABs and 1101 other security blocks MAY be added for some parts of the journey but 1102 not others, so the setting of this bit might change from hop to hop. 1104 The "Block was forwarded without being processed" flag is ignored 1105 because the bundle may pass through nodes that do not understand that 1106 extension block and this flag would be set. 1108 Endpoint ID references in blocks are canonicalized using the de- 1109 referenced text form in place of the reference pair. The reference 1110 count is not included, nor is the length of the endpoint ID text. 1111 The EID reference is, therefore, canonicalized as :, 1112 which includes the ":" character. 1114 Since neither the length of the canonicalized EID text nor a null- 1115 terminator is used in EID canonicalization, a separator token MUST be 1116 used to determine when one EID ends and another begins. When 1117 multiple EIDs are canonicalized together, the character "," SHALL be 1118 placed between adjacent instances of EID text. 1120 The block-length is canonicalized as its unpacked SDNV value. If the 1121 data to be canonicalized is less than the complete, original block 1122 data, this field contains the size of the data being canonicalized 1123 (the "effective block") rather than the actual size of the block. 1125 3.1.3. Considerations 1127 o The canonical forms for the bundle and various extension blocks is 1128 not transmitted. It is simply an artifact used as input to 1129 digesting. 1131 o We omit the reserved flags because we cannot determine if they 1132 will change in transit. The masks specified above will have to be 1133 revised if additional flags are defined and they need to be 1134 protected. 1136 o Our URI encoding does not preserve the null-termination convention 1137 from the dictionary field, nor do we canonicalize the scheme and 1138 scheme-specific part (SSP) separately. Instead, the byte array < 1139 scheme name > : < scheme-specific part (SSP)> is used in the 1140 canonicalization. 1142 o The URI encoding will cause errors if any node rewrites the 1143 dictionary content (e.g., changing the DNS part of an HTTP URL 1144 from lower case to upper case). This could happen transparently 1145 when a bundle is synched to disk using one set of software and 1146 then read from disk and forwarded by a second set of software. 1147 Because there are no general rules for canonicalizing URIs (or 1148 IRIs), this problem may be an unavoidable source of integrity 1149 failures. 1151 o All SDNV fields here are canonicalized as eight-byte unpacked 1152 values in network byte order. Length fields are canonicalized as 1153 four-byte values in network byte order. Encoding does not need 1154 optimization since the values are never sent over the network. 1156 o These canonicalization algorithms assume that endpoint IDs 1157 themselves are immutable and they are unsuitable for use in 1158 environments where that assumption might be violated. 1160 o Cipher suites MAY define their own canonicalization algorithms and 1161 require the use of those algorithms over the ones provided in this 1162 specification. 1164 3.2. Endpoint ID Confidentiality 1166 Every bundle has a primary block that contains the source and 1167 destination endpoint IDs, and possibly other EIDs (in the dictionary 1168 field) that cannot be encrypted. If endpoint ID confidentiality is 1169 required, then bundle-in-bundle encapsulation can solve this problem 1170 in some instances. 1172 Similarly, confidentiality requirements MAY also apply to other parts 1173 of the primary block (e.g., the current-custodian), and that is 1174 supported in the same manner. 1176 3.3. Bundles Received from Other Nodes 1178 Security blocks MUST be processed in a specific order when received 1179 by a security-aware node. The processing order is as follows. 1181 o All BAB blocks in the bundle MUST be evaluated prior to evaluating 1182 any other block in the bundle. 1184 o All BCB blocks in the bundle MUST be evaluated prior to evaluating 1185 any BIBs in the bundle. When BIBs and BCBs share a security- 1186 target, BCBs MUST be evaluated first and BIBs second. 1188 3.3.1. Receiving BAB Blocks 1190 Nodes implementing this specification SHALL consult their security 1191 policy to determine whether or not a received bundle is required by 1192 policy to include a BAB. 1194 If the bundle is not required to have a BAB then BAB processing on 1195 the received bundle is complete, and the bundle is ready to be 1196 further processed for BIB/BCB handling or delivery or forwarding. 1197 Security policy may provide a means to override this default behavior 1198 and require processing of a BAB if it exists. 1200 If the bundle is required to have a BAB but does not, then the bundle 1201 MUST be discarded and processed no further. If the bundle is 1202 required to have a BAB but the key information for the security- 1203 source cannot be determined or the security-result value check fails, 1204 then the bundle has failed to authenticate, and the bundle MUST be 1205 discarded and processed no further. 1207 If the bundle is required to have a BAB, and a BAB exists, and the 1208 BAB information is verified, then the BAB processing on the received 1209 bundle is complete, and the bundle is ready to be further processed 1210 for BIB/BCB handling or delivery or forwarding. 1212 A BAB received in a bundle MUST be stripped before the bundle is 1213 forwarded. A new BAB MAY be added as required by policy. This MAY 1214 require correcting the "last block" field of the to-be-forwarded 1215 bundle. 1217 3.3.2. Receiving BCB Blocks 1219 If the bundle has a BCB and the receiving node is the destination for 1220 the bundle, the node MUST decrypt the relevant parts of the security- 1221 target in accordance with the cipher suite specification. 1223 If the relevant parts of an encrypted payload cannot be decrypted 1224 (i.e., the decryption key cannot be deduced or decryption fails), 1225 then the bundle MUST be discarded and processed no further; in this 1226 case, a bundle deletion status report (see [RFC5050]) indicating the 1227 decryption failure MAY be generated. If any other encrypted 1228 security-target cannot be decrypted then the associated security- 1229 target and all security blocks associated with that target MUST be 1230 discarded and processed no further. 1232 When a BCB is decrypted, the recovered plain-text MUST replace the 1233 cipher-text in the security-target body data 1235 3.3.3. Receiving BIB Blocks 1237 A BIB MUST NOT be processed if the security-target of the BIB is also 1238 the security-target of a BCB in the bundle. Given the order of 1239 operations mandated by this specification, when both a BIB and a BCB 1240 share a security-target, it means that the security-target MUST have 1241 been encrypted after it was integrity signed and, therefore, the BIB 1242 cannot be verified until the security-target has been decrypted by 1243 processing the BCB. 1245 If the security policy of a security-aware node specifies that a 1246 bundle SHOULD apply integrity to a specific security-target and no 1247 such BIB is present in the bundle, then the node MUST process this 1248 security-target in accordance with the security policy. This MAY 1249 involve removing the security-target from the bundle. If the removed 1250 security-target is the payload or primary block, the bundle MAY be 1251 discarded. This action may occur at any node that has the ability to 1252 verify an integrity signature, not just the bundle destination. 1254 If the bundle has a BIB and the receiving node is the destination for 1255 the bundle, the node MUST verify the security-target in accordance 1256 with the cipher suite specification. If a BIB check fails, the 1257 security-target has failed to authenticate and the security-target 1258 SHALL be processed according to the security policy. A bundle status 1259 report indicating the failure MAY be generated. Otherwise, if the 1260 BIB verifies, the security-target is ready to be processed for 1261 delivery. 1263 If the bundle has a BIB and the receiving node is not the bundle 1264 destination, the receiving node MAY attempt to verify the value in 1265 the security-result field. If the check fails, the node SHALL 1266 process the security-target in accordance to local security policy. 1267 It is RECOMMENDED that if a payload integrity check fails at a 1268 waypoint that it is processed in the same way as if the check fails 1269 at the destination. 1271 3.4. Bundle Fragmentation and Reassembly 1273 If it is necessary for a node to fragment a bundle and security 1274 services have been applied to that bundle, the fragmentation rules 1275 described in [RFC5050] MUST be followed. As defined there and 1276 repeated here for completeness, only the payload may be fragmented; 1277 security blocks, like all extension blocks, can never be fragmented. 1278 In addition, the following security-specific processing is REQUIRED: 1280 o Due to the complexity of bundle fragmentation, including the 1281 possibility of fragmenting bundle fragments, integrity and 1282 confidentiality operations are not to be applied to a bundle 1283 fragment. Specifically, a BCB or BIB MUST NOT be added to a 1284 bundle fragment, even if the security-target of the security block 1285 is not the payload. When integrity and confidentiality must be 1286 applied to a fragment, we RECOMMEND that encapsulation be used 1287 instead. 1289 o The authentication security policy requirements for a bundle MUST 1290 be applied individually to all the bundles resulting from a 1291 fragmentation event. 1293 o A BAB cipher suite MAY specify that it only applies to non- 1294 fragmented bundles and not to bundle fragments. 1296 o The decision to fragment a bundle MUST be made prior to adding 1297 authentication to the bundle. The bundle MUST first be fragmented 1298 and authentication applied to each individual fragment. 1300 o If a bundle with a BAB is fragmented by a non-security-aware node, 1301 then the entire bundle must be re-assembled before being processed 1302 to allow for the proper verification of the BAB. 1304 3.5. Reactive Fragmentation 1306 When a partial bundle has been received, the receiving node SHALL 1307 consult its security policy to determine if it MAY fragment the 1308 bundle, converting the received portion into a bundle fragment for 1309 further forwarding. Whether or not reactive fragmentation is 1310 permitted SHALL depend on the security policy and the cipher suite 1311 used to calculate the BAB authentication information, if required. 1313 Specifically, if the security policy does not require authentication, 1314 then reactive fragmentation MAY be permitted. If the security policy 1315 does require authentication, then reactive fragmentation MUST NOT be 1316 permitted if the partial bundle is not sufficient to allow 1317 authentication. 1319 If reactive fragmentation is allowed, then all BAB blocks must be 1320 removed from created fragments. 1322 4. Key Management 1324 Key management in delay-tolerant networks is recognized as a 1325 difficult topic and is one that this specification does not attempt 1326 to solve. 1328 5. Policy Considerations 1330 When implementing the SBSP, several policy decisions must be 1331 considered. This section describes key policies that affect the 1332 generation, forwarding, and receipt of bundles that are secured using 1333 this specification. 1335 o If a bundle is received that contains more than one security- 1336 operation, in violation of the SBSP, then the BPA must determine 1337 how to handle this bundle. The bundle may be discarded, the block 1338 affected by the security-operation may be discarded, or one 1339 security-operation may be favored over another. 1341 o BPAs in the network MUST understand what security-operations they 1342 should apply to bundles. This decision may be based on the source 1343 of the bundle, the destination of the bundle, or some other 1344 information related to the bundle. 1346 o If an intermediate receiver has been configured to add a security- 1347 operation to a bundle, and the received bundle already has the 1348 security-operation applied, then the receiver MUST understand what 1349 to do. The receiver may discard the bundle, discard the security- 1350 target and associated SBSP blocks, replace the security-operation, 1351 or some other action. 1353 o It is recommended that security operations only be applied to the 1354 payload block, the primary block, and any block-types specifically 1355 identified in the security policy. If a BPA were to apply 1356 security operations such as integrity or confidentiality to every 1357 block in the bundle, regardless of the block type, there could be 1358 downstream errors processing blocks whose contents must be 1359 inspected at every hop in the network path. 1361 6. Security Considerations 1363 Certain applications of DTN need to both sign and encrypt a message, 1364 and there are security issues to consider with this. 1366 o To provide an assurance that a security-target came from a 1367 specific source and has not been changed, then it should be signed 1368 with a BIB. 1370 o To ensure that a security-target cannot be inspected during 1371 transit, it should be encrypted with a BCB. 1373 o Adding a BIB to a security-target that has already been encrypted 1374 by a BCB is not allowed. Therefore, we recommend three methods to 1375 add an integrity signature to an encrypted security-target. 1376 First, at the time of encryption, an integrity signature may be 1377 generated and added to the BCB for the security-target as 1378 additional information in the security-result field. Second, the 1379 encrypted block may be replicated as a new block and integrity 1380 signed. Third, an encapsulation scheme may be applied to 1381 encapsulate the security-target (or the entire bundle) such that 1382 the encapsulating structure is, itself, no longer the security- 1383 target of a BCB and may therefore be the security-target of a BIB. 1385 7. Conformance 1387 All implementations are strongly RECOMMENDED to provide at least a 1388 BAB cipher suite. A relay node, for example, might not deal with 1389 end-to-end confidentiality and data integrity, but it SHOULD exclude 1390 unauthorized traffic and perform hop-by-hop bundle verification. 1392 8. IANA Considerations 1394 This protocol has fields that have been registered by IANA. 1396 8.1. Bundle Block Types 1398 This specification allocates three block types from the existing 1399 "Bundle Block Types" registry defined in [RFC6255]. 1401 Additional Entries for the Bundle Block-Type Codes Registry: 1403 +--------+-----------------------------+---------------+ 1404 | Value | Description | Reference | 1405 +--------+-----------------------------+---------------+ 1406 | 2 | Bundle Authentication Block | This document | 1407 | 3 | Block Integrity Block | This document | 1408 | 4 | Block Confidentiality Block | This document | 1409 +--------+-----------------------------+---------------+ 1411 Table 2 1413 8.2. Cipher Suite Flags 1415 This protocol has a cipher suite flags field and certain flags are 1416 defined. An IANA registry has been set up as follows. 1418 The registration policy for this registry is: Specification Required 1420 The Value range is: Variable Length 1421 Cipher Suite Flag Registry: 1423 +--------------------------+-------------------------+--------------+ 1424 | Bit Position (right to | Description | Reference | 1425 | left) | | | 1426 +--------------------------+-------------------------+--------------+ 1427 | 0 | Block contains result | This | 1428 | | | document | 1429 | 1 | Block Contains | This | 1430 | | parameters | document | 1431 | 2 | Source EID ref present | This | 1432 | | | document | 1433 | >3 | Reserved | This | 1434 | | | document | 1435 +--------------------------+-------------------------+--------------+ 1437 Table 3 1439 8.3. Parameters and Results 1441 This protocol has fields for cipher suite parameters and results. 1442 The field is a type-length-value triple and a registry is required 1443 for the "type" sub-field. The values for "type" apply to both the 1444 cipher suite parameters and the cipher suite results fields. Certain 1445 values are defined. An IANA registry has been set up as follows. 1447 The registration policy for this registry is: Specification Required 1449 The Value range is: 8-bit unsigned integer. 1451 Cipher Suite Parameters and Results Type Registry: 1453 +---------+---------------------------------+---------------+ 1454 | Value | Description | Reference | 1455 +---------+---------------------------------+---------------+ 1456 | 0 | reserved | This document | 1457 | 1 | initialization vector (IV) | This document | 1458 | 2 | reserved | This document | 1459 | 3 | key-information | This document | 1460 | 4 | content-range (pair of SDNVs) | This document | 1461 | 5 | integrity signature | This document | 1462 | 6 | unassigned | This document | 1463 | 7 | salt | This document | 1464 | 8 | BCB integrity check value (ICV) | This document | 1465 | 9-191 | reserved | This document | 1466 | 192-250 | private use | This document | 1467 | 251-255 | reserved | This document | 1468 +---------+---------------------------------+---------------+ 1470 Table 4 1472 9. References 1474 9.1. Normative References 1476 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1477 Requirement Levels", BCP 14, RFC 2119, March 1997. 1479 [RFC5050] Scott, K. and S. Burleigh, "Bundle Protocol 1480 Specification", RFC 5050, November 2007. 1482 [RFC6255] Blanchet, M., "Delay-Tolerant Networking Bundle Protocol 1483 IANA Registries", RFC 6255, May 2011. 1485 9.2. Informative References 1487 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1488 Resource Identifier (URI): Generic Syntax", STD 66, RFC 1489 3986, January 2005. 1491 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1492 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1493 Networking Architecture", RFC 4838, April 2007. 1495 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 1496 Mail Extensions (S/MIME) Version 3.2 Message 1497 Specification", RFC 5751, January 2010. 1499 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1500 "Bundle Security Protocol Specification", RFC 6257, May 1501 2011. 1503 Appendix A. Acknowledgements 1505 The following participants contributed technical material, use cases, 1506 and useful thoughts on the overall approach to this security 1507 specification: Scott Burleigh of the Jet Propulsion Laboratory, Amy 1508 Alford and Angela Hennessy of the Laboratory for Telecommunications 1509 Sciences, and Angela Dalton and Cherita Corbett of the Johns Hopkins 1510 University Applied Physics Laboratory. 1512 Author's Address 1514 Edward J. Birrane, III 1515 The Johns Hopkins University Applied Physics Laboratory 1516 11100 Johns Hopkins Rd. 1517 Laurel, MD 20723 1518 US 1520 Phone: +1 443 778 7423 1521 Email: Edward.Birrane@jhuapl.edu