idnits 2.17.1 draft-ietf-manet-rfc6622-bis-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 171 has weird spacing: '...-length is th...' -- The document date (April 15, 2013) is 4027 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) ** Obsolete normative reference: RFC 5226 (ref. 'BCP26') (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Downref: Normative reference to an Informational RFC: RFC 2104 -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-FIPS-197' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-FIPS-186-3' -- Possible downref: Non-RFC (?) normative reference: ref. 'ANSI-X9-62-2005' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-SP-800-67' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-FIPS-180-4' -- Obsolete informational reference (is this intentional?): RFC 6622 (Obsoleted by RFC 7182) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Mobile Ad hoc Networking (MANET) U. Herberg 3 Internet-Draft Fujitsu Laboratories of America 4 Obsoletes: 6622 (if approved) T. Clausen 5 Intended status: Standards Track LIX, Ecole Polytechnique 6 Expires: October 17, 2013 C. Dearlove 7 BAE Systems ATC 8 April 15, 2013 10 Integrity Check Value and Timestamp TLV Definitions 11 for Mobile Ad Hoc Networks (MANETs) 12 draft-ietf-manet-rfc6622-bis-02 14 Abstract 16 This document revises, extends and replaces RFC 6622. It describes 17 general and flexible TLVs for representing cryptographic Integrity 18 Check Values (ICVs) and timestamps, using the generalized Mobile Ad 19 Hoc Network (MANET) packet/message format defined in RFC 5444. It 20 defines two Packet TLVs, two Message TLVs, and two Address Block TLVs 21 for affixing ICVs and timestamps to a packet, a message, and one or 22 more addresses, respectively. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on October 17, 2013. 41 Copyright Notice 43 Copyright (c) 2013 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 1.1. Differences from RFC6622 . . . . . . . . . . . . . . . . . 3 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Applicability Statement . . . . . . . . . . . . . . . . . . . 4 62 4. Security Architecture . . . . . . . . . . . . . . . . . . . . 5 63 5. Overview and Functioning . . . . . . . . . . . . . . . . . . . 6 64 6. General ICV TLV Structure . . . . . . . . . . . . . . . . . . 7 65 7. General Timestamp TLV Structure . . . . . . . . . . . . . . . 7 66 8. Packet TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 8 67 8.1. ICV Packet TLV . . . . . . . . . . . . . . . . . . . . . . 8 68 8.2. TIMESTAMP Packet TLV . . . . . . . . . . . . . . . . . . . 9 69 9. Message TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 9 70 9.1. ICV Message TLV . . . . . . . . . . . . . . . . . . . . . 9 71 9.2. TIMESTAMP Message TLV . . . . . . . . . . . . . . . . . . 9 72 10. Address Block TLVs . . . . . . . . . . . . . . . . . . . . . . 10 73 10.1. ICV Address Block TLV . . . . . . . . . . . . . . . . . . 10 74 10.2. TIMESTAMP Address Block TLV . . . . . . . . . . . . . . . 10 75 11. ICV: Basic . . . . . . . . . . . . . . . . . . . . . . . . . . 10 76 12. ICV: Hash Function and Cryptographic Function . . . . . . . . 11 77 12.1. General ICV TLV Structure . . . . . . . . . . . . . . . . 11 78 12.1.1. Rationale . . . . . . . . . . . . . . . . . . . . . . 12 79 12.2. Considerations for Calculating the ICV . . . . . . . . . . 13 80 12.2.1. Packet ICV TLV . . . . . . . . . . . . . . . . . . . 13 81 12.2.2. Message ICV TLV . . . . . . . . . . . . . . . . . . . 13 82 12.2.3. Address Block ICV TLV . . . . . . . . . . . . . . . . 14 83 12.3. Example of a Message Including an ICV . . . . . . . . . . 14 84 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 85 13.1. Expert Review: Evaluation Guidelines . . . . . . . . . . . 16 86 13.2. Packet TLV Type Registrations . . . . . . . . . . . . . . 16 87 13.3. Message TLV Type Registrations . . . . . . . . . . . . . . 18 88 13.4. Address Block TLV Type Registrations . . . . . . . . . . . 19 89 13.5. Hash Functions . . . . . . . . . . . . . . . . . . . . . . 20 90 13.6. Cryptographic Functions . . . . . . . . . . . . . . . . . 20 91 14. Security Considerations . . . . . . . . . . . . . . . . . . . 21 92 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 21 93 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22 94 16.1. Normative References . . . . . . . . . . . . . . . . . . . 22 95 16.2. Informative References . . . . . . . . . . . . . . . . . . 23 97 1. Introduction 99 This document specifies a syntactical representation of security- 100 related information for use with [RFC5444] addresses, messages, and 101 packets, and also reports and updates IANA registrations (from 102 [RFC6622]) of TLV types and type extension registries for these TLV 103 types. This specification does not represent a stand-alone protocol, 104 but is intended for use by MANET routing protocols, or security 105 extensions thereof. 107 Specifically, this document, which revises, extends and replaces 108 [RFC6622], specifies: 110 o Two kinds of TLV: one for carrying Integrity Check Values (ICVs) 111 and one for timestamps in packets, messages, and address blocks as 112 defined by [RFC5444]. 114 o A generic framework for use of these TLVs, accounting for specific 115 features of Packet, Message and Address Block TLVs. 117 This document retains the IANA registries, defined in [RFC6622], for 118 recording code points for ICV calculations, and requests an 119 additional allocation from each these registries. This document 120 retains the IANA registries, defined in [RFC6622], for recording code 121 points for timestamps, hash-functions, and cryptographic functions, 122 but does not request any additional allocations from these 123 registries. 125 Moreover, in Section 12, this document defines the following: 127 o A method for generating ICVs using a combination of a 128 cryptographic function and a hash function, and for including such 129 ICVs in the value field of a TLV. 131 1.1. Differences from RFC6622 133 This document obsoletes [RFC6622]. In addition to editorial updates, 134 this document adds a new type extension 2 for the ICV TLV that is 135 specified in Section 12 of this document. It also makes it clear 136 that an ICV TLV may be used to carry a truncated ICV, and that a 137 single- or multi- value ICV or TIMESTAMP Address Block TLV may cover 138 more than one address. 140 The TLV value of an ICV TLV with type extension 2 has the same 141 internal structure as an ICV TLV with type extension 1, but is 142 calculated also over the source address of the IP datagram carrying 143 the packet, message, or Address Block. The rationale for adding this 144 type extension is that some MANET protocols, such as [RFC6130], use 145 the IP source address of the IP datagram carrying the packet, message 146 or Address Block, e.g., to identify links with neighbor routers. If 147 this address is not otherwise contained in the packet, message, or 148 Address Block payload (which is permitted, e.g., in [RFC6130]), then 149 the address is not protected against tampering. 151 2. Terminology 153 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 154 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 155 "OPTIONAL" in this document are to be interpreted as described in 156 [RFC2119]. 158 This document uses the terminology and notation defined in [RFC5444]. 159 In particular, the following TLV fields and notation from [RFC5444] 160 are used in this specification: 162 is the hop limit of a message, as specified in 163 Section 5.2 of [RFC5444]. 165 is the hop count of a message, as specified in 166 Section 5.2 of [RFC5444]. 168 is the length of the value field in a TLV in octets, as 169 specified in Section 5.4.1 of [RFC5444]. 171 single-length is the length of a single value in the value field in 172 a TLV in octets, as specified in Section 5.4.1 of [RFC5444]. (It 173 is equal to except in a multivalue Address Block TLV.) 175 3. Applicability Statement 177 MANET routing protocols using the format defined in [RFC5444] are 178 accorded the ability to carry additional information in control 179 messages and packets, through the inclusion of TLVs. Information so 180 included MAY be used by a MANET routing protocol, or by an extension 181 of a MANET routing protocol, according to its specification. 183 This document specifies how to include an ICV for a packet, a 184 message, and addresses in Address Blocks within a message, using such 185 TLVs. This document also specifies how to treat an empty Packet TLV 186 Block, and "mutable" fields, specifically the and 187 fields, if present in the Message Header when 188 calculating ICVs, such that the resulting ICV can be correctly 189 verified by any recipient. 191 This document describes a generic framework for creating ICVs, and 192 how to include these ICVs in TLVs. In Section 12, an example method 193 for calculating such ICVs is given, using a cryptographic function 194 and a hash function, for which two TLV type extensions are allocated. 196 4. Security Architecture 198 MANET routing protocol specifications may have a clause allowing a 199 control message to be rejected as "badly formed" or "insecure" prior 200 to the message being processed or forwarded. In particular, MANET 201 routing protocols such as the Neighborhood Discovery Protocol (NHDP) 202 [RFC6130] and the Optimized Link State Routing Protocol version 2 203 [OLSRv2] recognize external reasons (such as failure to verify an 204 ICV) for rejecting a message that would be considered "invalid for 205 processing". 207 This architecture is a result of the observation that with respect to 208 security in MANETs, "one size rarely fits all" and that MANET routing 209 protocol deployment domains have varying security requirements 210 ranging from "unbreakable" to "virtually none". The virtue of this 211 approach is that MANET routing protocol specifications (and 212 implementations) can remain "generic", with extensions providing 213 proper security mechanisms specific to a deployment domain. 215 The MANET routing protocol "security architecture", in which this 216 specification situates itself, can therefore be summarized as 217 follows: 219 o MANET routing protocol specifications, each with a clause allowing 220 an extension to reject a message (prior to processing/forwarding) 221 as "badly formed" or "insecure". 223 o MANET routing protocol security extensions, each rejecting 224 messages as "badly formed" or "insecure", as appropriate for a 225 given security requirement specific to a deployment domain. 227 o Code points and an exchange format for information, necessary for 228 specification of such MANET routing protocol security extensions. 230 This document addresses the last of the points above, by specifying a 231 common exchange format for cryptographic ICVs and timestamps, making 232 reservations from within the Packet TLV, Message TLV, and Address 233 Block TLV registries of [RFC5444], to be used by (and shared among) 234 MANET routing protocol security extensions. 236 For the specific decomposition of an ICV using a cryptographic 237 function and a hash function (specified in Section 12), this document 238 reports the two IANA registries from [RFC6622] for code points for 239 hash functions and cryptographic functions. 241 With respect to [RFC5444], this document is: 243 o Intended to be used in the non-normative, but intended, mode of 244 use described in Appendix B of [RFC5444]. 246 o A specific example of the Security Considerations section of 247 [RFC5444] (the authentication part). 249 5. Overview and Functioning 251 This document specifies a syntactical representation of security- 252 related information for use with [RFC5444] addresses, messages, and 253 packets, and also reports and updates IANA registrations (from 254 [RFC6622]) of TLV types and type extension registries for these TLV 255 types. 257 Moreover, this document provides guidelines for how MANET routing 258 protocols, and MANET routing protocol extensions using this 259 specification, should treat ICV and Timestamp TLVs, and mutable 260 fields in messages. This specification does not represent a stand- 261 alone protocol. MANET routing protocols, and MANET routing protocol 262 extensions using this specification, MUST provide instructions as to 263 how to handle packets, messages, and addresses with security 264 information, associated as specified in this document. 266 This document reports previously assigned TLV types (from [RFC6622]) 267 from the registries defined for Packet, Message, and Address Block 268 TLVs in [RFC5444]. When a TLV type is assigned from one of these 269 registries, a registry for type extensions for that TLV type is 270 created by IANA. This document reports and updates these type 271 extension registries, in order to specify internal structure (and 272 accompanying processing) of the field of a TLV. 274 For example, and as reported in this document, an ICV TLV with type 275 extension = 0 specifies that the field has no pre-defined 276 internal structure but is simply a sequence of octets. An ICV TLV 277 with type extension = 1 specifies that the field has a pre- 278 defined internal structure and defines its interpretation. An ICV 279 TLV with type extension = 2 specifies a modified version of this 280 definition. 282 Specifically, with type extension = 1 or type extension = 2 (added in 283 this document), the field contains the result of combining a 284 cryptographic function and a hash function, calculated over the 285 contents of the packet, message or Address Block. The field 286 contains multiple sub-fields indicating which hash function and 287 cryptographic function have been used as specified in Section 12. 288 The difference between the two type extensions is that the ICV TLV 289 with type extension = 2 is calculated also over the source address of 290 the IP datagram carrying the packet, message, or address block. 292 Other documents can request assignments for other type extensions; if 293 they do so, they MUST specify their internal structure (if any) and 294 interpretation. 296 6. General ICV TLV Structure 298 The value of the ICV TLV is: 300 := + 302 where: 304 is a field, of length octets (except in a 305 multivalue Address Block TLV, where each is of length 306 single-length octets) that contains the information to be 307 interpreted by the ICV verification process, as specified by the 308 type extension. 310 Note that this does not specify how to calculate the nor 311 the internal structure thereof, if any; such information MUST be 312 specified by the type extension for the ICV TLV type; see Section 13. 313 This document specifies three such type extensions -- one for ICVs 314 without pre-defined structures, and two for ICVs constructed 315 combining a cryptographic function and a hash function. 317 7. General Timestamp TLV Structure 319 The value of the Timestamp TLV is: 321 := + 323 where: 325 is a field, of length octets (except in a 326 multivalue Address Block TLV, where each is of length 327 single-length octets) that contains the timestamp. 329 Note that this does not specify how to calculate the nor 330 the internal structure thereof, if any; such information MUST be 331 specified by the type extension for the TIMESTAMP TLV type; see 332 Section 13. 334 A timestamp is essentially "freshness information". As such, its 335 setting and interpretation are to be determined by the MANET routing 336 protocol, or MANET routing protocol extension, that uses the 337 timestamp and can, for example, correspond to a POSIX timestamp, GPS 338 timestamp, or a simple sequence number. Note that insuring time 339 synchronization in a MANET may be difficult because of the 340 decentralized architecture as well as highly dynamic topology due to 341 mobility or other factors. It is out of scope for this document to 342 specify a time synchronization mechanism. 344 8. Packet TLVs 346 Two Packet TLVs are defined: one for including the cryptographic ICV 347 of a packet and one for including the timestamp indicating the time 348 at which the cryptographic ICV was calculated. 350 8.1. ICV Packet TLV 352 An ICV Packet TLV is an example of an ICV TLV as described in 353 Section 6. When determining the for a packet, and adding 354 an ICV Packet TLV to a packet, the following considerations MUST be 355 applied: 357 o Because packets as defined in [RFC5444] are never forwarded by 358 routers, no special considerations are required regarding mutable 359 fields (i.e., and ), if present 360 within any messages in the packet, when calculating the ICV. 362 o Any Packet ICV TLVs already present in the Packet TLV Block MUST 363 be removed before calculating the ICV, and the Packet TLV Block 364 size MUST be recalculated accordingly. 366 o If the Packet TLV Block now contains no Packet TLVs, the Packet 367 TLV Block MUST be removed, and the phastlv bit in the 368 field in the Packet Header MUST be cleared ('0'). 370 o Any removed ICV Packet TLVs MUST be restored after having 371 calculated the ICV, and the Packet TLV Block size MUST be 372 recalculated accordingly. 374 o When any removed ICV Packet TLVs, and the newly calculated ICV 375 Packet TLV, are added to the packet, if there is no Packet TLV 376 Block then one MUST be added, including setting ('1') the phastlv 377 bit in the field in the Packet Header. 379 The rationale for removing any Packet ICV TLVs already present prior 380 to calculating the ICV is that several ICV TLVs may be added to the 381 same packet, e.g., using different ICV cryptographic and/or hash 382 functions. The rationale for removing an empty Packet TLV Block is 383 because the receiver of the packet cannot tell the difference between 384 what was an absent Packet TLV Block, and what was an empty Packet TLV 385 Block when removing and verifying the ICV Packet TLV if no other 386 Packet TLVs are present. 388 8.2. TIMESTAMP Packet TLV 390 A TIMESTAMP Packet TLV is an example of a Timestamp TLV as described 391 in Section 7. If a packet contains one or more TIMESTAMP TLVs and 392 one or more ICV TLVs, then the TIMESTAMP TLVs (as well as any other 393 Packet TLVs) MUST be added to the packet before the ICV TLVs, in 394 order to include the timestamps and other TLVs in the calculation of 395 the ICVs. 397 9. Message TLVs 399 Two Message TLVs are defined: one for including the cryptographic ICV 400 of a message and one for including the timestamp indicating the time 401 at which the cryptographic ICV was calculated. 403 9.1. ICV Message TLV 405 An ICV Message TLV is an example of an ICV TLV as described in 406 Section 6. When determining the for a message, the 407 following considerations MUST be applied: 409 o The fields and , if present in the 410 Message Header, MUST both be assumed to have the value 0 (zero) 411 when calculating the ICV. 413 o Any Message ICV TLVs already present in the Message TLV Block MUST 414 be removed before calculating the ICV, and the message size as 415 well as the Message TLV Block size MUST be recalculated 416 accordingly. Also, all relevant TLVs other than ICV TLVs MUST be 417 added prior to TCV value calculation. 419 o Any removed ICV Message TLVs MUST be restored after having 420 calculated the ICV, and the message size as well as the Message 421 TLV Block size MUST be recalculated accordingly. 423 The rationale for removing any ICV Message TLVs already present prior 424 to calculating the ICV is that several ICV TLVs may be added to the 425 same message, e.g., using different ICV cryptographic and/or hash 426 functions. 428 9.2. TIMESTAMP Message TLV 430 A TIMESTAMP Message TLV is an example of a Timestamp TLV as described 431 in Section 7. If a message contains one or more TIMESTAMP TLVs and 432 one or more ICV TLVs, then the TIMESTAMP TLVs (as well as any other 433 Message TLVs) MUST be added to the message before the ICV TLVs, in 434 order to include the timestamps and other Message TLVs in the 435 calculation of the ICV. 437 10. Address Block TLVs 439 Two Address Block TLVs are defined: one for associating a 440 cryptographic ICV to one or more addresses and their associated 441 information, and one for including the timestamp indicating the time 442 at which the cryptographic ICV was calculated. 444 10.1. ICV Address Block TLV 446 An ICV Address Block TLV is an example of an ICV TLV as described in 447 Section 6. The ICV is calculated over one or more addresses, 448 concatenated with any other values -- for example, other Address 449 Block TLV fields -- associated with those addresses. A MANET 450 routing protocol, or MANET routing protocol extension, using Address 451 Block ICV TLVs MUST specify how to include any such concatenated 452 attributes of the addresses in the calculation and verification 453 processes for the ICV. When determining an for one or 454 more addresses, the following consideration MUST be applied: 456 o If other TLV values are concatenated with the addresses for 457 calculating the ICV, the corresponding TLVs MUST NOT be ICV 458 Address Block TLVs already associated with any of the addresses. 460 The rationale for not concatenating the addresses with any ICV TLV 461 values already associated with the addresses when calculating the ICV 462 is that several ICVs may be added to the same address or addresses, 463 e.g., using different ICV cryptographic and/or hash functions, and 464 the order of addition is not known to the recipient. 466 10.2. TIMESTAMP Address Block TLV 468 A TIMESTAMP Address Block TLV is an example of a Timestamp TLV as 469 described in Section 7. If one or more TIMESTAMP TLVs and one or 470 more ICV TLVs are associated with an address, the relevant TIMESTAMP 471 TLV (s) MUST be included before calculating the value of 472 the ICV to be contained in the ICV TLV value (i.e., concatenated with 473 the associated addresses and any other values as described in 474 Section 10.1). 476 11. ICV: Basic 478 The basic ICV, represented by way of an ICV TLV with type extension = 479 0, is a simple bit-field containing the cryptographic ICV. This 480 assumes that the mechanism stipulating how ICVs are calculated and 481 verified is established outside of this specification, e.g., by 482 administrative configuration or external out-of-band signaling. 483 Thus, the , when using type extension = 0, is: 485 := 487 where: 489 is a field, of length octets (or single-length 490 octets in a multivalue Address Block TLV) that contains the 491 cryptographic ICV. 493 12. ICV: Hash Function and Cryptographic Function 495 One common way of calculating an ICV is combining a cryptographic 496 function and a hash function applied to the content. This 497 decomposition is specified in this section, using either type 498 extension = 1 or type extension = 2, in the ICV TLVs. 500 12.1. General ICV TLV Structure 502 The following data structure allows representation of a cryptographic 503 ICV, including specification of the appropriate hash function and 504 cryptographic function used for calculating the ICV: 506 := 507 508 509 ? 510 512 where: 514 is a one octet unsigned integer field specifying the 515 hash function. 517 is a one octet unsigned integer field 518 specifying the cryptographic function. 520 is a one octet unsigned integer field specifying the 521 length of the field as a number of octets. The value 522 zero (0x00) is reserved for using a single pre-installed, shared 523 key. 525 is a field specifying the key identifier of the key that 526 was used to calculate the ICV of the message, which allows unique 527 identification of different keys with the same originator. It is 528 the responsibility of each key originator to make sure that 529 actively used keys that it issues have distinct key identifiers. 530 If equals zero (0x00), the field is not 531 contained in the TLV, and a single pre-installed, shared key is 532 used. 534 is a field with length - 3 - 535 octets (except in a multivalue Address Block TLV, in which it is 536 single-length - 3 - octets) and which contains the 537 cryptographic ICV. 539 The version of this TLV, specified in this section, assumes that, 540 unless otherwise specified, calculating the ICV can be decomposed 541 into: 543 ICV-value = cryptographic-function(hash-function(content)) 545 In some cases a different combination of cryptographic function and 546 hash function may be specified. This is the case for the HMAC 547 function, which is specified as defined in Section 13.6, using the 548 hash function twice. 550 The difference between the two type extensions is that in addition to 551 the information covered by the ICV using type extension 1 (which is 552 detailed in the following sections), the ICV using type extension 2 553 also MUST cover the source address of the IP datagram carrying the 554 corresponding packet, message, or Address Block. 556 The field MAY be truncated after being calculated, this is 557 indicated by its length, calculated as described above. The 558 truncation SHOULD be as specified for the relevant cryptographic 559 function (and, if appropriate, hash function). 561 The hash function and the cryptographic function correspond to the 562 entries in two IANA registries, which are reported by this 563 specification and are described in Section 13. 565 12.1.1. Rationale 567 The rationale for separating the hash function and the cryptographic 568 function into two octets instead of having all combinations in a 569 single octet -- possibly as a TLV type extension -- is that adding 570 further hash functions or cryptographic functions in the future may 571 lead to a non-contiguous number space, as well as providing a smaller 572 overall space. 574 The rationale for not including a field that lists parameters of the 575 cryptographic ICV in the TLV is that, before being able to validate a 576 cryptographic ICV, routers have to exchange or acquire keys. Any 577 additional parameters can be provided together with the keys in that 578 bootstrap process. It is therefore not necessary, and would even 579 entail an extra overhead, to transmit the parameters within every 580 message. 582 The rationale for the addition of type extension 2 is that the source 583 code address is used in some cases, such as when processing HELLO 584 messages in [RFC6130]. This is applicable only to packets (which 585 only ever travel one hop) and messages (and their Address Blocks) 586 that only travel one hop. It is not applicable to messages that may 587 be forwarded more than one hop, such as TC messages in [OLSRv2]. 589 12.2. Considerations for Calculating the ICV 591 The considerations listed in the following subsections MUST be 592 applied when calculating the ICV for Packet, Message, and Address 593 Block TLVs, respectively. 595 12.2.1. Packet ICV TLV 597 When determining the for a packet, with type extension = 598 1: 600 o The ICV is calculated over the fields , 601 , , and -- if present -- 602 (in that order), followed by the entire packet, including 603 the Packet Header, including all Packet TLVs (other than ICV 604 Packet TLVs), and all included messages. The considerations of 605 Section 8.1 MUST be applied. 607 When determining the for a packet, with type extension = 608 2: 610 o The same procedure as for type extension = 1 is used, except that 611 the source address of the IP datagram carrying the packet is also 612 concatenated, in the first position, with the data used. 614 12.2.2. Message ICV TLV 616 When determining the for a message, with type extension = 617 1: 619 o The ICV is calculated over the fields , 620 , , and -- if present -- 621 (in that order), followed by the entire message. The 622 considerations in Section 9.1 MUST be applied. 624 When determining the for a message, with type extension = 625 2: 627 o The same procedure as for type extension = 1 is used, except that 628 the source address of the IP datagram carrying the message is also 629 concatenated, in the first position, with the data used. 631 12.2.3. Address Block ICV TLV 633 When determining the for one or more addresses, with type 634 extension = 1: 636 o The ICV is calculated over the fields , 637 , , and -- if present -- 638 (in that order), followed by the addresses, and followed 639 by any other values -- for example, other address block TLV 640 s that are associated with those addresses. A MANET 641 routing protocol, or MANET routing protocol extension, using ICV 642 Address Block TLVs MUST specify how to include any such 643 concatenated attribute of the addresses in the verification 644 process of the ICV. The considerations in Section 10.1 MUST be 645 applied. 647 When determining the for one or more addresses, with type 648 extension = 2: 650 o The same procedure as for type extension = 1 is used, except that 651 the source address of the IP datagram carrying the Address Block 652 is also concatenated, in the first position, with the data used. 654 12.3. Example of a Message Including an ICV 656 The sample message depicted in Figure 1 is derived from Appendix D of 657 [RFC5444]. The message contains an ICV Message TLV, with the value 658 representing an ICV that is 16 octets long of the whole message, and 659 a key identifier that is 4 octets long. The type extension of the 660 Message TLV is 1, for the specific decomposition of an ICV using a 661 cryptographic function and a hash function, as specified in 662 Section 12. 664 0 1 2 3 665 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 666 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 667 | PV=0 | PF=8 | Packet Sequence Number | Message Type | 668 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 669 | MF=15 | MAL=3 | Message Length = 44 | Msg Orig Addr | 670 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 671 | Message Originator Address (cont) | Hop Limit | 672 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 673 | Hop Count | Message Sequence Number | Msg TLV Block | 674 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 675 | Length = 27 | ICV | MTLVF = 144 | MTLVExt = 1 | 676 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 677 |Value Len = 23 | Hash Func | Crypto Func |Key ID length=4| 678 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 679 | Key Identifier | 680 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 681 | ICV Value | 682 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 683 | ICV Value (cont) | 684 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 685 | ICV Value (cont) | 686 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 687 | ICV Value (cont) | 688 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 690 Figure 1: Example Message with ICV 692 13. IANA Considerations 694 This specification reports the following, originally specified in 695 [RFC6622]: 697 o Two Packet TLV Types, which have been allocated from the 0-223 698 range of the "Packet TLV Types" repository of [RFC5444], as 699 specified in Table 1. 701 o Two Message TLV Types, which have been allocated from the 0-127 702 range of the "Message TLV Types" repository of [RFC5444], as 703 specified in Table 2. 705 o Two Address Block TLV Types, which have been allocated from the 706 0-127 range of the "Address Block TLV Types" repository of 707 [RFC5444], as specified in Table 3. 709 This specification updates the following, created in [RFC6622]: 711 o A type extension registry for each of these TLV types with values 712 as listed in Tables 1, 2, and 3. 714 The following terms are used as defined in [BCP26]: "Namespace", 715 "Registration", and "Designated Expert". 717 The following policy is used as defined in [BCP26]: "Expert Review". 719 13.1. Expert Review: Evaluation Guidelines 721 For TLV type extensions registries where an Expert Review is 722 required, the Designated Expert SHOULD take the same general 723 recommendations into consideration as those specified by [RFC5444]. 725 For both Timestamp and ICV TLVs, functionally similar extensions for 726 Packet, Message, and Address Block TLVs SHOULD be numbered 727 identically. 729 13.2. Packet TLV Type Registrations 731 IANA has, in accordance with [RFC6622], made allocations from the 732 "Packet TLV Types" namespace of [RFC5444] for the Packet TLVs 733 specified in Table 1. IANA are requested to modify this allocation 734 (defining type extension = 2) as indicated. 736 +-----------+------+-----------+------------------------------------+ 737 | Name | Type | Type | Description | 738 | | | Extension | | 739 +-----------+------+-----------+------------------------------------+ 740 | ICV | 5 | 0 | ICV of a packet | 741 | | | 1 | ICV, using a cryptographic | 742 | | | | function and a hash function, as | 743 | | | | specified in Section 12 of this | 744 | | | | document | 745 | | | 2 | ICV, using a cryptographic | 746 | | | | function and a hash function, and | 747 | | | | including the IP datagram source | 748 | | | | address, as specified in | 749 | | | | Section 12 of this document | 750 | | | 3-251 | Unassigned; Expert Review | 751 | | | 252-255 | Experimental Use | 752 | TIMESTAMP | 6 | 0 | Unsigned timestamp of arbitrary | 753 | | | | length, given by the TLV Length | 754 | | | | field. The MANET routing protocol | 755 | | | | has to define how to interpret | 756 | | | | this timestamp | 757 | | | 1 | Unsigned 32-bit timestamp, as | 758 | | | | specified in [IEEE 1003.1-2008 | 759 | | | | (POSIX)] | 760 | | | 2 | NTP timestamp format, as specified | 761 | | | | in [RFC5905] | 762 | | | 3 | Signed timestamp of arbitrary | 763 | | | | length with no constraints such as | 764 | | | | monotonicity. In particular, it | 765 | | | | may represent any random value | 766 | | | 4-251 | Unassigned; Expert Review | 767 | | | 252-255 | Experimental Use | 768 +-----------+------+-----------+------------------------------------+ 770 Table 1: Packet TLV Types 772 More than one ICV Packet TLV with the same type extension MAY be 773 included in a packet if these represent different ICV calculations 774 (e.g., with type extension 1 or 2 and different cryptographic 775 function and/or hash function, or with a different key identifier). 776 ICV Packet TLVs that carry what is declared to be the same 777 information MUST NOT be included in the same packet. More than one 778 TIMESTAMP Packet TLV with the same type extension MUST NOT be 779 included in a packet. 781 13.3. Message TLV Type Registrations 783 IANA has, in accordance with [RFC6622], made allocations from the 784 "Message TLV Types" namespace of [RFC5444] for the Message TLVs 785 specified in Table 2. IANA are requested to modify this allocation 786 (defining type extension = 2) as indicated. 788 +-----------+------+-----------+------------------------------------+ 789 | Name | Type | Type | Description | 790 | | | Extension | | 791 +-----------+------+-----------+------------------------------------+ 792 | ICV | 5 | 0 | ICV of a message | 793 | | | 1 | ICV, using a cryptographic | 794 | | | | function and a hash function, as | 795 | | | | specified in Section 12 of this | 796 | | | | document | 797 | | | 2 | ICV, using a cryptographic | 798 | | | | function and a hash function, and | 799 | | | | including the IP datagram source | 800 | | | | address, as specified in | 801 | | | | Section 12 of this document | 802 | | | 3-251 | Unassigned; Expert Review | 803 | | | 252-255 | Experimental Use | 804 | TIMESTAMP | 6 | 0 | Unsigned timestamp of arbitrary | 805 | | | | length, given by the TLV Length | 806 | | | | field. | 807 | | | 1 | Unsigned 32-bit timestamp, as | 808 | | | | specified in [IEEE 1003.1-2008 | 809 | | | | (POSIX)] | 810 | | | 2 | NTP timestamp format, as specified | 811 | | | | in [RFC5905] | 812 | | | 3 | Signed timestamp of arbitrary | 813 | | | | length with no constraints such as | 814 | | | | monotonicity. In particular, it | 815 | | | | may represent any random value | 816 | | | 4-251 | Unassigned; Expert Review | 817 | | | 252-255 | Experimental Use | 818 +-----------+------+-----------+------------------------------------+ 820 Table 2: Message TLV Types 822 More than one ICV Message TLV with the same type extension MAY be 823 included in a message if these represent different ICV calculations 824 (e.g., with type extension 1 or 2 and different cryptographic 825 function and/or hash function, or with a different key identifier). 826 ICV Message TLVs that carry what is declared to be the same 827 information MUST NOT be included in the same message. More than one 828 TIMESTAMP Message TLV with the same type extension MUST NOT be 829 included in a message. 831 13.4. Address Block TLV Type Registrations 833 IANA has, in accordance with [RFC6622], made allocations from the 834 "Address Block TLV Types" namespace of [RFC5444] for the Packet TLVs 835 specified in Table 3. IANA are requested to modify this allocation 836 (defining type extension = 2) as indicated. 838 +-----------+------+-----------+------------------------------------+ 839 | Name | Type | Type | Description | 840 | | | Extension | | 841 +-----------+------+-----------+------------------------------------+ 842 | ICV | 5 | 0 | ICV of an object (e.g., an | 843 | | | | address) | 844 | | | 1 | ICV, using a cryptographic | 845 | | | | function and a hash function, as | 846 | | | | specified in Section 12 of this | 847 | | | | document | 848 | | | 2 | ICV, using a cryptographic | 849 | | | | function and a hash function, and | 850 | | | | including the IP datagram source | 851 | | | | address, as specified in | 852 | | | | Section 12 of this document | 853 | | | 3-251 | Unassigned; Expert Review | 854 | | | 252-255 | Experimental Use | 855 | TIMESTAMP | 6 | 0 | Unsigned timestamp of arbitrary | 856 | | | | length, given by the TLV Length | 857 | | | | field | 858 | | | 1 | Unsigned 32-bit timestamp, as | 859 | | | | specified in [IEEE 1003.1-2008 | 860 | | | | (POSIX)] | 861 | | | 2 | NTP timestamp format, as specified | 862 | | | | in [RFC5905] | 863 | | | 3 | Signed timestamp of arbitrary | 864 | | | | length with no constraints such as | 865 | | | | monotonicity. In particular, it | 866 | | | | may represent any random value | 867 | | | 4-251 | Unassigned; Expert Review | 868 | | | 252-255 | Experimental Use | 869 +-----------+------+-----------+------------------------------------+ 871 Table 3: Address Block TLV Types 873 More than one ICV Address Block TLV with the same type extension MAY 874 be associate with an address if these represent different ICV 875 calculations (e.g., with type extension 1 or 2 and different 876 cryptographic function and/or hash function, or with a different key 877 identifier). ICV Address Block TLVs that carry what is declared to 878 be the same information MUST NOT be associated with the same address. 879 More than one TIMESTAMP Address Block TLV with the same type 880 extension MUST NOT be associated with any address. 882 13.5. Hash Functions 884 IANA has, in accordance with [RFC6622], created a registry for hash 885 functions that can be used when creating an ICV, as specified in 886 Section 12 of this document. The initial assignments and allocation 887 policies are specified in Table 4. This registry is unchanged by 888 this specification. 890 +-------------+-----------+-----------------------------------------+ 891 | Hash | Algorithm | Description | 892 | Function | | | 893 | Value | | | 894 +-------------+-----------+-----------------------------------------+ 895 | 0 | none | The "identity function": The hash value | 896 | | | of an object is the object itself | 897 | 1 | SHA1 | [NIST-FIPS-180-4] | 898 | 2 | SHA224 | [NIST-FIPS-180-4] | 899 | 3 | SHA256 | [NIST-FIPS-180-4] | 900 | 4 | SHA384 | [NIST-FIPS-180-4] | 901 | 5 | SHA512 | [NIST-FIPS-180-4] | 902 | 6-251 | | Unassigned; Expert Review | 903 | 252-255 | | Experimental Use | 904 +-------------+-----------+-----------------------------------------+ 906 Table 4: Hash Function Registry 908 13.6. Cryptographic Functions 910 IANA has, in accordance with [RFC6622], created a registry for the 911 cryptographic functions, as specified in Section 12 of this document. 912 Initial assignments and allocation policies are specified in Table 5. 913 This registry is unchanged by this specification. 915 +----------------+-----------+--------------------------------------+ 916 | Cryptographic | Algorithm | Description | 917 | Function Value | | | 918 +----------------+-----------+--------------------------------------+ 919 | 0 | none | The "identity function": The value | 920 | | | of an encrypted hash is the hash | 921 | | | itself | 922 | 1 | RSA | [RFC3447] | 923 | 2 | DSA | [NIST-FIPS-186-3] | 924 | 3 | HMAC | [RFC2104] | 925 | 4 | 3DES | [NIST-SP-800-67] | 926 | 5 | AES | [NIST-FIPS-197] | 927 | 6 | ECDSA | [ANSI-X9-62-2005] | 928 | 7-251 | | Unassigned; Expert Review | 929 | 252-255 | | Experimental Use | 930 +----------------+-----------+--------------------------------------+ 932 Table 5: Cryptographic Function Registry 934 14. Security Considerations 936 This document does not specify a protocol. It provides a syntactical 937 component for cryptographic ICVs of messages and packets, as defined 938 in [RFC5444]. It can be used to address security issues of a MANET 939 routing protocol or MANET routing protocol extension. As such, it 940 has the same security considerations as [RFC5444]. 942 In addition, a MANET routing protocol or MANET routing protocol 943 extension that uses this specification MUST specify how to use the 944 framework, and the TLVs presented in this document. In addition, the 945 protection that the MANET routing protocol or MANET routing protocol 946 extensions attain by using this framework MUST be described. 948 As an example, a MANET routing protocol that uses this component to 949 reject "badly formed" or "insecure" messages if a control message 950 does not contain a valid ICV SHOULD indicate the security assumption 951 that if the ICV is valid, the message is considered valid. It also 952 SHOULD indicate the security issues that are counteracted by this 953 measure (e.g., link or identity spoofing) as well as the issues that 954 are not counteracted (e.g., compromised keys). 956 15. Acknowledgements 958 The authors would like to thank Bo Berry (Cisco), Alan Cullen (BAE 959 Systems), Justin Dean (NRL), Paul Lambert (Marvell), Jerome Milan 960 (Ecole Polytechnique), and Henning Rogge (FGAN) for their 961 constructive comments on [RFC6622]. 963 The authors also appreciate the detailed reviews of [RFC6622] from 964 the Area Directors, in particular Stewart Bryant (Cisco), Stephen 965 Farrell (Trinity College Dublin), and Robert Sparks (Tekelec), as 966 well as Donald Eastlake (Huawei) from the Security Directorate. 968 The authors would like to thank Justin Dean (NRL) and Henning Rogge 969 (FGAN) for their constructive comments on this specification. 971 16. References 973 16.1. Normative References 975 [BCP26] Narten, T. and H. Alvestrand, "Guidelines 976 for Writing an IANA Considerations 977 Section in RFCs", BCP 26, RFC 5226, 978 May 2008. 980 [RFC2119] Bradner, S., "Key words for use in RFCs 981 to Indicate Requirement Levels", BCP 14, 982 RFC 2119, March 1997. 984 [RFC5444] Clausen, T., Dearlove, C., Dean, J., and 985 C. Adjih, "Generalized Mobile Ad Hoc 986 Network (MANET) Packet/Message Format", 987 RFC 5444, February 2009. 989 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., 990 and W. Kasch, "Network Time Protocol 991 Version 4: Protocol and Algorithms 992 Specification", RFC 5905, June 2010. 994 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key 995 Cryptography Standards (PKCS) #1: RSA 996 Cryptography Specifications Version 2.1", 997 RFC 3447, February 2003. 999 [RFC2104] Krawczyk, H., Bellare, M., and R. 1000 Canetti, "HMAC: Keyed-Hashing for Message 1001 Authentication", RFC 2104, February 1997. 1003 [NIST-FIPS-197] National Institute of Standards and 1004 Technology, "Specification for the 1005 Advanced Encryption Standard (AES)", 1006 FIPS 197, November 2001. 1008 [NIST-FIPS-186-3] National Institute of Standards and 1009 Technology, "Digital Signature Standard 1010 (DSS)", FIPS 186-3, June 2009. 1012 [ANSI-X9-62-2005] American National Standards Institute, 1013 "Public Key Cryptography for the 1014 Financial Services Industry: The Elliptic 1015 Curve Digital Signature Algorithm 1016 (ECDSA)", ANSI X9.62-2005, November 2005. 1018 [NIST-SP-800-67] National Institute of Standards and 1019 Technology, "Recommendation for the 1020 Triple Data Encryption Algorithm (TDEA) 1021 Block Cipher", Special 1022 Publication 800-67, Revision 1, 1023 January 2012. 1025 [NIST-FIPS-180-4] National Institute of Standards and 1026 Technology, "Secure Hash Standard (SHS)", 1027 FIPS 180-4, March 2012. 1029 [IEEE 1003.1-2008 (POSIX)] IEEE Computer Society, "1003.1-2008 1030 Standard for Information Technology - 1031 Portable Operating System Interface 1032 (POSIX) Base Specifications, Issue 7", 1033 December 2008. 1035 16.2. Informative References 1037 [RFC6130] Clausen, T., Dearlove, C., and J. Dean, 1038 "Mobile Ad Hoc Network (MANET) 1039 Neighborhood Discovery Protocol (NHDP)", 1040 RFC 6130, April 2011. 1042 [RFC6622] Herberg, U. and T. Clausen, "Integrity 1043 Check Value and Timestamp TLV Definitions 1044 for Mobile Ad Hoc Networks (MANETs)", 1045 RFC 6622, May 2012. 1047 [OLSRv2] Clausen, T., Dearlove, C., Jacquet, P., 1048 and U. Herberg, "The Optimized Link State 1049 Routing Protocol version 2", Work in 1050 Progress draft-ietf-manet-olsrv2-19, 1051 March 2013. 1053 Authors' Addresses 1055 Ulrich Herberg 1056 Fujitsu Laboratories of America 1057 1240 E. Arques Ave. 1058 Sunnyvale, CA 94085 1059 USA 1061 EMail: ulrich@herberg.name 1062 URI: http://www.herberg.name/ 1064 Thomas Heide Clausen 1065 LIX, Ecole Polytechnique 1066 91128 Palaiseau Cedex 1067 France 1069 Phone: +33 6 6058 9349 1070 EMail: T.Clausen@computer.org 1071 URI: http://www.thomasclausen.org/ 1073 Christopher Dearlove 1074 BAE Systems Advanced Technology Centre 1075 West Hanningfield Road 1076 Great Baddow, Chelmsford 1077 United Kingdom 1079 Phone: +44 1245 242194 1080 EMail: chris.dearlove@baesystems.com 1081 URI: http://www.baesystems.com/