idnits 2.17.1 draft-irtf-dtnrg-bundle-security-17.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 'Intended status' indicated for this document; assuming Proposed Standard 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 == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: The sequence is maintained in the ordering of security blocks in the bundle. It is for this reason that blocks MUST not be rearranged at forwarding nodes, whether they support the security protocols or not. The only blocks that participate in this ordering are the primary and payload blocks, and the PIB and PCB security blocks themselves. All other extension blocks, including ESBs, are ignored for purposes of determining the processing order. -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 13, 2010) is 4973 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC3370' is defined on line 2586, but no explicit reference was found in the text == Unused Reference: 'RFC4106' is defined on line 2595, but no explicit reference was found in the text ** Downref: Normative reference to an Experimental RFC: RFC 5050 (ref. 'DTNBP') == Outdated reference: A later version (-10) exists of draft-irtf-dtnrg-bundle-metadata-block-00 ** Downref: Normative reference to an Experimental draft: draft-irtf-dtnrg-bundle-metadata-block (ref. 'DTNMD') == Outdated reference: A later version (-02) exists of draft-irtf-dtnrg-iana-bp-registries-00 ** Downref: Normative reference to an Informational draft: draft-irtf-dtnrg-iana-bp-registries (ref. 'I-D.irtf-dtnrg-iana-bp-registries') ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 3280 (Obsoleted by RFC 5280) -- No information found for draft-irtf-dtnrg-bundle-retrans - is the name correct? == Outdated reference: A later version (-12) exists of draft-irtf-dtnrg-bundle-previous-hop-block-11 Summary: 5 errors (**), 0 flaws (~~), 8 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DTN Research Group S. Symington 3 Internet-Draft The MITRE Corporation 4 Expires: March 17, 2011 S. Farrell 5 Trinity College Dublin 6 H. Weiss 7 P. Lovell 8 SPARTA, Inc. 9 September 13, 2010 11 Bundle Security Protocol Specification 12 draft-irtf-dtnrg-bundle-security-17 14 Abstract 16 This document defines the bundle security protocol, which provides 17 data integrity and confidentiality services for the bundle protocol. 18 Separate capabilities are provided to protect the bundle payload and 19 additional data that may be included within the bundle. We also 20 describe various bundle security considerations including policy 21 options. 23 This document is a product of the Delay Tolerant Networking Research 24 Group and has been reviewed by that group. No objections to its 25 publication as an RFC were raised. 27 Status of this Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on March 17, 2011. 44 Copyright Notice 46 Copyright (c) 2010 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 This document may contain material from IETF Documents or IETF 60 Contributions published or made publicly available before November 61 10, 2008. The person(s) controlling the copyright in some of this 62 material may not have granted the IETF Trust the right to allow 63 modifications of such material outside the IETF Standards Process. 64 Without obtaining an adequate license from the person(s) controlling 65 the copyright in such materials, this document may not be modified 66 outside the IETF Standards Process, and derivative works of it may 67 not be created outside the IETF Standards Process, except to format 68 it for publication as an RFC or to translate it into languages other 69 than English. 71 Table of Contents 73 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 74 1.1. Related Documents . . . . . . . . . . . . . . . . . . . . 5 75 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 76 2. Security Blocks . . . . . . . . . . . . . . . . . . . . . . . 8 77 2.1. Abstract Security Block . . . . . . . . . . . . . . . . . 9 78 2.2. Bundle Authentication Block . . . . . . . . . . . . . . . 13 79 2.3. Payload Integrity Block . . . . . . . . . . . . . . . . . 14 80 2.4. Payload Confidentiality Block . . . . . . . . . . . . . . 16 81 2.5. Extension Security Block . . . . . . . . . . . . . . . . . 19 82 2.6. Parameters and Result Fields . . . . . . . . . . . . . . . 21 83 2.7. Key Transport . . . . . . . . . . . . . . . . . . . . . . 23 84 2.8. PIB and PCB combinations . . . . . . . . . . . . . . . . . 23 85 3. Security Processing . . . . . . . . . . . . . . . . . . . . . 26 86 3.1. Nodes as policy enforcement points . . . . . . . . . . . . 26 87 3.2. Processing order of security blocks . . . . . . . . . . . 26 88 3.3. Security Regions . . . . . . . . . . . . . . . . . . . . . 29 89 3.4. Canonicalisation of bundles . . . . . . . . . . . . . . . 31 90 3.5. Endpoint ID confidentiality . . . . . . . . . . . . . . . 37 91 3.6. Bundles received from other nodes . . . . . . . . . . . . 37 92 3.7. The At-Most-Once-Delivery Option . . . . . . . . . . . . . 39 93 3.8. Bundle Fragmentation and Reassembly . . . . . . . . . . . 40 94 3.9. Reactive fragmentation . . . . . . . . . . . . . . . . . . 41 95 3.10. Attack Model . . . . . . . . . . . . . . . . . . . . . . . 41 96 4. Mandatory Ciphersuites . . . . . . . . . . . . . . . . . . . . 43 97 4.1. BAB-HMAC . . . . . . . . . . . . . . . . . . . . . . . . . 43 98 4.2. PIB-RSA-SHA256 . . . . . . . . . . . . . . . . . . . . . . 44 99 4.3. PCB-RSA-AES128-PAYLOAD-PIB-PCB . . . . . . . . . . . . . . 45 100 4.4. ESB-RSA-AES128-EXT . . . . . . . . . . . . . . . . . . . . 49 101 5. Key Management . . . . . . . . . . . . . . . . . . . . . . . . 52 102 6. Default Security Policy . . . . . . . . . . . . . . . . . . . 53 103 7. Security Considerations . . . . . . . . . . . . . . . . . . . 55 104 8. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 57 105 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 58 106 9.1. Bundle Block Types . . . . . . . . . . . . . . . . . . . . 58 107 9.2. Ciphersuite Numbers . . . . . . . . . . . . . . . . . . . 58 108 9.3. Ciphersuite Flags . . . . . . . . . . . . . . . . . . . . 59 109 9.4. Parameters and Results . . . . . . . . . . . . . . . . . . 59 110 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 61 111 10.1. Normative References . . . . . . . . . . . . . . . . . . . 61 112 10.2. Informative References . . . . . . . . . . . . . . . . . . 61 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 63 115 1. Introduction 117 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 118 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 119 document are to be interpreted as described in [RFC2119]. 121 This document defines security features for the bundle protocol 122 [DTNBP] intended for use in delay tolerant networks, in order to 123 provide DTN security services. 125 The bundle protocol is used in DTNs which overlay multiple networks, 126 some of which may be challenged by limitations such as intermittent 127 and possibly unpredictable loss of connectivity, long or variable 128 delay, asymmetric data rates, and high error rates. The purpose of 129 the bundle protocol is to support interoperability across such 130 stressed networks. The bundle protocol is layered on top of 131 underlay-network-specific convergence layers, on top of network- 132 specific lower layers, to enable an application in one network to 133 communicate with an application in another network, both of which are 134 spanned by the DTN. 136 Security will be important for the bundle protocol. The stressed 137 environment of the underlying networks over which the bundle protocol 138 will operate makes it important for the DTN to be protected from 139 unauthorized use, and this stressed environment poses unique 140 challenges for the mechanisms needed to secure the bundle protocol. 141 Furthermore, DTNs may very likely be deployed in environments where a 142 portion of the network might become compromised, posing the usual 143 security challenges related to confidentiality, integrity and 144 availability. 146 Different security processing applies to the payload and extension 147 blocks that may accompany it in a bundle, and different rules apply 148 to various extension blocks. 150 This document describes both the base Bundle Security Protocol (BSP) 151 and a set of mandatory ciphersuites. A ciphersuite is a specific 152 collection of various cryptographic algorithms and implementation 153 rules that are used together to provide certain security services. 155 The Bundle Security Protocol applies, by definition, only to those 156 nodes that implement it, known as "security-aware" nodes. There MAY 157 be other nodes in the DTN that do not implement BSP. All nodes can 158 interoperate with the exception that BSP security operations can only 159 happen at security-aware nodes. 161 1.1. Related Documents 163 This document is best read and understood within the context of the 164 following other DTN documents: 166 The Delay-Tolerant Network Architecture [DTNarch] defines the 167 architecture for delay-tolerant networks, but does not discuss 168 security at any length. 170 The DTN Bundle Protocol [DTNBP] defines the format and processing 171 of the blocks used to implement the bundle protocol, excluding the 172 security-specific blocks defined here. 174 1.2. Terminology 176 We introduce the following terminology for purposes of clarity: 178 source - the bundle node from which a bundle originates 180 destination - the bundle node to which a bundle is ultimately 181 destined 183 forwarder - the bundle node that forwarded the bundle on its most 184 recent hop 186 intermediate receiver or "next hop" - the neighboring bundle node 187 to which a forwarder forwards a bundle. 189 path - the ordered sequence of nodes through which a bundle passes 190 on its way from source to destination 192 In the figure below, which is adapted from figure 1 in the Bundle 193 Protocol Specification, four bundle nodes (denoted BN1, BN2, BN3, and 194 BN4) reside above some transport layer(s). Three distinct transport 195 and network protocols (denoted T1/N1, T2/N2, and T3/N3) are also 196 shown. 198 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 199 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 200 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 201 | T1 v | + ^ T1/T2 v | + ^ T2/T3 v | | ^ T3 | 202 +---------v-+ +-^---------v-+ +-^---------v + +-^---------+ 203 | N1 v | | ^ N1/N2 v | | ^ N2/N3 v | | ^ N3 | 204 +---------v-+ +-^---------v + +-^---------v-+ +-^---------+ 205 | >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ | 206 +-----------+ +------------+ +-------------+ +-----------+ 207 | | | | 208 |<-- An Internet --->| |<--- An Internet --->| 209 | | | | 211 BN = "Bundle Node" as defined in the Bundle Protocol Specification 213 Bundle Nodes Sit at the Application layer of the Internet Model. 215 Figure 1 217 Bundle node BN1 originates a bundle that it forwards to BN2. BN2 218 forwards the bundle to BN3, and BN3 forwards the bundle to BN4. BN1 219 is the source of the bundle and BN4 is the destination of the bundle. 220 BN1 is the first forwarder, and BN2 is the first intermediate 221 receiver; BN2 then becomes the forwarder, and BN3 the intermediate 222 receiver; BN3 then becomes the last forwarder, and BN4 the last 223 intermediate receiver, as well as the destination. 225 If node BN2 originates a bundle (for example, a bundle status report 226 or a custodial signal), which is then forwarded on to BN3, and then 227 to BN4, then BN2 is the source of the bundle (as well as being the 228 first forwarder of the bundle) and BN4 is the destination of the 229 bundle (as well as being the final intermediate receiver). 231 We introduce the following security-specific DTN terminology: 233 security-source - a bundle node that adds a security block to a 234 bundle 236 security-destination - a bundle node that processes a security 237 block of a bundle 239 security path - the ordered sequence of security-aware nodes 240 through which a bundle passes on its way from the security-source 241 to the security-destination 243 Referring to Figure 1 again: 245 If the bundle that originates at BN1 as source is given a security 246 block by BN1, then BN1 is the security-source of this bundle with 247 respect to that security block, as well as being the source of the 248 bundle. 250 If the bundle that originates at BN1 as source is given a security 251 block by BN2, then BN2 is the security-source of this bundle with 252 respect to that security block, even though BN1 is the source. 254 If the bundle that originates at BN1 as source is given a security 255 block by BN1 that is intended to be processed by BN3, then BN1 is the 256 security-source and BN3 is the security destination with respect to 257 this security block. The security path for this block is BN1 to BN3. 259 A bundle MAY have multiple security blocks. The security-source of a 260 bundle with respect to a given security block in the bundle MAY be 261 the same as or different from the security-source of the bundle with 262 respect to a different security block in the bundle. Similarly, the 263 security-destination of a bundle with respect to each of that 264 bundle's security blocks MAY be the same or different. Therefore the 265 security paths for various blocks MAY be and often will be different. 267 If the bundle that originates at BN1 as source is given a security 268 block by BN1 that is intended to be processed by BN3, and BN2 adds a 269 security block with security-destination BN4, the security paths for 270 the two blocks overlap but not completely. This problem is discussed 271 further in Section 3.3. 273 As required in [DTNBP], forwarding nodes MUST transmit blocks in a 274 bundle in the same order in which they were received. This 275 requirement applies to all DTN nodes, not just ones which implement 276 security processing. Blocks in a bundle MAY be added or deleted 277 according to the applicable specification, but those blocks which are 278 both received and transmitted MUST be transmitted in the same order 279 that they were received. 281 If a node is not security-aware then it forwards the security blocks 282 in the bundle unchanged unless the bundle's block processing flags 283 specify otherwise. If a network has some nodes that are not 284 security-aware then the block processing flags SHOULD be set such 285 that security blocks are not discarded at those nodes solely because 286 they can not be processed there. Except for this, the non-security- 287 aware nodes are transparent relay points and are invisible as far as 288 security processing is concerned. 290 The block sequence also indicates the order in which certain 291 significant actions have affected the bundle, and therefore the 292 sequence in which actions MUST occur in order to produce the bundle 293 at its destination. 295 2. Security Blocks 297 There are four types of security block that MAY be included in a 298 bundle. These are the Bundle Authentication Block (BAB), the Payload 299 Integrity Block (PIB), the Payload Confidentiality Block (PCB) and 300 the Extension Security Block (ESB). 302 The BAB is used to assure the authenticity and integrity of the 303 bundle along a single hop from forwarder to intermediate receiver. 304 Since security blocks are only processed at security-aware nodes, 305 a "single hop" from a security-aware forwarder to the next 306 security-aware intermediate receiver might be more than one actual 307 hop. This situation is discussed further below Section 2.2. 309 The PIB is used to assure the authenticity and integrity of the 310 payload from the PIB security-source, which creates the PIB, to 311 the PIB security-destination, which verifies the PIB 312 authenticator. The authentication information in the PIB MAY (if 313 the ciphersuite allows) be verified by any node in between the PIB 314 security-source and the PIB security-destination that has access 315 to the cryptographic keys and revocation status information 316 required to do so. 318 Since a BAB protects a bundle on a "hop-by-hop" basis and other 319 security blocks MAY be protecting over several hops or end-to-end, 320 whenever both are present the BAB MUST form the "outer" layer of 321 protection - that is, the BAB MUST always be calculated and added 322 to the bundle after all other security blocks have been calculated 323 and added to the bundle. 325 The PCB indicates that the payload has been encrypted, in whole or 326 in part, at the PCB security-source in order to protect the bundle 327 content while in transit to the PCB security-destination. 329 PIB and PCB protect the payload and are regarded as "payload- 330 related" for purposes of the security discussion in this document. 331 Other blocks are regarded as "non-payload" blocks. Of course, the 332 primary block is unique and has separate rules. 334 The ESB provides security for non-payload blocks in a bundle. ESB 335 therefore is not applied to PIB or PCBs, and of course is not 336 appropriate for either the payload block or primary block. 338 Each of the security blocks uses the Canonical Bundle Block Format as 339 defined in the Bundle Protocol Specification. That is, each security 340 block is comprised of the following elements: 342 - Block type code 344 - Block processing control flags 346 - Block EID reference list (optional) 348 - Block data length 350 - Block-type-specific data fields 352 Since the four security blocks have most fields in common, we can 353 shorten the description of the Block-type-specific data fields of 354 each security block if we first define an abstract security block 355 (ASB) and then specify each of the real blocks in terms of the fields 356 which are present/absent in an ASB. Note that no bundle ever 357 contains an actual ASB, which is simply a specification artifact. 359 2.1. Abstract Security Block 361 An ASB consists of the following mandatory and optional fields: 363 - Block-type code (one byte) - as in all bundle protocol blocks 364 except the primary bundle block. The block types codes for the 365 security blocks are: 367 BundleAuthenticationBlock - BAB: 0x02 369 PayloadIntegrityBlock - PIB: 0x03 371 PayloadConfidentialityBlock - PCB: 0x04 373 ExtensionSecurityBlock - ESB: 0x09 375 - Block processing control flags (SDNV) - defined as in all bundle 376 protocol blocks except the primary bundle block (as described in 377 the Bundle Protocol [DTNBP]). SDNV encoding is described in the 378 bundle protocol. There are no general constraints on the use of 379 the block processing flags, and some specific requirements are 380 discussed later. 382 - EID references - composite field defined in [DTNBP] containing 383 references to one or two EIDs. Presence of the EID-reference 384 field is indicated by the setting of the "block contains an EID- 385 reference field" (EID_REF) bit of the block processing control 386 flags. If one or more references is present, flags in the 387 ciphersuite ID field, described below, specify which. 389 If no EID fields are present then the composite field itself MUST 390 be omitted entirely and the EID_REF bit MUST be unset. A count 391 field of zero is not permitted. 393 The possible EIDs are: 395 - (optional) Security-source - specifies the security source 396 for the block. If this is omitted, then the source of the 397 bundle is assumed to be the security-source unless otherwise 398 indicated. 400 - (optional) Security-destination - specifies the security 401 destination for the block. If this is omitted, then the 402 destination of the bundle is assumed to be the security- 403 destination unless otherwise indicated. 405 If two EIDs are present, security-source is first and security- 406 destination comes second. 408 - Block data length (SDNV) - as in all bundle protocol blocks 409 except the primary bundle block. SDNV encoding is described in 410 the bundle protocol. 412 - Block-type-specific data fields as follows: 414 - Ciphersuite ID (SDNV) 416 - Ciphersuite flags (SDNV) 418 - (optional) Correlator - when more than one related block is 419 inserted then this field MUST have the same value in each 420 related block instance. This is encoded as an SDNV. See note 421 in Section 3.8 with regard to correlator values in bundle 422 fragments. 424 - (optional) Ciphersuite parameters - compound field of next 425 two items 427 - Ciphersuite parameters length - specifies the length of 428 the following Ciphersuite parameters data field and is 429 encoded as an SDNV. 431 - Ciphersuite parameters data - parameters to be used with 432 the ciphersuite in use, e.g. a key identifier or 433 initialization vector (IV). See Section 2.6 for a list of 434 potential parameters and their encoding rules. The 435 particular set of parameters that are included in this field 436 are defined as part of the ciphersuite specification. 438 - (optional) Security result - compound field of next two items 440 - Security result length - contains the length of the next 441 field and is encoded as an SDNV. 443 - Security result data - contains the results of the 444 appropriate ciphersuite-specific calculation (e.g., a 445 signature, MAC or ciphertext block key). 447 Although the diagram hints at a 32-bit layout this is purely for the 448 purpose of exposition. Except for the "type" field, all fields are 449 variable in length. 451 +----------------+----------------+----------------+----------------+ 452 | type | flags (SDNV) | EID ref list(comp) | 453 +----------------+----------------+----------------+----------------+ 454 | length (SDNV) | ciphersuite (SDNV) | 455 +----------------+----------------+----------------+----------------+ 456 | ciphersuite flags (SDNV) | correlator (SDNV) | 457 +----------------+----------------+----------------+----------------+ 458 |params len(SDNV)| ciphersuite params data | 459 +----------------+----------------+----------------+----------------+ 460 |res-len (SDNV) | security result data | 461 +----------------+----------------+----------------+----------------+ 463 The structure of an abstract security block. 465 Figure 2 467 Some ciphersuites are specified in Section 4, which also specifies 468 the rules which MUST be satisfied by ciphersuite specifications. 469 Additional ciphersuites MAY be defined in separate specifications. 470 Ciphersuite IDs not specified are reserved. Implementations of the 471 bundle security protocol decide which ciphersuites to support, 472 subject to the requirements of Section 4. It is RECOMMENDED that 473 implementations that allow additional ciphersuites permit ciphersuite 474 ID values at least up to and including 127, and they MAY decline to 475 allow larger ID values. 477 The structure of the ciphersuite flags field is shown in Figure 3. 478 In each case the presence of an optional field is indicated by 479 setting the value of the corresponding flag to one. A value of zero 480 indicates the corresponding optional field is missing. Presently 481 there are five flags defined for the field and for convenience these 482 are shown as they would be extracted from a single-byte SDNV. Future 483 additions may cause the field to grow to the left so, as with the 484 flags fields defined in [DTNBP], the description below numbers the 485 bit positions from the right rather than the standard RFC definition 486 which numbers bits from the left. 488 src - bit 4 indicates whether the EID-reference field of the ASB 489 contains the optional reference to the security-source. 491 dest - bit 3 indicates whether the EID-reference field of the ASB 492 contains the optional reference to the security-destination. 494 parm - bit 2 indicates whether the ciphersuite-parameters-length 495 and ciphersuite parameters data fields are present or not. 497 corr - bit 1 indicates whether or not the ASB contains an optional 498 correlator. 500 res - bit 0 indicates whether or not the ASB contains the security 501 result length and security result data fields. 503 bits 5-6 are reserved for future use. 505 Ciphersuite flags 506 Bit Bit Bit Bit Bit Bit Bit 507 6 5 4 3 2 1 0 508 +-----+-----+-----+-----+-----+-----+-----+ 509 | reserved |src |dest |parm |corr |res | 510 +-----+-----+-----+-----+-----+-----+-----+ 512 Figure 3 514 A little bit more terminology: if the block is a PIB then when we 515 refer to the "PIB-source", we mean the security source for the PIB as 516 represented by the EID reference in the EID-references field. 517 Similarly we may refer to the PCB-dest, meaning the security- 518 destination of the PCB, again as represented by an EID reference. 519 For example, referring to Figure 1 again, if the bundle that 520 originates at BN1 as source is given a Confidentiality Block (PCB) by 521 BN1 that is protected using a key held by BN3 and it is given a 522 Payload Integrity Block (PIB) by BN1, then BN1 is both the PCB-source 523 and the PIB-source of the bundle, and BN3 is the PCB-dest of the 524 bundle. 526 The correlator field is used to associate several related instances 527 of a security block. This can be used to place a BAB that contains 528 the ciphersuite information at the "front" of a (probably large) 529 bundle, and another correlated BAB that contains the security result 530 at the "end" of the bundle. This allows even very memory-constrained 531 nodes to be able to process the bundle and verify the BAB. There are 532 similar use cases for multiple related instances of PIB and PCB as 533 will be seen below. 535 The ciphersuite specification MUST make it clear whether or not 536 multiple block instances are allowed, and if so, under what 537 conditions. Some ciphersuites can of course leave flexibility to the 538 implementation, whereas others might mandate a fixed number of 539 instances. 541 For convenience, we use the term "first block" to refer to the 542 initial block in a group of correlated blocks, or to the single block 543 if there are no others in the set. Obviously there can be several 544 unrelated groups in a bundle, each containing only one block or more 545 than one, and each has its own "first block". 547 2.2. Bundle Authentication Block 549 In this section we describe typical BAB field values for two 550 scenarios - where a single instance of the BAB contains all the 551 information and where two related instances are used, one "up front" 552 which contains the ciphersuite and another following the payload 553 which contains the security result (e.g. a MAC). 555 For the case where a single BAB is used: 557 The block-type code field value MUST be 0x02. 559 The block processing control flags value can be set to whatever 560 values are required by local policy. Ciphersuite designers should 561 carefully consider the effect of setting flags that either discard 562 the block or delete the bundle in the event that this block cannot 563 be processed. 565 The ciphersuite ID MUST be documented as a hop-by-hop 566 authentication-ciphersuite which requires one instance of the BAB. 568 The correlator field MUST NOT be present. 570 The ciphersuite parameters field MAY be present, if so specified 571 in the ciphersuite specification. 573 An EID reference to the security-source MAY be present. The 574 security-source can also be specified as part of key information 575 described in Section 2.6 or another block such as the Previous Hop 576 Insertion Block [PHIB]. The security-source might also be 577 inferred from some implementation-specific means such as the 578 convergence layer. 580 An EID reference to the security-destination MAY be present and is 581 useful to ensure that the bundle has been forwarded to the correct 582 next-hop node. 584 The security result MUST be present as it is effectively the 585 "output" from the ciphersuite calculation (e.g. the MAC or 586 signature) applied to the (relevant parts of) the bundle (as 587 specified in the ciphersuite definition). 589 For the case using two related BAB instances, the first instance is 590 as defined above, except the ciphersuite ID MUST be documented as a 591 hop-by-hop authentication ciphersuite that requires two instances of 592 the BAB. In addition, the correlator MUST be present and the 593 security result length and security result fields MUST be absent. 594 The second instance of the BAB MUST have the same correlator value 595 present and MUST contain security result length and security result 596 data fields. The other optional fields MUST NOT be present. 597 Typically, this second instance of a BAB will be the last block of 598 the bundle. 600 The details of key transport for BAB are specified by the particular 601 ciphersuite. In the absence of conflicting requirements, the 602 following should be noted by implementors: 604 - the key information item Section 2.6 is optional, and if not 605 provided then the key should be inferred from the source- 606 destination tuple, being the previous key used, a key created from 607 a key-derivation function, or a pre-shared key 609 - if all the nodes are security-aware, the capabilities of the 610 underlying convergence layer might be useful for identifying the 611 security-source 613 - depending upon the key mechanism used, bundles can be signed by 614 the sender, or authenticated for one or more recipients, or both. 616 2.3. Payload Integrity Block 618 A PIB is an ASB with the following additional restrictions: 620 The block type code value MUST be 0x03. 622 The block processing control flags value can be set to whatever 623 values are required by local policy. Ciphersuite designers should 624 carefully consider the effect of setting flags that either discard 625 the block or delete the bundle in the event that this block cannot 626 be processed. 628 The ciphersuite ID MUST be documented as an end-to-end 629 authentication-ciphersuite or as an end-to-end error-detection- 630 ciphersuite. 632 The correlator MUST be present if the ciphersuite requires more 633 than one related instance of a PIB be present in the bundle. The 634 correlator MUST NOT be present if the ciphersuite only requires 635 one instance of the PIB in the bundle. 637 The ciphersuite parameters field MAY be present. 639 An EID reference to the security-source MAY be present. The 640 security-source can also be specified as part of key information 641 described in Section 2.6. 643 An EID reference to the security-destination MAY be present. 645 The security result is effectively the "output" from the 646 ciphersuite calculation (e.g. the MAC or signature) applied to the 647 (relevant parts of) the bundle. As in the case of the BAB, this 648 field MUST be present if the correlator is absent. If more than 649 one related instance of the PIB is required then this is handled 650 in the same way as described for the BAB above. 652 The ciphersuite MAY process less than the entire original bundle 653 payload. This might be because it is defined to process some 654 subset of the bundle, or perhaps because the the current payload 655 is a fragment of an original bundle. For whatever reason, if the 656 ciphersuite processes less than the complete, original bundle 657 payload, the ciphersuite parameters of this block MUST specify 658 which bytes of the bundle payload are protected. 660 For some ciphersuites, (e.g. those using asymmetric keying to produce 661 signatures or those using symmetric keying with a group key), the 662 security information can be checked at any hop on the way to the 663 security destination that has access to the required keying 664 information. This possibility is further discussed in Section 3.6 665 below. 667 The use of a generally-available key is RECOMMENDED if custodial 668 transfer is employed and all nodes SHOULD verify the bundle before 669 accepting custody. 671 Most asymmetric PIB-ciphersuites will use the PIB-source to indicate 672 the signer and will not require the PIB-dest field because the key 673 needed to verify the PIB authenticator will be a public key 674 associated with the PIB-source. 676 2.4. Payload Confidentiality Block 678 A typical confidentiality ciphersuite will encrypt the payload using 679 a randomly generated bundle encrypting key (BEK) and will use a key 680 information item in the PCB security parameters to carry the BEK 681 encrypted with some long term key encryption key (KEK) or well-known 682 public key. If neither the destination nor security-destination 683 resolves the key to use for decryption, the key information item in 684 the ciphersuite parameters field can also be used to indicate the 685 decryption key with which the BEK can be recovered. If the bundle 686 already contains PIBs and/or PCBs these SHOULD also be encrypted 687 using this same BEK, as described just below for "super-encryption". 688 The encrypted block is encapsulated into a new PCB that replaces the 689 original block at the same place in the bundle. 691 It is strongly RECOMMENDED that a data integrity mechanism be used in 692 conjunction with confidentiality, and that encryption-only 693 ciphersuites NOT be used. AES-GCM satisfies this requirement. The 694 "authentication tag" or "integrity check value" is stored into 695 security-result rather than being appended to the payload as is 696 common in some protocols since, as described below, it is important 697 that there be no change in the size of the payload. 699 The payload is encrypted "in-place", that is, following encryption, 700 the payload block payload field contains ciphertext, not plaintext. 701 The payload block processing flags are unmodified. 703 The "in-place" encryption of payload bytes is to allow bundle payload 704 fragmentation and re-assembly, and custody transfer, to operate 705 without knowledge of whether or not encryption has occurred and, if 706 so, how many times. 708 Fragmentation and reassembly and custody transfer are adversely 709 affected by a change in size of the payload due to ambiguity about 710 what byte range of the original payload is actually in any particular 711 fragment. Ciphersuites SHOULD place any payload expansion, such as 712 authentication tags (integrity check values) and any padding 713 generated by a block-mode cipher, into an "integrity check value" 714 item in the security-result field (see Section 2.6) of the 715 confidentiality block. 717 Payload super-encryption is allowed; that is, encrypting a payload 718 that has already been encrypted, perhaps more than once. 719 Ciphersuites SHOULD define super-encryption such that, as well as re- 720 encrypting the payload, it also protects the parameters of earlier 721 encryption. Failure to do so may represent a vulnerability in some 722 circumstances. 724 Confidentiality is normally applied to the payload, and possibly to 725 additional blocks. It is RECOMMENDED to apply a Payload 726 Confidentiality ciphersuite to non-payload blocks only if these 727 should be super-encrypted with the payload. If super-encryption of 728 the block is not desired then protection of the block should be done 729 using the Extension Security Block mechanism rather than PCB. 731 Multiple related PCB instances are required if both the payload and 732 PIBs and PCBs in the bundle are to be encrypted. These multiple PCB 733 instances require correlators to associate them with each other since 734 the key information is provided only in the first PCB. 736 There are situations where more than one PCB instance is required but 737 the instances are not "related" in the sense which requires 738 correlators. One example is where a payload is encrypted for more 739 than one security-destination so as to be robust in the face of 740 routing uncertainties. In this scenario the payload is encrypted 741 using a BEK. Several PCBs contain the BEK encrypted using different 742 KEKs, one for each destination. These multiple PCB instances, are 743 not "related" and should not contain correlators. 745 The ciphersuite MAY apply different rules to confidentiality for non- 746 payload blocks. 748 A PCB is an ASB with the following additional restrictions: 750 The block type code value MUST be 0x04. 752 The block processing control flags value can be set to whatever 753 values are required by local policy, except that a PCB "first 754 block" MUST have the "replicate in every fragment" flag set. This 755 flag SHOULD NOT be set otherwise. Ciphersuite designers should 756 carefully consider the effect of setting flags that either discard 757 the block or delete the bundle in the event that this block cannot 758 be processed. 760 The ciphersuite ID MUST be documented as a confidentiality- 761 ciphersuite. 763 The correlator MUST be present if there is more than one related 764 PCB instance. The correlator MUST NOT be present if there are no 765 related PCB instances. 767 If a correlator is present, the key information MUST be placed in 768 the PCB "first block". 770 Any additional bytes generated as a result of encryption and/or 771 authentication processing of the payload SHOULD be placed in an 772 "integrity check value" field (see Section 2.6) in the security- 773 result of the first PCB. 775 The ciphersuite parameters field MAY be present. 777 An EID reference to the security-source MAY be present. The 778 security-source can also be specified as part of key information 779 described in Section 2.6. 781 An EID reference to the security-destination MAY be present. 783 The security result MAY be present and normally contains fields 784 such as an encrypted bundle encryption key, authentication tag or 785 the encrypted versions of bundle blocks other than the payload 786 block. 788 The ciphersuite MAY process less than the entire original bundle 789 payload, either because the current payload is a fragment of the 790 original bundle or just because it is defined to process some subset. 791 For whatever reason, if the ciphersuite processes less than the 792 complete, original bundle payload the "first" PCB MUST specify, as 793 part of the ciphersuite parameters, which bytes of the bundle payload 794 are protected. 796 PCB ciphersuites MUST specify which blocks are to be encrypted. The 797 specification MAY be flexible and be dependent upon block type, 798 security policy, various data values and other inputs but it MUST be 799 deterministic. The determination of whether a block is to be 800 encrypted or not MUST NOT be ambiguous. 802 As was the case for the BAB and PIB, if the ciphersuite requires more 803 than one instance of the PCB, then the "first block" MUST contain any 804 optional fields (e.g., security destination etc.) that apply to all 805 instances with this correlator. These MUST be contained in the first 806 instance and MUST NOT be repeated in other correlated blocks. Fields 807 that are specific to a particular instance of the PCB MAY appear in 808 that PCB. For example, security result fields MAY (and probably 809 will) be included in multiple related PCB instances, with each result 810 being specific to that particular block. Similarly, several PCBs 811 might each contain a ciphersuite parameters field with an IV specific 812 to that PCB instance. 814 Put another way: when confidentiality will generate multiple blocks, 815 it MUST create a "first" PCB with the required ciphersuite ID, 816 parameters etc. as specified above. Typically, this PCB will appear 817 early in the bundle. This "first" PCB contains the parameters that 818 apply to the payload and also to the other correlated PCBs. The 819 correlated PCBs follow the "first" PCB and MUST NOT repeat the 820 ciphersuite parameters, security-source, or security-destination 821 fields from the first PCB. These correlated PCBs need not follow 822 immediately after the "first" PCB, and probably will not do so. Each 823 correlated block, encapsulating an encrypted PIB or PCB, is at the 824 same place in the bundle as the original PIB or PCB. 826 A ciphersuite MUST NOT mix payload data and a non-payload block in a 827 single PCB. 829 Even if a to-be-encrypted block has the "discard" flag set, whether 830 or not the PCB's "discard" flag is set is an implementation/policy 831 decision for the encrypting node. (The "discard" flag is more 832 properly called the "discard if block cannot be processed" flag.) 834 Any existing EID-list in the to-be-encapsulated original block 835 remains exactly as-is, and is copied to become the EID-list for the 836 replacing block. The encapsulation process MUST NOT replace or 837 remove the existing EID-list entries. This is critically important 838 for correct updating of entries at the security-destination. 840 At the security-destination, either specific destination or the 841 bundle destination, the processes described above are reversed. The 842 payload is decrypted in-place using the salt, IV and key values in 843 the first PCB, including verification using the ICV. These values 844 are described below in Section 2.6. Each correlated PCB is also 845 processed at the same destination, using the salt and key values from 846 the first PCB and the block-specific IV item. The "encapsulated 847 block" item in the security-result is decrypted and validated, using 848 also the tag which SHOULD have been appended to the ciphertext of the 849 original block data. Assuming the validation succeeds, the resultant 850 plaintext, which is the entire content of the original block, 851 replaces the PCB at the same place in the bundle. The block type 852 reverts to that of the original block prior to encapsulation, and the 853 other block-specific data fields also return to their original 854 values. Implementors are cautioned that this "replacement" process 855 requires delicate stitchery, as the EID-list contents in the 856 decapsulated block are invalid. As noted above, the EID-list 857 references in the original block were preserved in the replacing PCB, 858 and will have been updated as necessary as the bundle has toured the 859 dtn. The references from the PCB MUST replace the references within 860 the EID-list of the newly-decapsulated block. Caveat implementor. 862 2.5. Extension Security Block 864 Extension security blocks provide protection for non-payload-related 865 portions of a bundle. ESBs MUST NOT be used for the primary block or 866 payload, including payload-related security blocks (PIBs and PCBs). 868 It is sometimes desirable to protect certain parts of a bundle in 869 ways other than those applied to the bundle payload. One such 870 example is bundle metadata that might specify the kind of data in the 871 payload but not the actual payload detail, as described in [DTNMD]. 873 ESBs are typically used to apply confidentiality protection. While 874 it is possible to create an integrity-only ciphersuite, the block 875 protection is not transparent and makes access to the data more 876 difficult. For simplicity, this discussion describes use of a 877 confidentiality ciphersuite. 879 The protection mechanisms in ESBs are similar to other security 880 blocks with two important differences: 882 - different key values are used (using same key as for payload 883 would defeat the purpose) 885 - the block is not encrypted or super-encrypted with the payload 887 A typical ESB ciphersuite will encrypt the extension block using a 888 randomly generated ephemeral key and will use the key information 889 item in the security parameters field to carry the key encrypted with 890 some long term key encryption key (KEK) or well-known public key. If 891 neither the destination nor security-destination resolves the key to 892 use for decryption, the key information item in the ciphersuite 893 parameters field can be used also to indicate the decryption key with 894 which the BEK can be recovered. 896 It is strongly RECOMMENDED that a data integrity mechanism be used in 897 conjunction with confidentiality, and that encryption-only 898 ciphersuites NOT be used. AES-GCM satisfies this requirement. 900 The ESB is placed in the bundle in the same position as the block 901 being protected. That is, the entire original block is processed 902 (encrypted, etc) and encapsulated in a "replacing" ESB-type block, 903 and this appears in the bundle at the same sequential position as the 904 original block. The processed data is placed in the security-result 905 field. 907 The process is reversed at the security destination with the 908 recovered plaintext block replacing the ESB that had encapsulated it. 909 Processing of EID-list entries, if any, is described above in 910 Section 2.4 and this MUST be followed in order to correctly recover 911 EIDs. 913 An ESB is an ASB with the following additional restrictions: 915 Block type is 0x09. 917 Ciphersuite flags indicate which fields are present in this block. 918 Ciphersuite designers should carefully consider the effect of 919 setting flags that either discard the block or delete the bundle 920 in the event that this block cannot be processed. 922 EID references MUST be stored in the EID reference list. 924 Security-source MAY be present. The security-source can also be 925 specified as part of key information described in Section 2.6. If 926 neither is present then the bundle-source is used as the security- 927 source. 929 Security-destination MAY be present. If not present, then the 930 bundle-destination is used as the security-destination. 932 The security-parameters MAY optionally contain a block-type field to 933 indicate the type of the encapsulated block. Since this replicates a 934 field in the encrypted portion of the block, it is a slight security 935 risk and its use is therefore OPTIONAL. 937 2.6. Parameters and Result Fields 939 Various ciphersuites include several items in the security-parameters 940 and/or security-result fields. Which items MAY appear is defined by 941 the particular ciphersuite description. A ciphersuite MAY support 942 several instances of the same type within a single block. 944 Each item is represented as type-length-value. Type is a single byte 945 indicating which item this is. Length is the count of data bytes to 946 follow, and is an SDNV-encoded integer. Value is the data content of 947 the item. 949 Item types are 951 0: reserved 953 1: initialization vector (IV) 955 2: reserved 957 3: key information 959 4: fragment range (offset and length as a pair of SDNVs) 961 5: integrity signature 962 6: reserved 964 7: salt 966 8: PCB integrity check value (ICV) 968 9: reserved 970 10: encapsulated block 972 11: block type of encapsulated block 974 12 - 191: reserved 976 192 - 250: private use 978 251 - 255: reserved 980 The folowing descriptions apply to usage of these items for all 981 ciphersuites. Additional characteristics are noted in the discussion 982 for specific suites. 984 - initialization vector(IV): random value, typically eight to 985 sixteen bytes 987 - key information: key material encoded or protected by the key 988 management system, and used to transport an ephemeral key 989 protected by a long-term key. This item is discussed further 990 below in Section 2.7 992 - fragment range: pair of SDNV values (offset then length) 993 specifying the range of payload bytes to which a particular 994 operation applies. This is termed "fragment range" since that is 995 its typical use, even though sometimes it describes a subset range 996 that is not a fragment. The offset value MUST be the offset 997 within the original bundle, which might not be the offset within 998 the current bundle if the current bundle is already a fragment 1000 - integrity signature: result of BA or PI digest or signing 1001 operation. This item is discussed further below in Section 2.7 1003 - salt: an IV-like value used by certain confidentiality suites 1005 - PCB integrity check value(ICV): output from certain 1006 confidentiality ciphersuite operations to be used at the 1007 destination to verify that the protected data has not been 1008 modified 1009 - encapsulated block: result of confidentiality operation on 1010 certain blocks, contains the ciphertext of the block and MAY also 1011 contain an integrity check value appended to the ciphertext; MAY 1012 also contain padding if required by the encryption mode; used for 1013 non-payload blocks only 1015 - block type of encapsulated block: block type code for a block 1016 that has been encapsulated in ESB 1018 2.7. Key Transport 1020 This specification endeavours to maintain separation between the 1021 security protocol and key management. However, these two interact in 1022 the transfer of key information, etc., from security-source to 1023 security-destination. The intent of the separation is to facilitate 1024 use of a variety of key management systems without a necessity to 1025 tailor a ciphersuite to each individually. 1027 The key management process deals with such things as long-term keys, 1028 specifiers for long-term keys, certificates for long-term keys and 1029 integrity signatures using long-term keys. The ciphersuite itself 1030 should not require a knowledge of these, and separation is improved 1031 if it treats these as opaque entities, to be handled by the key 1032 management process. 1034 The key management process deals specifically with the content of two 1035 of the items defined above in Section 2.6:- key information (item 1036 type 3) and integrity signature (item type 5). The ciphersuite MUST 1037 define the details and format for these items. To facilitate 1038 interoperability, it is strongly RECOMMENDED that the implementations 1039 use the appropriate definitions from Cryptographic Message Syntax 1040 (CMS) [RFC5652] and related RFCs. 1042 Many situations will require several pieces of key information. 1043 Again, ciphersuites MUST define whether they accept these packed into 1044 a single key information item and/or separated into multiple 1045 instances of key information. For interoperability, it is 1046 RECOMMENDED that ciphersuites accept these packed into a single key- 1047 information item, and that they MAY additionally choose to accept 1048 them sent as separate items. 1050 2.8. PIB and PCB combinations 1052 Given the above definitions, nodes are free to combine applications 1053 of PIB and PCB in any way they wish - the correlator value allows for 1054 multiple applications of security services to be handled separately. 1055 Since PIB and PCB apply to the payload and ESB to non-payload blocks, 1056 combinations of ESB with PIB and/or PCB are not considered. 1058 There are some obvious security problems that could arise when 1059 applying multiple services. For example, if we encrypted a payload 1060 but left a PIB security result containing a signature in the clear, 1061 payload guesses could be confirmed. 1063 We cannot, in general, prevent all such problems since we cannot 1064 assume that every ciphersuite definition takes account of every other 1065 ciphersuite definition. However, we can limit the potential for such 1066 problems by requiring that any ciphersuite which applies to one 1067 instance of a PIB or PCB, MUST be applied to all instances with the 1068 same correlator. 1070 We now list the PIB and PCB combinations which we envisage as being 1071 useful to support: 1073 Encrypted tunnels - a single bundle MAY be encrypted many times 1074 en-route to its destination. Clearly it has to be decrypted an 1075 equal number of times, but we can imagine each encryption as 1076 representing the entry into yet another layer of tunnel. This is 1077 supported by using multiple instances of PCB, but with the payload 1078 encrypted multiple times, "in-place". Depending upon the 1079 ciphersuite defintion, other blocks can and should be encrypted, 1080 as discussed above and in Section 2.4 to ensure that parameters 1081 are protected in the case of super-encryption. 1083 Multiple parallel authenticators - a single security source might 1084 wish to protect the integrity of a bundle in multiple ways. This 1085 could be required if the bundle's path is unpredictable, and if 1086 various nodes might be involved as security destinations. 1087 Similarly, if the security source cannot determine in advance 1088 which algorithms to use, then using all might be reasonable. This 1089 would result in uses of PIB which presumably all protect the 1090 payload, and which cannot in general protect one another. Note 1091 that this logic can also apply to a BAB, if the unpredictable 1092 routing happens in the convergence layer, so we also envisage 1093 support for multiple parallel uses of BAB. 1095 Multiple sequential authenticators - if some security destination 1096 requires assurance about the route that bundles have taken, then 1097 it might insist that each forwarding node add its own PIB. More 1098 likely, however would be that outbound "bastion" nodes would be 1099 configured to sign bundles as a way of allowing the sending 1100 "domain" to take accountability for the bundle. In this case, the 1101 various PIBs will likely be layered, so that each protects the 1102 earlier applications of PIB. 1104 Authenticated and encrypted bundles - a single bundle MAY require 1105 both authentication and confidentiality. Some specifications 1106 first apply the authenticator and follow this by encrypting the 1107 payload and authenticator. As noted previously in the case where 1108 the authenticator is a signature, there are security reasons for 1109 this ordering. (See the PCB-RSA-AES128-PAYLOAD-PIB-PCB 1110 ciphersuite defined later in Section 4.3.) Others apply the 1111 authenticator after encryption, that is, to the ciphertext. This 1112 ordering is generally recommended and minimizes attacks which, in 1113 some cases, can lead to recovery of the encryption key. 1115 There are no doubt other valid ways to combine PIB and PCB instances, 1116 but these are the "core" set supported in this specification. Having 1117 said that, as will be seen, the mandatory ciphersuites defined here 1118 are quite specific and restrictive in terms of limiting the 1119 flexibility offered by the correlator mechanism. This is primarily 1120 designed to keep this specification as simple as possible, while at 1121 the same time supporting the above scenarios. 1123 3. Security Processing 1125 This section describes the security aspects of bundle processing. 1127 3.1. Nodes as policy enforcement points 1129 All nodes are REQUIRED to have and enforce their own configurable 1130 security policies, whether these policies be explicit or default, as 1131 defined in Section 6. 1133 All nodes serve as Policy Enforcement Points (PEP) insofar as they 1134 enforce polices that MAY restrict the permissions of bundle nodes to 1135 inject traffic into the network. Policies MAY apply to traffic 1136 originating at the current node, traffic terminating at the current 1137 node and traffic to be forwarded by the current node to other nodes. 1138 If a particular transmission request, originating either locally or 1139 remotely, satisfies the node's policy or policies and is therefore 1140 accepted, then an outbound bundle can be created and dispatched. If 1141 not, then in its role as a PEP, the node will not create or forward a 1142 bundle. Error handling for such cases is currently considered out of 1143 scope of this document. 1145 Policy enforcing code MAY override all other processing steps 1146 described here and elsewhere in this document. For example, it is 1147 valid to implement a node which always attempts to attach a PIB. 1148 Similarly it is also valid to implement a node which always rejects 1149 all requests which imply the use of a PIB. 1151 Nodes MUST consult their security policy to determine the criteria 1152 that a received bundle ought to meet before it will be forwarded. 1153 These criteria MUST include a determination of whether or not the 1154 received bundle MUST include a valid BAB, PIB, PCB or ESB. If the 1155 bundle does not meet the node's policy criteria, then the bundle MUST 1156 be discarded and processed no further; in this case, a bundle status 1157 report indicating the failure MAY be generated. 1159 The node's policy MAY call for the node to add or subtract some 1160 security blocks. For example, it might require the node attempt to 1161 encrypt (parts of) the bundle for some security-destination, or that 1162 it add a PIB. If the node's policy requires a BAB to be added to the 1163 bundle, it MUST be added last so that the calculation of its security 1164 result MAY take into consideration the values of all other blocks in 1165 the bundle. 1167 3.2. Processing order of security blocks 1169 The processing order of security actions for a bundle is critically 1170 important for the actions to complete successfully. In general, the 1171 actions performed at the originating node MUST be executed in the 1172 reverse sequence at the destination. There are variations and 1173 exceptions, and these are noted below. 1175 The sequence is maintained in the ordering of security blocks in the 1176 bundle. It is for this reason that blocks MUST not be rearranged at 1177 forwarding nodes, whether they support the security protocols or not. 1178 The only blocks that participate in this ordering are the primary and 1179 payload blocks, and the PIB and PCB security blocks themselves. All 1180 other extension blocks, including ESBs, are ignored for purposes of 1181 determining the processing order. 1183 The security blocks are added to and removed from a bundle in a last- 1184 in-first-out (LIFO) manner, with the top of the stack immediately 1185 after the primary block. A newly-created bundle has just the primary 1186 and payload blocks, and the stack is empty. As security actions are 1187 requested for the bundle, security blocks are pushed onto the stack 1188 immediately after the primary block. The early actions have security 1189 blocks close to the payload, later actions have blocks nearer to the 1190 primary block. The actions deal with only those blocks in the bundle 1191 at the time so, for example, the first to be added processes only the 1192 payload and primary blocks, the next might process the first if it 1193 chooses and the payload and primary, and so on. The last block to be 1194 added can process all the blocks. 1196 When the bundle is received, this process is reversed and security 1197 processing begins at the top of the stack, immediately after the 1198 primary block. The security actions are performed and the block is 1199 popped from the stack. Processing continues with the next security 1200 block until finally only the payload and primary blocks remain. 1202 The simplicity of this description is undermined by various real- 1203 world requirements. Nonetheless it serves as a helpful initial 1204 framework for understanding the bundle security process. 1206 The first issue is a very common one and easy to handle. The bundle 1207 may be sent indirectly to its destination, requiring several 1208 forwarding hops to finally arrive there. Security processing happens 1209 at each node, assuming that the node supports bundle security. For 1210 the following discussion, we assume that a bundle is created and that 1211 confidentiality, then payload integrity and finally bundle 1212 authentication are applied to it. The block sequence would therefore 1213 be primary-BAB-PIB-PCB-payload. Traveling from source to destination 1214 requires going through one intermediate node, so the trip consists of 1215 two hops. 1217 When the bundle is received at the intermediate node, the receive 1218 processing validates the BAB and pops it from the stack. However the 1219 PIBs and PCBs have the final destination as their security 1220 destination, so these can't be processed and removed. The 1221 intermediate node then begins the send process with the four 1222 remaining blocks in the bundle. The outbound processing adds any 1223 security blocks required by local policy, and these are pushed on the 1224 stack immediately after the primary block, ahead of the PIB. In this 1225 example, the intermediate node adds a PIB as a signature that the 1226 bundle has passed through the node. 1228 The receive processing at the destination first handles the 1229 intermediate node's PIB and pops it, next is the originator's PIB, 1230 also popped, and finally the originator's confidentiality block which 1231 allows the payload to be decrypted and the bundle handled for 1232 delivery. 1234 DTNs in practice are likely to be more complex. The security policy 1235 for a node specifies the security requirements for a bundle. The 1236 policy will possibly cause one or more security operations to be 1237 applied to the bundle at the current node, each with its own 1238 security-destination. Application of policy at subsequent nodes 1239 might cause additional security operations, each with a security- 1240 destination. The list of security-destinations in the security 1241 blocks (BAB, PIB and PCB, not ESB) creates a partial-ordering of 1242 nodes that MUST be visited en route to the bundle destination. 1244 The bundle security scheme does not deal with security paths that 1245 overlap partially but not completely. The security policy for a node 1246 MUST avoid specifying for a bundle a security-destination that causes 1247 a conflict with any existing security-destination in that bundle. 1248 This is discussed further below in Section 3.3. 1250 The second issue relates to the reversibility of certain security 1251 process actions. In general, the actions fall into two categories: 1252 those which do not affect other parts of the bundle, and those which 1253 are fully reversible. Creating a bundle signature, for example, does 1254 not change the bundle content except for the result. The encryption 1255 performed as part of the confidentiality processing does change the 1256 bundle, but the reverse processing at the destination restores the 1257 original content. 1259 The third category is the one where the bundle content has changed 1260 slightly and in a non-destructive way, but there is no mechanism to 1261 reverse the change. The simplest example is the addition of an EID- 1262 reference to a security block. The addition of the reference causes 1263 the text to be added to the bundle's dictionary. The text may be 1264 used also by other references so removal of the block and this 1265 specific EID-reference does not cause removal of the text from the 1266 dictionary. This shortcoming is of no impact to the "sequential" or 1267 "wrapping" security schemes described above, but does cause failures 1268 with "parallel" authentication mechanisms. Solutions for this 1269 problem are implementation-specific and typically involve multi-pass 1270 processing such that blocks are added at one stage and the security 1271 results calculated at a later stage of the overall process. 1273 Certain ciphersuites have sequence requirements for their correct 1274 operation, most notably the bundle authentication ciphersuites. 1275 Processing for bundle authentication is required to happen after all 1276 other sending operations, and prior to any receive operations at the 1277 next hop node. It follows therefore that BA blocks MUST always be 1278 pushed onto the stack after all others. 1280 Although we describe the security block list as a stack, there are 1281 some blocks which are placed after the payload and therefore are not 1282 part of the stack. The BundleAuthentication ciphersuite #1 ("BA1") 1283 requires a second, correlated block to contain the security-result 1284 and this block is placed after the payload, usually as the last block 1285 in the bundle. We can apply the stack rules even to these blocks by 1286 specifying that they be added to the end of the bundle at the same 1287 time that their "owner" or "parent" block is pushed on the stack. In 1288 fact, they form a stack beginning at the payload but growing in the 1289 other direction. Also, not all blocks in the main stack have a 1290 corresponding entry in the trailing stack. The only blocks which 1291 MUST follow the payload are those mandated by ciphersuites as 1292 correlated blocks for holding a security-result. No other blocks are 1293 required to follow the payload block and it is RECOMMENDED that they 1294 NOT do so. 1296 ESBs are effectively placeholders for the blocks they encapsulate 1297 and, since those do not form part of the processing sequence 1298 described above, ESBs themselves do not either. ESBs MAY be 1299 correlated, however, so the "no reordering" requirement applies to 1300 them as well. 1302 3.3. Security Regions 1304 Each security block has a security path, as described in the 1305 discussion for Figure 1, and the paths for various blocks are often 1306 different. 1308 BA blocks are always for a single hop and these restricted paths 1309 never cause conflict. 1311 The paths for PIBs and PCBs are often from bundle source to bundle 1312 destination, to provide end-to-end protection. A bundle-source-to- 1313 bundle-destination path likewise never causes a problem. 1315 Another common scenario is for gateway-to-gateway protection of 1316 traffic between two sub-networks ("tunnel-mode"). 1318 Looking at Figure 1 and the simplified version shown in Figure 4, we 1319 can regard BN2 and BN3 as gateways connecting the two subnetworks 1320 labeled "An internet". As long as they provide security for the BN2- 1321 BN3 path, all is well. Problems begin, for example, when BN2 adds 1322 blocks with BN4 as the security-destination, and originating node BN1 1323 has created blocks with BN3 as security-destination. We now have two 1324 paths and neither is a subset of the other. 1326 This scenario should be prevented by node BN2's security policy being 1327 aware of the already-existing block with BN3 as the security 1328 destination. This policy SHOULD NOT specify a security-dest that is 1329 further distant than any existing security-dest. 1331 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 1332 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 1333 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 1334 >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ 1336 <------------- BN1 to BN3 path ------------> 1338 <------------- BN2 to BN4 path ------------> 1340 Overlapping security paths 1342 Figure 4 1344 Consider the case where the security concern is for data integrity, 1345 so the blocks are PIBs. BN1 creates one ("PIa") along with the new 1346 bundle, and BN2 pushes its own PIB "PIb" on the stack, with security- 1347 destination BN4. When this bundle arrives at BN3, the bundle blocks 1348 are 1350 primary - PIb - PIa - payload 1352 Block PIb is not destined for this node BN3 so has to be forwarded. 1353 This is the security-destination for block PIa so, after validation, 1354 it should be removed from the bundle. But that will invalidate the 1355 PIb signature when the block is checked at the final destination. 1356 The PIb signature includes the primary block, PIb itself, PIa and the 1357 payload block, so PIa MUST remain in the bundle. This is why 1358 security blocks are treated as a stack and add/remove operations are 1359 permitted only at the top-of-stack. 1361 The situation would be worse if the security concern is 1362 confidentiality, and PCBs are employed, using the confidentiality 1363 ciphersuite #3 ("PC3") described in Section 4.3. In this scenario, 1364 BN1 would encrypt the bundle with BN3 as security-destination, BN2 1365 would create an overlapping security path by super-encrypting the 1366 payload and encapsulating the PC3 block for security-destination BN4. 1367 BN3 forwards all the blocks without change. BN4 decrypts the payload 1368 from its super-encryption and decapsulates the PC3 block, only to 1369 find that it should have been processed earlier. Assuming that BN4 1370 has no access to BN3's key store, BN4 has no way to decrypt the 1371 bundle and recover the original content. 1373 As mentioned above, authors of security policy need to use care to 1374 ensure that their policies do not cause overlaps. These guidelines 1375 should prove helpful: 1377 the originator of a bundle can always specify the bundle-dest as 1378 the security-dest, and should be cautious about doing otherwise 1380 in the "tunnel-mode" scenario where two sub-networks are connected 1381 by a tunnel through a network, the gateways can each specify the 1382 other as security-dest, and should be cautious about doing 1383 otherwise 1385 BAB is never a problem because it is always only a single hop 1387 PIB for a bundle without PCB will usually specify the bundle 1388 destination as security-dest 1390 PIB for a bundle containing a PCB should specify as its security- 1391 dest the security-dest of the PCB (outermost PCB if there are more 1392 than one) 1394 3.4. Canonicalisation of bundles 1396 In order to verify a signature or MAC on a bundle the exact same 1397 bits, in the exact same order, MUST be input to the calculation upon 1398 verification as were input upon initial computation of the original 1399 signature or MAC value. Consequently, a node MUST NOT change the 1400 encoding of any URI in the dictionary field, e.g., changing the DNS 1401 part of some HTTP URL from lower case to upper case. Because bundles 1402 MAY be modified while in transit (either correctly or due to 1403 implementation errors), a canonical form of any given bundle (that 1404 contains a BAB or PIB) MUST be defined. 1406 This section defines bundle canonicalisation algorithms used in the 1407 Section 4.1 and Section 4.2 ciphersuites. Other ciphersuites can use 1408 these or define their own canonicalization procedures. 1410 3.4.1. Strict canonicalisation 1412 The first algorithm that can be used permits no changes at all to the 1413 bundle between the security-source and the security-destination. It 1414 is mainly intended for use in BAB ciphersuites. This algorithm 1415 conceptually catenates all blocks in the order presented, but omits 1416 all security result data fields in blocks of this ciphersuite type. 1417 That is, when a BA ciphersuite specifies this algorithm then we omit 1418 all BAB security results for all BA ciphersuites, when a PIB 1419 ciphersuite specifies this algorithm then we omit all PIB security 1420 results for all PI ciphersuites. All security result length fields 1421 are included, even though their corresponding security result data 1422 fields are omitted. 1424 Notes: 1426 - In the above we specify that security result data is omitted. 1427 This means that no bytes of the security result data are input. 1428 We do not set the security result length to zero. Rather, we 1429 assume that the security result length will be known to the module 1430 that implements the ciphersuite before the security result is 1431 calculated, and require that this value be in the security result 1432 length field even though the security result data itself will be 1433 omitted. 1435 - The 'res' bit of the ciphersuite ID, which indicates whether or 1436 not the security result length and security result data field are 1437 present, is part of the canonical form. 1439 - The value of the block data length field, which indicates the 1440 length of the block, is also part of the canonical form. Its 1441 value indicates the length of the entire bundle when the bundle 1442 includes the security result data field. 1444 - BABs are always added to bundles after PIBs, so when a PIB 1445 ciphersuite specifies this strict canonicalisation algorithm and 1446 the PIB is received with a bundle that also includes one or more 1447 BABs, application of strict canonicalisation as part of the PIB 1448 security result verification process requires that all BABs in the 1449 bundle be ignored entirely. 1451 3.4.2. Mutable canonicalisation 1453 This algorithm is intended to protect parts of the bundle which 1454 should not be changed in-transit. Hence it omits the mutable parts 1455 of the bundle. 1457 The basic approach is to define a canonical form of the primary block 1458 and catenate it with the security (PIBs and PCBs only) and payload 1459 blocks in the order that they will be transmitted. This algorithm 1460 ignores all other blocks, including ESBs, because it cannot be 1461 determined whether or not they will change as the bundle transits the 1462 network. In short, this canonicalization protects the payload, 1463 payload-related security blocks and parts of the primary block. 1465 Many fields in various blocks are stored as variable-length SDNVs. 1466 These are canonicalized in unpacked form, as eight-byte fixed-width 1467 fields in network byte order. The size of eight bytes is chosen 1468 because implementations MAY handle larger values as invalid, as noted 1469 in [DTNBP]. 1471 The canonical form of the primary block is shown in Figure 5. 1472 Essentially, it de-references the dictionary block, adjusts lengths 1473 where necessary and ignores flags that MAY change in transit. 1475 +----------------+----------------+----------------+----------------+ 1476 | Version | Processing flags (incl. COS and SRR) | 1477 +----------------+----------------+---------------------------------+ 1478 | Canonical primary block length | 1479 +----------------+----------------+---------------------------------+ 1480 | Destination endpoint ID length | 1481 +----------------+----------------+---------------------------------+ 1482 | | 1483 | Destination endpoint ID | 1484 | | 1485 +----------------+----------------+---------------------------------+ 1486 | Source endpoint ID length | 1487 +----------------+----------------+----------------+----------------+ 1488 | | 1489 | Source endpoint ID | 1490 | | 1491 +----------------+----------------+---------------------------------+ 1492 | Report-to endpoint ID length | 1493 +----------------+----------------+----------------+----------------+ 1494 | | 1495 | Report-to endpoint ID | 1496 | | 1497 +----------------+----------------+----------------+----------------+ 1498 | | 1499 + Creation Timestamp (2 x SDNV) + 1500 | | 1501 +---------------------------------+---------------------------------+ 1502 | Lifetime | 1503 +----------------+----------------+----------------+----------------+ 1505 The canonical form of the primary bundle block. 1507 Figure 5 1509 The fields shown in Figure 5 are: 1511 Version is the single-byte value in the primary block. 1513 Processing flags in the primary block is an SDNV, and includes the 1514 class-of-service (COS) and status report request (SRR) fields. 1515 For purposes of canonicalization, the SDNV is unpacked into a 1516 fixed-width field and some bits are masked out. The unpacked 1517 field is ANDed with mask 0x0000 0000 0007 C1BE to set to zero all 1518 reserved bits and the "bundle is a fragment" bit. 1520 Length - a four-byte value containing the length (in bytes) of 1521 this structure, in network byte order. 1523 Destination endpoint ID length and value - are the length (as a 1524 four byte value in network byte order) and value of the 1525 destination endpoint ID from the primary bundle block. The URI is 1526 simply copied from the relevant part(s) of the dictionary block 1527 and is not itself canonicalised. Although the dictionary entries 1528 contain null-terminators, the null-terminators are not included in 1529 the length or the canonicalization. 1531 Source endpoint ID length and value are handled similarly to the 1532 destination. 1534 Report-to endpoint ID length and value are handled similarly to 1535 the destination. 1537 Creation time (2 x SDNV) and Lifetime (SDNV) are simply copied 1538 from the primary block, with the SDNV values being represented as 1539 eight-byte unpacked values. 1541 Fragment offset and Total application data unit length are 1542 ignored, as is the case for the "bundle is a fragment" bit 1543 mentioned above. If the payload data to be canonicalized is less 1544 than the complete, original bundle payload, the offset and length 1545 are specified in the security-parameters. 1547 For non-primary blocks being included in the canonicalization, the 1548 block processing flags value used for canonicalization is the 1549 unpacked SDNV value with reserved and mutable bits masked to zero. 1550 The unpacked value is ANDed with mask 0x0000 0000 0000 0077 to zero 1551 reserved bits and the "last block" flag. The "last block" flag is 1552 ignored because BABs and other security blocks MAY be added for some 1553 parts of the journey but not others so the setting of this bit might 1554 change from hop to hop. 1556 Endpoint ID references in security blocks are canonicalized using the 1557 de-referenced text form in place of the reference pair. The 1558 reference count is not included, nor is the length of the endpoint ID 1559 text. 1561 The block-length is canonicalized as an eight-byte unpacked value in 1562 network byte order. If the payload data to be canonicalized is less 1563 than the complete, original bundle payload, this field contain the 1564 size of the data being canonicalized (the "effective block") rather 1565 that the actual size of the block. 1567 Payload blocks are generally canonicalized as-is with the exception 1568 that in some instances only a portion of the payload data is to be 1569 protected. In such a case, only those bytes are included in the 1570 canonical form, and additional ciphersuite parameters are required to 1571 specify which part of the payload is protected, as discussed further 1572 below. 1574 Security blocks are handled likewise, except that the ciphersuite 1575 will likely specify that the "current" security block security result 1576 field not be considered part of the canonical form. This differs 1577 from the strict canonicalisation case since we might use the mutable 1578 canonicalisation algorithm to handle sequential signatures such that 1579 signatures cover earlier ones. 1581 ESBs MUST NOT be included in the canonicalization. 1583 Notes: 1585 - The canonical form of the bundle is not transmitted. It is 1586 simply an artifact used as input to digesting. 1588 - We omit the reserved flags because we cannot determine if they 1589 will change in transit. The masks specified above will have to be 1590 revised if additional flags are defined and they need to be 1591 protected. 1593 - Our URI encoding does not preserve the "null-termination" 1594 convention from the dictionary field, nor do we separate the 1595 scheme and the scheme-specific part (SSP) as is done there. 1597 - The URI encoding will cause errors if any node rewrites the 1598 dictionary content (e.g. changing the DNS part of an HTTP URL from 1599 lower-case to upper case). This could happen transparently when a 1600 bundle is synched to disk using one set of software and then read 1601 from disk and forwarded by a second set of software. Because 1602 there are no general rules for canonicalising URIs (or IRIs), this 1603 problem may be an unavoidable source of integrity failures. 1605 - All SDNV fields here are canonicalized as eight-byte unpacked 1606 values in network byte order. Length fields are canonicalized as 1607 four-byte values in network byte order. Encoding does not need 1608 optimization since the values are never sent over the network. 1610 If a bundle is fragmented before the PIB is applied then the PIB 1611 applies to a fragment and not the entire bundle. However, the 1612 protected fragment could be subsequently further fragmented, which 1613 would leave the verifier unable to know which bytes were protected 1614 by the PIB. Even in the absence of fragmentation the same 1615 situation applies if the ciphersuite is defined to allow 1616 protection of less than the entire, original bundle payload. 1618 For this reason, PIB ciphersuites which support applying a PIB to 1619 less than the complete, original bundle payload MUST specify, as 1620 part of the ciphersuite parameters, which bytes of the bundle 1621 payload are protected. When verification occurs, only the 1622 specified range of the payload bytes are input to PIB 1623 verification. It is valid for a ciphersuite to be specified so as 1624 to only apply to entire bundles and not to fragments. A 1625 ciphersuite MAY be specified to apply to only a portion of the 1626 payload, regardless of whether the payload is a fragment or the 1627 complete original bundle payload. 1629 The same fragmentation issue applies equally to PCB ciphersuites. 1630 Ciphersuites which support applying confidentiality to fragments 1631 MUST specify, as part of the ciphersuite parameters, which bytes 1632 of the bundle payload are protected. When decrypting a fragment, 1633 only the specified bytes are processed. It is also valid for a 1634 confidentiality ciphersuite to be specified so as to only apply to 1635 entire bundles and not to fragments. 1637 This definition of mutable canonicalization assumes that endpoint IDs 1638 themselves are immutable and is unsuitable for use in environments 1639 where that assumption might be violated. 1641 The canonicalization applies to a specific bundle and not a specific 1642 payload. If a bundle is forwarded in some way, the recipient is not 1643 able to verify the original integrity signature since the the source 1644 EID will be different, and possibly other fields. 1646 The solution for either of these issues is to define and use a PIB 1647 ciphersuite having an alternate version of mutable canonicalization 1648 any fields from the primary block. 1650 3.5. Endpoint ID confidentiality 1652 Every bundle MUST contain a primary block that contains the source 1653 and destinations endpoint IDs, and others, and that cannot be 1654 encrypted. If endpoint ID confidentiality is required, then bundle- 1655 in-bundle encapsulation can solve this problem in some instances. 1657 Similarly, confidentiality requirements MAY also apply to other parts 1658 of the primary block (e.g. the current-custodian) and that is 1659 supported in the same manner. 1661 3.6. Bundles received from other nodes 1663 Nodes implementing this specification SHALL consult their security 1664 policy to determine whether or not a received bundle is required by 1665 policy to include a BAB. If the bundle has no BAB and one is not 1666 required then BAB processing on the received bundle is complete and 1667 the bundle is ready to be further processed for PIB/PCB/ESB handling 1668 or delivery or forwarding. 1670 If the bundle is required to have a BAB but does not, then the bundle 1671 MUST be discarded and processed no further. If the bundle is 1672 required to have a BAB but all of its BABs identify a different node 1673 other than the receiving node as the BAB security destination, then 1674 the bundle MUST be discarded and processed no further. 1676 If the bundle is required to have a BAB and has one or more BABs that 1677 identify the receiving node as the BAB security destination, or for 1678 which there is no security destination, then the value in the 1679 security result field(s) of the BAB(s) MUST be verified according to 1680 the ciphersuite specification. If for all such BABs in the bundle 1681 either the BAB security source cannot be determined or the security 1682 result value check fails, the bundle has failed to authenticate and 1683 the bundle MUST be discarded and processed no further. If any of the 1684 BABs present verify, or if a BAB is not required, the bundle is ready 1685 for further processing as determined by extension blocks and/or 1686 policy. 1688 BABs received in a bundle MUST be stripped before the bundle is 1689 forwarded. New BABs MAY be added as required by policy. This MAY 1690 require correcting the "last block" field of the to-be-forwarded 1691 bundle. 1693 Further processing of the bundle MUST take place in the order 1694 indicated by the various blocks from the primary block to the payload 1695 block, except as defined by an applicable specification. 1697 If the bundle has a PCB and the receiving node is the PCB destination 1698 for the bundle (either because the node is listed as the bundle's 1699 PCB-dest or because the node is listed as the bundle's destination 1700 and there is no PCB-dest), the node MUST decrypt the relevant parts 1701 of the bundle in accordance with the ciphersuite specification. The 1702 PCB SHALL be deleted. If the relevant parts of the bundle cannot be 1703 decrypted (i.e. the decryption key cannot be deduced or decryption 1704 fails), then the bundle MUST be discarded and processed no further; 1705 in this case a bundle deletion status report (see the Bundle Protocol 1706 [DTNBP]) indicating the decryption failure MAY be generated. If the 1707 PCB security result included the ciphertext of a block other than the 1708 payload block, the recovered plaintext block MUST be placed in the 1709 bundle at the location from which the PCB was deleted. 1711 If the bundle has one or more PIBs for which the receiving node is 1712 the bundle's PIB destination (either because the node is listed in 1713 the bundle's PIB-dest or because the node is listed as the bundle's 1714 destination and there is no PIB-dest), the node MUST verify the value 1715 in the PIB security result field(s) in accordance with the 1716 ciphersuite specification. If all the checks fail, the bundle has 1717 failed to authenticate and the bundle SHALL be processed according to 1718 the security policy. A bundle status report indicating the failure 1719 MAY be generated. Otherwise, if the PIB verifies, the bundle is 1720 ready to be processed for either delivery or forwarding. Before 1721 forwarding the bundle, the node SHOULD remove the PIB from the 1722 bundle, subject to the requirements of Section 3.2, unless it is 1723 likely that some downstream node will also be able to verify the PIB. 1725 If the bundle has a PIB and the receiving node is not the bundle's 1726 PIB-dest the receiving node MAY attempt to verify the value in the 1727 security result field. If it is able to check and the check fails, 1728 the node SHALL discard the bundle and it MAY send a bundle status 1729 report indicating the failure. 1731 If the bundle has an ESB and the receiving node is the ESB 1732 destination for the bundle (either because the node is listed as the 1733 bundle's ESB-dest or because the node is listed as the bundle's 1734 destination and there is no ESB-dest), the node MUST decrypt and/or 1735 decapsulate the encapsulated block in accordance with the ciphersuite 1736 specification. The decapsulated block replaces the ESB in the bundle 1737 block sequence, and the ESB is thereby deleted. If the content 1738 cannot be decrypted (i.e., the decryption key cannot be deduced or 1739 decryption fails), then the bundle MAY be discarded and processed no 1740 further unless the security policy specifies otherwise. In this case 1741 a bundle deletion status report (see the Bundle Protocol [DTNBP]) 1742 indicating the decryption failure MAY be generated. 1744 3.7. The At-Most-Once-Delivery Option 1746 An application MAY request (in an implementation specific manner) 1747 that a node be registered as a member of an endpoint and that 1748 received bundles destined for that endpoint be delivered to that 1749 application. 1751 An option for use in such cases is known as "at-most-once-delivery". 1752 If this option is chosen, the application indicates that it wants the 1753 node to check for duplicate bundles, discard duplicates, and deliver 1754 at most one copy of each received bundle to the application. If this 1755 option is not chosen, the application indicates that it wants the 1756 node to deliver all received bundle copies to the application. If 1757 this option is chosen, the node SHALL deliver at most one copy of 1758 each received bundle to the application. If the option is not 1759 chosen, the node SHOULD, subject to policy, deliver all bundles. 1761 To enforce this the node MUST look at the source/timestamp pair value 1762 of each complete (reassembled, if necessary) bundle received and 1763 determine if this pair, which uniquely identifies a bundle, has been 1764 previously received. If it has, then the bundle is a duplicate. If 1765 it has not, then the bundle is not a duplicate. The source/timestamp 1766 pair SHALL be added to the list of pair values already received by 1767 that node. 1769 Each node implementation MAY decide how long to maintain a table of 1770 pair value state. 1772 Additional discussion relevant to at-most-once-delivery is in the DTN 1773 Retransmission Block specification [DTNRB]. 1775 3.8. Bundle Fragmentation and Reassembly 1777 If it is necessary for a node to fragment a bundle and security 1778 services have been applied to that bundle, the fragmentation rules 1779 described in [DTNBP] MUST be followed. As defined there and repeated 1780 here for completeness, only the payload MAY be fragmented; security 1781 blocks, like all extension blocks, can never be fragmented. In 1782 addition, the following security-specific processing is REQUIRED: 1784 The security policy requirements for a bundle MUST be applied 1785 individually to all the bundles resulting from a fragmentation event. 1787 If the original bundle contained a PIB, then each of the PIB 1788 instances MUST be included in some fragment. 1790 If the original bundle contained one or more PCBs, then any PCB 1791 instances containing a key information item MUST have the "replicate 1792 in every fragment" flag set, and thereby be replicated in every 1793 fragment. This is to ensure that the canonical block-sequence can be 1794 recovered during reassembly. 1796 If the original bundle contained one or more correlated PCBs not 1797 containing a key information item, then each of these MUST be 1798 included in some fragment, but SHOULD NOT be sent more than once. 1799 They MUST be placed in a fragment in accordance with the 1800 fragmentation rules described in [DTNBP]. 1802 Note: various fragments MAY have additional security blocks added at 1803 this or later stages and it is possible that correlators will 1804 collide. In order to facilitate uniqueness, ciphersuites SHOULD 1805 include the fragment-offset of the fragment as a high-order component 1806 of the correlator. 1808 3.9. Reactive fragmentation 1810 When a partial bundle has been received, the receiving node SHALL 1811 consult its security policy to determine if it MAY fragment the 1812 bundle, converting the received portion into a bundle fragment for 1813 further forwarding. Whether or not reactive fragmentation is 1814 permitted SHALL depend on the security policy and the ciphersuite 1815 used to calculate the BAB authentication information, if required. 1816 (Some BAB ciphersuites, i.e., the mandatory BAB-HMAC ciphersuite 1817 defined in Section 4.1, do not accommodate reactive fragmentation 1818 because the security result in the BAB requires that the entire 1819 bundle be signed. It is conceivable, however, that a BAB ciphersuite 1820 could be defined such that multiple security results are calculated, 1821 each on a different segment of a bundle, and that these security 1822 results could be interspersed between bundle payload segments such 1823 that reactive fragmentation could be accommodated.) 1825 If the bundle is reactively fragmented by the intermediate receiver 1826 and the BAB-ciphersuite is of an appropriate type (e.g. with multiple 1827 security results embedded in the payload), the bundle MUST be 1828 fragmented immediately after the last security result value in the 1829 partial payload that is received. Any data received after the last 1830 security result value MUST be dropped. 1832 If a partial bundle is received at the intermediate receiver and is 1833 reactively fragmented and forwarded, only the part of the bundle that 1834 was not received MUST be retransmitted, though more of the bundle MAY 1835 be retransmitted. Before retransmitting a portion of the bundle, it 1836 SHALL be changed into a fragment and, if the original bundle included 1837 a BAB, the fragmented bundle MUST also, and its BAB SHALL be 1838 recalculated. 1840 This specification does not currently define any ciphersuite which 1841 can handle this reactive fragmentation case. 1843 An interesting possibility is a ciphersuite definition such that the 1844 transmission of a follow-up fragment would be accompanied by the 1845 signature for the payload up to the restart point. 1847 3.10. Attack Model 1849 An evaluation of resilience to cryptographic attack necessarily 1850 depends upon the algorithms chosen for bulk data protection and for 1851 key transport. The mandatory ciphersuites described in the following 1852 section use AES, RSA and SHA algorithms in ways that are believed to 1853 be reasonably secure against ciphertext-only, chosen-ciphertext, 1854 known-plaintext and chosen-plaintext attacks. 1856 The design has been careful to preserve the resilience of the 1857 algorithms against attack. For example, if a message is encrypted 1858 then any message integrity signature is also encrypted so that 1859 guesses cannot be confirmed. 1861 4. Mandatory Ciphersuites 1863 This section defines the mandatory ciphersuites for this 1864 specification. There is currently one mandatory ciphersuite for use 1865 with each of the security block types BAB, PIB, PCB and ESB. The BAB 1866 ciphersuite is based on shared secrets using HMAC. The PIB 1867 ciphersuite is based on digital signatures using RSA with SHA256. 1868 The PCB and ESB ciphersuites are based on using RSA for key transport 1869 and AES for bulk encryption. 1871 The key transport mechanisms defined in Cryptographic Message Syntax 1872 [RFC5652] are suitable for the ciphersuites, with only minor 1873 adjustment as required by the ciphersuite characteristics. 1875 4.1. BAB-HMAC 1877 The BAB-HMAC ciphersuite has ciphersuite ID value 0x001. 1879 BAB-HMAC uses the strict canonicalisation algorithm in Section 3.4.1. 1881 Strict canonicalization supports digesting of a fragment-bundle. It 1882 does not permit the digesting of only a subset of the payload, but 1883 only the complete contents of the payload of the current bundle, 1884 which might be a fragment. The "fragment range" item for security- 1885 parameters is not used to indicate a fragment, as this information is 1886 digested within the primary block. 1888 The variant of HMAC to be used is HMAC-SHA1 as defined in [RFC2104]. 1890 This ciphersuite requires the use of two related instances of the 1891 BAB. It involves placing the first BAB instance (as defined in 1892 Section 2.2) just after the primary block. The second (correlated) 1893 instance of the BAB MUST be placed after all other blocks (except 1894 possibly other BAB blocks) in the bundle. 1896 This means that normally, the BAB will be the second and last blocks 1897 of the bundle. If a forwarder wishes to apply more than one 1898 correlated BAB pair, then this can be done. There is no requirement 1899 that each application "wrap" the others, but the forwarder MUST 1900 insert all the "up front" BABs, and their "at back" "partners" 1901 (without any security result), before canonicalising. 1903 Inserting more than one correlated BAB pair would be useful if the 1904 bundle could be routed to more than one potential "next-hop" or if 1905 both an old or a new key were valid at sending time, with no 1906 certainty about the situation that will obtain at reception time. 1908 The security result is the output of the HMAC-SHA1 calculation with 1909 input being the result of running the entire bundle through the 1910 strict canonicalisation algorithm. Both required BAB instances MUST 1911 be included in the bundle before canonicalisation. 1913 Security parameters are optional with this scheme, but if used then 1914 the only field that can be present is key information (see 1915 Section 2.6). 1917 Implementations MUST support use of "AuthenticatedData" type as 1918 defined in [RFC5652] section 9.1, with RecipientInfo type 1919 KeyTransRecipientInfo containing the issuer and serial number of a 1920 suitable certificate. They MAY support additional RecipientInfo 1921 types. They MAY additionally use the "SignedData" type described in 1922 [RFC5652] Section 5.1. In either case, the "eContent" field in 1923 EncapsulatedContentInfo contains the encrypted HMAC key. 1925 Because this ciphersuite requires that the security result be in the 1926 second, correlated BAB, the content of the 1927 "MessageAuthenticationCode" field in AuthenticatedData is ignored, 1928 although the field has to be present. 1930 In the absence of key information the receiver is expected to be able 1931 to find the correct key based on the sending identity. The sending 1932 identity MAY be known from the security-source field or the content 1933 of a previous-hop block in the bundle. It MAY also be determined 1934 using implementation-specific means such as the convergence layer. 1936 4.2. PIB-RSA-SHA256 1938 The PIB-RSA-SHA256 ciphersuite has ciphersuite ID value 0x02. 1940 If the bundle being signed has been fragmented before signing, then 1941 we have to specify which bytes were signed in case the signed bundle 1942 is subsequently fragmented for a second time. If the bundle is a 1943 fragment, then the ciphersuite parameters MUST include a fragment- 1944 range field, as described in Section 2.6, specifying the offset and 1945 length of the signed fragment. If the entire bundle is signed then 1946 these numbers MUST be omitted. 1948 Implementations MUST support use of "SignedData" type as defined in 1949 [RFC5652] section 5.1, with SignerInfo type SignerIdentifier 1950 containing the issuer and serial number of a suitable certificate. 1951 The "eContent" field in EncapsulatedContentInfo contains the signed 1952 checksum (SignatureValue) of the data. 1954 Because the signature field in SignedData SignatureValue is a 1955 security-result field, the entire key information item MUST be placed 1956 in the block's security-result field, rather than security- 1957 parameters. 1959 PIB-RSA-SHA256 uses the mutable canonicalisation algorithm 1960 Section 3.4.2, with the security-result data field for only the 1961 "current" block being excluded from the canonical form. The 1962 resulting canonical form of the bundle is the input to the signing 1963 process. This ciphersuite requires the use of a single instance of 1964 the PIB. 1966 RSA is used with SHA256 as specified for the id-sha256 PKCSv2.1 1967 signature scheme in [RFC4055]. The output of the signing process is 1968 the SignatureValue field for the PIB. 1970 "Commensurate strength" cryptography is generally held to be a good 1971 idea. A combination of RSA with SHA256 is reckoned to require a 3076 1972 bit RSA key according to this logic. Few implementations will choose 1973 this length by default (and probably some just won't support such 1974 long keys). Since this is an experimental protocol, we expect that 1975 1024 or 2048 bit RSA keys will be used in many cases, and that that 1976 will be fine since we also expect that the hash function "issues" 1977 will be resolved before any standard would be derived from this 1978 protocol. 1980 4.3. PCB-RSA-AES128-PAYLOAD-PIB-PCB 1982 The PCB-RSA-AES128-PAYLOAD-PIB-PCB ciphersuite has ciphersuite ID 1983 value 0x003. 1985 This scheme encrypts PIBs, PCBs and the payload. The key size for 1986 this ciphersuite is 128 bits. 1988 Encryption is done using the AES algorithm in Galois/Counter Mode 1989 (GCM) as described in [RFC5084] [Note: parts of the following 1990 description are borrowed from RFC 4106]. 1992 The choice of GCM avoids expansion of the payload, which causes 1993 problems with fragmentation/reassembly and custody transfer. GCM 1994 also includes authentication, essential in preventing attacks that 1995 can alter the decrypted plaintext or even recover the encryption key. 1997 GCM is a block cipher mode of operation providing both 1998 confidentiality and data integrity. The GCM encryption operation has 1999 four inputs: a secret key, an initialization vector (IV), a 2000 plaintext, and an input for additional authenticated data (AAD) which 2001 is not used here. It has two outputs, a ciphertext whose length is 2002 identical to the plaintext, and an authentication tag, also known as 2003 the Integrity Check Value (ICV). 2005 For consistency with the description in [RFC5084], we refer to the 2006 GCM IV as a nonce. The same key and nonce combination MUST NOT be 2007 used more than once. The nonce has the following layout 2009 +----------------+----------------+----------------+----------------+ 2010 | salt | 2011 +----------------+----------------+----------------+----------------+ 2012 | | 2013 | initialization vector | 2014 | | 2015 +----------------+----------------+----------------+----------------+ 2017 Nonce format. 2019 Figure 6 2021 The salt field is a four-octet value, usually chosen at random. It 2022 MUST be the same for all PCBs which have the same correlator value. 2023 The salt need not be kept secret. 2025 The initialization vector (IV) is an eight-octet value, usually 2026 chosen at random. It MUST be different for all PCBs which have the 2027 same correlator value. The value need not be kept secret. 2029 The key (bundle encryption key, BEK) is a sixteen-octet (128 bits) 2030 value, usually chosen at random. The value MUST be kept secret, as 2031 described below. 2033 The integrity check value is a sixteen-octet value used to verify 2034 that the protected data has not been altered. The value need not be 2035 kept secret. 2037 This ciphersuite requires the use of a single PCB instance to deal 2038 with payload confidentiality. If the bundle already contains PIBs or 2039 PCBs then the ciphersuite will create additional correlated blocks to 2040 protect these PIBs and PCBs. These "additional" blocks replace the 2041 original blocks on a one-for-one basis, so the number of blocks 2042 remains unchanged. All these related blocks MUST have the same 2043 correlator value. The term "first PCB" in this section refers to the 2044 single PCB if there is only one or, if there are several, then to the 2045 one containing the key information. This MUST be the first of the 2046 set. 2048 First PCB - the first PCB MAY contain a correlator value, and MAY 2049 specify security-source and/or security-destination in the EID-list. 2050 If not specified, the bundle-source and bundle-destination 2051 respectively are used for these values, as with other ciphersuites. 2053 The block MUST contain security-parameters and security-result 2054 fields. Each field MAY contain several items formatted as described 2055 in Section 2.6. 2057 Security-parameters 2059 key information 2061 salt 2063 IV (this instance applies only to payload) 2065 fragment offset and length, if bundle is a fragment 2067 Security-result 2069 ICV 2071 Subsequent PCBs MUST contain a correlator value to link them to the 2072 first PCB. Security-source and security-destination are implied from 2073 the first PCB, however see the discussion in Section 2.4 concerning 2074 EID-list entries. They MUST contain security-parameters and 2075 security-result fields as follows: 2077 Security-parameters 2079 IV for this specific block 2081 Security-result 2083 encapsulated block 2085 The security-parameters and security-result fields in the subsequent 2086 PCBs MUST NOT contain any items other than these two. Items such as 2087 key and salt are supplied in the first PCB and MUST NOT be repeated. 2089 Implementations MUST support use of "Enveloped-data" type as defined 2090 in [RFC5652] section 6, with RecipientInfo type KeyTransRecipientInfo 2091 containing the issuer and serial number of a suitable certificate. 2092 They MAY support additional RecipientInfo types. The "eContent" 2093 field in EncryptedContentInfo contains the encrypted BEK that 2094 protects the payload and certain security blocks of the bundle. 2096 The Integrity Check Value from the AES-GCM encryption of the payload 2097 is placed in the security-result field of the first PCB. 2099 If the bundle being encrypted is a fragment-bundle we have to specify 2100 which bytes are encrypted in case the bundle is subsequently 2101 fragmented again. If the bundle is a fragment the ciphersuite 2102 parameters MUST include a fragment-range field, as described in 2103 Section 2.6, specifying the offset and length of the encrypted 2104 fragment. Note that this is not the same pair of fields which appear 2105 in the primary block as "offset and length". The "length" in this 2106 case is the length of the fragment, not the original length. If the 2107 bundle is not a fragment then this field MUST be omitted. 2109 The confidentiality processing for payload and other blocks is 2110 different, mainly because the payload might be fragmented later at 2111 some other node. 2113 For the payload, only the bytes of the bundle payload field are 2114 affected, being replaced by ciphertext. The salt, IV and key values 2115 specified in the first PCB are used to encrypt the payload, and the 2116 resultant authentication tag (ICV) is placed in an ICV item in the 2117 security-result field of that first PCB. The other bytes of the 2118 payload block, such as type, flags and length, are not modified. 2120 For each PIB or PCB to be protected, the entire original block is 2121 encapsulated in a "replacing" PCB. This replacing PCB is placed in 2122 the outgoing bundle in the same position as the original block, PIB 2123 or PCB. As mentioned above, this is one-for-one replacement and 2124 there is no consolidation of blocks or mixing of data in any way. 2126 The encryption process uses AES-GCM with the salt and key values from 2127 the first PCB, and an IV unique to this PCB. The process creates 2128 ciphertext for the entire original block, and an authentication tag 2129 for validation at the security destination. For this encapsulation 2130 process, unlike the processing of the bundle payload, the 2131 authentication tag is appended to the ciphertext for the block and 2132 the combination is stored into the "encapsulated block" item in 2133 security-result. 2135 The replacing block, of course, also has the same correlator value as 2136 the first PCB with which it is associated. It also contains the 2137 block-specific IV in security-parameters, and the combination of 2138 original-block-ciphertext and authentication tag, stored as an 2139 "encapsulated block" item in security-result. 2141 If the payload was fragmented after encryption then all those 2142 fragments MUST be present and reassembled before decryption. This 2143 process might be repeated several times at different destinations if 2144 multiple fragmentation actions have occurred. 2146 The size of the GCM counter field limits the payload size to 2^39 - 2147 256 bytes, about half a terabyte. A future revision of this 2148 specification will address the issue of handling payloads in excess 2149 of this size. 2151 4.4. ESB-RSA-AES128-EXT 2153 The ESB-RSA-AES128-EXT ciphersuite has ciphersuite ID value 0x004. 2155 This scheme encrypts non-payload-related blocks. It MUST NOT be used 2156 to encrypt PIBs, PCBs or primary or payload blocks. The key size for 2157 this ciphersuite is 128 bits. 2159 Encryption is done using the AES algorithm in Galois/Counter Mode 2160 (GCM) as described in [RFC5084] [Note: parts of the following 2161 description are borrowed from RFC 4106]. 2163 GCM is a block cipher mode of operation providing both 2164 confidentiality and data origin authentication. The GCM 2165 authenticated encryption operation has four inputs: a secret key, an 2166 initialization vector (IV), a plaintext, and an input for additional 2167 authenticated data (AAD) which is not used here. It has two outputs, 2168 a ciphertext whose length is identical to the plaintext, and an 2169 authentication tag, also known as the Integrity Check Value (ICV). 2171 For consistency with the description in [RFC5084], we refer to the 2172 GCM IV as a nonce. The same key and nonce combination MUST NOT be 2173 used more than once. The nonce has the following layout 2175 +----------------+----------------+---------------------------------+ 2176 | salt | 2177 +----------------+----------------+---------------------------------+ 2178 | | 2179 | initialization vector | 2180 | | 2181 +----------------+----------------+---------------------------------+ 2183 Nonce format. 2185 Figure 7 2187 The salt field is a four-octet value, usually chosen at random. It 2188 MUST be the same for all ESBs which have the same correlator value. 2189 The salt need not be kept secret. 2191 The initialization vector (IV) is an eight-octet value, usually 2192 chosen at random. It MUST be different for all ESBs which have the 2193 same correlator value. The value need not be kept secret. 2195 The data encryption key is a sixteen-octet (128 bits) value, usually 2196 chosen at random. The value MUST be kept secret, as described below. 2198 The integrity check value is a sixteen-octet value used to verify 2199 that the protected data has not been altered. The value need not be 2200 kept secret. 2202 This ciphersuite replaces each BP extension block to be protected 2203 with a "replacing" ESB, and each can be individually specified. 2205 If a number of related BP extension blocks are to be protected they 2206 can be grouped as a correlated set and protected using a single key. 2207 These blocks replace the original blocks on a one-for-one basis, so 2208 the number of blocks remains unchanged. All these related blocks 2209 MUST have the same correlator value. The term "first ESB" in this 2210 section refers to the single ESB if there is only one or, if there 2211 are several, then to the one containing the key or key-identifier. 2212 This MUST be the first of the set. If the blocks are individually 2213 specified then there is no correlated set and each block is its own 2214 "first ESB". 2216 First ESB - the first ESB MAY contain a correlator value, and MAY 2217 specify security-source and/or security-destination in the EID-list. 2218 If not specified, the bundle-source and bundle-destination 2219 respectively are used for these values, as with other ciphersuites. 2220 The block MUST contain security-parameters and security-result 2221 fields. Each field MAY contain several items formatted as described 2222 in Section 2.6. 2224 Security-parameters 2226 key information 2228 salt 2230 IV for this specific block 2232 block type of encapsulated block (optional) 2234 Security-result 2236 encapsulated block 2238 Subsequent ESBs MUST contain a correlator value to link them to the 2239 first ESB. Security-source and security-destination are implied from 2240 the first ESB, however see the discussion in Section 2.4 concerning 2241 EID-list entries. Subsequent ESBs MUST contain security-parameters 2242 and security-result fields as follows: 2244 Security-parameters 2246 IV for this specific block 2248 block type of encapsulated block (optional) 2250 Security-result 2252 encapsulated block 2254 The security-parameters and security-result fields in the subsequent 2255 ESBs MUST NOT contain any items other than those listed. Items such 2256 as key and salt are supplied in the first ESB and MUST NOT be 2257 repeated. 2259 Implementations MUST support use of "Enveloped-data" type as defined 2260 in [RFC5652] section 6, with RecipientInfo type KeyTransRecipientInfo 2261 containing the issuer and serial number of a suitable certificate. 2262 They MAY support additional RecipientInfo types. The "eContent" 2263 field in EncryptedContentInfo contains the encrypted BEK used to 2264 encrypt the content of the block being protected. 2266 For each block to be protected, the entire original block is 2267 encapsulated in a "replacing" ESB. This replacing ESB is placed in 2268 the outgoing bundle in the same position as the original block. As 2269 mentioned above, this is one-for-one replacement and there is no 2270 consolidation of blocks or mixing of data in any way. 2272 The encryption process uses AES-GCM with the salt and key values from 2273 the first ESB, and an IV unique to this ESB. The process creates 2274 ciphertext for the entire original block, and an authentication tag 2275 for validation at the security destination. The authentication tag 2276 is appended to the ciphertext for the block and the combination is 2277 stored into the "encapsulated block" item in security-result. 2279 The replacing block, of course, also has the same correlator value as 2280 the first ESB with which it is associated. It also contains the 2281 block-specific IV in security-parameters, and the combination of 2282 original-block-ciphertext and authentication tag, stored as an 2283 "encapsulated block" item in security-result. 2285 5. Key Management 2287 Key management in delay tolerant networks is recognized as a 2288 difficult topic and is one that this specification does not attempt 2289 to solve. However, solely in order to support implementation and 2290 testing, implementations SHOULD support: 2292 - The use of well-known RSA public keys for all ciphersuites. 2294 - Long-term pre-shared-symmetric keys for the BAB-HMAC 2295 ciphersuite. 2297 Since endpoint IDs are URIs and URIs can be placed in X.509 [RFC3280] 2298 public key certificates (in the subjectAltName extension) 2299 implementations SHOULD support this way of distributing public keys. 2300 RFC 5280 does not insist that implementations include revocation 2301 checking. In the context of a DTN, it is reasonably likely that some 2302 nodes would not be able to use revocation checking services (either 2303 CRLs or OCSP) and deployments SHOULD take this into account when 2304 planning any public key infrastructure to support this specification. 2306 6. Default Security Policy 2308 Every node serves as a Policy Enforcement Point insofar as it 2309 enforces some policy that controls the forwarding and delivery of 2310 bundles via one or more convergence layer protocol implementation. 2311 Consequently, every node SHALL have and operate according to its own 2312 configurable security policy, whether the policy be explicit or 2313 default. The policy SHALL specify: 2315 Under what conditions received bundles SHALL be forwarded. 2317 Under what conditions received bundles SHALL be required to 2318 include valid BABs. 2320 Under what conditions the authentication information provided in a 2321 bundle's BAB SHALL be deemed adequate to authenticate the bundle. 2323 Under what conditions received bundles SHALL be required to have 2324 valid PIBs and/or PCBs. 2326 Under what conditions the authentication information provided in a 2327 bundle's PIB SHALL be deemed adequate to authenticate the bundle. 2329 Under what conditions a BAB SHALL be added to a received bundle 2330 before that bundle is forwarded. 2332 Under what conditions a PIB SHALL be added to a received bundle 2333 before that bundle is forwarded. 2335 Under what conditions a PCB SHALL be added to a received bundle 2336 before that bundle is forwarded. 2338 Under what conditions an ESB SHALL be applied to one or more 2339 blocks in a received bundle before that bundle is forwarded. 2341 The actions that SHALL be taken in the event that a received 2342 bundle does not meet the receiving node's security policy 2343 criteria. 2345 This specification does not address how security policies get 2346 distributed to nodes. It only REQUIRES that nodes have and enforce 2347 security policies. 2349 If no security policy is specified at a given node, or if a security 2350 policy is only partially specified, that node's default policy 2351 regarding unspecified criteria SHALL consist of the following: 2353 Bundles that are not well-formed do not meet the security policy 2354 criteria. 2356 The mandatory ciphersuites MUST be used. 2358 All bundles received MUST have a BAB which MUST be verified to 2359 contain a valid security result. If the bundle does not have a 2360 BAB, then the bundle MUST be discarded and processed no further; a 2361 bundle status report indicating the authentication failure MAY be 2362 generated. 2364 No received bundles SHALL be required to have a PIB; if a received 2365 bundle does have a PIB, however, the PIB can be ignored unless the 2366 receiving node is the PIB-dest, in which case the PIB MUST be 2367 verified. 2369 No received bundles SHALL be required to have a PCB; if a received 2370 bundle does have a PCB, however, the PCB can be ignored unless the 2371 receiving node is the PCB-dest, in which case the PCB MUST be 2372 processed. If processing of a PCB yields a PIB, that PIB SHALL be 2373 processed by the node according to the node's security policy. 2375 A PIB SHALL NOT be added to a bundle before sourcing or forwarding 2376 it. 2378 A PCB SHALL NOT be added to a bundle before sourcing or forwarding 2379 it. 2381 A BAB MUST always be added to a bundle before that bundle is 2382 forwarded. 2384 If a destination node receives a bundle that has a PIB-dest but 2385 the value in that PIB-dest is not the EID of the destination node, 2386 the bundle SHALL be delivered at that destination node. 2388 If a destination node receives a bundle that has an ESB-dest but 2389 the value in that ESB-dest is not the EID of the destination node, 2390 the bundle SHALL be delivered at that destination node. 2392 If a received bundle does not satisfy the node's security policy 2393 for any reason, then the bundle MUST be discarded and processed no 2394 further; in this case, a bundle deletion status report (see the 2395 Bundle Protocol [DTNBP]) indicating the failure MAY be generated. 2397 7. Security Considerations 2399 If a BAB ciphersuite uses digital signatures but doesn't include the 2400 security destination (which for a BAB is the next host), then this 2401 allows the bundle to be sent to some node other than the intended 2402 adjacent node. Because the BAB will still authenticate, the 2403 receiving node might erroneously accept and forward the bundle. When 2404 asymmetric BAB ciphersuites are used, the security destination field 2405 SHOULD therefore be included in the BAB. 2407 If a bundle's PIB-dest is not the same as its destination, then some 2408 node other than the destination (the node identified as the PIB-dest) 2409 is expected to validate the PIB security result while the bundle is 2410 en route. However, if for some reason the PIB is not validated, 2411 there is no way for the destination to become aware of this. 2412 Typically, a PIB-dest will remove the PIB from the bundle after 2413 verifying the PIB and before forwarding it. However, if there is a 2414 possibility that the PIB will also be verified at a downstream node, 2415 the PIB-dest will leave the PIB in the bundle. Therefore, if a 2416 destination receives a bundle with a PIB that has a PIB-dest (which 2417 isn't the destination), this might, but does not necessarily, 2418 indicate a possible problem. 2420 If a bundle is fragmented after being forwarded by its PIB-source but 2421 before being received by its PIB-dest, the payload in the bundle MUST 2422 be reassembled before validating the PIB security result in order for 2423 the security result to validate correctly. Therefore, if the PIB- 2424 dest is not capable of performing payload reassembly, its utility as 2425 a PIB-dest will be limited to validating only those bundles that have 2426 not been fragmented since being forwarded from the PIB-source. 2427 Similarly, if a bundle is fragmented after being forwarded by its 2428 PIB-source but before being received by its PIB-dest, all fragments 2429 MUST be received at that PIB-dest in order for the bundle payload to 2430 be able to be reassembled. If not all fragments are received at the 2431 PIB-dest node, the bundle will not be able to be authenticated, and 2432 will therefore never be forwarded by this PIB-dest node. 2434 Specification of a security-destination other than the bundle 2435 destination creates a routing requirement that the bundle somehow be 2436 directed to the security-destination node on its way to the final 2437 destination. This requirement is presently private to the 2438 ciphersuite, since routing nodes are not required to implement 2439 security processing. 2441 If a security target were to generate reports in the event that some 2442 security validation step fails, then that might leak information 2443 about the internal structure or policies of the DTN containing the 2444 security target. This is sometimes considered bad security practice 2445 so SHOULD only be done with care. 2447 8. Conformance 2449 As indicated above, this document describes both BSP and 2450 ciphersuites. A conformant implementation MUST implement both BSP 2451 support and the four ciphersuites described in Section 4. It MAY 2452 also support other ciphersuites. 2454 Implementations that support BSP but not all four mandatory 2455 ciphersuites MUST claim only "restricted compliance" with this 2456 specification, even if they provide other ciphersuites. 2458 All implementations are strongly RECOMMENDED to provide at least a 2459 BAB ciphersuite. A relay node, for example, might not deal with end- 2460 to-end confidentiality and data integrity but it SHOULD exclude 2461 unauthorized traffic and perform hop-by-hop bundle verification. 2463 9. IANA Considerations 2465 This protocol has fields requiring registries managed by IANA. 2467 9.1. Bundle Block Types 2469 This specification allocates four codepoints from the existing Bundle 2470 Block Type Codes registry defined in 2471 [I-D.irtf-dtnrg-iana-bp-registries]. 2473 Additional Entries for the Bundle Block Type Codes Registry: 2474 +-------+----------------------------------------+----------------+ 2475 | Value | Description | Reference | 2476 +-------+----------------------------------------+----------------+ 2477 | 2 | Bundle Authentication Block | This document | 2478 | 3 | Payload Integrity Block | This document | 2479 | 4 | Payload Confidentiality Block | This document | 2480 | 9 | Extension Security Block | This document | 2481 +-------+----------------------------------------+----------------+ 2483 9.2. Ciphersuite Numbers 2485 This Protocol has a ciphersuite number field and certain ciphersuites 2486 are defined. An IANA registry shall be set up as follows. 2488 The registration policy for this registry is: Specification Required 2490 The Value range is: Variable Length 2492 Ciphersuite Numbers Registry: 2493 +-------+----------------------------------------+----------------+ 2494 | Value | Description | Reference | 2495 +-------+----------------------------------------+----------------+ 2496 | 0 | unassigned | This document | 2497 | 1 | BAB-HMAC | This document | 2498 | 2 | PIB-RSA-SHA256 | This document | 2499 | 3 | PCB-RSA-AES128-PAYLOAD-PIB-PCB | This document | 2500 | 4 | ESB-RSA-AES128-EXT | This document | 2501 | >4 | Reserved | This document | 2502 +-------+----------------------------------------+----------------+ 2504 9.3. Ciphersuite Flags 2506 This Protocol has a ciphersuite flags field and certain flags are 2507 defined. An IANA registry shall be set up as follows. 2509 The registration policy for this registry is: Specification Required 2511 The Value range is: Variable Length 2513 Ciphersuite Flags Registry: 2514 +-----------------+------------------------------+----------------+ 2515 | Bit Position | Description | Reference | 2516 | (right to left) | | | 2517 +-----------------+------------------------------+----------------+ 2518 | 0 | Block contains result | This document | 2519 | 1 | Block contains correlator | This document | 2520 | 2 | Block contains parameters | This document | 2521 | 3 | Destination EIDref present | This document | 2522 | 4 | Source EIDref present | This document | 2523 | all others | Reserved | This document | 2524 +-----------------+------------------------------+----------------+ 2526 9.4. Parameters and Results 2528 This Protocol has fields for ciphersuite parameters and results. The 2529 field is a type-length-value triple and a registry is required for 2530 the "type" sub-field. The values for "type" apply to both the 2531 ciphersuite parameters and the ciphersuite results fields. Certain 2532 values are defined. An IANA registry shall be set up as follows. 2534 The registration policy for this registry is: Specification Required 2536 The Value range is: 8-bit unsigned integer 2537 Ciphersuite Parameters and Results Type Registry: 2538 +---------+--------------------------------------+----------------+ 2539 | Value | Description | Reference | 2540 +---------+--------------------------------------+----------------+ 2541 | 0 | reserved | This document | 2542 | 1 | initialization vector (IV) | This document | 2543 | 2 | reserved | This document | 2544 | 3 | key-information | This document | 2545 | 4 | fragment range (pair of SDNVs) | This document | 2546 | 5 | integrity signature | This document | 2547 | 6 | unassigned | This document | 2548 | 7 | salt | This document | 2549 | 8 | PCB integrity check value (ICV) | This document | 2550 | 9 | reserved | This document | 2551 | 10 | encapsulated block | This document | 2552 | 11 | block type of encapsulated block | This document | 2553 | 12-191 | reserved | This document | 2554 | 192-250 | private use | This document | 2555 | 251-255 | reserved | This document | 2556 +-------+----------------------------------------+----------------+ 2558 10. References 2560 10.1. Normative References 2562 [DTNBP] Scott, K. and S. Burleigh, "Bundle Protocol 2563 Specification", RFC 5050, November 2007. 2565 [DTNMD] Symington, S., "Delay-Tolerant Networking Metadata 2566 Extension Block", 2567 draft-irtf-dtnrg-bundle-metadata-block-00.txt , June 2007. 2569 [I-D.irtf-dtnrg-iana-bp-registries] 2570 Blanchet, M., "Delay-Tolerant Networks (DTN) Bundle 2571 Protocol IANA Registries", draft-irtf-dtnrg-iana-bp- 2572 registries-00.txt, work-in-progress, April 2010. 2574 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2575 Hashing for Message Authentication", RFC 2104, 2576 February 1997. 2578 [RFC2119] Bradner, S. and J. Reynolds, "Key words for use in RFCs to 2579 Indicate Requirement Levels", RFC 2119, October 1997. 2581 [RFC3280] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet 2582 X.509 Public Key Infrastructure Certificate and 2583 Certificate Revocation List (CRL) Profile", RFC 3280, 2584 April 2002. 2586 [RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) 2587 Algorithms", RFC 3370, August 2002. 2589 [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional 2590 Algorithms and Identifiers for RSA Cryptography for use in 2591 the Internet X.509 Public Key Infrastructure Certificate 2592 and Certificate Revocation List (CRL) Profile", RFC 4055, 2593 June 2005. 2595 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 2596 (GCM) in IPsec Encapsulating Security Payload (ESP)", 2597 RFC 4106, June 2005. 2599 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", 2600 RFC 5652, July 2004. 2602 10.2. Informative References 2604 [DTNRB] Symington, S., "Delay-Tolerant Network Retransmission 2605 Block", 2606 draft-irtf-dtnrg-bundle-retrans-00.txt, work-in-progress, 2607 April 2007. 2609 [DTNarch] Cerf, V., Burleigh, S., Durst, R., Fall, K., Hooke, A., 2610 Scott, K., Torgerson, L., and H. Weiss, "Delay-Tolerant 2611 Network Architecture", RFC 4838, April 2007. 2613 [PHIB] Symington, S., "Delay-Tolerant Networking Previous Hop 2614 Insertion Block", draft-irtf-dtnrg-bundle-previous-hop- 2615 block-11.txt, work-in-progress, February 2010. 2617 [RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated 2618 Encryption in the Cryptographic Message Syntax (CMS)", 2619 RFC 5084, November 2007. 2621 Authors' Addresses 2623 Susan Flynn Symington 2624 The MITRE Corporation 2625 7515 Colshire Drive 2626 McLean, VA 22102 2627 US 2629 Phone: +1 (703) 983-7209 2630 Email: susan@mitre.org 2631 URI: http://mitre.org/ 2633 Stephen Farrell 2634 Trinity College Dublin 2635 Distributed Systems Group 2636 Department of Computer Science 2637 Trinity College 2638 Dublin 2 2639 Ireland 2641 Phone: +353-1-608-1539 2642 Email: stephen.farrell@cs.tcd.ie 2644 Howard Weiss 2645 SPARTA, Inc. 2646 7110 Samuel Morse Drive 2647 Columbia, MD 21046 2648 US 2650 Phone: +1-443-430-8089 2651 Email: howard.weiss@sparta.com 2653 Peter Lovell 2654 SPARTA, Inc. 2655 7110 Samuel Morse Drive 2656 Columbia, MD 21046 2657 US 2659 Phone: +1-443-430-8052 2660 Email: dtnbsp@gmail.com