idnits 2.17.1 draft-irtf-dtnrg-bundle-security-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See https://trustee.ietf.org/license-info/) 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 (November 19, 2009) is 5269 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 2450, but no explicit reference was found in the text == Unused Reference: 'RFC4106' is defined on line 2459, 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') ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 3280 (Obsoleted by RFC 5280) ** Obsolete normative reference: RFC 3852 (ref. 'RFC5652') (Obsoleted by RFC 5652) -- No information found for draft-irtf-dtnrg-bundle-retrans - is the name correct? Summary: 6 errors (**), 0 flaws (~~), 6 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: May 23, 2010 S. Farrell 5 Trinity College Dublin 6 H. Weiss 7 P. Lovell 8 SPARTA, Inc. 9 November 19, 2009 11 Bundle Security Protocol Specification 12 draft-irtf-dtnrg-bundle-security-11 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 Status of this Memo 25 This Internet-Draft is submitted to IETF in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/ietf/1id-abstracts.txt. 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html. 44 This Internet-Draft will expire on May 23, 2010. 46 Copyright Notice 48 Copyright (c) 2009 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the BSD License. 61 This document may contain material from IETF Documents or IETF 62 Contributions published or made publicly available before November 63 10, 2008. The person(s) controlling the copyright in some of this 64 material may not have granted the IETF Trust the right to allow 65 modifications of such material outside the IETF Standards Process. 66 Without obtaining an adequate license from the person(s) controlling 67 the copyright in such materials, this document may not be modified 68 outside the IETF Standards Process, and derivative works of it may 69 not be created outside the IETF Standards Process, except to format 70 it for publication as an RFC or to translate it into languages other 71 than English. 73 Table of Contents 75 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 76 1.1. Related Documents . . . . . . . . . . . . . . . . . . . . 4 77 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 78 2. Security Blocks . . . . . . . . . . . . . . . . . . . . . . . 7 79 2.1. Abstract Security Block . . . . . . . . . . . . . . . . . 8 80 2.2. Bundle Authentication Block . . . . . . . . . . . . . . . 12 81 2.3. Payload Integrity Block . . . . . . . . . . . . . . . . . 13 82 2.4. Payload Confidentiality Block . . . . . . . . . . . . . . 15 83 2.5. Extension Security Block . . . . . . . . . . . . . . . . . 19 84 2.6. Parameters and Result Fields . . . . . . . . . . . . . . . 20 85 2.7. Key Transport . . . . . . . . . . . . . . . . . . . . . . 22 86 2.8. PIB and PCB combinations . . . . . . . . . . . . . . . . . 23 87 3. Security Processing . . . . . . . . . . . . . . . . . . . . . 25 88 3.1. Nodes as policy enforcement points . . . . . . . . . . . . 25 89 3.2. Processing order of security blocks . . . . . . . . . . . 25 90 3.3. Security Regions . . . . . . . . . . . . . . . . . . . . . 28 91 3.4. Canonicalisation of bundles . . . . . . . . . . . . . . . 30 92 3.5. Endpoint ID confidentiality . . . . . . . . . . . . . . . 36 93 3.6. Bundles received from other nodes . . . . . . . . . . . . 36 94 3.7. The At-Most-Once-Delivery Option . . . . . . . . . . . . . 38 95 3.8. Bundle Fragmentation and Reassembly . . . . . . . . . . . 39 96 3.9. Reactive fragmentation . . . . . . . . . . . . . . . . . . 40 97 4. Mandatory Ciphersuites . . . . . . . . . . . . . . . . . . . . 41 98 4.1. BAB-HMAC . . . . . . . . . . . . . . . . . . . . . . . . . 41 99 4.2. PIB-RSA-SHA256 . . . . . . . . . . . . . . . . . . . . . . 42 100 4.3. PCB-RSA-AES128-PAYLOAD-PIB-PCB . . . . . . . . . . . . . . 43 101 4.4. ESB-RSA-AES128-EXT . . . . . . . . . . . . . . . . . . . . 47 102 5. Key Management . . . . . . . . . . . . . . . . . . . . . . . . 50 103 6. Default Security Policy . . . . . . . . . . . . . . . . . . . 51 104 7. Security Considerations . . . . . . . . . . . . . . . . . . . 53 105 8. Conformance . . . . . . . . . . . . . . . . . . . . . . . . . 54 106 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 55 107 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 56 108 10.1. Normative References . . . . . . . . . . . . . . . . . . . 56 109 10.2. Informative References . . . . . . . . . . . . . . . . . . 56 110 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 58 112 1. Introduction 114 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 115 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 116 document are to be interpreted as described in [RFC2119]. 118 This document defines security features for the bundle protocol 119 [DTNBP] intended for use in delay tolerant networks, in order to 120 provide DTN security services. 122 The bundle protocol is used in DTNs which overlay multiple networks, 123 some of which may be challenged by limitations such as intermittent 124 and possibly unpredictable loss of connectivity, long or variable 125 delay, asymmetric data rates, and high error rates. The purpose of 126 the bundle protocol is to support interoperability across such 127 stressed networks. The bundle protocol is layered on top of 128 underlay-network-specific convergence layers, on top of network- 129 specific lower layers, to enable an application in one network to 130 communicate with an application in another network, both of which are 131 spanned by the DTN. 133 Security will be important for the bundle protocol. The stressed 134 environment of the underlying networks over which the bundle protocol 135 will operate makes it important for the DTN to be protected from 136 unauthorized use, and this stressed environment poses unique 137 challenges for the mechanisms needed to secure the bundle protocol. 138 Furthermore, DTNs may very likely be deployed in environments where a 139 portion of the network might become compromised, posing the usual 140 security challenges related to confidentiality, integrity and 141 availability. 143 Different security processing applies to the payload and extension 144 blocks that may accompany it in a bundle, and different rules apply 145 to various extension blocks. 147 This document describes both the base Bundle Security Protocol (BSP) 148 and a set of mandatory ciphersuites. A ciphersuite is a specific 149 collection of various cryptographic algorithms and implementation 150 rules that are used together to provide certain security services. 152 The Bundle Security Protocol applies, by definition, only to those 153 nodes that implement it, known as "security-aware" nodes. There MAY 154 be other nodes in the DTN that do not implement BSP. All nodes can 155 interoperate with the exception that BSP security operations can only 156 happen at security-aware nodes. 158 1.1. Related Documents 160 This document is best read and understood within the context of the 161 following other DTN documents: 163 The Delay-Tolerant Network Architecture [DTNarch] defines the 164 architecture for delay-tolerant networks, but does not discuss 165 security at any length. 167 The DTN Bundle Protocol [DTNBP] defines the format and processing 168 of the blocks used to implement the bundle protocol, excluding the 169 security-specific blocks defined here. 171 1.2. Terminology 173 We introduce the following terminology for purposes of clarity: 175 source - the bundle node from which a bundle originates 177 destination - the bundle node to which a bundle is ultimately 178 destined 180 forwarder - the bundle node that forwarded the bundle on its most 181 recent hop 183 intermediate receiver or "next hop" - the neighboring bundle node 184 to which a forwarder forwards a bundle. 186 path - the ordered sequence of nodes through which a bundle passes 187 on its way from source to destination 189 In the figure below, which is adapted from figure 1 in the Bundle 190 Protocol Specification, four bundle nodes (denoted BN1, BN2, BN3, and 191 BN4) reside above some transport layer(s). Three distinct transport 192 and network protocols (denoted T1/N1, T2/N2, and T3/N3) are also 193 shown. 195 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 196 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 197 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 198 | T1 v | + ^ T1/T2 v | + ^ T2/T3 v | | ^ T3 | 199 +---------v-+ +-^---------v-+ +-^---------v + +-^---------+ 200 | N1 v | | ^ N1/N2 v | | ^ N2/N3 v | | ^ N3 | 201 +---------v-+ +-^---------v + +-^---------v-+ +-^---------+ 202 | >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ | 203 +-----------+ +------------+ +-------------+ +-----------+ 204 | | | | 205 |<-- An Internet --->| |<--- An Internet --->| 206 | | | | 208 BN = "Bundle Node" (as defined in the Bundle Protocol Specification 210 Bundle Nodes Sit at the Application layer of the Internet Model. 212 Figure 1 214 Bundle node BN1 originates a bundle that it forwards to BN2. BN2 215 forwards the bundle to BN3, and BN3 forwards the bundle to BN4. BN1 216 is the source of the bundle and BN4 is the destination of the bundle. 217 BN1 is the first forwarder, and BN2 is the first intermediate 218 receiver; BN2 then becomes the forwarder, and BN3 the intermediate 219 receiver; BN3 then becomes the last forwarder, and BN4 the last 220 intermediate receiver, as well as the destination. 222 If node BN2 originates a bundle (for example, a bundle status report 223 or a custodial signal), which is then forwarded on to BN3, and then 224 to BN4, then BN2 is the source of the bundle (as well as being the 225 first forwarder of the bundle) and BN4 is the destination of the 226 bundle (as well as being the final intermediate receiver). 228 We introduce the following security-specific DTN terminology: 230 security-source - a bundle node that adds a security block to a 231 bundle 233 security-destination - a bundle node that processes a security 234 block of a bundle 236 security path - the ordered sequence of security-aware nodes 237 theough which a bundle passes on its way from the security-source 238 to the security-destination 240 Referring to Figure 1 again: 242 If the bundle that originates at BN1 as source is given a security 243 block by BN1, then BN1 is the security-source of this bundle with 244 respect to that security block, as well as being the source of the 245 bundle. 247 If the bundle that originates at BN1 as source is given a security 248 block by BN2, then BN2 is the security-source of this bundle with 249 respect to that security block, even though BN1 is the source. 251 If the bundle that originates at BN1 as source is given a security 252 block by BN1 that is intended to be processed by BN3, then BN1 is the 253 security-source and BN3 is the security destination with respect to 254 this security block. The security path for this block is BN1 to BN3. 256 A bundle MAY have multiple security blocks. The security-source of a 257 bundle with respect to a given security block in the bundle MAY be 258 the same as or different from the security-source of the bundle with 259 respect to a different security block in the bundle. Similarly, the 260 security-destination of a bundle with respect to each of that 261 bundle's security blocks MAY be the same or different. Therefore the 262 security paths for various blocks MAY be and often will be different. 264 If the bundle that originates at BN1 as source is given a security 265 block by BN1 that is intended to be processed by BN3, and BN2 adds a 266 security block with security-destination BN4, the security paths for 267 the two blocks overlap but not completely. This problem is discussed 268 further in Section 3.3. 270 As required in [DTNBP], forwarding nodes MUST transmit blocks in a 271 bundle in the same order in which they were received. This 272 requirement applies to all dtn nodes, not just ones which implement 273 security processing. Blocks in a bundle MAY be added or deleted 274 according to the applicable specification, but those blocks which are 275 both received and transmitted MUST be transmitted in the same order 276 that they were received. 278 If a node is not security-aware then it forwards the security blocks 279 unchanged in the bundle. The non-security-aware nodes are 280 transparent relay points and are invisible as far as security 281 processing is concerned. 283 The block sequence also indicates the order in which certain 284 significant actions have affected the bundle, and therefore the 285 sequence in which actions MUST occur in order to produce the bundle 286 at its destination. 288 2. Security Blocks 290 There are four types of security block that MAY be included in a 291 bundle. These are the Bundle Authentication Block (BAB), the Payload 292 Integrity Block (PIB), the Payload Confidentiality Block (PCB) and 293 the Extension Security Block (ESB). 295 The BAB is used to assure the authenticity and integrity of the 296 bundle along a single hop from forwarder to intermediate receiver. 297 This is actually from a security-aware forwarder to the next 298 security-aware intermediate receiver and could be more than one 299 actual hop. 301 The PIB is used to assure the authenticity and integrity of the 302 payload from the PIB security-source, which creates the PIB, to 303 the PIB security-destination, which verifies the PIB 304 authenticator. The authentication information in the PIB MAY (if 305 the ciphersuite allows) be verified by any node in between the PIB 306 security-source and the PIB security-destination that has access 307 to the cryptographic keys and revocation status information 308 required to do so. 310 Since a BAB protects a bundle on a "hop-by-hop" basis and other 311 security blocks MAY be protecting over several hops or end-to-end, 312 whenever both are present the BAB MUST form the "outer" layer of 313 protection - that is, the BAB MUST always be calculated and added 314 to the bundle after all other security bloacks have been 315 calculated and added to the bundle. 317 The PCB indicates that the payload has been encrypted, in whole or 318 in part, at the PCB security-source in order to protect the bundle 319 content while in transit to the PCB security-destination. 321 PIB and PCB protect the payload and are regarded as "payload- 322 related" for purposes of the security discussion in this document. 323 Other blocks are regarded as "non-payload" blocks. Of course, the 324 primary block is unique and has separate rules. 326 The ESB provides security for non-payload blocks in a bundle. ESB 327 therefore is not applied to PIB or PCBs, and of course is not 328 appropriate for either the payload block or primary block. 330 Each of the security blocks uses the Canonical Bundle Block Format as 331 defined in the Bundle Protocol Specification. That is, each security 332 block is comprised of the following elements: 334 - Block type code 336 - Block processing control flags 338 - Block EID reference list (optional) 340 - Block data length 342 - Block-type-specific data fields 344 Since the four security blocks have most fields in common, we can 345 shorten the description of the Block-type-specific data fields of 346 each security block if we first define an abstract security block 347 (ASB) and then specify each of the real blocks in terms of the fields 348 which are present/absent in an ASB. Note that no bundle ever 349 contains an actual ASB, which is simply a specification artifact. 351 2.1. Abstract Security Block 353 An ASB consists of the following mandatory and optional fields: 355 - Block-type code (one byte) - as in all bundle protocol blocks 356 except the primary bundle block. The block types codes for the 357 security blocks are: 359 BundleAuthenticationBlock - BAB: 0x02 361 PayloadIntegrityBlock - PIB: 0x03 363 PayloadConfidentialityBlock - PCB: 0x04 365 ExtensionSecurityBlock - ESB: 0x09 367 - Block processing control flags (SDNV) - defined as in all bundle 368 protocol blocks except the primary bundle block (as described in 369 the Bundle Protocol [DTNBP]). SDNV encoding is described in the 370 bundle protocol. There are no general constraints on the use of 371 the block processing flags, and some specific requirements are 372 discussed later. 374 - EID references - composite field defined in [DTNBP] containing 375 references to one or two EIDs. Presence of the EID-reference 376 field is indicated by the setting of the "block contains an EID- 377 reference field" (EID_REF) bit of the block processing control 378 flags. If one or more references is present, flags in the 379 ciphersuite ID field, described below, specify which. 381 If no EID fields are present then the composite field itself is 382 omitted entirely, rather than containing a count field of zero, 383 since such a representation is not permitted. The EID_REF bit is 384 not set. 386 The possible EIDs are:- 388 - (optional) Security-source - specifies the security source 389 for the block. If this is omitted, then the source of the 390 bundle is assumed to be the security-source. 392 - (optional) Security-destination - specifies the security 393 destination for the block. If this is omitted, then the 394 destination of the bundle is assumed to be the security- 395 destination. 397 If two EIDs are present, security-source is first and security- 398 destination comes second. 400 - Block data length (SDNV) - as in all bundle protocol blocks 401 except the primary bundle block. SDNV encoding is described in 402 the bundle protocol. 404 - Block-type-specific data fields as follows: 406 - Ciphersuite ID (SDNV) 408 - Ciphersuite flags (SDNV) 410 - (optional) Correlator - when more than one related block is 411 inserted then this field MUST have the same value in each 412 related block instance. This is encoded as an SDNV. See note 413 in Section 3.8 with regard to correlator values in bundle 414 fragments. 416 - (optional) Ciphersuite parameters - compound field of next 417 two items 419 - Ciphersuite parameters length - specifies the length of 420 the following Ciphersuite parameters data field and is 421 encoded as an SDNV. 423 - Ciphersuite parameters data - parameters to be used with 424 the ciphersuite in use, e.g. a key identifier or 425 initialization vector (IV). See Section 2.6 for a list of 426 potential parameters and their encoding rules. The 427 particular set of parameters that are included in this field 428 are defined as part of the ciphersuite specification. 430 - (optional) Security result - compound field of next two items 432 - Security result length - contains the length of the next 433 field and is encoded as an SDNV. 435 - Security result data - contains the results of the 436 appropriate ciphersuite-specific calculation (e.g. a 437 signature, MAC or ciphertext block key). 439 +----------------+----------------+----------------+----------------+ 440 | type | flags (SDNV) | EID ref list(comp) | 441 +----------------+----------------+----------------+----------------+ 442 | length (SDNV) | ciphersuite (SDNV) | 443 +----------------+----------------+----------------+----------------+ 444 | ciphersuite flags (SDNV) | correlator (SDNV) | 445 +----------------+----------------+----------------+----------------+ 446 |params len(SDNV)| ciphersuite params data | 447 +----------------+----------------+----------------+----------------+ 448 |res-len (SDNV) | security result data | 449 +----------------+----------------+----------------+----------------+ 451 The structure of an abstract security block 453 Figure 2 455 Some ciphersuites are specified in Section 4, which also specifies 456 the rules which MUST be satisfied by ciphersuite specifications. 457 Additional ciphersuites MAY be defined in separate specifications. 458 Ciphersuite IDs not specified are reserved. Implementations of the 459 bundle security protocol decide which ciphersuites to support, 460 subject to the requirements of Section 4. It is RECOMMENDED that 461 implementations that allow additional ciphersuites permit ciphersuite 462 ID values at least up to and including 127, and they MAY decline to 463 allow larger ID values. 465 The structure of the ciphersuite flags field is shown in Figure 3. 466 In each case the presence of an optional field is indicated by 467 setting the value of the corresponding flag to one. A value of zero 468 indicates the corresponding optional field is missing. Presently 469 there are five flags defined for the field and for convenience these 470 are shown as they would be extracted from a single-byte SDNV. Future 471 additions may cause the field to grow to the left so, as with the 472 flags fields defined in [DTNBP], the description below numbers the 473 bit positions from the right rather than the standard RFC definition 474 which numbers bits from the left. 476 src - bit 4 indicates whether the EID-reference field of the ASB 477 contains the optional reference to the security-source. 479 dest - bit 3 indicates whether the EID-reference field of the ASB 480 contains the optional reference to the security-destination. 482 parm - bit 2 indicates whether the ciphersuite-parameters-length 483 and ciphersuite parameters data fields are present or not. 485 corr - bit 1 indicates whether or not the ASB contains an optional 486 correlator. 488 res - bit 0 indicates whether or not the ASB contains the security 489 result length and security result data fields. 491 bits 5-6 are reserved for future use. 493 Ciphersuite flags 494 Bit Bit Bit Bit Bit Bit Bit 495 6 5 4 3 2 1 0 496 +-----+-----+-----+-----+-----+-----+-----+ 497 | reserved |src |dest |parm |corr |res | 498 +-----+-----+-----+-----+-----+-----+-----+ 500 Figure 3 502 A little bit more terminology: if the block is a PIB then when we 503 refer to the "PIB-source", we mean the security source for the PIB as 504 represented by the EID reference in the EID-references field. 505 Similarly we may refer to the PCB-dest, meaning the security- 506 destination of the PCB, again as represented by an EID reference. 507 For example, referring to Figure 1 again, if the bundle that 508 originates at BN1 as source is given a Confidentiality Block (PCB) by 509 BN1 that is protected using a key held by BN3 and it is given a 510 Payload Integrity Block (PIB) by BN1, then BN1 is both the PCB-source 511 and the PIB-source of the bundle, and BN3 is the PCB-dest of the 512 bundle. 514 The correlator field is used to associate several related instances 515 of a security block. This can be used to place a BAB that contains 516 the ciphersuite information at the "front" of a (probably large) 517 bundle, and another correlated BAB that contains the security result 518 at the "end" of the bundle. This allows even very memory-constrained 519 nodes to be able to process the bundle and verify the BAB. There are 520 similar use cases for multiple related instances of PIB and PCB as 521 will be seen below. 523 The ciphersuite specification MUST make it clear whether or not 524 multiple block instances are allowed, and if so, under what 525 conditions. Some ciphersuites can of course leave flexibility to the 526 implementation, whereas others might mandate a fixed number of 527 instances. 529 For convenience, we use the term "first block" to refer to the 530 initial block in a group of correlated blocks, or to the single block 531 if there are no others in the set. Obviously there can be several 532 unrelated groups in a bundle, each containing only one block or more 533 than one, and each has its own "first block". 535 2.2. Bundle Authentication Block 537 In this section we describe typical BAB field values for two 538 scenarios - where a single instance of the BAB contains all the 539 information and where two related instances are used, one "up front" 540 which contains the ciphersuite and another following the payload 541 which contains the security result (e.g. a MAC). 543 For the case where a single BAB is used: 545 The block-type code field value MUST be 0x02. 547 The block processing control flags value can be set to whatever 548 values are required by local policy. Ciphersuite designers should 549 carefully consider the effect of setting flags that either discard 550 the block or delete the bundle in the event that this block cannot 551 be processed. 553 The ciphersuite ID MUST be documented as a hop-by-hop 554 authentication-ciphersuite which requires one instance of the BAB. 556 The correlator field MUST NOT be present. 558 The ciphersuite parameters field MAY be present, if so specified 559 in the ciphersuite specification. 561 An EID reference to the security-source MAY be present and, if so, 562 it MUST identify the forwarder of the bundle. The security-source 563 can also be specified as part of key information described in 564 Section 2.6 or another block such as the Previous Hop Insertion 565 Block. The security-source might also be inferred from some 566 implementation-specific means such as the convergence layer. 568 An EID reference to the security-destination MAY be present and is 569 useful to ensure that the bundle has been forwarded to the correct 570 next-hop node. 572 The security result MUST be present as it is effectively the 573 "output" from the ciphersuite calculation (e.g. the MAC or 574 signature) applied to the (relevant parts of) the bundle (as 575 specified in the ciphersuite definition). 577 For the case using two related BAB instances, the first instance is 578 as defined above, except the ciphersuite ID MUST be documented as a 579 hop-by-hop authentication ciphersuite that requires two instances of 580 the BAB. In addition, the correlator MUST be present and the 581 security result length and security result fields MUST be absent. 582 The second instance of the BAB MUST have the same correlator value 583 present and MUST contain security result length and security result 584 data fields. The other optional fields MUST NOT be present. 585 Typically, this second instance of a BAB will be the last block of 586 the bundle. 588 The details of key transport for BAB are specified by the particular 589 ciphersuite. In the absence of conflicting requirements, the 590 following should be noted by implementors: 592 the key information item Section 2.6 is optional, and if not 593 provided then the key should be inferred from the source- 594 destination tuple, being the previous key used, a key created from 595 a key-derivation function, or a pre-shared key 597 since BAB is for a single hop, by definition, the capabilities of 598 the underlying convergence layer might be useful for key transport 600 depending upon the key mechanism used, bundles can be signed by 601 the sender, or authenticated for one or more recipients, or both. 603 2.3. Payload Integrity Block 605 A PIB is an ASB with the following additional restrictions: 607 The block type code value MUST be 0x03. 609 The block processing control flags value can be set to whatever 610 values are required by local policy. Ciphersuite designers should 611 carefully consider the effect of setting flags that either discard 612 the block or delete the bundle in the event that this block cannot 613 be processed. 615 The ciphersuite ID MUST be documented as an end-to-end 616 authentication-ciphersuite or as an end-to-end error-detection- 617 ciphersuite. 619 The correlator MUST be present if the ciphersuite requires more 620 than one related instance of a PIB be present in the bundle. The 621 correlator MUST NOT be present if the ciphersuite only requires 622 one instance of the PIB in the bundle. 624 The ciphersuite parameters field MAY be present. 626 An EID reference to the security-source MAY be present. 628 An EID reference to the security-destination MAY be present. 630 The security result is effectively the "output" from the 631 ciphersuite calculation (e.g. the MAC or signature) applied to the 632 (relevant parts of) the bundle. As in the case of the BAB, this 633 field MUST be present if the correlator is absent. If more than 634 one related instance of the PIB is required then this is handled 635 in the same way as described for the BAB above. 637 The ciphersuite MAY process less than the entire original bundle 638 payload, either because the current payload is a fragment of the 639 original bundle or just becuase it is defined to process some 640 subset. For whatever reason, if the ciphersuite processes less 641 than the complete, original bundle payload, the ciphersuite 642 parameters of this block MUST specify which bytes of the bundle 643 payload are protected. 645 For some ciphersuites, (e.g. those using asymmetric keying to produce 646 signatures or those using symmetric keying with a group key), the 647 security information can be checked at any hop on the way to the 648 security destination that has access to the required keying 649 information. This possibility is further discussed in Section 3.6 650 below. 652 The use of a generally-available key is RECOMMENDED if custodial 653 transfer is employed and all nodes SHOULD verify the bundle before 654 accepting custody. 656 Most asymmetric PIB-ciphersuites will use the PIB-source to indicate 657 the signer and will not require the PIB-dest field because the key 658 needed to verify the PIB authenticator will be a public key 659 associated with the PIB-source. 661 2.4. Payload Confidentiality Block 663 A typical confidentiality ciphersuite will encrypt the payload using 664 a randomly generated bundle encrypting key (BEK) and will use a key 665 information item in the PCB security parameters to carry the BEK 666 encrypted with some long term key encryption key (KEK) or well-known 667 public key. If neither the destination nor security-destination 668 resolves the key to use for decryption, the key information item in 669 the ciphersuite parameters field can also be used to indicate the 670 decryption key with which the BEK can be recovered. If the bundle 671 already contains PIBs and/or PCBs these SHOULD also be encrypted 672 using this same BEK, as described just below for "super-encryption". 674 It is strongly RECOMMENDED that a data integrity mechanism be used in 675 conjunction with confidentiality, and that encryption-only 676 ciphersuites NOT be used. AES-GCM satisfies this requirement. The 677 "authentication tag" or "integrity check value" is stored into 678 security-result rather than being appended to the payload as is 679 common in some protocols since, as described below, it is important 680 that there be no change in the size of the payload. 682 The payload is encrypted "in-place", that is, following encryption, 683 the payload block payload field contains ciphertext, not plaintext. 684 The payload block processing flags are unmodified. 686 The "in-place" encryption of payload bytes is to allow bundle payload 687 fragmentation and re-assembly, and custody transfer, to operate 688 without knowledge of whether or not encryption has occurred and, if 689 so, how many times. 691 Fragmentation and reassembly and custody transfer are adversely 692 affected by a change in size of the payload due to ambiguity about 693 what byte range of the original payload is actually in any particular 694 fragment. Ciphersuites SHOULD place any payload expansion, such as 695 authentication tags (integrity check values) and any padding 696 generated by a block-mode cipher, into an "integrity check value" 697 item in the security-result field (see Section 2.6) of the 698 confidentiality block. 700 Payload super-encryption is allowed; that is, encrypting a payload 701 that has already been encrypted, perhaps more than once. 702 Ciphersuites SHOULD define super-encryption such that, as well as re- 703 encrypting the payload, it also protects the parameters of earlier 704 encryption. Failure to do do may represent a vulnerability in some 705 circumstances. 707 Confidentiality is normally applied to the payload, and possibly to 708 additional blocks. It is RECOMMENDED to apply a Payload 709 Confidentiality ciphersuite to non-payload blocks only if these 710 should be super-encrypted with the payload. If super-encryption of 711 the block is not desired then protection of the block should be done 712 using the Extension Security Block mechanism rather than PCB. 714 Multiple related PCB instances are required if both the payload and 715 PIBs and PCBs in the bundle are to be encrypted. These multiple PCB 716 instances require correlators to associate them with each other since 717 the key information is provided only in the first PCB. 719 There are situations where more than one PCB instance is required but 720 the instances are not "related" in the sense which requires 721 correlators. One example is where a payload is encrypted for more 722 than one security-destination so as to be robust in the face of 723 routing uncertainties. In this scenario the payload is encrypted 724 using a BEK. Several PCBs contain the BEK encrypted using different 725 KEKs, one for each destination. These multiple PCB instances, are 726 not "related" and should not contain correlators. 728 The ciphersuite MAY apply different rules to confidentiality for non- 729 payload blocks. 731 A PCB is an ASB with the following additional restrictions: 733 The block type code value MUST be 0x04. 735 The block processing control flags value can be set to whatever 736 values are required by local policy, except that a PCB "first 737 block" MUST have the "replicate in every fragment" flag set. This 738 flag SHOULD NOT be set otherwise. Ciphersuite designers should 739 carefully consider the effect of setting flags that either discard 740 the block or delete the bundle in the event that this block cannot 741 be processed. 743 The ciphersuite ID MUST be documented as a confidentiality- 744 ciphersuite. 746 The correlator MUST be present if there is more than one related 747 PCB instance. The correlator MUST NOT be present if there are no 748 related PCB instances. 750 If a correlator is present, the key information MUST be placed in 751 the PCB "first block". 753 Any additional bytes generated as a result of encryption and/or 754 authentication processing of the payload SHOULD be placed in an 755 "integrity check value" field (see Section 2.6) in the security- 756 result of the first PCB. 758 The ciphersuite parameters field MAY be present. 760 An EID reference to the security-source MAY be present. 762 An EID reference to the security-destination MAY be present. 764 The security result MAY be present and normally contains fields 765 such as an encrypted bundle encryption key, authentication tag or 766 the encrypted versions of bundle blocks other than the payload 767 block. 769 As was the case for the BAB and PIB, if the ciphersuite requires more 770 than one instance of the PCB, then the "first block" MUST contain any 771 optional fields (e.g., security destination etc.) that apply to all 772 instances with this correlator. These MUST be contained in the first 773 instance and MUST NOT be repeated in other correlated blocks. Fields 774 that are specific to a particular instance of the PCB MAY appear in 775 that PCB. For example, security result fields MAY (and probably 776 will) be included in multiple related PCB instances, with each result 777 being specific to that particular block. Similarly, several PCBs 778 might each contain a ciphersuite parameters field with an IV specific 779 to that PCB instance. 781 Put another way: when confidentiality will generate multiple blocks, 782 it MUST first create a PCB with the required ciphersuite ID, 783 parameters etc. as specified above. Typically, this PCB will appear 784 "early" in the bundle. If this "first" PCB doesn't contain all of 785 the ciphertext, then it MAY be followed by other, correlated PCBs 786 which MUST NOT repeat the ciphersuite parameters, security-source, or 787 security-destination fields from the first PCB. 789 PCB ciphersuites MUST specify which blocks are to be encrypted. The 790 specification MAY be flexible and be dependent upon block type, 791 security policy, various data values and other inputs but it MUST be 792 deterministic. The determination of whether a block is to be 793 encrypted or not MUST NOT be ambiguous. 795 The ciphersuite MAY process less than the entire original bundle 796 payload, either because the current payload is a fragment of the 797 original bundle or just becuase it is defined to process some subset. 798 For whatever reason, if the ciphersuite processes less than the 799 complete, original bundle payload the PCB MUST specify, as part of 800 the ciphersuite parameters, which bytes of the bundle payload are 801 protected. 803 After decryption the plaintext recovered from the security-result 804 field should then replace the PCB in the bundle for further 805 processing (e.g. PIB verification). This recovered plaintext MUST 806 contain all the appropriate block type, processing flags and length 807 information. In other words delete the PCB in question and place the 808 recovered plaintext, which consists of some complete non-payload 809 block, in the bundle at the location from which the PCB was deleted. 811 A ciphersuite MUST NOT mix payload data and a non-payload block in a 812 single PCB. 814 Even if a to-be-encrypted block has the "discard" flag set, whether 815 or not the PCB's "discard" flag is set is an implementation/policy 816 decision for the encrypting node. (The "discard" flag is more 817 properly called the "discard if block cannot be processed" flag.) 819 Any existing eid-list in the to-be-encapsulated original block 820 remains exactly as-is, and becomes the eid-list for the replacing 821 block. The encapsulation process MUST NOT replace or remove the 822 existing eid-list entries. This is critically important for correct 823 updating of entries at the security-destination. 825 At the security-destination, either specific destination or the 826 bundle destination, the processes described above are reversed. The 827 payload is decrypted in-place using the salt, IV and key values in 828 the first PCB, including verification using the ICV. These values 829 are described below in Section 2.6. Each correlated PCB is also 830 processed at the same destination, using the salt and key values from 831 the first PCB and the block-specific IV item. The "encapsulated 832 block" item in security-result is decrypted and validated, using also 833 the tag which SHOULD have been appended to the ciphertext of the 834 original block data. Assuming the validation succeeds, the resultant 835 plaintext, which is the entire content of the original block, 836 replaces the PCB at the same place in the bundle. The block type 837 reverts to that of the original block prior to encapsulation, and the 838 other block-specific data fields also return to their original 839 values. Implementors are cautioned that this "replacement" process 840 requires delicate stitchery, as the eid-list contents in the 841 decapsulated block are invalid. As noted above, the eid-list 842 references in the original block were preserved in the replacing PCB, 843 and will have been updated as necessary as the bundle has toured the 844 dtn. The references from the PCB MUST replace the references within 845 the eid-list of the newly-decapsulated block. Caveat implementor. 847 2.5. Extension Security Block 849 Extension security blocks provide protection for non-payload-related 850 portions of a bundle. They MUST NOT be used for the primary block or 851 payload, including payload-related security blocks (PIBs and PCBs). 853 It is sometimes desirable to protect certain parts of a bundle in 854 ways other than those applied to the bundle payload. One such 855 example is bundle metadata that might specify the kind of data in the 856 payload but not the actual payload detail, as described in [DTNMD]. 858 ESBs are typically used to apply confidentiality protection. While 859 it is possible to create an integrity-only ciphersuite, the block 860 protection is not transparent and makes access to the data more 861 difficult. For simplicity, this discussion describes use of a 862 confidentiality ciphersuite. 864 The protection mechanisms in ESBs are similar to other security 865 blocks with two important differences: 867 - different key values are used (using same key as for payload 868 would defeat the purpose) 870 - the block is not encrypted or super-encrypted with the payload 872 A typical ESB ciphersuite will encrypt the extension block using a 873 randomly generated ephemeral key and will use the key information 874 item in the security parameters field to carry the key encrypted with 875 some long term key encryption key (KEK) or well-known public key. If 876 neither the destination nor security-destination resolves the key to 877 use for decryption, the key information item in the ciphersuite 878 parameters field can be used also to indicate the decryption key with 879 which the BEK can be recovered. 881 It is strongly RECOMMENDED that a data integrity mechanism be used in 882 conjunction with confidentiality, and that encryption-only 883 ciphersuites NOT be used. AES-GCM satisfies this requirement. 885 The ESB is placed in the bundle in the same position as the block 886 being protected. That is, the entire original block is processed 887 (encrypted, etc) and encapsulated in a "replacing" ESB-type block, 888 and this appears in the bundle at the same sequential position as the 889 original block. The processed data is placed in the security-result 890 field. 892 The process is reversed at the security destination with the 893 recovered plaintext block replacing the ESB that had encapsulated it. 894 Processing of EID-list entries, if any, is described above in 895 Section 2.4 and this MUST be followed in order to correctly recover 896 EIDs. 898 An ESB is an ASB with the following additional restrictions: 900 Block type is 0x09. 902 Ciphersuite flags indicate which fields are present in this block. 903 Ciphersuite designers should carefully consider the effect of 904 setting flags that either discard the block or delete the bundle 905 in the event that this block cannot be processed. 907 EID references MUST be stored in the EID reference list. 909 Security-source MAY be present. If not present, then the bundle- 910 source is used as the security-source. 912 Security-destination MAY be present. If not present, then the 913 bundle-destination is used as the security-destination. 915 The security-parameters MAY optionally contain a block-type field to 916 indicate the type of the encapsulated block. Since this replicates a 917 field in the encrypted portion of the block, it is a slight security 918 risk and its use is therefore OPTIONAL. 920 2.6. Parameters and Result Fields 922 Various ciphersuites include several items in the security-parameters 923 and/or security-result fields. Which items MAY appear is defined by 924 the particular ciphersuite description. A ciphersuite MAY support 925 several instances of the same type within a single block. 927 Each item is represented as type-length-value. Type is a single byte 928 indicating which item this is. Length is the count of data bytes to 929 follow, and is an SDNV-encoded integer. Value is the data content of 930 the item. 932 Item types are 934 0: reserved 936 1: initialization vector (IV) 938 2: reserved 940 3: key information 941 4: fragment range (offset and length as a pair of SDNVs) 943 5: integrity signature 945 6: reserved 947 7: salt 949 8: PCB integrity check value (ICV) 951 9: reserved 953 10: encapsulated block 955 11: block type of encapsulated block 957 12 - 191: reserved 959 192 - 250: private use 961 251 - 255: reserved 963 The folowing descriptions apply to usage of these items for all 964 ciphersuites. Additional characteristics are noted in the discussion 965 for specific suites. 967 - initialization vector(IV): random value, typically eight to 968 sixteen bytes 970 - key information: key material encoded or protected by the key 971 management system, and used to transport an ephemeral key 972 protected by a long-term key. This item is discussed further 973 below in Section 2.7 975 - fragment range: pair of SDNV values (offset then length) 976 specifying the range of payload bytes to which a particular 977 operation applies. This is termed "fragment range" since that is 978 its typical use, even though sometimes it describes a subset range 979 that is not a fragment. The offset value MUST be the offset 980 within the original bundle, which might not be the offset within 981 the current bundle if the current bundle is already a fragment 983 - integrity signature: result of BA or PI digest or signing 984 operation. This item is discussed further below in Section 2.7 986 - salt: an IV-like value used by certain confidentiality suites 987 - PCB integrity check value(ICV): output from certain 988 confidentiality ciphersuite operations to be used at the 989 destination to verify that the protected data has not been 990 modified 992 - encapsulated block: result of confidentiality operation on 993 certain blocks, contains the ciphertext of the block and MAY also 994 contain an integrity check value appended to the ciphertext; MAY 995 also contain padding if required by the encryption mode; used for 996 non-payload blocks only 998 - block type of encapsulated block: block type code for a block 999 that has been encapsulated in ESB 1001 2.7. Key Transport 1003 This specification endeavours to maintain separation between the 1004 security protocol and key management. However, these two interact in 1005 the transfer of key information, etc., from security-source to 1006 security-destination. The intent of the separation is to facilitate 1007 use of a variety of key management systems without a necessity to 1008 tailor a ciphersuite to each individually. 1010 The key management process deals with such things as long-term keys, 1011 specifiers for long-term keys, certificates for long-term keys and 1012 integrity signatures using long-term keys. The ciphersuite itself 1013 should not require a knowledge of these, and separation is improved 1014 if it treats these as opaque entities, to be handled by the key 1015 management process. 1017 The key management process deals specifically with the content of two 1018 of the items defined above in Section 2.6:- key information (item 1019 type 3) and integrity signature (item type 5). The ciphersuite MUST 1020 define the details and format for these items. To facilitate 1021 interoperability, it is strongly RECOMMENDED that the implementations 1022 use the appropriate definitions from Cryptographic Message Syntax 1023 (CMS) [RFC5652] and related RFCs. 1025 Many situations will require several pieces of key information. 1026 Again, ciphersuites MUST define whether they accept these packed into 1027 a single key information item and/or separated into multiple 1028 instances of key information. For interoperability, it is 1029 RECOMMENDED that ciphersuites accept these packed into a single key- 1030 information item, and that they MAY additionally choose to accept 1031 them sent as separate items. 1033 2.8. PIB and PCB combinations 1035 Given the above definitions, nodes are free to combine applications 1036 of PIB and PCB in any way they wish - the correlator value allows for 1037 multiple applications of security services to be handled separately. 1038 Since PIB and PCB apply to the payload and ESB to non-payload blocks, 1039 combinations of ESB with PIB and/or PCB are not considered. 1041 There are some obvious security problems that could arise when 1042 applying multiple services. For example, if we encrypted a payload 1043 but left a PIB security result containing a signature in the clear, 1044 payload guesses could be confirmed. 1046 We cannot, in general, prevent all such problems since we cannot 1047 assume that every ciphersuite definition takes account of every other 1048 ciphersuite definition. However, we can limit the potential for such 1049 problems by requiring that any ciphersuite which applies to one 1050 instance of a PIB or PCB, MUST be applied to all instances with the 1051 same correlator. 1053 We now list the PIB and PCB combinations which we envisage as being 1054 useful to support: 1056 Encrypted tunnels - a single bundle MAY be encrypted many times 1057 en-route to its destination. Clearly it has to be be decrypted an 1058 equal number of times, but we can imagine each encryption as 1059 representing the entry into yet another layer of tunnel. This is 1060 supported by using multiple instances of PCB, but with the payload 1061 encrypted multiple times, "in-place". Depending upon the 1062 ciphersuite defintion, other blocks can and should be encrypted, 1063 as discussed above and in Section 2.4 to ensure that parameters 1064 are protected in the case of super-encryption. 1066 Multiple parallel authenticators - a single security source might 1067 wish to protect the integrity of a bundle in multiple ways. This 1068 could be required if the bundle's path is unpredictable, and if 1069 various nodes might be involved as security destinations. 1070 Similarly, if the security source cannot determine in advance 1071 which algorithms to use, then using all might be reasonable. This 1072 would result in uses of PIB which presumably all protect the 1073 payload, and which cannot in general protect one another. Note 1074 that this logic can also apply to a BAB, if the unpredictable 1075 routing happens in the convergence layer, so we also envisage 1076 support for multiple parallel uses of BAB. 1078 Multiple sequential authenticators - if some security destination 1079 requires assurance about the route that bundles have taken, then 1080 it might insist that each forwarding node add its own PIB. More 1081 likely, however would be that outbound "bastion" nodes would be 1082 configured to sign bundles as a way of allowing the sending 1083 "domain" to take accountability for the bundle. In this case, the 1084 various PIBs will likely be layered, so that each protects the 1085 earlier applications of PIB. 1087 Authenticated and encrypted bundles - a single bundle MAY require 1088 both authentication and confidentiality. Some specifications 1089 first apply the authenticator and follow this by encrypting the 1090 payload and authenticator. As noted previously in the case where 1091 the authenticator is a signature, there are security reasons for 1092 this ordering. (See the PCB-RSA-AES128-PAYLOAD-PIB-PCB 1093 ciphersuite defined later in Section 4.3.) Others apply the 1094 authenticator after encryption, that is, to the ciphertext. This 1095 ordering is generally recommended and minimizes attacks which, in 1096 some cases, can lead to recovery of the encryption key. 1098 There are no doubt other valid ways to combine PIB and PCB instances, 1099 but these are the "core" set supported in this specification. Having 1100 said that, as will be seen, the mandatory ciphersuites defined here 1101 are quite specific and restrictive in terms of limiting the 1102 flexibility offered by the correlator mechanism. This is primarily 1103 designed to keep this specification as simple as possible, while at 1104 the same time supporting the above scenarios. 1106 3. Security Processing 1108 This section describes the security aspects of bundle processing. 1110 3.1. Nodes as policy enforcement points 1112 All nodes are REQUIRED to have and enforce their own configurable 1113 security policies, whether these policies be explicit or default, as 1114 defined in Section 6. 1116 All nodes serve as Policy Enforcement Points (PEP) insofar as they 1117 enforce polices that MAY restrict the permissions of bundle nodes to 1118 inject traffic into the network. Policies MAY apply to traffic 1119 originating at the current node, traffic terminating at the current 1120 node and traffic to be forwarded by the current node to other nodes. 1121 If a particular transmission request, originating either locally or 1122 remotely, satisfies the node's policy or policies and is therefore 1123 accepted, then an outbound bundle can be created and dispatched. If 1124 not, then in its role as a PEP, the node will not create or forward a 1125 bundle. Error handling for such cases is currently considered out of 1126 scope of this document. 1128 Policy enforcing code MAY override all other processing steps 1129 described here and elsewhere in this document. For example, it is 1130 valid to implement a node which always attempts to attach a PIB. 1131 Similarly it is also valid to implement a node which always rejects 1132 all requests which imply the use of a PIB. 1134 Nodes MUST consult their security policy to determine the criteria 1135 that a received bundle ought to meet before it will be forwarded. 1136 These criteria MUST include a determination of whether or not the 1137 received bundle MUST include a valid BAB, PIB, PCB or ESB. If the 1138 bundle does not meet the node's policy criteria, then the bundle MUST 1139 be discarded and processed no further; in this case, a bundle status 1140 report indicating the failure MAY be generated. 1142 The node's policy MAY call for the node to add or subtract some 1143 security blocks, for example, requiring the node attempt to encrypt 1144 (parts of) the bundle for some security-destination, or requiring 1145 that the node add a PIB. If the node's policy requires a BAB to be 1146 added to the bundle, it MUST be added last so that the calculation of 1147 its security result MAY take into consideration the values of all 1148 other blocks in the bundle. 1150 3.2. Processing order of security blocks 1152 The processing order of security actions for a bundle is critically 1153 important for the actions to complete successfully. In general, the 1154 actions performed at the originating node MUST be executed in the 1155 reverse sequence at the destination. There are variations and 1156 exceptions, and these are noted below. 1158 The sequence is maintained in the ordering of security blocks in the 1159 bundle. It is for this reason that blocks MUST not be rearranged at 1160 forwarding nodes, whether they support the security protocols or not. 1161 The only blocks that participate in this ordering are the primary and 1162 payload blocks, and the PIB and PCB security blocks themselves. All 1163 other extension blocks, including ESBs, are ignored for purposes of 1164 determining the processing order. 1166 The security blocks are added to and removed from a bundle in a last- 1167 in-first-out (LIFO) manner, with the top of the stack immediately 1168 after the primary block. A newly-created bundle has just the primary 1169 and payload blocks, and the stack is empty. As security actions are 1170 requested for the bundle, security blocks are pushed onto the stack 1171 immediately after the primary block. The early actions have security 1172 blocks close to the payload, later actions have blocks nearer to the 1173 primary block. The actions deal with only those blocks in the bundle 1174 at the time so, for example, the first to be added processes only the 1175 payload and primary blocks, the next might process the first if it 1176 chooses and the payload and primary, and so on. The last block to be 1177 added can process all the blocks. 1179 When the bundle is received, this process is reversed and security 1180 processing begins at the top of the stack, immediately after the 1181 primary block. The security actions are performed and the block is 1182 popped from the stack. Processing continues with the next security 1183 block until finally only the payload and primary blocks remain. 1185 The simplicity of this description is undermined by various real- 1186 world requirements. Nonetheless it serves as a helpful initial 1187 framework for understanding the bundle security process. 1189 The first issue is a very common one and easy to handle. The bundle 1190 may be sent indirectly to its destination, requiring several 1191 forwarding hops to finally arrive there. Security processing happens 1192 at each node, assuming that the node supports bundle security. For 1193 the following discussion, we assume that a bundle is created and that 1194 confidentiality, then payload integrity and finally bundle 1195 authentication are applied to it. The block sequence would therefore 1196 be primary-BAB-PIB-PCB-payload. Traveling from source to destination 1197 requires going through one intermediate node, so the trip consists of 1198 two hops. 1200 When the bundle is received at the intermediate node, the receive 1201 processing validates the BAB and pops it from the stack. However the 1202 PIBs and PCBs have the final destination as their security 1203 destination, so these can't be processed and removed. The 1204 intermediate node then begins the send process with the four 1205 remaining blocks in the bundle. The outbound processing adds any 1206 security blocks required by local policy, and these are pushed on the 1207 stack immediately after the primary block, ahead of the PIB. In this 1208 example, the intermediate node adds a PIB as a signature that the 1209 bundle has passed through the node. 1211 The receive processing at the destination first handles the 1212 intermediate node's PIB and pops it, next is the originator's PIB, 1213 also popped, and finally the originator's confidentiality block which 1214 allows the payload to be decrypted and the bundle handled for 1215 delivery. 1217 DTNs in practice are likely to be more complex. The security policy 1218 for a node specifies the security requirements for a bundle. The 1219 policy will possibly cause one or more security operations to be 1220 applied to the bundle at the current node, each with its own 1221 security-destination. Application of policy at subsequent nodes 1222 might cause additional security operations, each with a security- 1223 destination. The list of security-destinations in the security 1224 blocks (BAB, PIB and PCB, not ESB) creates a partial-ordering of 1225 nodes that MUST be visited en route to the bundle destination. 1227 The bundle security scheme does not deal with security paths that 1228 overlap partially but not completely. The security policy for a node 1229 MUST avoid specifying for a bundle a security-destination that causes 1230 a conflict with any existing security-destination in that bundle. 1231 This discussed further below in Section 3.3. 1233 The second issue relates to the reversibility of certain security 1234 process actions. In general, the actions fall into two categories: 1235 those which do not affect other parts of the bundle, and those which 1236 are fully reversible. Creating a bundle signature, for example, does 1237 not change the bundle content except for the result. The encryption 1238 performed as part of the confidentiality processing does change the 1239 bundle, but the reverse processing at the destination restores the 1240 original content. 1242 The third category is the one where the bundle content has changed 1243 slightly and in a non-destructive way, but there is no mechanism to 1244 reverse the change. The simplest example is the addition of an EID- 1245 reference to a security block. The addition of the reference causes 1246 the text to be added to the bundle's dictionary. The text may be 1247 used also by other references so removal of the block and this 1248 specific eid-reference does not cause removal of the text from the 1249 dictionary. This shortcoming is of no impact to the "sequential" or 1250 "wrapping" security schemes described above, but does cause failures 1251 with "parallel" authentication mechanisms. Solutions for this 1252 problem are implementation-specific and typically involve multi-pass 1253 processing such that blocks are added at one stage and the security 1254 results calculated at a later stage of the overall process. 1256 Certain ciphersuites have sequence requirements for their correct 1257 operation, most notably the bundle authentication ciphersuites. 1258 Processing for bundle authentication is required to happen after all 1259 other sending operations, and prior to any receive operations at the 1260 next hop node. It follows therefore that BA blocks MUST always be 1261 pushed onto the stack after all others. 1263 Although we describe the security block list as a stack, there are 1264 some blocks which are placed after the payload and therefore are not 1265 part of the stack. The BundleAuthentication ciphersuite #1 ("BA1") 1266 requires a second, correlated block to contain the security-result 1267 and this block is placed after the payload, usually as the last block 1268 in the bundle. We can apply the stack rules even to these blocks by 1269 specifying that they be added to the end of the bundle at the same 1270 time that their "owner" or "parent" block is pushed on the stack. In 1271 fact, they form a stack beginning at the payload but growing in the 1272 other direction. Also, not all blocks in the main stack have a 1273 corresponding entry in the trailing stack. The only blocks which 1274 MUST follow the payload are those mandated by ciphersuites as 1275 correlated blocks for holding a security-result. No other blocks are 1276 required to follow the payload block and it is RECOMMENDED that they 1277 NOT do so. 1279 ESBs are effectively placeholders for the blocks they encapsulate 1280 and, since those do not form part of the processing sequence 1281 described above, ESBs themselves do not either. ESBs MAY be 1282 correlated, however, so the "no reordering" requirement applies to 1283 them as well. 1285 3.3. Security Regions 1287 Each security block has a security path, as described in the 1288 discussion for Figure 1, and the paths for various blocks are often 1289 different. 1291 BA blocks are always for a single hop and these restricted paths 1292 never cause conflict. 1294 The paths for PIBs and PCBs are often from bundle source to bundle 1295 destination, to provide end-to-end protection. A bundle-source-to- 1296 bundle-destination path likewise never causes a problem. 1298 Another common scenario is for gateway-to-gateway protection of 1299 traffic between two sub-networks ("tunnel-mode"). 1301 Looking at Figure 1 and the simplified version shown in Figure 4, we 1302 can regard BN2 and BN3 as gateways connecting the two subnetworks 1303 labeled "An internet". As long as they provide security for the BN2- 1304 BN3 path, all is well. Problems begin, for example, when BN2 adds 1305 blocks with BN4 as the security-destination, and originating node BN1 1306 has created blocks with BN3 as security-destination. We now have two 1307 paths and neither is a subset of the other. 1309 This scenario should be prevented by node BN2's security policy being 1310 aware of the already-existing block with BN3 as the security 1311 destination. This policy SHOULD NOT specify a security-dest that is 1312 further distant than any existing security-dest. 1314 +---------v-| +->>>>>>>>>>v-+ +->>>>>>>>>>v-+ +-^---------+ 1315 | BN1 v | | ^ BN2 v | | ^ BN3 v | | ^ BN4 | 1316 +---------v-+ +-^---------v-+ +-^---------v-+ +-^---------+ 1317 >>>>>>>>^ >>>>>>>>>>^ >>>>>>>>^ 1319 <------------- BN1 to BN3 path ------------> 1321 <------------- BN2 to BN4 path ------------> 1323 Overlapping security paths 1325 Figure 4 1327 Consider the case where the security concern is for data integrity, 1328 so the blocks are PIBs. BN1 creates one ("PIa") along with the new 1329 bundle, and BN2 pushes its own PIB "PIb" on the stack, with security- 1330 destination BN4. When this bundle arrives at BN3, the bundle blocks 1331 are 1333 primary - PIb - PIa - payload 1335 Block PIb is not destined for this node BN3 so has to be forwarded. 1336 This is the security-destination for block PIa so, after validation, 1337 it should be removed from the bundle. But that will invalidate the 1338 PIb signature when the block is checked at the final destination. 1339 The PIb signature includes the primary block, PIb itself, PIa and the 1340 payload block, so PIa MUST remain in the bundle. This is why 1341 security blocks are treated as a stack and add/remove operations are 1342 permitted only at the top-of-stack. 1344 The situation would be worse if the security concern is 1345 confidentiality, so PCBs are employed, such as the confidentiality 1346 ciphersuite #3 ("PC3") described in Section 4.3. In this scenario, 1347 BN1 would encrypt the bundle with BN3 as security-destination, BN2 1348 would super-encrypt the payload and encapsulate the PC3 block for 1349 security-destination BN4. BN3 forwards all the blocks without 1350 change. BN4 decrypts the payload from its super-encryption and 1351 decapsulates the PC3 block, only to find that it should have been 1352 processed earlier. Assuming that BN4 has no access to BN3's key 1353 store, BN4 has no way to decrypt the bundle and recover the original 1354 content. 1356 As mentioned above, authors of security policy need to use care to 1357 ensure that their policies do not cause overlaps. These guidelines 1358 should prove helpful: 1360 the originator of a bundle can always specify the bundle-dest as 1361 the security-dest, and should be cautious about doing otherwise 1363 in the "tunnel-mode" scenario where two sub-networks are connected 1364 by a tunnel through a network, the gateways can each specify the 1365 other as security-dest, and should be cautious about doing 1366 otherwise 1368 BAB is never a problem because it is always only a single hop 1370 PIB for a bundle without PCB will usually specify the bundle 1371 destination as security-dest 1373 PIB for a bundle containing a PCB should specify as its security- 1374 dest the security-dest of the PCB (outermost PCB if there are more 1375 than one) 1377 3.4. Canonicalisation of bundles 1379 In order to verify a signature or MAC on a bundle the exact same 1380 bits, in the exact same order, MUST be input to the calculation upon 1381 verification as were input upon initial computation of the original 1382 signature or MAC value. Consequently, a node MUST NOT change the 1383 encoding of any URI in the dictionary field, e.g., changing the DNS 1384 part of some HTTP URL from lower case to upper case. Because bundles 1385 MAY be modified while in transit (either correctly or due to 1386 implementation errors), a canonical form of any given bundle (that 1387 contains a BAB or PIB) MUST be defined. 1389 This section defines bundle canonicalisation algorithms used in the 1390 Section 4.1 and Section 4.2 ciphersuites. Other ciphersuites can use 1391 these or define their own canonicalization procedures. 1393 3.4.1. Strict canonicalisation 1395 The first algorithm that can be used permits no changes at all to the 1396 bundle between the security-source and the security-destination. It 1397 is mainly intended for use in BAB ciphersuites. This algorithm 1398 conceptually catenates all blocks in the order presented, but omits 1399 all security result data fields in blocks of this ciphersuite type. 1400 That is, when a BA ciphersuite specifies this algorithm then we omit 1401 all BAB security results for all BA ciphersuites, when a PIB 1402 ciphersuite specifies this algorithm then we omit all PIB security 1403 results for all PI ciphersuites. All security result length fields 1404 are included, even though their corresponding security result data 1405 fields are omitted. 1407 Notes: 1409 - In the above we specify that security result data is omitted. 1410 This means that no bytes of the security result data are input. 1411 We do not set the security result length to zero. Rather, we 1412 assume that the security result length will be known to the module 1413 that implements the ciphersuite before the security result is 1414 calculated, and require that this value be in the security result 1415 length field even though the security result data itself will be 1416 omitted. 1418 - The 'res' bit of the ciphersuite ID, which indicates whether or 1419 not the security result length and security result data field are 1420 present, is part of the canonical form. 1422 -The value of the block data length field, which indicates the 1423 length of the block, is also part of the canonical form. Its 1424 value indicates the length of the entire bundle when the bundle 1425 includes the security result data field. 1427 -BABs are always added to bundles after PIBs, so when a PIB 1428 ciphersuite specifies this strict canonicalisation algorithm and 1429 the PIB is received with a bundle that also includes one or more 1430 BABs, application of strict canonicalisation as part of the PIB 1431 security result verification process requires that all BABs in the 1432 bundle be ignored entirely. 1434 3.4.2. Mutable canonicalisation 1436 This algorithm is intended to protect parts of the bundle which 1437 should not be changed in-transit. Hence it omits the mutable parts 1438 of the bundle. 1440 The basic approach is to define a canonical form of the primary block 1441 and catenate it with the security (PIBs and PCBs only) and payload 1442 blocks in the order that they will be transmitted. This algorithm 1443 ignores all other blocks, including ESBs, because it cannot be 1444 determined whether or not they will change as the bundle transits the 1445 network. In short, this canonicalization protects the payload, 1446 payload-related security blocks and parts of the primary block. 1448 Many fields in various blocks are stored as variable-length SDNVs. 1449 These are canonicalized in unpacked form, as eight-byte fixed-width 1450 fields in network byte order. The size of eight bytes is chosen 1451 because implementations MAY handle larger values as invalid, as noted 1452 in [DTNBP]. 1454 The canonical form of the primary block is shown in Figure 5. 1455 Essentially, it de-references the dictionary block, adjusts lengths 1456 where necessary and ignores flags that MAY change in transit. 1458 +----------------+----------------+----------------+----------------+ 1459 | Version | Processing flags (incl. COS and SRR) | 1460 +----------------+----------------+---------------------------------+ 1461 | Canonical primary block length | 1462 +----------------+----------------+---------------------------------+ 1463 | Destination endpoint ID length | 1464 +----------------+----------------+---------------------------------+ 1465 | | 1466 | Destination endpoint ID | 1467 | | 1468 +----------------+----------------+---------------------------------+ 1469 | Source endpoint ID length | 1470 +----------------+----------------+----------------+----------------+ 1471 | | 1472 | Source endpoint ID | 1473 | | 1474 +----------------+----------------+---------------------------------+ 1475 | Report-to endpoint ID length | 1476 +----------------+----------------+----------------+----------------+ 1477 | | 1478 | Report-to endpoint ID | 1479 | | 1480 +----------------+----------------+----------------+----------------+ 1481 | | 1482 + Creation Timestamp (2 x SDNV) + 1483 | | 1484 +---------------------------------+---------------------------------+ 1485 | Lifetime | 1486 +----------------+----------------+----------------+----------------+ 1488 The canonical form of the primary bundle block. 1490 Figure 5 1492 The fields shown in Figure 5 are: 1494 Version is the single-byte value in the primary block. 1496 Processing flags in the primary block is an SDNV, and includes the 1497 class-of-service (COS) and status report request (SRR) fields. 1498 For purposes of canonicalization, the SDNV is unpacked into a 1499 fixed-width field and some bits are masked out. The unpacked 1500 field is ANDed with mask 0x0000 0000 0007 C1BE to set to zero all 1501 reserved bits and the "bundle is a fragment" bit. 1503 Length - a four-byte value containing the length (in bytes) of 1504 this structure, in network byte order. 1506 Destination endpoint ID length and value - are the length (as a 1507 four byte value in network byte order) and value of the 1508 destination endpoint ID from the primary bundle block. The URI is 1509 simply copied from the relevant part(s) of the dictionary block 1510 and is not itself canonicalised. Although the dictionary entries 1511 contain null-terminators, the null-terminators are not included in 1512 the length or the canonicalization. 1514 Source endpoint ID length and value are handled similarly to the 1515 destination. 1517 Report-to endpoint ID length and value are handled similarly to 1518 the destination. 1520 Creation time (2 x SDNV) and Lifetime (SDNV) are simply copied 1521 from the primary block, with the SDNV values being represented as 1522 eight-byte unpacked values. 1524 Fragment offset and Total application data unit length are 1525 ignored, as is the case for the "bundle is a fragment" bit 1526 mentioned above. If the payload data to be canonicalized is less 1527 than the complete, original bundle payload, the offset and length 1528 are specified in the security-parameters. 1530 For non-primary blocks being included in the canonicalization, the 1531 block processing flags value used for canonicalization is the 1532 unpacked SDNV value with reserved and mutable bits masked to zero. 1533 The unpacked value is ANDed with mask 0x0000 0000 0000 0077 to zero 1534 reserved bits and the "last block" flag. The "last block" flag is 1535 ignored because BABs and other security blocks MAY be added for some 1536 parts of the journey but not others so the setting of this bit might 1537 change from hop to hop. 1539 Endpoint ID references in security blocks are canonicalized using the 1540 de-referenced text form in place of the reference pair. The 1541 reference count is not included, nor is the length of the endpoint ID 1542 text. 1544 The block-length is canonicalized as an eight-byte unpacked value in 1545 network byte order. If the payload data to be canonicalized is less 1546 than the complete, original bundle payload, this field contain the 1547 size of the data being canonicalized (the "effective block") rather 1548 that the actual size of the block. 1550 Payload blocks are generally canonicalized as-is with the exception 1551 that in some instances only a portion of the payload data is to be 1552 protected. In such a case, only those bytes are included in the 1553 canonical form, and additional ciphersuite parameters are required to 1554 specify which part of the payload is protected, as discussed further 1555 below. 1557 Security blocks are handled likewise, except that the ciphersuite 1558 will likely specify that the "current" security block security result 1559 field not be considered part of the canonical form. This differs 1560 from the strict canonicalisation case since we might use the mutable 1561 canonicalisation algorithm to handle sequential signatures such that 1562 signatures cover earlier ones. 1564 ESBs MUST NOT be included in the canonicalization. 1566 Notes: 1568 - The canonical form of the bundle is not transmitted. It is 1569 simply an artifact used as input to digesting. 1571 - We omit the reserved flags because we cannot determine if they 1572 will change in transit. The masks specified above will have to be 1573 revised if additional flags are defined and they need to be 1574 protected. 1576 - Our URI encoding does not preserve the "null-termination" 1577 convention from the dictionary field, nor do we separate the 1578 scheme and ssp as is done there. 1580 - The URI encoding will cause errors if any node rewrites the 1581 dictionary content (e.g. changing the DNS part of an HTTP URL from 1582 lower-case to upper case). This could happen transparently when a 1583 bundle is synched to disk using one set of software and then read 1584 from disk and forwarded by a second set of software. Because 1585 there are no general rules for canonicalising URIs (or IRIs), this 1586 problem may be an unavoidable source of integrity failures. 1588 - All SDNV fields here are canonicalized as eight-byte unpacked 1589 values in network byte order. Length fields are canonicalized as 1590 four-byte values in network byte order. Encoding does not need 1591 optimization since the values are never sent over the network. 1593 If a bundle is fragmented before the PIB is applied then the PIB 1594 applies to a fragment and not the entire bundle. However, the 1595 protected fragment could be subsequently further fragmented, which 1596 would leave the verifier unable to know which bytes were protected 1597 by the PIB. Even in the absence of frgmentation the same 1598 situation applies if the ciphersuite is defined to allow 1599 protection of less than the entire, original bundle payload. 1601 For this reason, PIB ciphersuites which support applying a PIB to 1602 less than the complete, original bundle payload MUST specify, as 1603 part of the ciphersuite parameters, which bytes of the bundle 1604 payload are protected. When verification occurs, only the 1605 specified range of the payload bytes are input to PIB 1606 verification. It is valid for a ciphersuite to be specified so as 1607 to only apply to entire bundles and not to fragments. A 1608 ciphersuite MAY be specified to apply to only a portion of the 1609 payload, regardless of whether the payload is a fragment or the 1610 complete original bundle payload. 1612 The same fragmentation issue applies equally to PCB ciphersuites. 1613 Ciphersuites which support applying confidentiality to fragments 1614 MUST specify, as part of the ciphersuite parameters, which bytes 1615 of the bundle payload are protected. When decrypting a fragment, 1616 only the specified bytes are processed. It is also valid for a 1617 confidentiality ciphersuite to be specified so as to only apply to 1618 entire bundles and not to fragments. 1620 This definition of mutable canonicalization assumes that endpoint IDs 1621 themselves are immutable and is unsuitable for use in environments 1622 where that assumption might be violated. 1624 Since the canonicalization applies to a specific bundle rather than a 1625 payload, an originator's signature cannot be verified if a payload is 1626 forwarded, as the forwarded bundle will have a different source. 1628 The solution for either of these issues is to define and use a PIB 1629 ciphersuite having an alternate version of mutable canonicalization 1630 any fields from the primary block. 1632 3.5. Endpoint ID confidentiality 1634 Every bundle MUST contain a primary block that contains the source 1635 and destinations endpoint IDs, and others, and that cannot be 1636 encrypted. If endpoint ID confidentiality is required, then bundle- 1637 in-bundle encapsulation can solve this problem in some instances. 1639 Similarly, confidentiality requirements MAY also apply to other parts 1640 of the primary block (e.g. the current-custodian) and that is 1641 supported in the same manner. 1643 3.6. Bundles received from other nodes 1645 Nodes implementing this specification SHALL consult their security 1646 policy to determine whether or not a received bundle is required by 1647 policy to include a BAB. If the bundle has no BAB and one is not 1648 required then BAB processing on the received bundle is complete and 1649 the bundle is ready to be further processed for PIB/PCB/ESB handling 1650 or delivery or forwarding. 1652 If the bundle is required to have a BAB but does not, then the bundle 1653 MUST be discarded and processed no further. If the bundle is 1654 required to have a BAB but all of its BABs identify a different node 1655 other than the receiving node as the BAB security destination, then 1656 the bundle MUST be discarded and processed no further. 1658 If the bundle is required to have a BAB and has one or more BABs that 1659 identify the receiving node as the BAB security destination, or for 1660 which there is no security destination, then the value in the 1661 security result field(s) of the BAB(s) MUST be verified according to 1662 the ciphersuite specification. If for all such BABs in the bundle 1663 either the BAB security source cannot be determined or the security 1664 result value check fails, the bundle has failed to authenticate and 1665 the bundle MUST be discarded and processed no further. If any of the 1666 BABs present verify, or if a BAB is not required, the bundle is ready 1667 for further processing as determined by extension blocks and/or 1668 policy. 1670 BABs received in a bundle MUST be stripped before the bundle is 1671 forwarded. New BABs MAY be added as required by policy. This MAY 1672 require correcting the "last block" field of the to-be-forwarded 1673 bundle. 1675 Further processing of the bundle MUST take place in the order 1676 indicated by the various blocks from the primary block to the payload 1677 block, except as defined by an applicable specification. 1679 If the bundle has a PCB and the receiving node is the PCB destination 1680 for the bundle (either because the node is listed as the bundle's 1681 PCB-dest or because the node is listed as the bundle's destination 1682 and there is no PCB-dest), the node MUST decrypt the relevant parts 1683 of the bundle in accordce with the ciphersuite specification. The 1684 PCB SHALL be deleted. If the relevant parts of the bundle cannot be 1685 decrypted (i.e. the decryption key cannot be deduced or decryption 1686 fails), then the bundle MUST be discarded and processed no further; 1687 in this case a bundle deletion status report (see the Bundle Protocol 1688 [DTNBP]) indicating the decryption failure MAY be generated. If the 1689 PCB security result included the ciphertext of a block other than the 1690 payload block, the recovered plaintext block MUST be placed in the 1691 bundle at the location from which the PCB was deleted. 1693 If the bundle has one or more PIBs for which the receiving node is 1694 the bundle's PIB destination (either because the node is listed in 1695 the bundle's PIB-dest or because the node is listed as the bundle's 1696 destination and there is no PIB-dest), the node MUST verify the value 1697 in the PIB security result field(s) in accordance with the 1698 ciphersuite specification. If all the checks fail, the bundle has 1699 failed to authenticate and the bundle SHALL be processed according to 1700 the security policy. A bundle status report indicating the failure 1701 MAY be generated. Otherwise, if the PIB verifies, the bundle is 1702 ready to be processed for either delivery or forwarding. Before 1703 forwarding the bundle, the node SHOULD remove the PIB from the 1704 bundle, subject to the requirements of Section 3.2, unless it is 1705 likely that some downstream node will also be able to verify the PIB. 1707 If the bundle has a PIB and the receiving node is not the bundle's 1708 PIB-dest the receiving node MAY attempt to verify the value in the 1709 security result field. If it is able to check and the check fails, 1710 the node SHALL discard the bundle and it MAY send a bundle status 1711 report indicating the failure. 1713 If the bundle has an ESB and the receiving node is the ESB 1714 destination for the bundle (either because the node is listed as the 1715 bundle's ESB-dest or because the node is listed as the bundle's 1716 destination and there is no ESB-dest), the node MUST decrypt and/or 1717 decapsulate the encapsulated block in accordance with the ciphersuite 1718 specification. The decapsulated block replaces the ESB in the bundle 1719 block sequence, and the ESB is thereby deleted. If the content 1720 cannot be decrypted (i.e., the decryption key cannot be deduced or 1721 decryption fails), then the bundle MAY be discarded and processed no 1722 further unless the security policy specifies otherwise. In this case 1723 a bundle deletion status report (see the Bundle Protocol [DTNBP]) 1724 indicating the decryption failure MAY be generated. 1726 3.7. The At-Most-Once-Delivery Option 1728 An application MAY request (in an implementation specific manner) 1729 that a node be registered as a member of an endpoint and that 1730 received bundles destined for that endpoint be delivered to that 1731 application. 1733 An option for use in such cases is known as "at-most-once-delivery". 1734 If this option is chosen, the application indicates that it wants the 1735 node to check for duplicate bundles, discard duplicates, and deliver 1736 at most one copy of each received bundle to the application. If this 1737 option is not chosen, the application indicates that it wants the 1738 node to deliver all received bundle copies to the application. If 1739 this option is chosen, the node SHALL deliver at most one copy of 1740 each received bundle to the application. If the option is not 1741 chosen, the node SHOULD, subject to policy, deliver all bundles. 1743 To enforce this the node MUST look at the source/timestamp pair value 1744 of each complete (reassembled, if necessary) bundle received and 1745 determine if this pair, which uniquely identifies a bundle, has been 1746 previously received. If it has, then the bundle is a duplicate. If 1747 it has not, then the bundle is not a duplicate. The source/timestamp 1748 pair SHALL be added to the list of pair values already received by 1749 that node. 1751 Each node implementation MAY decide how long to maintain a table of 1752 pair value state. 1754 Additional discussion relevant to at-most-once-delivery is in the DTN 1755 Retransmission Block specification [DTNRB]. 1757 3.8. Bundle Fragmentation and Reassembly 1759 If it is necessary for a node to fragment a bundle and security 1760 services have been applied to that bundle, the fragmentation rules 1761 described in [DTNBP] MUST be followed. As defined there and repeated 1762 here for completeness, only the payload MAY be fragmented; security 1763 blocks, like all extension blocks, can never be fragmented. In 1764 addition, the following security-specific processing is REQUIRED: 1766 The security policy requirements for a bundle MUST be applied 1767 individually to all the bundles resulting from a fragmentation event. 1769 If the original bundle contained a PIB, then each of the PIB 1770 instances MUST be included in some fragment. 1772 If the original bundle contained one or more PCBs, then any PCB 1773 instances containing a key information item MUST have the "replicate 1774 in every fragment" flag set, and thereby be replicated in every 1775 fragment. This is to ensure that the canonical block-sequence can be 1776 recovered during reassembly. 1778 If the original bundle contained one or more correlated PCBs not 1779 containing a key information item, then each of these MUST be 1780 included in some fragment, but SHOULD NOT be sent more than once. 1781 They MUST be placed in a fragment in accordance with the 1782 fragmentation rules described in [DTNBP]. 1784 Note: various fragments MAY have additional security blocks added at 1785 this or later stages and it is possible that correlators will 1786 collide. In order to facilitate uniqueness, ciphersuites SHOULD 1787 include the fragment-offset of the fragment as a high-order component 1788 of the correlator. 1790 3.9. Reactive fragmentation 1792 When a partial bundle has been received, the receiving node SHALL 1793 consult its security policy to determine if it MAY fragment the 1794 bundle, converting the received portion into a bundle fragment for 1795 further forwarding. Whether or not reactive fragmentation is 1796 permitted SHALL depend on the security policy and the ciphersuite 1797 used to calculate the BAB authentication information, if required. 1798 (Some BAB ciphersuites, i.e., the mandatory BAB-HMAC ciphersuite 1799 defined in Section 4.1, do not accommodate reactive fragmentation 1800 because the security result in the BAB requires that the entire 1801 bundle be signed. It is conceivable, however, that a BAB ciphersuite 1802 could be defined such that multiple security results are calculated, 1803 each on a different segment of a bundle, and that these security 1804 results could be interspersed between bundle payload segments such 1805 that reactive fragmentation could be accommodated.) 1807 If the bundle is reactively fragmented by the intermediate receiver 1808 and the BAB-ciphersuite is of an appropriate type (e.g. with multiple 1809 security results embedded in the payload), the bundle MUST be 1810 fragmented immediately after the last security result value in the 1811 partial payload that is received. Any data received after the last 1812 security result value MUST be dropped. 1814 If a partial bundle is received at the intermediate receiver and is 1815 reactively fragmented and forwarded, only the part of the bundle that 1816 was not received MUST be retransmitted, though more of the bundle MAY 1817 be retransmitted. Before retransmitting a portion of the bundle, it 1818 SHALL be changed into a fragment and, if the original bundle included 1819 a BAB, the fragmented bundle MUST also, and its BAB SHALL be 1820 recalculated. 1822 This specification does not currently define any ciphersuite which 1823 can handle this reactive fragmentation case. 1825 An interesting possibility is a ciphersuite definition such that the 1826 transmission of a follow-up fragment would be accompanied by the 1827 signature for the payload up to the restart point. 1829 4. Mandatory Ciphersuites 1831 This section defines the mandatory ciphersuites for this 1832 specification. There is currently one mandatory ciphersuite for use 1833 with each of the security block types BAB, PIB, PCB and ESB. The BAB 1834 ciphersuite is based on shared secrets using HMAC. The PIB 1835 ciphersuite is based on digital signatures using RSA with SHA256. 1836 The PCB and ESB ciphersuites are based on using RSA for key transport 1837 and AES for bulk encryption. 1839 The key transport mechanisms defined in Cryptographic Message Syntax 1840 [RFC5652] are suitable for the ciphersuites, with only minor 1841 adjustment as required by the ciphersuite characteristics. 1843 4.1. BAB-HMAC 1845 The BAB-HMAC ciphersuite has ciphersuite ID value 0x001. 1847 BAB-HMAC uses the strict canonicalisation algorithm in Section 3.4.1. 1849 Strict canonicalization supports digesting of a fragment-bundle. It 1850 does not permit the digesting of only a subset of the payload, but 1851 only the complete contents of the payload of the current bundle, 1852 which might be a fragment. The "fragment range" item for security- 1853 parameters is not used to indicate a fragment, as this information is 1854 digested within the primary block. 1856 The variant of HMAC to be used is HMAC-SHA1 as defined in [RFC2104]. 1858 This ciphersuite requires the use of two related instances of the 1859 BAB. It involves placing the first BAB instance (as defined in 1860 Section 2.2) just after the primary block. The second (correlated) 1861 instance of the BAB MUST be placed after all other blocks (except 1862 possibly other BAB blocks) in the bundle. 1864 This means that normally, the BAB will be the second and last blocks 1865 of the bundle. If a forwarder wishes to apply more than one 1866 correlated BAB pair, then this can be done. There is no requirement 1867 that each application "wrap" the others, but the forwarder MUST 1868 insert all the "up front" BABs, and their "at back" "partners" 1869 (without any security result), before canonicalising. 1871 Inserting more than one correlated BAB pair would be useful if the 1872 bundle could be routed to more than one potential "next-hop" or if 1873 both an old or a new key were valid at sending time, with no 1874 certainty about the situation that will obtain at reception time. 1876 The security result is the output of the HMAC-SHA1 calculation with 1877 input being the result of running the entire bundle through the 1878 strict canonicalisation algorithm. Both required BAB instances MUST 1879 be included in the bundle before canonicalisation. 1881 Security parameters are optional with this scheme, but if used then 1882 the only field that can be present is key information (see 1883 Section 2.6). 1885 Implementations MUST support use of "AuthenticatedData" type as 1886 defined in [RFC5652] section 9.1, with RecipientInfo type 1887 KeyTransRecipientInfo containing the issuer and serial number of a 1888 suitable certificate. They MAY support additional RecipientInfo 1889 types. They MAY additionally use the "SignedData" type described in 1890 [RFC5652] section 5.1. In either case, the optional "eContent" field 1891 in EncapsulatedContentInfo MUST be omitted. That is, the data itself 1892 is external, being the canonicalized form of the bundle. 1894 Because this ciphersuite requires that the security result be in the 1895 second, correlated BAB, the content of the 1896 "MessageAuthenticationCode" field in AuthenticatedData is ignored, 1897 although the field has to be present. 1899 In the absence of key information the receiver is expected to be able 1900 to find the correct key based on the sending identity. The sending 1901 identity MAY be known from the security-source field or the content 1902 of a previous-hop block in the bundle. It MAY also be determined 1903 using implementation-specific means such as the convergence layer. 1905 4.2. PIB-RSA-SHA256 1907 The PIB-RSA-SHA256 ciphersuite has ciphersuite ID value 0x02. 1909 If the bundle being signed has been fragmented before signing, then 1910 we have to specify which bytes were signed in case the signed bundle 1911 is subsequently fragmented for a second time. If the bundle is a 1912 fragment, then the ciphersuite parameters MUST include a fragment- 1913 range field, as described in Section 2.6, specifying the offset and 1914 length of the signed fragment. If the entire bundle is signed then 1915 these numbers MUST be omitted. 1917 Implementations MUST support use of "SignedData" type as defined in 1918 [RFC5652] section 5.1, with SignerInfo type SignerIdentifier 1919 containing the issuer and serial number of a suitable certificate. 1920 The optional "eContent" field in EncapsulatedContentInfo MUST be 1921 omitted. That is, the data itself is external, being the 1922 canonicalized form of the bundle. 1924 Because the signature field in SignedData SignatureValue is a 1925 security-result field, the entire key information item MUST be placed 1926 in the block's security-result field, rather than security- 1927 parameters. 1929 PIB-RSA-SHA256 uses the mutable canonicalisation algorithm 1930 Section 3.4.2, with the security-result data field for only the 1931 "current" block being excluded from the canonical form. The 1932 resulting canonical form of the bundle is the input to the signing 1933 process. This ciphersuite requires the use of a single instance of 1934 the PIB. 1936 RSA is used with SHA256 as specified for the id-sha256 PKCSv2.1 1937 signature scheme in [RFC4055]. The output of the signing process is 1938 the SignatureValue field for the PIB. 1940 "Commensurate strength" cryptography is generally held to be a good 1941 idea. A combination of RSA with SHA256 is reckoned to require a 3076 1942 bit RSA key according to this logic. Few implementations will choose 1943 this length by default (and probably some just won't support such 1944 long keys). Since this is an experimental protocol, we expect that 1945 1024 or 2048 bit RSA keys will be used in many cases, and that that 1946 will be fine since we also expect that the hash function "issues" 1947 will be resolved before any standard would be derived from this 1948 protocol. 1950 4.3. PCB-RSA-AES128-PAYLOAD-PIB-PCB 1952 The PCB-RSA-AES128-PAYLOAD-PIB-PCB ciphersuite has ciphersuite ID 1953 value 0x003. 1955 This scheme encrypts PIBs, PCBs and the payload. The key size for 1956 this ciphersuite is 128 bits. 1958 Encryption is done using the AES algorithm in Galois/Counter Mode 1959 (GCM) as described in [RFC5084] [Note: parts of the following 1960 description are borrowed from RFC 4106]. 1962 The choice of GCM avoids expansion of the payload, which causes 1963 problems with fragmentation/reassembly and custody transfer. GCM 1964 also includes authentication, essential in preventing attacks that 1965 can alter the decrypted plaintext or even recover the encryption key. 1967 GCM is a block cipher mode of operation providing both 1968 confidentiality and data origin authentication. The GCM 1969 authenticated encryption operation has four inputs: a secret key, an 1970 initialization vector (IV), a plaintext, and an input for additional 1971 authenticated data (AAD) which is not used here. It has two outputs, 1972 a ciphertext whose length is identical to the plaintext, and an 1973 authentication tag, also known as the Integrity Check Value (ICV). 1975 For consistency with the description in [RFC5084], we refer to the 1976 GCM IV as a nonce. The same key and nonce combination MUST NOT be 1977 used more than once. The nonce has the following layout 1979 +----------------+----------------+----------------+----------------+ 1980 | salt | 1981 +----------------+----------------+----------------+----------------+ 1982 | | 1983 | initialization vector | 1984 | | 1985 +----------------+----------------+----------------+----------------+ 1987 Nonce format. 1989 Figure 6 1991 The salt field is a four-octet value, usually chosen at random. It 1992 MUST be the same for all PCBs which have the same correlator value. 1993 The salt need not be kept secret. 1995 The initialization vector (IV) is an eight-octet value, usually 1996 chosen at random. It MUST be different for all PCBs which have the 1997 same correlator value. The value need not be kept secret. 1999 The key (bundle encryption key, BEK) is a sixteen-octet (128 bits) 2000 value, usually chosen at random. The value MUST be kept secret, as 2001 described below. 2003 The integrity check value is a sixteen-octet value used to verify 2004 that the protected data has not been altered. The value need not be 2005 kept secret. 2007 This ciphersuite requires the use of a single PCB instance to deal 2008 with payload confidentiality. If the bundle already contains PIBs or 2009 PCBs then the ciphersuite will create additional correlated blocks to 2010 protect these PIBs and PCBs. These "additional" blocks replace the 2011 original blocks on a one-for-one basis, so the number of blocks 2012 remains unchanged. All these related blocks MUST have the same 2013 correlator value. The term "first PCB" in this section refers to the 2014 single PCB if there is only one or, if there are several, then to the 2015 one containing the key information. This MUST be the first of the 2016 set. 2018 First PCB - the first PCB MAY contain a correlator value, and MAY 2019 specify security-source and/or security-destination in the eid-list. 2021 If not specified, the bundle-source and bundle-destination 2022 respectively are used for these values, as with other ciphersuites. 2023 The block MUST contain security-parameters and security-result 2024 fields. Each field MAY contain several items formatted as described 2025 in Section 2.6. 2027 Security-parameters 2029 key information 2031 salt 2033 IV (this instance applies only to payload) 2035 fragment offset and length, if bundle is a fragment 2037 Security-result 2039 ICV 2041 Subsequent PCBs MUST contain a correlator value to link them to the 2042 first PCB. Security-source and security-destination are implied from 2043 the first PCB, however see the discussion in Section 2.4 concerning 2044 eid-list entries. They MUST contain security-parameters and 2045 security-result fields as follows: 2047 Security-parameters 2049 IV for this specific block 2051 Security-result 2053 encapsulated block 2055 The security-parameters and security-result fields in the subsequent 2056 PCBs MUST NOT contain any items other than these two. Items such as 2057 key and salt are supplied in the first PCB and MUST NOT be repeated. 2059 Implementations MUST support use of "Enveloped-data" type as defined 2060 in [RFC5652] section 6, with RecipientInfo type KeyTransRecipientInfo 2061 containing the issuer and serial number of a suitable certificate. 2062 They MAY support additional RecipientInfo types. The optional 2063 "eContent" field in EncryptedContentInfo MUST be omitted. That is, 2064 the data itself is external, being the payload of the bundle. 2066 The Integrity Check Value from the AES-GCM encryption of the payload 2067 is placed in the security-result field of the first PCB. 2069 If the bundle being encrypted is a fragment-bundle we have to specify 2070 which bytes are encrypted in case the bundle is subsequently 2071 fragmented again. If the bundle is a fragment the ciphersuite 2072 parameters MUST include a fragment-range field, as described in 2073 Section 2.6, specifying the offset and length of the encrypted 2074 fragment. Note that this is not the same pair of fields which appear 2075 in the primary block as "offset and length". The "length" in this 2076 case is the length of the fragment, not the original length. If the 2077 bundle is not a fragment then this field MUST be omitted. 2079 The confidentiality processing for payload and other blocks is 2080 different, mainly because the payload might be fragmented later at 2081 some other node. 2083 For the payload, only the bytes of the bundle payload field are 2084 affected, being replaced by ciphertext. The salt, IV and key values 2085 specified in the first PCB are used to encrypt the payload, and the 2086 resultant authentication tag (ICV) is placed in an ICV item in the 2087 security-result field of that first PCB. The other bytes of the 2088 payload block, such as type, flags and length, are not modified. 2090 For each PIB or PCB to be protected, the entire original block is 2091 encapsulated in a "replacing" PCB. This replacing PCB is placed in 2092 the outgoing bundle in the same position as the original block, PIB 2093 or PCB. As mentioned above, this is one-for-one replacement and 2094 there is no consolidation of blocks or mixing of data in any way. 2096 The encryption process uses AES-GCM with the salt and key values from 2097 the first PCB, and an IV unique to this PCB. The process creates 2098 ciphertext for the entire original block, and an authentication tag 2099 for validation at the security destination. For this encapsulation 2100 process, unlike the processing of the bundle payload, the 2101 authentication tag is appended to the ciphertext for the block and 2102 the combination is stored into the "encapsulated block" item in 2103 security-result. 2105 The replacing block, of course, also has the same correlator value as 2106 the first PCB with which it is associated. It also contains the 2107 block-specific IV in security-parameters, and the combination of 2108 original-block-ciphertext and authentication tag, stored as an 2109 "encapsulated block" item in security-result. 2111 If the payload was fragmented after encryption then all those 2112 fragments MUST be present and reassembled before decryption. This 2113 process might be repeated several times at different destinations if 2114 multiple fragmentation actions have occurred. 2116 The size of the GCM counter field limits the payload size to 2^39 - 2117 256 bytes, about half a terabyte. A future revision of this 2118 specification will address the issue of handling payloads in excess 2119 of this size. 2121 4.4. ESB-RSA-AES128-EXT 2123 The ESB-RSA-AES128-EXT ciphersuite has ciphersuite ID value 0x004. 2125 This scheme encrypts non-payload-related blocks. It MUST NOT be used 2126 to encrypt PIBs, PCBs or primary or payload blocks. The key size for 2127 this ciphersuite is 128 bits. 2129 Encryption is done using the AES algorithm in Galois/Counter Mode 2130 (GCM) as described in [RFC5084] [Note: parts of the following 2131 description are borrowed from RFC 4106]. 2133 GCM is a block cipher mode of operation providing both 2134 confidentiality and data origin authentication. The GCM 2135 authenticated encryption operation has four inputs: a secret key, an 2136 initialization vector (IV), a plaintext, and an input for additional 2137 authenticated data (AAD) which is not used here. It has two outputs, 2138 a ciphertext whose length is identical to the plaintext, and an 2139 authentication tag, also known as the Integrity Check Value (ICV). 2141 For consistency with the description in [RFC5084], we refer to the 2142 GCM IV as a nonce. The same key and nonce combination MUST NOT be 2143 used more than once. The nonce has the following layout 2145 +----------------+----------------+---------------------------------+ 2146 | salt | 2147 +----------------+----------------+---------------------------------+ 2148 | | 2149 | initialization vector | 2150 | | 2151 +----------------+----------------+---------------------------------+ 2153 Nonce format. 2155 Figure 7 2157 The salt field is a four-octet value, usually chosen at random. It 2158 MUST be the same for all ESBs which have the same correlator value. 2159 The salt need not be kept secret. 2161 The initialization vector (IV) is an eight-octet value, usually 2162 chosen at random. It MUST be different for all ESBs which have the 2163 same correlator value. The value need not be kept secret. 2165 The data encryption key is a sixteen-octet (128 bits) value, usually 2166 chosen at random. The value MUST be kept secret, as described below. 2168 The integrity check value is a sixteen-octet value used to verify 2169 that the protected data has not been altered. The value need not be 2170 kept secret. 2172 This ciphersuite replaces each BP extension block to be protected 2173 with a "replacing" ESB, and each can be individually specified. 2175 If a number of related BP extension blocks are to be protected they 2176 can be grouped as a correlated set and protected using a single key. 2177 These blocks replace the original blocks on a one-for-one basis, so 2178 the number of blocks remains unchanged. All these related blocks 2179 MUST have the same correlator value. The term "first ESB" in this 2180 section refers to the single ESB if there is only one or, if there 2181 are several, then to the one containing the key or key-identifier. 2182 This MUST be the first of the set. If the blocks are individually 2183 specified then there is no correlated set and each block is its own 2184 "first ESB". 2186 First ESB - the first ESB MAY contain a correlator value, and MAY 2187 specify security-source and/or security-destination in the eid-list. 2188 If not specified, the bundle-source and bundle-destination 2189 respectively are used for these values, as with other ciphersuites. 2190 The block MUST contain security-parameters and security-result 2191 fields. Each field MAY contain several items formatted as described 2192 in Section 2.6. 2194 Security-parameters 2196 key information 2198 salt 2200 IV for this specific block 2202 Security-result 2204 encapsulated block 2206 Subsequent ESBs MUST contain a correlator value to link them to the 2207 first ESB. Security-source and security-destination are implied from 2208 the first ESB, however see the discussion in Section 2.4 concerning 2209 eid-list entries. They MUST contain security-parameters and 2210 security-result fields as follows: 2212 Security-parameters 2213 IV for this specific block 2215 Security-result 2217 encapsulated block 2219 The security-parameters and security-result fields in the subsequent 2220 ESBs MUST NOT contain any items other than these two. Items such as 2221 key and salt are supplied in the first ESB and MUST NOT be repeated. 2223 Implementations MUST support use of "Enveloped-data" type as defined 2224 in [RFC5652] section 6, with RecipientInfo type KeyTransRecipientInfo 2225 containing the issuer and serial number of a suitable certificate. 2226 They MAY support additional RecipientInfo types. The optional 2227 "eContent" field in EncryptedContentInfo MUST be omitted. That is, 2228 the data itself is external, being the content of the block being 2229 protected. 2231 For each block to be protected, the entire original block is 2232 encapsulated in a "replacing" ESB. This replacing ESB is placed in 2233 the outgoing bundle in the same position as the original block. As 2234 mentioned above, this is one-for-one replacement and there is no 2235 consolidation of blocks or mixing of data in any way. 2237 The encryption process uses AES-GCM with the salt and key values from 2238 the first ESB, and an IV unique to this ESB. The process creates 2239 ciphertext for the entire original block, and an authentication tag 2240 for validation at the security destination. The authentication tag 2241 is appended to the ciphertext for the block and the combination is 2242 stored into the "encapsulated block" item in security-result. 2244 The replacing block, of course, also has the same correlator value as 2245 the first ESB with which it is associated. It also contains the 2246 block-specific IV in security-parameters, and the combination of 2247 original-block-ciphertext and authentication tag, stored as an 2248 "encapsulated block" item in security-result. 2250 5. Key Management 2252 Key management in delay tolerant networks is recognized as a 2253 difficult topic and is one that this specification does not attempt 2254 to solve. However, solely in order to support implementation and 2255 testing,implementations SHOULD support: 2257 - The use of well-known RSA public keys for all ciphersuites. 2259 - Long-term pre-shared-symmetric keys for the BAB-HMAC 2260 ciphersuite. 2262 Since endpoint IDs are URIs and URIs can be placed in X.509 [RFC3280] 2263 public key certificates (in the subjectAltName extension) 2264 implementations SHOULD support this way of distributing public keys. 2265 Implementations SHOULD NOT be very strict in how they process X.509 2266 though, for example, it would probably not be correct to insist on 2267 Certificate Revocation List (CRL) checking in many DTN contexts. 2269 6. Default Security Policy 2271 Every node serves as a Policy Enforcement Point insofar as it 2272 enforces some policy that controls the forwarding and delivery of 2273 bundles via one or more convergence layer protocol implementation. 2274 Consequently, every node SHALL have and operate according to its own 2275 configurable security policy, whether the policy be explicit or 2276 default. The policy SHALL specify: 2278 Under what conditions received bundles SHALL be forwarded. 2280 Under what conditions received bundles SHALL be required to 2281 include valid BABs. 2283 Under what conditions the authentication information provided in a 2284 bundle's BAB SHALL be deemed adequate to authenticate the bundle. 2286 Under what conditions received bundles SHALL be required to have 2287 valid PIBs and/or PCBs. 2289 Under what conditions the authentication information provided in a 2290 bundle's PIB SHALL be deemed adequate to authenticate the bundle. 2292 Under what conditions a BAB SHALL be added to a received bundle 2293 before that bundle is forwarded. 2295 Under what conditions a PIB SHALL be added to a received bundle 2296 before that bundle is forwarded. 2298 Under what conditions a PCB SHALL be added to a received bundle 2299 before that bundle is forwarded. 2301 Under what conditions an ESB SHALL be applied to one or more 2302 blocks in a received bundle before that bundle is forwarded. 2304 The actions that SHALL be taken in the event that a received 2305 bundle does not meet the receiving node's security policy 2306 criteria. 2308 This specification does not address how security policies get 2309 distributed to nodes. It only REQUIRES that nodes have and enforce 2310 security policies. 2312 If no security policy is specified at a given node, or if a security 2313 policy is only partially specified, that node's default policy 2314 regarding unspecified criteria SHALL consist of the following: 2316 Bundles that are not well-formed do not meet the security policy 2317 criteria. 2319 The mandatory ciphersuites MUST be used. 2321 All bundles received MUST have a BAB which MUST be verified to 2322 contain a valid security result. If the bundle does not have a 2323 BAB, then the bundle MUST be discarded and processed no further; a 2324 bundle status report indicating the authentication failure MAY be 2325 generated. 2327 No received bundles SHALL be required to have a PIB; if a received 2328 bundle does have a PIB, however, the PIB can be ignored unless the 2329 receiving node is the PIB-dest, in which case the PIB MUST be 2330 verified. 2332 No received bundles SHALL be required to have a PCB; if a received 2333 bundle does have a PCB, however, the PCB can be ignored unless the 2334 receiving node is the PCB-dest, in which case the PCB MUST be 2335 processed. If processing of a PCB yields a PIB, that PIB SHALL be 2336 processed by the node according to the node's security policy. 2338 A PIB SHALL NOT be added to a bundle before sourcing or forwarding 2339 it. 2341 A PCB SHALL NOT be added to a bundle before sourcing or forwarding 2342 it. 2344 A BAB MUST always be added to a bundle before that bundle is 2345 forwarded. 2347 If a destination node receives a bundle that has a PIB-dest but 2348 the value in that PIB-dest is not the EID of the destination node, 2349 the bundle SHALL be delivered at that destination node. 2351 If a destination node receives a bundle that has an ESB-dest but 2352 the value in that ESB-dest is not the EID of the destination node, 2353 the bundle SHALL be delivered at that destination node. 2355 If a received bundle does not satisfy the node's security policy 2356 for any reason, then the bundle MUST be discarded and processed no 2357 further; in this case, a bundle deletion status report (see the 2358 Bundle Protocol [DTNBP]) indicating the failure MAY be generated. 2360 7. Security Considerations 2362 If a BAB ciphersuite uses digital signatures but doesn't include the 2363 security destination (which for a BAB is the next host), then this 2364 allows the bundle to be sent to some node other than the intended 2365 adjacent node. Because the BAB will still authenticate, the 2366 receiving node might erroneously accept and forward the bundle. When 2367 asymmetric BAB ciphersuites are used, the security destination field 2368 SHOULD therefore be included in the BAB. 2370 If a bundle's PIB-dest is not the same as its destination, then some 2371 node other than the destination (the node identified as the PIB-dest) 2372 is expected to validate the PIB security result while the bundle is 2373 en route. However, if for some reason the PIB is not validated, 2374 there is no way for the destination to become aware of this. 2375 Typically, a PIB-dest will remove the PIB from the bundle after 2376 verifying the PIB and before forwarding it. However, if there is a 2377 possibility that the PIB will also be verified at a downstream node, 2378 the PIB-dest will leave the PIB in the bundle. Therefore, if a 2379 destination receives a bundle with a PIB that has a PIB-dest (which 2380 isn't the destination), this might, but does not necessarily, 2381 indicate a possible problem. 2383 If a bundle is fragmented after being forwarded by its PIB-source but 2384 before being received by its PIB-dest, the payload in the bundle MUST 2385 be reassembled before validating the PIB security result in order for 2386 the security result to validate correctly. Therefore, if the PIB- 2387 dest is not capable of performing payload reassembly, its utility as 2388 a PIB-dest will be limited to validating only those bundles that have 2389 not been fragmented since being forwarded from the PIB-source. 2390 Similarly, if a bundle is fragmented after being forwarded by its 2391 PIB-source but before being received by its PIB-dest, all fragments 2392 MUST be received at that PIB-dest in order for the bundle payload to 2393 be able to be reassembled. If not all fragments are received at the 2394 PIB-dest node, the bundle will not be able to be authenticated, and 2395 will therefore never be forwarded by this PIB-dest node. 2397 Specification of a security-destination other than the bundle 2398 destination creates a routing requirement that the bundle somehow be 2399 directed to the security-destination node on its way to the final 2400 destination. This requirement is presently private to the 2401 ciphersuite, since routing nodes are not required to implement 2402 security processing. 2404 8. Conformance 2406 As indicated above, this document describes both BSP and 2407 ciphersuites. A conformant implementation MUST implement both BSP 2408 support and the four ciphersuites described in Section 4. It MAY 2409 also support other ciphersuites. 2411 Implementations that support BSP but not all four mandatory 2412 ciphersuites MUST claim only "restricted compliance" with this 2413 specification, even if they provide other ciphersuites. 2415 All implementations are strongly RECOMMENDED to provide at least a 2416 BAB ciphersuite. A relay node, for example, might not deal with end- 2417 to-end confidentiality and data integrity but it SHOULD exclude 2418 unauthorized traffic and perform hop-by-hop bundle verification. 2420 9. IANA Considerations 2422 None at this time. If the bundle protocol becomes a standards track 2423 protocol, then we may want to consider having IANA establish a 2424 register of block types, and in particular for this specification a 2425 separate register of ciphersuite specifications. 2427 10. References 2429 10.1. Normative References 2431 [DTNBP] Scott, K. and S. Burleigh, "Bundle Protocol 2432 Specification", RFC 5050, November 2007. 2434 [DTNMD] Symington, S., "Delay-Tolerant Networking Metadata 2435 Extension Block", 2436 draft-irtf-dtnrg-bundle-metadata-block-00.txt , June 2007. 2438 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2439 Hashing for Message Authentication", RFC 2104, 2440 February 1997. 2442 [RFC2119] Bradner, S. and J. Reynolds, "Key words for use in RFCs to 2443 Indicate Requirement Levels", RFC 2119, October 1997. 2445 [RFC3280] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet 2446 X.509 Public Key Infrastructure Certificate and 2447 Certificate Revocation List (CRL) Profile", RFC 3280, 2448 April 2002. 2450 [RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) 2451 Algorithms", RFC 3370, August 2002. 2453 [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional 2454 Algorithms and Identifiers for RSA Cryptography for use in 2455 the Internet X.509 Public Key Infrastructure Certificate 2456 and Certificate Revocation List (CRL) Profile", RFC 4055, 2457 June 2005. 2459 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 2460 (GCM) in IPsec Encapsulating Security Payload (ESP)", 2461 RFC 4106, June 2005. 2463 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", 2464 RFC 3852, July 2004. 2466 10.2. Informative References 2468 [DTNRB] Symington, S., "Delay-Tolerant Network Retransmission 2469 Block", 2470 draft-irtf-dtnrg-bundle-retrans-00.txt, work-in-progress, 2471 April 2007. 2473 [DTNarch] Cerf, V., Burleigh, S., Durst, R., Fall, K., Hooke, A., 2474 Scott, K., Torgerson, L., and H. Weiss, "Delay-Tolerant 2475 Network Architecture", RFC 4838, April 2007. 2477 [RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated 2478 Encryption in the Cryptographic Message Syntax (CMS)", 2479 RFC 5084, November 2007. 2481 Authors' Addresses 2483 Susan Flynn Symington 2484 The MITRE Corporation 2485 7515 Colshire Drive 2486 McLean, VA 22102 2487 US 2489 Phone: +1 (703) 983-7209 2490 Email: susan@mitre.org 2491 URI: http://mitre.org/ 2493 Stephen Farrell 2494 Trinity College Dublin 2495 Distributed Systems Group 2496 Department of Computer Science 2497 Trinity College 2498 Dublin 2 2499 Ireland 2501 Phone: +353-1-608-1539 2502 Email: stephen.farrell@cs.tcd.ie 2504 Howard Weiss 2505 SPARTA, Inc. 2506 7110 Samuel Morse Drive 2507 Columbia, MD 21046 2508 US 2510 Phone: +1-443-430-8089 2511 Email: hsw@sparta.com 2513 Peter Lovell 2514 SPARTA, Inc. 2515 7110 Samuel Morse Drive 2516 Columbia, MD 21046 2517 US 2519 Phone: +1-443-430-8052 2520 Email: peter.lovell@sparta.com