idnits 2.17.1 draft-ietf-tsvwg-sctp-auth-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 19. -- Found old boilerplate from RFC 3978, Section 5.5 on line 753. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 764. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 771. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 777. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. 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 RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 23, 2006) is 6388 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) -- Looks like a reference, but probably isn't: 'RFCXXXX' on line 583 == Unused Reference: '1' is defined on line 678, but no explicit reference was found in the text ** Downref: Normative reference to an Informational RFC: RFC 1321 (ref. '1') ** Downref: Normative reference to an Informational RFC: RFC 2104 (ref. '2') ** Obsolete normative reference: RFC 2960 (ref. '4') (Obsoleted by RFC 4960) -- Possible downref: Non-RFC (?) normative reference: ref. '6' -- Possible downref: Non-RFC (?) normative reference: ref. '7' Summary: 6 errors (**), 0 flaws (~~), 3 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Tuexen 3 Internet-Draft Muenster Univ. of Applied Sciences 4 Intended status: Standards Track R. Stewart 5 Expires: April 26, 2007 P. Lei 6 Cisco Systems, Inc. 7 E. Rescorla 8 RTFM, Inc. 9 October 23, 2006 11 Authenticated Chunks for Stream Control Transmission Protocol (SCTP) 12 draft-ietf-tsvwg-sctp-auth-05.txt 14 Status of this Memo 16 By submitting this Internet-Draft, each author represents that any 17 applicable patent or other IPR claims of which he or she is aware 18 have been or will be disclosed, and any of which he or she becomes 19 aware will be disclosed, in accordance with Section 6 of BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF), its areas, and its working groups. Note that 23 other groups may also distribute working documents as Internet- 24 Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt. 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 This Internet-Draft will expire on April 26, 2007. 39 Copyright Notice 41 Copyright (C) The Internet Society (2006). 43 Abstract 45 This document describes a new chunk type, several parameters and 46 procedures for SCTP. This new chunk type can be used to authenticate 47 SCTP chunks by using shared keys between the sender and receiver. 48 The new parameters are used to establish the shared keys. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 3. New Parameter Types . . . . . . . . . . . . . . . . . . . . . 3 55 3.1. Random Parameter (RANDOM) . . . . . . . . . . . . . . . . 4 56 3.2. Chunk List Parameter (CHUNKS) . . . . . . . . . . . . . . 4 57 3.3. Requested HMAC Algorithm Parameter (HMAC-ALGO) . . . . . . 5 58 4. New Error Cause . . . . . . . . . . . . . . . . . . . . . . . 7 59 4.1. Unsupported HMAC Identifier error cause . . . . . . . . . 7 60 5. New Chunk Type . . . . . . . . . . . . . . . . . . . . . . . . 7 61 5.1. Authentication Chunk (AUTH) . . . . . . . . . . . . . . . 8 62 6. Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . 9 63 6.1. Establishment of an association shared key . . . . . . . . 9 64 6.2. Sending authenticated chunks . . . . . . . . . . . . . . . 10 65 6.3. Receiving authenticated chunks . . . . . . . . . . . . . . 11 66 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 67 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 68 8.1. A New Chunk Type . . . . . . . . . . . . . . . . . . . . . 13 69 8.2. Three New Parameter Types . . . . . . . . . . . . . . . . 14 70 8.3. A New Error Cause . . . . . . . . . . . . . . . . . . . . 14 71 8.4. A New Table For HMAC Identifiers . . . . . . . . . . . . . 14 72 9. Security Considerations . . . . . . . . . . . . . . . . . . . 15 73 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 74 11. Normative References . . . . . . . . . . . . . . . . . . . . . 16 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16 76 Intellectual Property and Copyright Statements . . . . . . . . . . 18 78 1. Introduction 80 SCTP uses 32 bit verification tags to protect itself against blind 81 attackers. These values are not changed during the lifetime of an 82 SCTP association. 84 Looking at new SCTP extensions there is the need to have a method of 85 proving that an SCTP chunk(s) was really sent by the original peer 86 that started the association and not by a malicious attacker. 88 Using TLS as defined in RFC3436 [5] does not help here because it 89 only secures SCTP user data. 91 Therefore an SCTP extension is presented which provides a mechanism 92 for deriving shared keys for each association. These association 93 shared keys are derived from endpoint pair shared keys, which are 94 configured and might be empty, and data which is exchanged during the 95 SCTP association setup. 97 The extension presented in this document allows an SCTP sender to 98 sign chunks using shared keys between the sender and receiver. The 99 receiver can then verify that the chunks are sent from the sender and 100 not from a malicious attacker as long as the attacker does not know 101 an association shared key. 103 2. Conventions 105 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 106 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 107 "OPTIONAL", when they appear in this document, are to be interpreted 108 as described in RFC2119 [3]. 110 3. New Parameter Types 112 This section defines the new parameter types that will be used to 113 negotiate the authentication during association setup. Table 1 114 illustrates the new parameter types. 116 +----------------+------------------------------------------------+ 117 | Parameter Type | Parameter Name | 118 +----------------+------------------------------------------------+ 119 | 0x8002 | Random Parameter (RANDOM) | 120 | 0x8003 | Chunk List Parameter (CHUNKS) | 121 | 0x8004 | Requested HMAC Algorithm Parameter (HMAC-ALGO) | 122 +----------------+------------------------------------------------+ 123 Table 1 125 It should be noted that the parameter format requires the receiver to 126 ignore the parameter and continue processing if it is not understood. 127 This is accomplished as described in RFC2960 [4] section 3.2.1. by 128 the use of the upper bits of the parameter type. 130 3.1. Random Parameter (RANDOM) 132 This parameter is used to carry an arbitrary length random number. 134 0 1 2 3 135 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 136 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 137 | Parameter Type = 0x8002 | Parameter Length | 138 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 139 | | 140 \ Random Number / 141 / \ 142 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 144 Figure 1 146 Parameter Type: 2 bytes (unsigned integer) 147 This value MUST be set to 0x8002. 149 Parameter Length: 2 bytes (unsigned integer) 150 This value is the length of the Random Number in bytes plus 4. 152 Random Number: n bytes (unsigned integer) 153 This value represents an arbitrary Random Number in network byte 154 order. 156 The RANDOM parameter MUST be included once in the INIT or INIT-ACK 157 chunk if the sender wants to send or receive authenticated chunks. 159 3.2. Chunk List Parameter (CHUNKS) 161 This parameter is used to specify which chunk types are required to 162 be sent authenticated by the peer. 164 0 1 2 3 165 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 166 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 167 | Parameter Type = 0x8003 | Parameter Length | 168 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 169 | Chunk Type 1 | Chunk Type 2 | Chunk Type 3 | Chunk Type 4 | 170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 171 / / 172 \ ... \ 173 / / 174 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 175 | Chunk Type n | Padding | 176 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 178 Figure 2 180 Parameter Type: 2 bytes (unsigned integer) 181 This value MUST be set to 0x8003. 183 Parameter Length: 2 bytes (unsigned integer) 184 This value is the number of listed Chunk Types plus 4. 186 Chunk Type n: 1 byte (unsigned integer) 187 Each Chunk Type listed is required to be authenticated when sent 188 by the peer. 190 The CHUNKS parameter MUST be included once in the INIT or INIT-ACK 191 chunk if the sender wants to receive authenticated chunks. Its 192 maximum length is 260 bytes. 194 The chunk types for INIT, INIT-ACK, SHUTDOWN-COMPLETE and AUTH chunks 195 MUST NOT be listed in the CHUNKS parameter. However, if a CHUNKS 196 parameter is received then the types for INIT, INIT-ACK, SHUTDOWN- 197 COMPLETE and AUTH chunks MUST be ignored. 199 3.3. Requested HMAC Algorithm Parameter (HMAC-ALGO) 201 This parameter is used to list the HMAC identifiers the peer MUST 202 use. 204 0 1 2 3 205 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 206 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 207 | Parameter Type = 0x8004 | Parameter Length | 208 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 209 | HMAC Identifier 1 | HMAC Identifier 2 | 210 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 211 / / 212 \ ... \ 213 / / 214 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 215 | HMAC Identifier n | Padding | 216 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 218 Figure 3 220 Parameter Type: 2 bytes (unsigned integer) 221 This value MUST be set to 0x8004. 223 Parameter Length: 2 bytes (unsigned integer) 224 This value is the number of HMAC identifiers multiplied by 2 plus 225 4. 227 HMAC Identifier n: 2 bytes (unsigned integer) 228 The values expressed are a list of HMAC identifiers that may be 229 used by the peer. The values are listed by preference, with 230 respect to the sender, where the first HMAC identifier listed is 231 the one most preferable to the sender. 233 The HMAC-ALGO parameter MUST be included once in the INIT or INIT-ACK 234 chunk if the sender wants to send or receive authenticated chunks. 236 The following Table 2 shows the currently defined values for HMAC 237 identifiers. 239 +-----------------+--------------------------+ 240 | HMAC Identifier | Message Digest Algorithm | 241 +-----------------+--------------------------+ 242 | 0 | Reserved | 243 | 1 | SHA-1 defined in [6] | 244 | 3 | SHA-256 defined in [6] | 245 +-----------------+--------------------------+ 247 Table 2 249 Every endpoint supporting SCTP chunk authentication MUST support the 250 HMAC based on the SHA-1 algorithm. 252 4. New Error Cause 254 This section defines a new error cause that will be sent if an AUTH 255 chunk is received with an unsupported HMAC identifier. Table 3 256 illustrates the new error cause. 258 +------------+-----------------------------+ 259 | Cause Code | Error Cause Name | 260 +------------+-----------------------------+ 261 | 0x0105 | Unsupported HMAC Identifier | 262 +------------+-----------------------------+ 264 Table 3 266 4.1. Unsupported HMAC Identifier error cause 268 This error cause is used to indicate that an AUTH chunk was received 269 with an unsupported HMAC Identifier. 271 0 1 2 3 272 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 273 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 274 | Cause Code = 0x0105 | Cause Length = 6 | 275 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 276 | HMAC Identifier | Padding | 277 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 279 Figure 4 281 Cause Code: 2 bytes (unsigned integer) 282 This value MUST be set to 0x0105. 284 Cause Length: 2 bytes (unsigned integer) 285 This value MUST be set to 6. 287 HMAC Identifier: 2 bytes (unsigned integer) 288 This value is the HMAC Identifier which is not supported. 290 5. New Chunk Type 292 This section defines the new chunk type that will be used to 293 authenticate chunks. Table 4 illustrates the new chunk type. 295 +------------+-----------------------------+ 296 | Chunk Type | Chunk Name | 297 +------------+-----------------------------+ 298 | 0x0F | Authentication Chunk (AUTH) | 299 +------------+-----------------------------+ 301 Table 4 303 It should be noted that the AUTH-chunk format requires the receiver 304 to ignore the chunk if it is not understood and silently discard all 305 chunks that follow. This is accomplished as described in RFC2960 [4] 306 section 3.2. by the use of the upper bits of the chunk type. 308 5.1. Authentication Chunk (AUTH) 310 This chunk is used to hold the result of the HMAC calculation. 312 0 1 2 3 313 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 314 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 315 | Type = 0x0F | Flags=0 | Length | 316 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 317 | Shared Key Identifier | HMAC Identifier | 318 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 319 | | 320 \ HMAC / 321 / \ 322 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 324 Figure 5 326 Type: 1 byte (unsigned integer) 327 This value MUST be set to 0x0F for all AUTH-chunks. 329 Flags: 1 byte (unsigned integer) 330 SHOULD be set to zero on transmit and MUST be ignored on receipt. 332 Length: 2 bytes (unsigned integer) 333 This value holds the length of the HMAC in bytes plus 8. 335 Shared Key Identifier: 2 bytes (unsigned integer) 336 This value describes which endpoint pair shared key is used. 338 HMAC Identifier: 2 bytes (unsigned integer) 339 This value describes which message digest is being used. Table 2 340 shows the currently defined values. 342 HMAC: n bytes (unsigned integer) 343 This hold the result of the HMAC calculation. 345 The control chunk AUTH MUST NOT appear more than once in an SCTP 346 packet. All control and data chunks which are placed after the AUTH 347 chunk in the packet are sent in an authenticated way. Those chunks 348 placed in a packet before the AUTH chunk are not authenticated. 349 Please note that DATA chunks can not appear before control chunks in 350 an SCTP packet. 352 6. Procedures 354 6.1. Establishment of an association shared key 356 An SCTP endpoint willing to receive or send authenticated chunks MUST 357 send one RANDOM parameter in its INIT or INIT-ACK chunk. The RANDOM 358 parameter MUST contain a 32 byte random number. If the random number 359 is not 32 byte long the association MUST be aborted. The ABORT chunk 360 SHOULD contain the error cause 'Protocol Violation'. In case of INIT 361 collision, the rules governing the handling of this random number 362 follow the same pattern as those for the Verification Tag, as 363 explained in section 5.2.4 of RFC2960 [4]. Therefore each endpoint 364 knows its own random number and the peer's random number after the 365 association has been established. 367 An SCTP endpoint has a list of chunks it only accepts if they are 368 received in an authenticated way. This list is included in the INIT 369 and INIT-ACK and MAY be omitted if it is empty. Since this list does 370 not change during the lifetime of there is no problem in case of INIT 371 collision. 373 Each SCTP endpoint MUST include in the INIT and INIT-ACK a HMAC-ALGO 374 parameter containing a list of HMAC Identifiers it requests the peer 375 to use. The receiver of a HMAC-ALGO parameter SHOULD use the first 376 listed algorithm it supports. The HMAC algorithm based on SHA-1 MUST 377 be supported and included in the HMAC-ALGO parameter. An SCTP 378 endpoint MUST NOT change the parameters listed in the HMAC-ALGO 379 parameter during the lifetime of the endpoint. 381 Both endpoints of an association MAY have endpoint pair shared keys 382 which are byte vectors and pre-configured or established by another 383 mechanism. They are identified by the shared key identifier. If no 384 endpoint pair shared keys are preconfigured or established by another 385 mechanism an empty byte vector is used. 387 The random number value, the list of chunks and the list of HMAC 388 identifiers in network byte order sent by each endpoint are 389 concatenated as byte vectors. The resulting two vectors are called 390 the two key numbers. 392 From the endpoint pair shared keys and the key numbers the 393 association shared keys are computed. This is performed by selecting 394 the smaller key number and concatenating it to the endpoint pair 395 shared key, and then concatenating the larger of the key numbers to 396 that. If both key numbers are equal, then the concatenation order is 397 the endpoint shared key, followed by the key number with the shorter 398 length, followed by the key number with the longer length. If the 399 key number lengths are the same, then they may be concatenated to the 400 endpoint pair key in any order. The concatenation is performed on 401 byte vectors representing all numbers in network byte order. The 402 result is the association shared key. 404 6.2. Sending authenticated chunks 406 Endpoints MUST send all requested chunks authenticated where this has 407 been requested by the peer. The other chunks MAY be sent 408 authenticated or not. If endpoint pair shared keys are used, one of 409 them MUST be selected for authentication. 411 To send chunks in an authenticated way, the sender MUST include these 412 chunks after an AUTH chunk. This means that a sender MUST bundle 413 chunks in order to authenticate them. 415 If the endpoint has no endpoint shared key for the peer, it MUST use 416 Shared Key Identifier 0 with an empty endpoint pair shared key. 418 The sender MUST calculate the MAC as described in RFC2104 [2] using 419 the hash function H as described by the MAC Identifier and the shared 420 association key K based on the endpoint pair shared key described by 421 the shared key identifier. The 'data' used for the computation of 422 the AUTH-chunk is given by Figure 6 and all chunks that are placed 423 after the AUTH chunk in the SCTP packet. 425 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 426 | Type = 0x0F | Flags=0 | Chunk Length | 427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 428 | Shared Key Identifier | HMAC Identifier | 429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 430 | | 431 \ 0 / 432 / \ 433 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 435 Figure 6 437 Please note that all fields are in network byte order and that the 438 field which will contain the complete HMAC is filled with zeroes. 439 The length of the field shown as 0 is the length of the HMAC 440 described by the HMAC Identifier. The padding of all chunks being 441 authenticated MUST be included in the HMAC computation. 443 The sender fills the HMAC into the HMAC field and sends the packet. 445 6.3. Receiving authenticated chunks 447 The receiver has a list of chunk types which it expects to be 448 received only after an AUTH-chunk. This list has been sent to the 449 peer during the association setup. It MUST silently discard these 450 chunks if they are not placed after an AUTH chunk in the packet. 452 The receiver MUST use the HMAC algorithm indicated in the HMAC 453 Identifier field. If this algorithm was not specified by the 454 receiver in the HMAC-ALGO parameter in the INIT or INIT-ACK chunk 455 during association setup, the AUTH chunk and all chunks after it MUST 456 be discarded and an ERROR chunk SHOULD be sent with the error cause 457 defined in Section 4.1. 459 If an endpoint with no shared key receives a Shared Key Identifier 460 other than 0, it MUST silently discard all authenticated chunks. If 461 the endpoint has at least one endpoint pair shared key for the peer, 462 it MUST use the key specified by the Shared Key Identifier if a key 463 has been configured for that Shared Key Identifier. If no endpoint 464 pair shared key has been configured for that Shared Key Identifier, 465 all authenticated chunks MUST be silently discarded. 467 The receiver now performs the same calculation as described for the 468 sender based on Figure 6. If the result of the calculation is the 469 same as given in the HMAC field, all chunks following the AUTH chunk 470 are processed. If the field does not match the result of the 471 calculation, all the chunks following the AUTH chunk MUST be silently 472 discarded. 474 It should be noted that if the receiver wants to tear down an 475 association in an authenticated way only, the handling of malformed 476 packets should be in tune with this. 478 An SCTP implementation has to maintain state for each SCTP 479 association. In the following we call this data structure the SCTP 480 transmission control block (STCB). 482 If the receiver does not find a STCB for a packet containing an AUTH 483 chunk as a first chunk and a COOKIE-ECHO chunk as the second chunk 484 and possibly more chunks after them, the receiver MUST authenticate 485 the chunks by using the random numbers included in the COOKIE-ECHO, 486 and possibly the local shared secret. If authentication fails then 487 the packet discarded. If the authentication is successful the 488 COOKIE-ECHO and all chunks after the COOKIE-ECHO MUST be processed. 489 If the receiver has a STCB, it MUST process the AUTH chunk as 490 described above using the STCB from the existing association to 491 authenticate the COOKIE-ECHO chunk and all chunks after it. 493 If the receiver does not find a STCB for a packet containing an AUTH 494 chunk as the first chunk and not a COOKIE-ECHO chunk as the second 495 chunk, it MUST use the chunks after the AUTH chunk to look up an 496 existing association. If no association is found, the packet MUST be 497 considered as out of the blue. The out of the blue handling MUST be 498 based on the packet without taking the AUTH chunk into account. If 499 an association is found, it MUST process the AUTH chunk using the 500 STCB from the existing association as described earlier. 502 If the receiver of the packet does not have a STCB when it needs to 503 process the AUTH chunk, it MUST ignore the AUTH chunk. This applies 504 to a packet containing an AUTH chunk as a first chunk and an COOKIE- 505 ECHO chunk as the second chunk received in the CLOSED state. If the 506 receiver has a STCB, it MUST process the AUTH chunk as described 507 above. 509 Requiring ABORT chunks and COOKIE-ECHO chunks to be authenticated 510 makes it impossible for an attacker to bring down or restart an 511 association as long as the attacker does not know an association 512 shared key. But it should also be noted that if an endpoint accepts 513 ABORT chunks only in an authenticated way, it may take longer to 514 detect that the peer is no longer available. If an endpoint accepts 515 COOKIE-ECHO chunks only in an authenticated way, the restart 516 procedure does not work. 518 Furthermore it is important that the cookie contained in an INIT-ACK 519 chunk and in a COOKIE-ECHO chunk MUST NOT contain the end-point pair 520 shared key. 522 7. Examples 524 This section gives examples of message exchanges for association 525 setup. 527 The simplest way of using the extension described in this document is 528 given by the following message exchange. 530 ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> 531 <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- 532 -------------------- COOKIE-ECHO --------------------> 533 <-------------------- COOKIE-ACK --------------------- 535 Please note that the CHUNKS parameter is optional in the INIT and 536 INIT-ACK. 538 If the server wants to receive DATA chunks in an authenticated way, 539 the following message exchange is possible: 541 ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> 542 <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- 543 --------------- COOKIE-ECHO; AUTH; DATA -------------> 544 <----------------- COOKIE-ACK; SACK ------------------ 546 Please note that if the endpoint pair shared key depends on the 547 client and the server and that it is only known by the upper layer 548 this message exchange requires an upper layer intervention between 549 the processing of the COOKIE-ECHO chunk (COMMUNICATION-UP 550 notification followed by the presentation of the endpoint pair shared 551 key by the upper layer to the SCTP stack) and the processing of the 552 AUTH and DATA chunk at the server side. If this intervention is not 553 possible due to limitations of the API (for example the socket API) 554 the server might discard the AUTH and DATA chunk making a 555 retransmission of the DATA chunk necessary. If the same endpoint 556 pair shared key is used for multiple endpoints and does not depend on 557 the client this intervention might not be necessary. 559 8. IANA Considerations 561 [NOTE to RFC-Editor: 563 "RFCXXXX" is to be replaced by the RFC number you assign this 564 document. 566 ] 568 This document (RFCXXX) is the reference for all registrations 569 described in this section. All registrations need to be listed in 570 the document available at sctp-parameters [7]. The suggested changes 571 are described below. 573 8.1. A New Chunk Type 575 A chunk type for the AUTH chunk has to be assigned by IANA. It is 576 suggested to use the value given in Table 4. This requires an 577 additional line in the "CHUNK TYPES" table of sctp-parameters [7]: 579 CHUNK TYPES 581 ID Value Chunk Type Reference 582 ----- ---------- --------- 583 15 Authentication Chunk (AUTH) [RFCXXXX] 585 8.2. Three New Parameter Types 587 Parameter types have to be assigned for the RANDOM, CHUNKS, and HMAC- 588 ALGO parameter by IANA. It is suggested to use the values given in 589 Table 1. This requires two modifications of the "CHUNK PARAMETER 590 TPYES" tables in sctp-parameters [7]: The first change is the 591 addition of three new lines to the "INIT Chunk Parameter Types" 592 table: 594 Chunk Parameter Type Value 595 -------------------- ----- 596 Random 32770 (0x8002) 597 Chunk List 32771 (0x8003) 598 Requested HMAC Algorithm Parameter 32772 (0x8004) 600 The second required change is the addition of the same three lines to 601 the to the "INIT ACK Chunk Parameter Types" table. 603 8.3. A New Error Cause 605 An error cause for the Unsupported HMAC Identifier error cause has to 606 be assigned. It is suggested to use the value given in Table 3. 607 This requires an additional line of the "CAUSE CODES" table in sctp- 608 parameters [7]: 610 VALUE CAUSE CODE REFERENCE 611 ----- ---------------- --------- 612 261 (0x0105) Unsupported HMAC Identifier RFCXXXX 614 8.4. A New Table For HMAC Identifiers 616 HMAC Identifiers have to be maintained by IANA. Three initial values 617 should be assigned by IANA as described in Table 2. This requires a 618 new table "HMAC IDENTIFIERS" in sctp-parameters [7]: 620 HMAC Identifier Message Digest Algorithm REFERENCE 621 --------------- ------------------------ --------- 622 0 Reserved RFCXXXX 623 1 SHA-1 RFCXXXX 624 3 SHA-256 RFCXXXX 625 For registering at IANA a new HMAC Identifier in this table a request 626 has to be made to assign such a number. This number must be unique 627 and a message digest algorithm usable with the HMAC defined in 628 RFC2104 [2] MUST be specified. 630 9. Security Considerations 632 Without using endpoint shared keys this extension only protects 633 against modification or injection of authenticated chunks by 634 attackers who did not capture the initial handshake setting up the 635 SCTP association. 637 If an endpoint pair shared key is used even a true man in the middle 638 cannot inject chunks which are required to be authenticated even if 639 he intercepts the initial message exchange. The endpoint also knows 640 that it is accepting authenticated chunks from a peer who knows the 641 endpoint pair shared key. 643 The establishment of endpoint pair shared keys is out of scope of 644 this document. Other mechanisms can be used like using TLS or manual 645 configuration. 647 Because SCTP has already a mechanism built-in that handles the 648 reception of duplicated chunks, the presented solution makes use of 649 this functionality and does not provide a method to avoid replay 650 attacks by itself. Of course, this only works within each SCTP 651 association. Therefore a separate shared key is used for each SCTP 652 association to handle replay attacks covering multiple SCTP 653 associations. 655 Each endpoint presenting a list of more than one element in the HMAC- 656 ALGO parameter must be prepared that the peer uses the weakest 657 algorithm listed. 659 If an endpoint requests the authentication of some chunks using the 660 CHUNKS parameter and an attacker intercepts the handshake used to 661 setup the association and modifies or removes this CHUNKS parameter 662 this endpoint will not accept chunks which are authenticated or needs 663 to be authenticated and are not. This might result in the failure of 664 the association. 666 When an endpoint pair uses non-NULL endpoint pair shared keys and one 667 of the endpoints still accepts a NULL key an attacker who captured 668 the initial handshake can still inject or modify authenticated chunks 669 by using the NULL key. 671 10. Acknowledgments 673 The authors wish to thank Sascha Grau, Ivan Arias Rodriguez, Irene 674 Ruengeler, and Magnus Westerlund for their invaluable comments. 676 11. Normative References 678 [1] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 679 April 1992. 681 [2] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing 682 for Message Authentication", RFC 2104, February 1997. 684 [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement 685 Levels", BCP 14, RFC 2119, March 1997. 687 [4] Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer, 688 H., Taylor, T., Rytina, I., Kalla, M., Zhang, L., and V. Paxson, 689 "Stream Control Transmission Protocol", RFC 2960, October 2000. 691 [5] Jungmaier, A., Rescorla, E., and M. Tuexen, "Transport Layer 692 Security over Stream Control Transmission Protocol", RFC 3436, 693 December 2002. 695 [6] National Institute of Standards and Technology, "Secure Hash 696 Standard", FIPS PUB 180-2, August 2002, 697 . 700 [7] 702 Authors' Addresses 704 Michael Tuexen 705 Muenster Univ. of Applied Sciences 706 Stegerwaldstr. 39 707 48565 Steinfurt 708 Germany 710 Email: tuexen@fh-muenster.de 711 Randall R. Stewart 712 Cisco Systems, Inc. 713 4875 Forest Drive 714 Suite 200 715 Columbia, SC 29206 716 USA 718 Email: rrs@cisco.com 720 Peter Lei 721 Cisco Systems, Inc. 722 8735 West Higgins Road 723 Suite 300 724 Chicago, IL 60631 725 USA 727 Phone: 728 Email: peterlei@cisco.com 730 Eric Rescorla 731 RTFM, Inc. 732 2064 Edgewood Drive 733 Palo Alto, CA 94303 734 USA 736 Phone: +1 650-320-8549 737 Email: ekr@rtfm.com 739 Full Copyright Statement 741 Copyright (C) The Internet Society (2006). 743 This document is subject to the rights, licenses and restrictions 744 contained in BCP 78, and except as set forth therein, the authors 745 retain all their rights. 747 This document and the information contained herein are provided on an 748 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 749 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 750 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 751 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 752 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 753 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 755 Intellectual Property 757 The IETF takes no position regarding the validity or scope of any 758 Intellectual Property Rights or other rights that might be claimed to 759 pertain to the implementation or use of the technology described in 760 this document or the extent to which any license under such rights 761 might or might not be available; nor does it represent that it has 762 made any independent effort to identify any such rights. Information 763 on the procedures with respect to rights in RFC documents can be 764 found in BCP 78 and BCP 79. 766 Copies of IPR disclosures made to the IETF Secretariat and any 767 assurances of licenses to be made available, or the result of an 768 attempt made to obtain a general license or permission for the use of 769 such proprietary rights by implementers or users of this 770 specification can be obtained from the IETF on-line IPR repository at 771 http://www.ietf.org/ipr. 773 The IETF invites any interested party to bring to its attention any 774 copyrights, patents or patent applications, or other proprietary 775 rights that may cover technology that may be required to implement 776 this standard. Please address the information to the IETF at 777 ietf-ipr@ietf.org. 779 Acknowledgment 781 Funding for the RFC Editor function is provided by the IETF 782 Administrative Support Activity (IASA).