idnits 2.17.1 draft-ietf-manet-packetbb-sec-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5444]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 20, 2010) is 5059 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) == Outdated reference: A later version (-15) exists of draft-ietf-manet-nhdp-12 == Outdated reference: A later version (-19) exists of draft-ietf-manet-olsrv2-11 -- Obsolete informational reference (is this intentional?): RFC 2437 (Obsoleted by RFC 3447) -- Obsolete informational reference (is this intentional?): RFC 4330 (Obsoleted by RFC 5905) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 3 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 T. Clausen 4 Intended status: Standards Track LIX, Ecole Polytechnique 5 Expires: December 22, 2010 June 20, 2010 7 MANET Cryptographical Signature TLV Definition 8 draft-ietf-manet-packetbb-sec-00 10 Abstract 12 This document describes a general and flexible TLV (type-length-value 13 structure) for representing cryptographic signatures as well as 14 timestamps, using the generalized MANET packet/message format 15 [RFC5444]. It defines two Packet TLVs, two Message TLVs, and two 16 Address Block TLVs, for affixing cryptographic signatures and 17 timestamps to a packet, message and address, respectively. 19 Status of this Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on December 22, 2010. 36 Copyright Notice 38 Copyright (c) 2010 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 3. Applicability Statement . . . . . . . . . . . . . . . . . . . 4 56 4. Protocol Overview and Functioning . . . . . . . . . . . . . . 5 57 5. General Signature TLV Structure . . . . . . . . . . . . . . . 6 58 5.1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . 6 59 6. General Timestamp TLV Structure . . . . . . . . . . . . . . . 7 60 7. Packet TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 7 61 7.1. Packet SIGNATURE TLV . . . . . . . . . . . . . . . . . . . 7 62 7.2. Packet TIMESTAMP TLV . . . . . . . . . . . . . . . . . . . 8 63 8. Message TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 8 64 8.1. Message SIGNATURE TLV . . . . . . . . . . . . . . . . . . 8 65 8.2. Message TIMESTAMP TLV . . . . . . . . . . . . . . . . . . 8 66 9. Address Block TLVs . . . . . . . . . . . . . . . . . . . . . . 8 67 9.1. Address Block SIGNATURE TLV . . . . . . . . . . . . . . . 9 68 9.2. Address Block TIMESTAMP TLV . . . . . . . . . . . . . . . 9 69 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 70 10.1. TLV Registrations . . . . . . . . . . . . . . . . . . . . 9 71 10.1.1. Expert Review: Evaluation Guidelines . . . . . . . . 9 72 10.1.2. Packet TLV Type Registrations . . . . . . . . . . . . 9 73 10.1.3. Message TLV Type Registrations . . . . . . . . . . . 10 74 10.1.4. Address Block TLV Type Registrations . . . . . . . . 11 75 10.2. New IANA Registries . . . . . . . . . . . . . . . . . . . 12 76 10.2.1. Expert Review: Evaluation Guidelines . . . . . . . . 12 77 10.2.2. Hash Function . . . . . . . . . . . . . . . . . . . . 12 78 10.2.3. Cryptographic Algorithm . . . . . . . . . . . . . . . 13 79 11. Security Considerations . . . . . . . . . . . . . . . . . . . 13 80 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 14 81 13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 14 82 13.1. Normative References . . . . . . . . . . . . . . . . . . . 14 83 13.2. Informative References . . . . . . . . . . . . . . . . . . 14 84 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 15 85 A.1. Example of a Signed Message . . . . . . . . . . . . . . . 15 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 17 88 1. Introduction 90 This document: 92 o specifies two TLVs for carrying cryptographic signatures and 93 timestamps in packets, messages and address blocks as defined by 94 [RFC5444], 96 o requests IANA allocations for these Packet, Message, and Address 97 Block TLVs from the 0-223 Packet TLV range, the 0-127 Message TLV 98 range and the 0-127 Address Block TLV range from [RFC5444], 100 o describes how cryptographic signatures are calculated, taking (for 101 Message TLVs) into account the mutable message header fields 102 ( and ) where these fields are 103 present in messages, 105 o requests creation of two IANA registries for recording code points 106 for hash function and signature calculation, respectively. 108 This document does not stipulate how to sign or validate messages. A 109 specification of a routing protocol or routing protocol extension, 110 using the security representation of this document, MUST specify 111 appropriate interpretation of the TLVs. This document does 112 specifically not suggest specific cryptographic algorithms or hash 113 functions, but rather establishes IANA registries for such. 115 2. Terminology 117 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 118 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 119 "OPTIONAL" in this document are to be interpreted as described in 120 [RFC2119]. 122 This document uses the terminology and notation defined in [RFC5444]. 123 Additionally, it defines the following terminology: 125 o Hash-Function 127 A hash function is an algorithm that takes a message of any 128 length as input and produces a fixed-length string as output. 129 Hash functions are used in cryptography for authentication and 130 message integrity. 132 o Object 133 An object, here, is any sequence of bytes that is used to 134 calculate the signature over (e.g. a packet, a message, an 135 address as defined in [RFC5444], a timestamp, or a combination 136 of these). 138 o Signature 140 A digital signature can be used to (i) authenticate the 141 originator and (ii) to assure that the object, which has been 142 signed, has not been altered in transit. In many cases, a 143 signature is calculated by encrypting a hash of the object, 144 which is the basic assumption of this specification. 146 o Timestamp 148 The timestamp indicates the time when the timestamp has been 149 created. If a timestamp is added to an object before signing 150 the object, this information can be useful to determine the 151 "freshness" of the signed object. "Old" objects can indicate 152 replayed objects. The minimal requirement for a timestamp is 153 to provide a logical representation of time (e.g. Lamport 154 time). Using timestamps may require - at least roughly - 155 synchronized clocks among the routers in the network. 157 3. Applicability Statement 159 The packet and message format defined in [RFC5444] accords MANET 160 routing protocols, using this format, the ability to carry additional 161 information in control messages, through inclusion of TLVs. 162 Information so included in a control message MAY be used by the 163 routing protocol, or by an extension of the routing protocol, 164 according to its specification. 166 This document specifies how to include a cryptographic signature for 167 a packet, message or address block by way of such TLVs. This 168 document also specifies how to treat "mutable" fields ( and ) in the message header when calculating 170 signatures, such that the resulting signature can be correctly 171 verified by any recipient, and how to include this signature. A 172 MANET routing protocol, or an extension of a MANET routing protocol, 173 MAY use such included cryptographic signatures for, for example, 174 rejecting messages where signature verification fails. 176 Basic MANET routing protocol specifications are often "oblivious to 177 security", however have a clause allowing a control message to be 178 rejected as "badly formed" prior to it being processed or forwarded. 179 Protocols such as [NHDP] and [OLSRv2] recognize external reasons 180 (such as failure to verify a signature) as being reasons for 181 rejecting a message as "badly formed", and therefore "invalid for 182 processing". This architecture is a result of the observation that 183 with respect to security in MANETs, "one size rarely fits all" and 184 that MANET routing protocol deployment domains have varying security 185 requirements ranging from "unbreakable" to "virtually none". The 186 virtue of this approach is that MANET routing protocol specifications 187 (and implementations) can remain "generic", with extensions providing 188 proper deployment-domain specific security mechanisms. 190 The MANET routing protocol "security architecture", in which this 191 specification situates itself, can therefore be summarized as 192 follows: 194 o Security-oblivious MANET routing protocol specifications, with a 195 clause allowing an extension to reject a message (prior to 196 processing/forwarding) as "badly formed". 198 o MANET routing protocol security extensions, rejecting messages as 199 "badly formed", as appropriate for a given deployment-domain 200 specific security requirement. 202 o Code-points and an exchange format for information necessary for 203 specification of such security extensions. 205 This document addresses the last of these issues, by specifying a 206 common exchange format for cryptographic signatures. This document 207 also makes reservations from within the Packet TLV, Message TLV and 208 Address Block TLV registries of [RFC5444], to be used (and shared) 209 among MANET routing protocol security extensions. Finally, this 210 document establishes two IANA registries for code-points for hash 211 functions and cryptographic algorithms for use by protocols adhering 212 to [RFC5444]. 214 With respect to [RFC5444], this document: 216 o is intended to be used in the non-normative, but intended, mode of 217 use of [RFC5444] as described in its Appendix B. 219 o is a specific example of the Security Considerations section of 220 [RFC5444] (the authentication part). 222 4. Protocol Overview and Functioning 224 This specification does not describe a protocol, nor does it mandate 225 specific router or protocol behavior. It represents a purely 226 syntactical representation of security related information for use 227 with [RFC5444] messages and packets, as well as establishes IANA 228 registrations and registries. 230 5. General Signature TLV Structure 232 The following data structure allows representation of a cryptographic 233 signature, including specification of the appropriate hash function 234 and cryptographic algorithm used for calculating the signature. This 235 data structure is specified, using the regular expression 236 syntax of [RFC5444], as: 238 := 239 240 242 where: 244 is an 8-bit unsigned integer field specifying the 245 hash function. 247 is an 8-bit unsigned integer field 248 specifying the cryptographic algorithm. 250 is an unsigned integer field, whose length is 251 -2, and which contains the cryptographic signature. 253 The basic version of this TLV assumes that calculating the signature 254 can be decomposed into: 256 signature-value = cryptographic-function(hash-function(message)) 258 The hash function and the cryptographic algorithm correspond to the 259 IANA registry in the two registries set up by this specification, see 260 Section 10. 262 5.1. Rationale 264 The rationale for separating the hash function and the cryptographic 265 algorithm into two octets instead of having all combinations in a 266 single octet - possibly as TLV type extension - is twofold: First, if 267 further hash functions or cryptographic algorithms are added in the 268 future, the number space might not remain continuous. More 269 importantly, the number space of 256 possible combinations would be 270 rapidly exhausted: 16 different hash functions and 16 different 271 cryptographic algorithms would lead to exhaustion. As new or 272 improved cryptographic mechanism are continuously being developed and 273 introduced, this format should be able to accommodate such for the 274 foreseeable future. 276 The rationale for not including a field that lists parameters of the 277 cryptographic signature in the TLV is the following: Before being 278 able to to validate a cryptographic signature, routers have to 279 exchange keys (e.g. public keys). Any additional parameters can be 280 exchanged together with the keys in this bootstrap process. It is 281 therefore not necessary, and would even entail an extra overhead, to 282 transmit the parameters within every message. One inherently 283 included parameter is the length of the signature, which is tlv- 284 length - 2 and which depends on the choice of the cryptographic 285 algorithm. 287 6. General Timestamp TLV Structure 289 The following data structure allows the representation of a 290 timestamp. This data structure is specified as: 292 := 294 where: 296 is an unsigned integer field, whose length is , and which contains the timestamp. The value of this 298 variable is to be interpreted by the routing protocol as specified 299 by the type extension of the Timestamp TLV (refer to Table 1). 301 A timestamp is essentially "freshness information". As such, its 302 setting and interpretation is to be determined by the routing 303 protocol (or the extension to a routing protocol) that uses it, and 304 may e.g. correspond to a UNIX-timestamp, GPS timestamp or a simple 305 sequence number. This is out of the scope of this specification. 307 7. Packet TLVs 309 Two Packet TLVs are defined, for including the cryptographic 310 signature of a packet, and for including the timestamp indicating the 311 time at which the cryptographic signature was calculated. 313 7.1. Packet SIGNATURE TLV 315 A Packet SIGNATURE TLV is an example of a Signature TLV as described 316 in Section 5. When calculating the for a Packet, 317 the signature is calculated over the entire Packet, including the 318 packet header, all Packet TLVs (other than Packet SIGNATURE TLVs) and 319 all included Messages and their message headers. 321 7.2. Packet TIMESTAMP TLV 323 A Packet TIMESTAMP TLV is an example of a Timestamp TLV as described 324 in Section 6. If a packet contains a TIMESTAMP TLV and a SIGNATURE 325 TLV, the TIMESTAMP TLV SHOULD be added to the packet before the 326 SIGNATURE TLV, in order that it be included in the calculation of the 327 signature. 329 8. Message TLVs 331 Two Message TLVs are defined, for including the cryptographic 332 signature of a message, and for including the timestamp indicating 333 the time at which the cryptographic signature was calculated. 335 8.1. Message SIGNATURE TLV 337 A Message SIGNATURE TLV is an example of a Signature TLV as described 338 in Section 5. When determining the for a message, 339 the signature is calculated over the entire message with the 340 following considerations: 342 o the fields and MUST be both 343 assumed to have the value 0 (zero). 345 o all Message SIGNATURE TLVs MUST be removed before calculating the 346 signature, and the message size as well as the Message TLV block 347 size MUST be recalculated accordingly. The TLVs can be restored 348 after having calculated the signature value. 350 8.2. Message TIMESTAMP TLV 352 A Message TIMESTAMP TLV is an example of a Timestamp TLV as described 353 in Section 6. If a message contains a TIMESTAMP TLV and a SIGNATURE 354 TLV, the TIMESTAMP TLV SHOULD be added to the message before the 355 SIGNATURE TLV, in order that it be included in the calculation of the 356 signature. 358 9. Address Block TLVs 360 Two Address Block TLVs are defined, for associating a cryptographic 361 signature to an address, and for including the timestamp indicating 362 the time at which the cryptographic signature was calculated. 364 9.1. Address Block SIGNATURE TLV 366 An Address Block SIGNATURE TLV is an example of a Signature TLV as 367 described in Section 5. The signature can be calculated over any 368 object, including, for example, the address to which this TLV is 369 associated to. 371 9.2. Address Block TIMESTAMP TLV 373 An Address Block TIMESTAMP TLV is an example of a Timestamp TLV as 374 described in Section 6. If both a TIMESTAMP TLV and a SIGNATURE TLV 375 are associated with an address, the timestamp value should be 376 considered when calculating the value of the signature. 378 10. IANA Considerations 380 10.1. TLV Registrations 382 This specification defines: 384 o two Packet TLV types which must be allocated from the 0-223 range 385 of the "Assigned Packet TLV Types" repository of [RFC5444] as 386 specified in Table 1, 388 o two Message TLV types which must be allocated from the 0-127 range 389 of the "Assigned Message TLV Types" repository of [RFC5444] as 390 specified in Table 2, 392 o and two Address Block TLV types which must be allocated from the 393 0-127 range of the "Assigned Address Block TLV Types" repository 394 of [RFC5444] as specified in Table 3. 396 IANA is requested to assign the same numerical value to the Packet 397 TLV, Message TLV and Address Block TLV types with the same name. 399 10.1.1. Expert Review: Evaluation Guidelines 401 For the registries for TLV type extensions where an Expert Review is 402 required, the designated expert SHOULD take the same general 403 recommendations into consideration as are specified by [RFC5444]. 405 10.1.2. Packet TLV Type Registrations 407 The Packet TLVs as specified in Table 1 must be allocated from the 408 "Packet TLV Types" namespace of [RFC5444]. 410 +-----------+------+-----------+------------------------------------+ 411 | Name | Type | Type | Description | 412 | | | Extension | | 413 +-----------+------+-----------+------------------------------------+ 414 | SIGNATURE | TBD3 | 0 | Signature of a packet | 415 | | | 1-223 | Expert Review | 416 | | | 224-255 | Experimental Use | 417 | TIMESTAMP | TBD4 | 0 | Unsigned timestamp of arbitrary | 418 | | | | length, given by the tlv-length | 419 | | | | field. The timestamp is assumed to | 420 | | | | increase strictly monotonously by | 421 | | | | steps of 1. The MANET routing | 422 | | | | protocol has to define how to | 423 | | | | interpret this timestamp | 424 | | | 1 | Unsigned 32-bit timestamp as | 425 | | | | specified in [POSIX] | 426 | | | 2 | NTP timestamp format as defined in | 427 | | | | [RFC4330] | 428 | | | 3 | Signed timestamp of arbitrary | 429 | | | | length with no constraints such as | 430 | | | | monotonicity. In particular, it | 431 | | | | may represent any random value | 432 | | | 4-223 | Expert Review | 433 | | | 224-255 | Experimental Use | 434 +-----------+------+-----------+------------------------------------+ 436 Table 1: Packet TLV types 438 10.1.3. Message TLV Type Registrations 440 The Message TLVs as specified in Table 2 must be allocated from the 441 "Message TLV Types" namespace of [RFC5444]. 443 +-----------+------+-----------+------------------------------------+ 444 | Name | Type | Type | Description | 445 | | | Extension | | 446 +-----------+------+-----------+------------------------------------+ 447 | SIGNATURE | TBD1 | 0 | Signature of a message | 448 | | | 1-223 | Expert Review | 449 | | | 224-255 | Experimental Use | 450 | TIMESTAMP | TBD2 | 0 | Unsigned timestamp of arbitrary | 451 | | | | length, given by the tlv-length | 452 | | | | field. The timestamp is assumed to | 453 | | | | increase strictly monotonously by | 454 | | | | steps of 1. The MANET routing | 455 | | | | protocol has to define how to | 456 | | | | interpret this timestamp | 457 | | | 1 | Unsigned 32-bit timestamp as | 458 | | | | specified in [POSIX] | 459 | | | 2 | NTP timestamp format as defined in | 460 | | | | [RFC4330] | 461 | | | 3 | Signed timestamp of arbitrary | 462 | | | | length with no constraints such as | 463 | | | | monotonicity. In particular, it | 464 | | | | may represent any random value | 465 | | | 4-223 | Expert Review | 466 | | | 224-255 | Experimental Use | 467 +-----------+------+-----------+------------------------------------+ 469 Table 2: Message TLV types 471 10.1.4. Address Block TLV Type Registrations 473 The Address Block TLVs as specified in Table 3 must be allocated from 474 the "Address Block TLV Types" namespace of [RFC5444]. 476 +-----------+------+-----------+------------------------------------+ 477 | Name | Type | Type | Description | 478 | | | Extension | | 479 +-----------+------+-----------+------------------------------------+ 480 | SIGNATURE | TBD1 | 0 | Signature of an object (e.g. an | 481 | | | | address) | 482 | | | 1-223 | Expert Review | 483 | | | 224-255 | Experimental Use | 484 | TIMESTAMP | TBD2 | 0 | Unsigned timestamp of arbitrary | 485 | | | | length, given by the tlv-length | 486 | | | | field. The timestamp is assumed to | 487 | | | | increase strictly monotonously by | 488 | | | | steps of 1. The MANET routing | 489 | | | | protocol has to define how to | 490 | | | | interpret this timestamp | 491 | | | 1 | Unsigned 32-bit timestamp as | 492 | | | | specified in [POSIX] | 493 | | | 2 | NTP timestamp format as defined in | 494 | | | | [RFC4330] | 495 | | | 3 | Signed timestamp of arbitrary | 496 | | | | length with no constraints such as | 497 | | | | monotonicity. In particular, it | 498 | | | | may represent any random value | 499 | | | 4-223 | Expert Review | 500 | | | 224-255 | Experimental Use | 501 +-----------+------+-----------+------------------------------------+ 503 Table 3: Address Block TLV types 505 10.2. New IANA Registries 507 This document introduces three namespaces that have been registered: 508 Packet TLV Types, Message TLV Types, and Address Block TLV Types. 509 This section specifies IANA registries for these namespaces and 510 provides guidance to the Internet Assigned Numbers Authority 511 regarding registrations in these namespaces. 513 The following terms are used with the meanings defined in [BCP26]: 514 "Namespace", "Assigned Value", "Registration", "Unassigned", 515 "Reserved", "Hierarchical Allocation", and "Designated Expert". 517 The following policies are used with the meanings defined in [BCP26]: 518 "Private Use", "Expert Review", and "Standards Action". 520 10.2.1. Expert Review: Evaluation Guidelines 522 For the registries for the following tables where an Expert Review is 523 required, the designated expert SHOULD take the same general 524 recommendations into consideration as are specified by [RFC5444]. 526 10.2.2. Hash Function 528 IANA is requested to create a new registry for the hash functions 529 that can be used when creating a signature. The initial assignments 530 and allocation policies are specified in Table 4. 532 +-------------+-----------+-----------------------------------------+ 533 | Hash | Algorithm | Description | 534 | function | | | 535 | value | | | 536 +-------------+-----------+-----------------------------------------+ 537 | 0 | none | The "identity function": the hash value | 538 | | | of an object is the object itself | 539 | 1 | MD5 | The hash function as specified in | 540 | | | [RFC1321] | 541 | 2 | SHA1 | The hash function as specified in | 542 | | | [RFC3174] | 543 | 3 | SHA256 | The hash function as specified in | 544 | | | [SHA256] | 545 | 4-223 | | Expert Review | 546 | 224-255 | | Experimental Use | 547 +-------------+-----------+-----------------------------------------+ 549 Table 4: Hash-Function registry 551 10.2.3. Cryptographic Algorithm 553 IANA is requested to create a new registry for the cryptographic 554 algorithm. Initial assignments and allocation policies are specified 555 in Table 5. 557 +-----------------+-----------+-------------------------------------+ 558 | Cryptographic | Algorithm | Description | 559 | algorithm value | | | 560 +-----------------+-----------+-------------------------------------+ 561 | 0 | none | The "identity function": the value | 562 | | | of an encrypted hash is the hash | 563 | | | itself | 564 | 1 | RSA | RSA as specified in [RFC2437] | 565 | 2 | DSA | DSA as specified in [DSA] | 566 | 3 | HMAC | HMAC as specified in [RFC2104] | 567 | 4 | 3DES | 3DES as specified in [3DES] | 568 | 5 | AES | AES as specified in [AES] | 569 | 6-223 | | Expert Review | 570 | 224-255 | | Experimental Use | 571 +-----------------+-----------+-------------------------------------+ 573 Table 5: Cryptographic algorithm registry 575 11. Security Considerations 577 This document does not specify a protocol itself. However, it 578 provides a syntactical component for cryptographic signatures of 579 messages and packets as defined in [RFC5444]. It can be used to 580 address security issues of a protocol or extension that uses the 581 component specified in this document. As such, it has the same 582 security considerations as [RFC5444]. 584 In addition, a protocol that includes this component MUST specify the 585 usage as well as the security that is attained by the cryptographic 586 signatures of a message or a packet. 588 As an example, a routing protocol that uses this component to reject 589 "badly formed" messages if a control message does not contain a valid 590 signature, should indicate the security assumption that if the 591 signature is valid, the message is considered valid. It also should 592 indicate the security issues that are counteracted by this measure 593 (e.g. link or identity spoofing) as well as the issues that are not 594 counteracted (e.g. compromised keys). 596 12. Acknowledgements 598 The authors would like to thank Jerome Milan (Ecole Polytechnique) 599 for his advice as cryptographer. In addition, many thanks to Alan 600 Cullen (BAE), Justin Dean (NRL), Christopher Dearlove (BAE), and 601 Henning Rogge (FGAN) for their constructive comments on the document. 603 13. References 605 13.1. Normative References 607 [BCP26] Narten, T. and H. Alvestrand, "Guidelines for Writing an 608 IANA Considerations Section in RFCs", RFC 5226, BCP 26, 609 May 2008. 611 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 612 Requirement Levels", RFC 2119, BCP 14, March 1997. 614 [RFC5444] Clausen, T., Dearlove, C., Dean, J., and C. Adjih, 615 "Generalized MANET Packet/Message Format", RFC 5444, 616 February 2009. 618 13.2. Informative References 620 [3DES] American National Standards Institute, "Triple Data 621 Encryption Algorithm Modes of Operation", ANSI X9.52-1998, 622 1998. 624 [AES] National Institute of Standards & Technology, "Advanced 625 Encryption Standard (AES)", FIPS 197, November 2001. 627 [DSA] National Institute of Standards & Technology, "Digital 628 Signature Standard", NIST, FIPS PUB 186, May 1994. 630 [NHDP] Clausen, T., Dean, J., and C. Dearlove, "MANET 631 Neighborhood Discovery Protocol (NHDP)", work in 632 progress draft-ietf-manet-nhdp-12.txt, March 2010. 634 [OLSRv2] Clausen, T., Dearlove, C., and P. Jacquet, "The Optimized 635 Link State Routing Protocol version 2", work in 636 progress draft-ietf-manet-olsrv2-11.txt, April 2010. 638 [POSIX] IEEE Computer Society, "1003.1-2008 Standard for 639 Information Technology - Portable Operating System 640 Interface (POSIX)", Base Specifications Issue 7, 641 December 2008. 643 [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 644 April 1992. 646 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 647 Hashing for Message Authentication", RFC 2104, 648 February 1997. 650 [RFC2437] Kaliski, B. and J. Staddon, "PKCS #1: RSA Cryptography 651 Specifications Version 2.0", RFC 2437, October 1998. 653 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 654 (SHA1)", RFC 3174, September 2001. 656 [RFC4330] Mills, D., "Simple Network Time Protocol (SNTP) Version 4 657 for IPv4, IPv6 and OSI", RFC 4330, January 2006. 659 [SHA256] National Institute of Standards and Technology, "Secure 660 Hash Algorithm", NIST FIPS 180-2, August 2002. 662 Appendix A. Examples 664 A.1. Example of a Signed Message 666 The sample message depicted in Figure 1 is taken from the appendix of 667 [RFC5444]. However, a SIGNATURE Message TLV has been added. It is 668 assumed that the SIGNATURE TLV type is lesser than the TLV type of 669 the second message TLV (i.e. it comes first in the order of Message 670 TLVs). The TLV value represents a 16 octet long signature of the 671 whole message. 673 0 1 2 3 674 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 675 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 676 |0 0 0 0 1 0 0 0| Packet Sequence Number | Message Type | 677 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 678 |1 1 1 1 0 0 1 1|0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0| Orig Addr | 679 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 680 | Originator Address (cont) | Hop Limit | 681 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 682 | Hop Count | Message Sequence Number |0 0 0 0 0 0 0 0| 683 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 684 |0 0 0 1 1 1 1 0| SIGNATURE |0 0 0 1 0 0 0 0|0 0 0 1 0 0 1 0| 685 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 686 | Hash Func | Crypto Func | Signature Value | 687 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 688 | Signature Value (cont) | 689 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 690 | Signature Value (cont) | 691 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 692 | Signature Value (cont) | 693 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 694 | Signature Value (cont) | TLV Type |0 0 0 1 0 0 0 0| 695 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 696 |0 0 0 0 0 1 1 0| Value | 697 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 698 | Value (cont) |0 0 0 0 0 0 1 0| 699 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 700 |0 0 1 1 0 0 0 0|0 0 0 0 0 0 1 0| Mid | 701 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 702 | Mid | Prefix Length |0 0 0 0 0 0 0 0| 703 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 704 |0 0 0 0 0 0 0 0|0 0 0 0 0 0 1 1|1 0 0 0 0 0 0 0|0 0 0 0 0 0 1 0| 705 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 706 | Head | Mid | 707 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 708 | Mid | Mid | 709 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 710 |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1| TLV Type |0 0 0 1 0 0 0 0| 711 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 712 |0 0 0 0 0 0 1 0| Value | TLV Type | 713 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 714 |0 0 1 0 0 0 0 0| Index Start | Index Stop | 715 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 717 Figure 1: Example message with signature 719 Authors' Addresses 721 Ulrich Herberg 722 LIX, Ecole Polytechnique 723 91128 Palaiseau Cedex, 724 France 726 Phone: +33-1-6933-4126 727 Email: ulrich@herberg.name 728 URI: http://www.herberg.name/ 730 Thomas Heide Clausen 731 LIX, Ecole Polytechnique 732 91128 Palaiseau Cedex, 733 France 735 Phone: +33 6 6058 9349 736 Email: T.Clausen@computer.org 737 URI: http://www.thomasclausen.org/