idnits 2.17.1 draft-ietf-avt-srtp-ekt-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 : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 14, 2011) is 4786 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) == Missing Reference: 'ChangeCipherSpec' is mentioned on line 1303, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS197' == Outdated reference: A later version (-06) exists of draft-ietf-tls-rfc4347-bis-04 ** Downref: Normative reference to an Informational RFC: RFC 3394 ** Obsolete normative reference: RFC 4566 (Obsoleted by RFC 8866) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 3547 (Obsoleted by RFC 6407) Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 AVT Working Group D. McGrew 3 Internet-Draft F. Andreasen 4 Intended status: Standards Track D. Wing 5 Expires: September 15, 2011 Cisco 6 K. Fischer 7 Siemens Enterprise Communications 8 March 14, 2011 10 Encrypted Key Transport for Secure RTP 11 draft-ietf-avt-srtp-ekt-02 13 Abstract 15 SRTP Encrypted Key Transport (EKT) is an extension to SRTP that 16 provides for the secure transport of SRTP master keys, Rollover 17 Counters, and other information, within SRTP or SRTCP. This facility 18 enables SRTP to work for decentralized conferences with minimal 19 control, and to handle situations caused by early media. 21 This note defines EKT, and also describes how to use it with SDP 22 Security Descriptions, DTLS-SRTP, and MIKEY. These other key 23 management protocols provide an EKT key to everyone in a session, and 24 EKT coordinates the keys within the session. 26 Status of this Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on September 15, 2011. 43 Copyright Notice 45 Copyright (c) 2011 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 1.1. Conventions Used In This Document . . . . . . . . . . . . 5 62 2. Encrypted Key Transport . . . . . . . . . . . . . . . . . . . 6 63 2.1. Authentication Tag Formats . . . . . . . . . . . . . . . . 6 64 2.2. Packet Processing and State Machine . . . . . . . . . . . 8 65 2.2.1. Outbound (Tag Generation) . . . . . . . . . . . . . . 9 66 2.2.2. Inbound (Tag Verification) . . . . . . . . . . . . . . 11 67 2.3. Ciphers . . . . . . . . . . . . . . . . . . . . . . . . . 14 68 2.3.1. The Default Cipher . . . . . . . . . . . . . . . . . . 15 69 2.3.2. The AES Key Wrap Cipher . . . . . . . . . . . . . . . 15 70 2.3.3. Other EKT Ciphers . . . . . . . . . . . . . . . . . . 16 71 2.4. Synchronizing Operation . . . . . . . . . . . . . . . . . 16 72 2.5. Transport . . . . . . . . . . . . . . . . . . . . . . . . 17 73 2.6. Timing and Reliability Consideration . . . . . . . . . . . 17 74 3. Use of EKT with SDP Security Descriptions . . . . . . . . . . 19 75 3.1. SDP Security Descriptions Recap . . . . . . . . . . . . . 19 76 3.2. Relationship between EKT and SDP Security Descriptions . . 20 77 3.3. Overview of Combined EKT and SDP Security Description 78 Operation . . . . . . . . . . . . . . . . . . . . . . . . 22 79 3.4. EKT Extensions to SDP Security Descriptions . . . . . . . 22 80 3.4.1. EKT_Cipher . . . . . . . . . . . . . . . . . . . . . . 22 81 3.4.2. EKT_Key . . . . . . . . . . . . . . . . . . . . . . . 23 82 3.4.3. EKT_SPI . . . . . . . . . . . . . . . . . . . . . . . 23 83 3.5. Offer/Answer Procedures . . . . . . . . . . . . . . . . . 23 84 3.5.1. Generating the Initial Offer - Unicast Streams . . . . 24 85 3.5.2. Generating the Initial Answer - Unicast Streams . . . 25 86 3.5.3. Processing of the Initial Answer - Unicast Streams . . 26 87 3.6. SRTP-Specific Use Outside Offer/Answer . . . . . . . . . . 27 88 3.7. Modifying the Session . . . . . . . . . . . . . . . . . . 27 89 3.8. Backwards Compatibility Considerations . . . . . . . . . . 28 90 3.9. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 28 91 4. Use of EKT with DTLS-SRTP Key Transport . . . . . . . . . . . 30 92 4.1. EKT Extensions to DTLS-SRTP . . . . . . . . . . . . . . . 30 93 4.1.1. Scaling to Large Groups . . . . . . . . . . . . . . . 32 94 4.2. Offer/Answer Considerations . . . . . . . . . . . . . . . 33 95 4.2.1. Generating the Initial Offer . . . . . . . . . . . . . 33 96 4.2.2. Generating the Initial Answer . . . . . . . . . . . . 34 97 4.2.3. Processing the Initial Answer . . . . . . . . . . . . 34 98 4.2.4. Modifying the Session . . . . . . . . . . . . . . . . 35 99 5. Use of EKT with MIKEY . . . . . . . . . . . . . . . . . . . . 36 100 5.1. EKT extensions to MIKEY . . . . . . . . . . . . . . . . . 37 101 5.2. Offer/Answer considerations . . . . . . . . . . . . . . . 39 102 5.2.1. Generating the Initial Offer . . . . . . . . . . . . . 39 103 5.2.2. Generating the Initial Answer . . . . . . . . . . . . 40 104 5.2.3. Processing the Initial Answer . . . . . . . . . . . . 40 105 5.2.4. Modifying the Session . . . . . . . . . . . . . . . . 40 106 6. Design Rationale . . . . . . . . . . . . . . . . . . . . . . . 42 107 7. Security Considerations . . . . . . . . . . . . . . . . . . . 44 108 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 45 109 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 46 110 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 47 111 10.1. Normative References . . . . . . . . . . . . . . . . . . . 47 112 10.2. Informative References . . . . . . . . . . . . . . . . . . 48 113 Appendix A. Using EKT to Optimize Interworking DTLS-SRTP with 114 Security Descriptions . . . . . . . . . . . . . . . . 49 115 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 52 117 1. Introduction 119 RTP is designed to allow decentralized groups with minimal control to 120 establish sessions, such as for multimedia conferences. 121 Unfortunately, Secure RTP (SRTP [RFC3711]) cannot be used in many 122 minimal-control scenarios, because it requires that SSRC values and 123 other data be coordinated among all of the participants in a session. 124 For example, if a participant joins a session that is already in 125 progress, the SRTP rollover counter (ROC) of each SRTP source in the 126 session needs to be provided to that participant. 128 The inability of SRTP to work in the absence of central control was 129 well understood during the design of that protocol; that omission was 130 considered less important than optimizations such as bandwidth 131 conservation. Additionally, in many situations SRTP is used in 132 conjunction with a signaling system that can provide most of the 133 central control needed by SRTP. However, there are several cases in 134 which conventional signaling systems cannot easily provide all of the 135 coordination required. It is also desirable to eliminate the layer 136 violations that occur when signaling systems coordinate certain SRTP 137 parameters, such as SSRC values and ROCs. 139 This document defines Encrypted Key Transport (EKT) for SRTP, an 140 extension to SRTP that fits within the SRTP framework and reduces the 141 amount of signaling control that is needed in an SRTP session. EKT 142 securely distributes the SRTP master key and other information for 143 each SRTP source, using SRTCP or SRTP to transport that information. 144 With this method, SRTP entities are free to choose SSRC values as 145 they see fit, and to start up new SRTP sources with new SRTP master 146 keys (see Section 2.2) within a session without coordinating with 147 other entities via signaling or other external means. This fact 148 allows to reinstate the RTP collision detection and repair mechanism, 149 which is nullified by the current SRTP specification because of the 150 need to control SSRC values closely. An SRTP endpoint using EKT can 151 generate new keys whenever an existing SRTP master key has been 152 overused, or start up a new SRTP source to replace an old SRTP source 153 that has reached the packet-count limit. EKT also solves the problem 154 in which the burst loss of the N initial SRTP packets can confuse an 155 SRTP receiver, when the initial RTP sequence number is greater than 156 or equal to 2^16 - N. These features simplify many architectures that 157 implement SRTP. 159 EKT provides a way for an SRTP session participant, either sender or 160 receiver, to securely transport its SRTP master key and current SRTP 161 rollover counter to the other participants in the session. This 162 data, possibly in conjunction with additional data provided by an 163 external signaling protocol, furnishes the information needed by the 164 receiver to instantiate an SRTP/SRTCP receiver context. 166 EKT does not control the manner in which the SSRC and master key are 167 generated; it is concerned only with their secure transport. Those 168 values may be generated on demand by the SRTP endpoint, or may be 169 dictated by an external mechanism such as a signaling agent or a 170 secure group controller. 172 EKT is not intended to replace external key establishment mechanisms 173 such as SDP Security Descriptions [RFC4568], DTLS-SRTP [RFC5764], or 174 MIKEY [RFC3830][RFC4563]. Instead, it is used in conjunction with 175 those methods, and it relieves them of the burden of tightly 176 coordinating every SRTP source among every SRTP participant. 178 This document is organized as follows. A complete normative 179 definition of EKT is provided in Section 2. It consists of packet 180 processing algorithms (Section 2.2) and cryptographic definitions 181 (Section 2.3) . In Section 3, the use of EKT with SDP Security 182 Descriptions is defined, and in Section 4 its use with DTLS-SRTP is 183 defined. In Section 5 we outline the use of EKT with MIKEY. 184 Section 6 provides a design rationale. Security Considerations are 185 provided in Section 7, and IANA considerations are provided in 186 Section 8. 188 1.1. Conventions Used In This Document 190 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 191 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 192 document are to be interpreted as described in [RFC2119]. 194 2. Encrypted Key Transport 196 In EKT, an SRTP master key is encrypted with a Key Encrypting Key 197 (KEK), and the resulting ciphertext is transported (using the EKT 198 Base Authentication Tag) in selected SRTCP or in selected SRTP 199 packets. A single KEK suffices for a single SRTP session, regardless 200 of the number of participants in the session. However, there can be 201 multiple KEKs used within a particular session. We use terms "KEK" 202 or "EKT key" to mean the same thing; the latter term is used when 203 describing the relation of EKT to external key management. 205 In order to convey the ciphertext of the SRTP master key, and other 206 additional information, the Authentication Tag field is subdivided as 207 defined in Section 2.1. EKT defines new SRTP and SRTCP 208 authentication functions, which use this format. It incorporates a 209 conventional authentication function, which is called the base 210 authentication function in this specification. Any authentication 211 function, such as the default one of HMAC-SHA1 with a 160-bit key and 212 an 80-bit authentication tag, can be used as a base authentication 213 function. EKT also defines a new method of providing SRTP master 214 keys to an endpoint. 216 2.1. Authentication Tag Formats 218 The EKT Authentication Tag uses one of the two formats defined below. 219 These two formats can always be unambiguously distinguished on 220 receipt by examining the final bit of the EKT Authentication Tag, 221 which is also the final bit of the SRTP packet. The first format is 222 the Full EKT Authentication Tag (Figure 1), and the second is the 223 Abbreviated EKT Authentication Tag (Figure 2). 225 The following figure shows the packet layout for the Full EKT 226 Authentication Tag: 228 0 1 2 3 229 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 230 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 231 : Base Authentication Tag : 232 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 233 : Encrypted Master Key : 234 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 235 | Rollover Counter | 236 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 237 | Initial Sequence Number | Security Parameter Index |1| 238 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 240 Figure 1: Full EKT Authentication Tag format 242 The Full EKT Authentication Tag field contains the following sub- 243 fields: 245 Base Authentication Tag: This field contains the authentication tag 246 computed by the base authentication function. The value of this 247 field is used to check the authenticity of the packet. 249 Encrypted Master Key: The length of this field is variable, and is 250 equal to the ciphertext size N defined in Section 2.3. Note that 251 the length of the field is inferable from the SPI field, since the 252 particular EKT cipher used by the sender of a packet is inferable 253 from that field. The Encrypted Master Key field is included 254 outside of the authenticated portion of the SRTCP packet, 255 immediately following the Authentication Tag. It contains the 256 ciphertext value resulting from the encryption of the SRTP master 257 key corresponding to the SSRC contained in the packet. The 258 encryption and decryption of this value is done using a cipher as 259 defined in Section 2.3. 261 Rollover Counter: The length of this field is fixed at 32 bits. 262 This field is set to the current value of the SRTP rollover 263 counter in the SRTP context associated with the SSRC in the SRTCP 264 packet. This field immediately follows the Encrypted Master Key 265 field. 267 Initial Sequence Number (ISN): The length of this field is fixed at 268 16 bits. If this field is nonzero, then it indicates the RTP 269 sequence number of the initial RTP packet that is protected using 270 the SRTP master key conveyed (in encrypted form) by the Encrypted 271 Master Key field of this packet. If this field is zero, it 272 indicates that the initial RTP packet protected using the SRTP 273 master key conveyed in this packet preceded, or was concurrent 274 with, the last roll-over of the RTP sequence number. 276 Security Parameter Index (SPI): The length of this field is fixed at 277 15 bits. This field indicates the appropriate Key Encrypting Key 278 and other parameters for the receiver to use when processing the 279 packet. It is an "index" into a table of possibilities (which are 280 established via signaling or some other out-of-band means), much 281 like the IPsec Security Parameter Index [RFC4301]. The parameters 282 that are identified by this field are: 284 * The Key Encrypting Key used to process the packet. 286 * The EKT cipher used to process the packet. 288 * The Secure RTP parameters associated with the SRTP Master Key 289 carried by the packet and the SSRC value in the packet. 291 Section 8.2. of [RFC3711] summarizes the parameters defined by 292 that specification. 294 * The Master Salt associated with the Master Key. (This value is 295 part of the parameters mentioned above, but we call it out for 296 emphasis.) The Master Salt is communicated separately, via 297 signaling, typically along with the EKT Key Encrypting Key. 299 Together, these elements are called an EKT parameter set. Within 300 each SRTP session, each distinct EKT parameter set that may be 301 used MUST be associated with a distinct SPI value, to avoid 302 ambiguity. The SPI field follows the Initial Sequence Number. 303 Since it appears at the end of the packet, and has a fixed length, 304 it is always possible to unambiguously parse this field. 306 Final bit: This MUST be 1. This flag distinguishes the packet 307 layout between Figure 2 or Figure 1. 309 The following figure shows the packet layout of the Abbreviated EKT 310 Authentication Tag: 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 : Base Authentication Tag : 316 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 317 | Reserved |0| 318 +-+-+-+-+-+-+-+-+ 320 Figure 2: Abbreviated EKT Authentication Tag format 322 The Abbreviated EKT Authentication Tag field contains the following 323 sub-fields: 325 Base Authentication Tag: same as described above. 327 Reserved: 7 bits. MUST be 0 on transmission and MUST be ignored on 328 reception. 330 Final Bit: This MUST be 0. This flag distinguishes the packet 331 layout betweenFigure 1 or Figure 2.s 333 2.2. Packet Processing and State Machine 335 At any given time, each SRTP/SRTCP source has associated with it a 336 single EKT parameter set. This parameter set is used to process all 337 outbound packets, and is called the outbound parameter set. There 338 may be other EKT parameter sets that are used by other SRTP/SRTCP 339 sources in the same session. All of these EKT parameter sets SHOULD 340 be stored by all of the participants in an SRTP session, for use in 341 processing inbound SRTCP traffic. 343 We next review SRTP authentication and show how the EKT 344 authentication method is built on top of a base authentication 345 method. An SRTP or SRTCP authentication method consists of a tag- 346 generation function and a verification function. The tag-generation 347 function takes as input a secret key, the data to be authenticated, 348 and the packet index. It provides an authentication tag as its sole 349 output, and is used in the processing of outbound packets. The 350 verification function takes as input a secret key, the data to be 351 authenticated, the packet index, and the authentication tag. It 352 returns an indication of whether or not the data, index, and tag are 353 valid or not. It is used in the processing of inbound packets. EKT 354 defines a tag-generation function in terms of the base tag-generation 355 function, and defines a verification function in terms of the base 356 verification function. The tag-generation function is used to 357 process outbound packets, and the verification function is used to 358 process inbound packets. 360 2.2.1. Outbound (Tag Generation) 362 When an SRTP or SRTCP packet needs to be sent, the EKT tag generation 363 function works as follows. The Rollover Counter field in the packet 364 is set to the current value of the SRTP rollover counter (represented 365 as an unsigned integer in network byte order). 367 The Initial Sequence Number field is set to zero, if the initial RTP 368 packet protected using the current SRTP master key for this source 369 preceded, or was concurrent with, the last roll-over of the RTP 370 sequence number. Otherwise, that field is set to the value of the 371 RTP sequence number of the initial RTP packet that was or will be 372 protected by that key. When the SRTP master key corresponding to a 373 source is changed, the new key SHOULD be communicated in advance via 374 EKT. (Note that the ISN field allows the receiver to know when it 375 should start using the new key to process SRTP packets.) This 376 enables the rekeying event to be communicated before any RTP packets 377 are protected with the new key. The rekeying event MUST NOT change 378 the value of ROC (otherwise, the current value of the ROC would not 379 be known to late joiners of existing sessions). 381 The Security Parameter Index field is set to the value of the 382 Security Parameter Index that is associated with the outbound 383 parameter set. 385 The Encrypted Master Key field is set to the ciphertext created by 386 encrypting the SRTP master key with the EKT cipher, using the KEK as 387 the encryption key. The encryption process is detailed in 388 Section 2.3. Implementations MAY cache the value of this field to 389 avoid recomputing it for each packet that is sent. 391 2.2.1.1. Computing the Base Authentication Tag 393 If using the Base Authentication Tag format, the field is computed 394 using the base tag-generation function as follows. It can only be 395 computed after all of the other fields have been set. The 396 authenticated input consists of the following elements, in order: 398 1. the SRTP or SRTCP authenticated portion, 400 2. a string of zero bits whose length exactly matches that of the 401 Base Authentication Tag field, 403 3. the Encrypted Master Key field, 405 4. the Rollover Counter field, 407 5. the Initial Sequence Number field, and 409 6. the Security Parameter Index field. 411 Implementation note: the string of zero bits is included in the 412 authenticated input in order to allow implementations to compute 413 the base authentication tag using a single pass of the base 414 authentication function. Implementations MAY write zeros into the 415 Base Authentication Tag field prior to computing that function, on 416 the sending side. 418 2.2.1.2. Computing the Abbreviated Authentication Tag 420 If using the Abbreviated Authentication Tag format, the field is 421 computed using the base tag-generation function as follows. It can 422 only be computed after all of the other fields have been set. The 423 authenticated input consists of the following elements, in order: 425 1. the SRTP or SRTCP authenticated portion, 427 2. a string of zero bits whose length exactly matches that of the 428 Base Authentication Tag field. Then for SRTP only, place the ROC 429 (in network order) into the first 4 bytes of the "base 430 authentication tag" field. 432 3. set reserved bits and final bit to zeros. 434 2.2.2. Inbound (Tag Verification) 436 The EKT verification function proceeds as follows (see Figure 3), or 437 uses an equivalent set of steps. Recall that the verification 438 function is a component of SRTP and SRTCP processing. When a packet 439 does not pass the verification step, the function indicates this fact 440 to the SRTCP packet processing function when it returns control to 441 that function. 443 1. The Security Parameter Index field is checked to determine which 444 EKT parameter set should be used when processing the packet. If 445 multiple parameter sets been defined for the SRTP session, then 446 the one that is associated with the Security Parameter Index 447 value that matches the Security Parameter Index field in the 448 packet is used. This parameter set is called the matching 449 parameter set below. If there is no matching SPI, then the 450 verification function MUST return an indication of authentication 451 failure, and the steps described below are not performed. 453 2. If there is already an SRTP crypto context associated with the 454 SSRC in the packet, and replay protection is in use, then the 455 receiver performs the replay check described in Section 3.3.2 of 456 [RFC3711]. If the EKT fields are conveyed in an RTCP packet, 457 then the packet index used in that check is formed from the 458 Rollover Counter and the Initial Sequence Number fields in that 459 packet. If the EKT fields are conveyed in an SRTP packet, then 460 the packet index used in that check is formed from the EKT 461 Rollover Counter field and the RTP Sequence Number in that 462 packet. 464 3. The Encrypted Master Key field is decrypted using the EKT 465 cipher's decryption function. That field is used as the 466 ciphertext input, and the Key Encrypting Key in the matching 467 parameter set is used as the decryption key. The decryption 468 process is detailed in Section 2.3. The plaintext resulting from 469 this decryption is provisionally accepted as the SRTP master key 470 corresponding to the SSRC in the packet. If an SRTP master key 471 identifier (MKI) is present in the packet, then the provisional 472 key corresponds to the particular SSRC and MKI combination. A 473 provisional key MUST be used only to process one single packet. 474 A provisional SRTP or SRTCP authentication key is generated from 475 the provisional master key, and the SRTP master salt from the 476 matching parameter set, using the SRTP key derivation algorithm 477 (see Section 4.3 of [RFC3711]). 479 4. An authentication check is performed on the packet, using the 480 provisional SRTP or SRTCP authentication key. This key is 481 provided to the base authentication function (see Figure 3), 482 which is evaluated as described in Section 2.2.1.1. If the Base 483 Authentication Tag field matches the tag computed by the base 484 authentication function, then the packet passes the check. 486 Implementation note: a receiver MAY copy the Base 487 Authentication Tag field into temporary storage, then write 488 zeros into that field, prior to computing the base 489 authentication tag value. This step allows the base 490 authentication function to be computed in a single pass over 491 the data in the packet. 493 5. If the base authentication check using the provisional key fails, 494 then the provisional key MUST be discarded and it MUST NOT affect 495 any subsequent processing. The verification function MUST return 496 an indication of authentication failure, and the steps described 497 below are not performed. 499 6. Otherwise, if the base authentication check is passed, the 500 provisional key is also accepted as the SRTP master key 501 corresponding to the SRTP source that sent the packet. If an MKI 502 is present in the packet, then the master key corresponds to the 503 particular SSRC and MKI combination. If there is no SRTP crypto 504 context corresponding to the SSRC in the packet, then a new 505 crypto context is created. The rollover counter in the context 506 is set to the value of the Rollover Counter field. If the crypto 507 context is not new, then the rollover counter in the context MUST 508 NOT be set to a value lower than its current value. (If the 509 replay protection step described above is performed, it ensures 510 that this requirement is satisfied.) 512 7. If the Initial Sequence Number field is nonzero, then the initial 513 sequence number for the SRTP master key is set to the packet 514 index created by appending that field to the current rollover 515 counter and treating the result as a 48-bit unsigned integer. 516 The initial sequence number for the master key is equivalent to 517 the "From" value of the pair of indices (Section 8.1.1 518 of [RFC3711]) that can be associated with a master key. 520 8. The newly accepted SRTP master key, the SRTP parameters from the 521 matching parameter set, the SSRC from the packet, and the MKI 522 from the packet, if one is present, are stored in the crypto 523 context associated with the SRTP source. The SRTP Key Derivation 524 algorithm is run in order to compute the SRTP encryption and 525 authentication keys, and those keys are stored for use in SRTP 526 processing of inbound packets. The Key Derivation algorithm 527 takes as input the newly accepted SRTP master key, along with the 528 Master Salt from the matching parameter set. 530 Implementation note: the receiver may want to retain old 531 master keys for some brief period of time, so that out of 532 order packets can be processed. 534 9. The verification function then returns an indication that the 535 packet passed the verification. 537 Implementation note: the value of the Encrypted Master Key 538 field is identical in successive packets protected by the same 539 KEK and SRTP master key. This value MAY be cached by an SRTP 540 receiver to minimize computational effort, by allowing it to 541 recognize when the SRTP master key is unchanged, and thus 542 avoid repeating Steps 2, 6, and 7. 544 +------- Encrypted Master Key 545 | 546 v 547 +------------+ 548 | Decryption | 549 | Function |<-------------------------- Key Encrypting Key 550 +------------+ 551 | +----------------+ EKT 552 +--------+-- provisional ---->| SRTCP |<-- master 553 | master key | Key Derivation | salt 554 | +----------------+ 555 | | 556 | provisional SRTCP authentication key 557 | | 558 | v 559 | +----------------+ 560 | authenticated portion --> | Base SRTCP | 561 | authentication tag -----> | Verification | 562 | +----------------+ 563 | | 564 | +----------------+ +---+ 565 | | return FAIL |<- FAIL -| ? | 566 | +----------------+ +---+ 567 | | 568 | +----------------+ | 569 +------->| set master key,|<- PASS ---+ 570 | ROC, and MKI | 571 +----------------+ 572 | 573 v 574 +----------------+ 575 | return PASS | 576 +----------------+ 578 Figure 3: EKT inbound processing. 580 2.3. Ciphers 582 EKT uses a cipher to encrypt the SRTP master keys. We first specify 583 the interface to the cipher, in order to abstract the interface away 584 from the details of that function. We then define the cipher that is 585 used in EKT by default. This cipher MUST be implemented, but another 586 cipher that conforms to this interface MAY be used, in which case its 587 use MUST be coordinated by external means (e.g., call signaling). 589 An EKT cipher consists of an encryption function and a decryption 590 function. The encryption function E(K, P) takes the following 591 inputs: 593 o a secret key K with a length of L bytes, and 595 o a plaintext value P with a length of M bytes. 597 The encryption function returns a ciphertext value C whose length is 598 N bytes, where N is at least M. The decryption function D(K, C) takes 599 the following inputs: 601 o a secret key K with a length of L bytes, and 603 o a ciphertext value C with a length of N bytes. 605 The decryption function returns a plaintext value P that is M bytes 606 long. These functions have the property that D(K, E(K, P)) = P for 607 all values of K and P. Each cipher also has a limit T on the number 608 of times that it can be used with any fixed key value. For each key, 609 the encryption function MUST NOT be invoked on more than T distinct 610 values of P, and the decryption function MUST NOT be invoked on more 611 than T distinct values of C. 613 An EKT cipher MUST resist attacks in which both ciphertexts and 614 plaintexts can be adaptively chosen. For each randomly chosen key, 615 the encryption and decryption functions cannot be distinguished from 616 a random permutation and its inverse with non-negligible advantage. 617 This must be true even for adversaries that can query both the 618 encryption and decryption functions adaptively. The advantage is 619 defined as the difference between the probability that the adversary 620 will identify the cipher as such and the probability that the 621 adversary will identify the random permutation as the cipher, when 622 each case is equally likely. 624 2.3.1. The Default Cipher 626 The default cipher is the Advanced Encryption Standard (AES) 627 [FIPS197] with 128-bit keys, in Electronic Codebook (ECB) Mode. Its 628 parameters are fixed at L=16, M=16, and T=2^48. Note that M matches 629 the size of the SRTP master keys used by the default SRTP key 630 derivation function; if an SRTP cipher with a different SRTP master 631 key length is to be used with EKT, then another EKT cipher must be 632 used. ECB is the simplest mode of operation of a block cipher, in 633 which the block cipher is used in its raw form. 635 2.3.2. The AES Key Wrap Cipher 637 The AES Key Wrap [RFC3394] defines a cipher that can be used with 638 plaintexts larger than 16 bytes in length. It requires a plaintext 639 length M that is a multiple of eight bytes, and it returns a 640 ciphertext with a length of N = M + 8 bytes. It can be used with key 641 sizes of L = 16, 24, and 32. The key size determines the length of 642 the AES key used by the Key Wrap algorithm. With this cipher, 643 T=2^48. 645 2.3.3. Other EKT Ciphers 647 Other specification MAY extend this one by defining other EKT ciphers 648 per Section 8. This section defines how those ciphers interact with 649 this specification. 651 An EKT cipher determines how the Encrypted Master Key field is 652 written, and how it is processed when it is read. This field is 653 opaque to the other aspects of EKT processing. EKT ciphers are free 654 to use this field in any way, but they SHOULD NOT use other EKT or 655 SRTP fields as an input. The values of the parameters L, M, N, and T 656 MUST be defined by each EKT cipher, and those values MUST be 657 inferable from the EKT parameter set. 659 2.4. Synchronizing Operation 661 A participant in a session MAY opt to use a particular EKT key to 662 protect outbound packets after it accepts that EKT key for protecting 663 inbound traffic. In this case, the fact that one participant has 664 changed to using a new EKT key for outbound traffic can trigger other 665 participants to switch to using the same key. 667 An SRTP/SRTCP source SHOULD change its SRTP master key after its EKT 668 key has been changed. This will ensure that the set of participants 669 able to decrypt the traffic will be limited to those who know the 670 current EKT key. 672 EKT can be transported over SRTCP, but some of the information that 673 it conveys is used for SRTP processing; some elements of the EKT 674 parameter set apply to both SRTP and SRTCP. Furthermore, SRTCP 675 packets can be lost and both SRTP and SRTCP packets may be delivered 676 out of order. This can lead to various race conditions, which we 677 review below. 679 When joining an SRTP session, SRTP packets may be received before any 680 EKT over SRTCP packets, which implies the crypto context has not been 681 established, unless other external signaling mechanism has done so. 682 Rather than automatically discarding such SRTP packets, the receiver 683 MAY want to provisionally place them in a jitter buffer and delay 684 discarding them until playout time. 686 When an SRTP source using EKT over SRTCP performs a rekeying 687 operation, there is a race between the actual rekeying signaled via 688 SRTCP and the SRTP packets secured by the new keying material. If 689 the SRTP packets are received first, they will fail authentication; 690 alternatively, if authentication is not being used, they will decrypt 691 to unintelligible random-looking plaintext. (Note, however, that 692 [RFC3711] says that SRTP "SHOULD NOT be used without message 693 authentication".) In order to address this problem, the rekeying 694 event can be sent before packets using the new SRTP master key are 695 sent (by use of the ISN field). Another solution involves using an 696 MKI at the expense of added overhead in each SRTP packet. 697 Alternatively, receivers MAY want to delay discarding packets from 698 known SSRCs that fail authentication in anticipation of receiving a 699 rekeying event via EKT (SRTCP) shortly. 701 The ROC signaled via EKT over SRTCP may be off by one when it is 702 received by the other party(ies) in the session. In order to deal 703 with this, receivers should simply follow the SRTP packet index 704 estimation procedures defined in Section 3.3.1 [RFC3711]. 706 2.5. Transport 708 EKT MUST be used over SRTCP, whenever RTCP is in use. EKT MAY be 709 used over SRTP. When EKT over SRTP is used in an SRTP session in 710 which SRTCP is available, then EKT MUST be used for both SRTP and 711 SRTCP. 713 The packet processing, state machine, and Authentication Tag format 714 for EKT over SRTP are nearly identical to that for EKT over SRTCP. 715 Differences are highlighted in Section 2.2.1 and Section 2.2.2. 717 2.6. Timing and Reliability Consideration 719 SRTCP communicates the master key and ROC for the SRTP session. 720 Thus, as explained above, if SRTP packets are received prior to the 721 corresponding SRTCP (EKT) packet, a race condition occurs. From an 722 EKT point of view, it is therefore desirable for an SRTP sender to 723 send an EKT packet containing the Base Authentication Tag as soon as 724 possible, and in no case any later than when the initial SRTP packet 725 is sent. It is RECOMMENDED that the Base Authentication Tag be 726 transmitted 3 times (to accomodate packet loss) and to provide a 727 reliable indication to the receiver that the sender is now using the 728 EKT key. If the Base Authentication Tag sent in SRTCP, the SRTCP 729 timing rules associated with the profile under which it runs (e.g., 730 RTP/SAVP or RTP/SAVPF) MUST be obeyed. Subject to that constraint, 731 SRTP senders using EKT over SRTCP SHOULD send an SRTCP packet as soon 732 as possible after joining a session. Note that there is no need for 733 SRTP receivers to do so. Also note, that per RFC 3550, Section 6.2, 734 it is permissible to send a compound RTCP packet immediately after 735 joining a unicast session (but not a multicast session). 737 SRTCP is not reliable and hence SRTCP packets may be lost. This is 738 obviously a problem for endpoints joining an SRTP session and 739 receiving SRTP traffic (as opposed to SRTCP), or for endpoints 740 receiving SRTP traffic following a rekeying event. To reduce the 741 impact of lost packets, SRTP senders using EKT over SRTCP SHOULD send 742 SRTCP packets as often as allowed by the profile under which they 743 operate. 745 3. Use of EKT with SDP Security Descriptions 747 The SDP Security Descriptions (SDESC) [RFC4568] specification defines 748 a generic framework for negotiating security parameters for media 749 streams negotiated via the Session Description Protocol by use of a 750 new SDP "crypto" attribute and the Offer/Answer procedures defined in 751 [RFC3264]. In addition to the general framework, SDES also defines 752 how to use that framework specifically to negotiate security 753 parameters for Secure RTP. Below, we first provide a brief recap of 754 the crypto attribute when used for SRTP and we then explain how it is 755 complementary to EKT. In the rest of this Section, we provide 756 extensions to the crypto attribute and associated offer/answer 757 procedures to define its use with EKT. 759 3.1. SDP Security Descriptions Recap 761 The SRTP crypto attribute defined for SDESC contains a tag followed 762 by three types of parameters (refer to [RFC4568] for details): 764 o Crypto-suite. Identifies the encryption and authentication 765 transform 767 o Key parameters. SRTP keying material and parameters. 769 o Session parameters. Additional (optional) SRTP parameters such as 770 Key Derivation Rate, Forward Error Correction Order, use of 771 unencrypted SRTP, and other parameters defined by SDESC. 773 The crypto attributes in the example SDP in Figure 4 illustrate these 774 parameters. 776 v=0 777 o=sam 2890844526 2890842807 IN IP4 192.0.2.5 778 s=SRTP Discussion 779 i=A discussion of Secure RTP 780 u=http://www.example.com/seminars/srtp.pdf 781 e=marge@example.com (Marge Simpson) 782 c=IN IP4 192.0.2.12 783 t=2873397496 2873404696 784 m=audio 49170 RTP/SAVP 0 785 a=crypto:1 AES_CM_128_HMAC_SHA1_80 786 inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|2^20|1:4 787 FEC_ORDER=FEC_SRTP 788 a=crypto:2 F8_128_HMAC_SHA1_80 789 inline:MTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5QUJjZGVm|2^20|1:4; 790 inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20|2:4 791 FEC_ORDER=FEC_SRTP 793 Figure 4: SDP Security Descriptions example 795 For legibility the SDP shows line breaks that are not present on the 796 wire. 798 The first crypto attribute has the tag "1" and uses the crypto-suite 799 AES_CM_128_HMAC_SHA1_80. The "inline" parameter provides the SRTP 800 master key and salt, the master key lifetime (number of packets), and 801 the (optional) Master Key Identifier (MKI) whose value is "1" and has 802 a byte length of "4" in the SRTP packets. Finally, the FEC_ORDER 803 session parameter indicates the order of Forward Error Correction 804 used (FEC is applied before SRTP processing by the sender of the SRTP 805 media). 807 The second crypto attribute has the tag "2" and uses the crypto-suite 808 F8_128_HMAC_SHA1_80. It includes two SRTP master keys and associated 809 salts. The first one is used with the MKI value 1, whereas the 810 second one is used with the MKI value 2. Finally, the FEC_ORDER 811 session parameter indicates the order of Forward Error Correction 812 used. 814 3.2. Relationship between EKT and SDP Security Descriptions 816 SDP Security Descriptions [RFC4568] define a generic framework for 817 negotiating security parameters for media streams negotiated via the 818 Session Description Protocol by use of the Offer/Answer procedures 819 defined in [RFC3264]. In addition to the general framework, SDESC 820 also defines how to use it specifically to negotiate security 821 parameters for Secure RTP. 823 EKT and SDESC are complementary. SDESC can negotiate several of the 824 SRTP security parameters (e.g., cipher and use of Master Key 825 Identifier/MKI) as well as SRTP master keys. SDESC, however, does 826 not negotiate SSRCs and their associated Rollover Counter (ROC). 827 Instead, SDESC relies on a so-called "late binding", where a newly 828 observed SSRC will have its crypto context initialized to a ROC value 829 of zero. Clearly, this does not work for participants joining an 830 SRTP session that has been established for a while and hence has a 831 non-zero ROC. It is impossible to use SDESC to join an SRTP session 832 that is already in progress. In this case, EKT on the endpoint 833 running SDP Security can provide the additional signaling necessary 834 to communicate the ROC (Section 6.4.1 of [RFC4568]). The use of EKT 835 solves this problem by communicating the ROC associated with the SSRC 836 in the media plane. 838 SDP Security Descriptions negotiates different SRTP master keys in 839 the send and receive direction. The offer contains the master key 840 used by the offerer to send media, and the answer contains the master 841 key used by the answerer to send media. Consequently, if media is 842 received by the offerer prior to the answer being received, the 843 offerer does not know the master key being used. Use of SDP security 844 preconditions can solve this problem, however it requires an 845 additional round-trip as well as a more complicated state machine. 846 EKT solves this problem by simply sending the master key used in the 847 media plane thereby avoiding the need for security preconditions. 849 If multiple crypto-suites were offered, the offerer also will not 850 know which of the crypto-suites offered was selected until the answer 851 is received. EKT solves this problem by using a correlator, the 852 Security Parameter Index (SPI), which uniquely identifies each crypto 853 attribute in the offer. 855 One of the primary call signaling protocols using offer/answer is the 856 Session Initiation Protocol (SIP) [RFC3261]. SIP uses the INVITE 857 message to initiate a media session and typically includes an offer 858 SDP in the INVITE. An INVITE may be "forked" to multiple recipients 859 which potentially can lead to multiple answers being received. 860 SDESC, however, does not properly support this scenario, mainly 861 because SDP and RTP/RTCP does not contain sufficient information to 862 allow for correlation of an incoming RTP/RTCP packet with a 863 particular answer SDP. Note that extensions providing this 864 correlation do exist (e.g., Interactive Connectivity Establishment 865 (ICE)). SDESC addresses this point-to-multipoint problem by moving 866 each answer to a separate RTP transport address thereby turning a 867 point-to-multipoint scenario into multiple point-to-point scenarios. 868 There are however significant disadvantages to doing so. As long as 869 the crypto attribute in the answer does not contain any declarative 870 parameters that differ from those in the offer, EKT solves this 871 problem by use of the SPI correlator and communication of the 872 answerer's SRTP master key in EKT. 874 As can be seen from the above, the combination of EKT and SDESC 875 provides a better solution to SRTP negotiation for offer/answer than 876 either of them alone. SDESC negotiates the various SRTP crypto 877 parameters (which EKT does not), whereas EKT addresses the 878 shortcomings of SDESC. 880 3.3. Overview of Combined EKT and SDP Security Description Operation 882 We define three session extension parameters to SDESC to communicate 883 the EKT cipher, EKT key, and Security Parameter Index to the peer. 884 The original SDESC parameters are used as defined in [RFC4568], 885 however the procedures associated with the SRTP master key differ 886 slightly, since both SDESC and EKT communicate an SRTP master key. 887 In particular, the SRTP master key communicated via SDESC is used 888 only if there is currently no crypto context established for the SSRC 889 in question. This will be the case when an entity has received only 890 the offer or answer, but has yet to receive a valid EKT message from 891 the peer. Once a valid EKT message is received for the SSRC, the 892 crypto context is initialized accordingly, and the SRTP master key 893 will then be derived from the EKT message. Subsequent offer/answer 894 exchanges do not change this: The most recent SRTP master key 895 negotiated via EKT will be used, or, if none is available for the 896 SSRC in question, the most recent SRTP master key negotiated via 897 offer/answer will be used. Note that with these rules, once a valid 898 EKT message has been received for a given SSRC, rekeying for that 899 SSRC can only be done via EKT. The associated SRTP crypto parameters 900 however can be changed via SDESC. 902 3.4. EKT Extensions to SDP Security Descriptions 904 In order to use EKT and SDESC in conjunction with each other, the 905 following new SDES session parameters are defined. These MUST NOT 906 appear more than once in a given crypto attribute: 908 EKT_Cipher: The EKT cipher used to encrypt the SRTP Master Key 910 EKT_Key: The EKT key used to encrypt the SRTP Master Key 912 EKT_SPI: The EKT Security Parameter Index 914 Below are details on each of these attributes. 916 3.4.1. EKT_Cipher 918 The (optional) EKT_Cipher parameter defines the EKT cipher used to 919 encrypt the EKT key with in SRTCP packets. The default value is 920 "AES_128" in accordance with Section 2.3.1. For the AES Key Wrap 921 cipher (see Section 2.3.2, the values "AESKW_128", "AESKW_192", and 922 "AESKW_256" are defined for values of L=16, 24, and 32 respectively. 923 In the Offer/Answer model, the EKT_Cipher parameter is a negotiated 924 parameter. 926 3.4.2. EKT_Key 928 The (mandatory) EKT_Key parameter is the key K used to encrypt the 929 SRTP Master Key in SRTCP packets. The value is base64 encoded as 930 described in Section 4 [RFC4648]. When base64 decoding the key, 931 padding characters (i.e., one or two "=" at the end of the base64 932 encoded data) are discarded (see [RFC4648] for details). Base64 933 encoding assumes that the base64 encoding input is an integral number 934 of octets. If a given EKT cipher requires the use of a key with a 935 length that is not an integral number of octets, said cipher MUST 936 define a padding scheme that results in the base64 input being an 937 integral number of octets. For example, if the length defined was 938 250 bits, then 6 padding bits would be needed, which could be defined 939 to be the last 6 bits in a 256 bit input. In the Offer/Answer model, 940 the EKT_Key parameter is a negotiated parameter. 942 3.4.3. EKT_SPI 944 The (mandatory) EKT_SPI parameter is the Security Parameter Index. 945 It is encoded as an ASCII string representing the hexadecimal value 946 of the Security Parameter Index. The SPI identifies the *offer* 947 crypto attribute (including the EKT Key and Cipher) being used for 948 the associated SRTP session. A crypto attribute corresponds to an 949 EKT Parameter Set and hence the SPI effectively identifies a 950 particular EKT parameter set. Note that the scope of the SPI is the 951 SRTP session, which may or may not be limited to the scope of the 952 associated SIP dialog. In particular, if one of the participants in 953 an SRTP session is an SRTP translator, the scope of the SRTP session 954 is not limited to the scope of a single SIP dialog. However, if all 955 of the participants in the session are endpoints or mixers, the scope 956 of the SRTP session will correspond to a single SIP dialog. In the 957 Offer/Answer model, the EKT_SPI parameter is a negotiated parameter. 959 3.5. Offer/Answer Procedures 961 In this section, we provide the offer/answer procedures associated 962 with use of the three new SDESC parameters defined in Section 963 Section 3.4. Since SDESC is defined only for unicast streams, we 964 provide only offer/answer procedures for unicast streams here as 965 well. 967 3.5.1. Generating the Initial Offer - Unicast Streams 969 When the initial offer is generated, the offerer MUST follow the 970 steps defined in [RFC4568] Section 7.1.1 as well as the following 971 steps. 973 For each unicast media line using SDESC and where use of EKT is 974 desired, the offerer MUST include one EKT_Key parameter and one 975 EKT_SPI parameter in at least one "crypto" attribute (see [RFC4568]). 976 The EKT_SPI parameter serves to identify the EKT parameter set used 977 for a particular SRTCP packet. Consequently, within a single media 978 line, a given EKT_SPI value MUST NOT be used with multiple crypto 979 attributes. Note that the EKT parameter set to use for the session 980 is not yet established at this point; each offered crypto attribute 981 contains a candidate EKT parameter set. Furthermore, if the media 982 line refers to an existing SRTP session, then any SPI values used for 983 EKT parameter sets in that session MUST NOT be remapped to any 984 different EKT parameter sets. When an offer describes an SRTP 985 session that is already in progress, the offer SHOULD use an EKT 986 parameter set (incl. EKT_SPI and EKT_KEY) that is already in use. 988 If an EKT_Cipher other than the default cipher is to be used, then 989 the EKT_Cipher parameter MUST be included as well. 991 If a given crypto attribute includes more than one set of SRTP key 992 parameters (SRTP master key, salt, lifetime, MKI), they MUST all use 993 the same salt. (EKT requires a single shared salt between all the 994 participants in the direct SRTP session). 996 Important Note: The scope of the offer/answer exchange is the SIP 997 dialog(s) established as a result of the INVITE, however the scope 998 of EKT is the direct SRTP session, i.e., all the participants that 999 are able to receive SRTP and SRTCP packets directly. If an SRTP 1000 session spans multiple SIP dialogs, the EKT parameter sets MUST be 1001 synchronized between all the SIP dialogs where SRTP and SRTCP 1002 packets can be exchanged. In the case where the SIP entity 1003 operates as an RTP mixer (and hence re-originates SRTP and SRTCP 1004 packets with its own SSRC), this is not an issue, unless the mixer 1005 receives traffic from the various participants on the same 1006 destination IP address and port, in which case further 1007 coordination of SPI values and crypto parameters may be needed 1008 between the SIP dialogs (note that SIP forking with multiple early 1009 media senders is an example of this). However if it operates as 1010 an RTP translator, synchronized negotiation of the EKT parameter 1011 sets on *all* the involved SIP dialogs will be needed. This is 1012 non-trivial in a variety of use cases, and hence use of the 1013 combined SDES/EKT mechanism with RTP translators should be 1014 considered very carefully. It should be noted, that use of SRTP 1015 with RTP translators in general should be considered very 1016 carefully as well. 1018 The EKT session parameters can either be included as optional or 1019 mandatory parameters, however within a given crypto attribute, they 1020 MUST all be either optional or mandatory. 1022 3.5.2. Generating the Initial Answer - Unicast Streams 1024 When the initial answer is generated, the answerer MUST follow the 1025 steps defined in [RFC4568] Section 7.1.2 as well as the following 1026 steps. 1028 For each unicast media line using SDESC, the answerer examines the 1029 associated crypto attribute(s) for the presence of EKT parameters. 1030 If mandatory EKT parameters are included with a "crypto" attribute, 1031 the answerer MUST support those parameters in order to accept that 1032 offered crypto attribute. If optional EKT parameters are included 1033 instead, the answerer MAY accept the offered crypto attribute without 1034 using EKT. However, doing so will prevent the offerer from 1035 processing any packets received before the answer. If neither 1036 optional nor mandatory EKT parameters are included with a crypto 1037 attribute, and that crypto attribute is accepted in the answer, EKT 1038 MUST NOT be used. If a given a crypto attribute includes a mixture 1039 of optional and mandatory EKT parameters, or an incomplete set of 1040 mandatory EKT parameters, that crypto attribute MUST be considered 1041 invalid. 1043 When EKT is used with SDESC, the offerer and answerer MUST use the 1044 same SRTP master salt. Thus, the SRTP key parameter(s) in the answer 1045 crypto attribute MUST use the same master salt as the one accepted 1046 from the offer. 1048 When the answerer accepts the offered media line and EKT is being 1049 used, the crypto attribute included in the answer MUST include the 1050 same EKT parameter values as found in the accepted crypto attribute 1051 from the offer (however, if the default EKT cipher is being used, it 1052 may be omitted). Furthermore, the EKT parameters included MUST be 1053 mandatory (i.e., no "-" prefix). 1055 Acceptance of a crypto attribute with EKT parameters leads to 1056 establishment of the EKT parameter set for the corresponding SRTP 1057 session. Consequently, the answerer MUST send packets in accordance 1058 with that particular EKT parameter set only. If the answerer wants 1059 to enable the offerer to process SRTP packets received by the offerer 1060 before it receives the answer, the answerer MUST NOT include any 1061 declarative session parameters that either were not present in the 1062 offered crypto attribute, or were present but with a different value. 1064 Otherwise, the offerer's view of the EKT parameter set would differ 1065 from the answerer's until the answer is received. Similarly, unless 1066 the offerer and answerer has other means for correlating an answer 1067 with a particular SRTP session, the answer SHOULD NOT include any 1068 declarative session parameters that either were not present in the 1069 offered crypto attribute, or were present but with a different value. 1070 If this recommendation is not followed and the offerer receives 1071 multiple answers (e.g., due to SIP forking), the offerer may not be 1072 able to process incoming media stream packets correctly. 1074 3.5.3. Processing of the Initial Answer - Unicast Streams 1076 When the offerer receives the answer, it MUST perform the steps in 1077 [RFC4568] Section 7.1.3 as well as the following steps for each SRTP 1078 media stream it offered with one or more crypto lines containing EKT 1079 parameters in it. 1081 If the answer crypto line contains EKT parameters, and the 1082 corresponding crypto line from the offer contained the same EKT 1083 values, use of EKT has been negotiated successfully and MUST be used 1084 for the media stream. When determining whether the values match, 1085 optional and mandatory parameters MUST be considered equal. 1086 Furthermore, if the default EKT cipher is being used, it MAY be 1087 either present or absent in the offer and/or answer. 1089 If the answer crypto line does not contain EKT parameters, then EKT 1090 MUST NOT be used for the corresponding SRTP session. Note that if 1091 the accepted crypto attribute contained mandatory EKT parameters in 1092 the offer, and the crypto attribute in the answer does not contain 1093 EKT parameters, then negotiation has failed (Section 5.1.3 of 1094 [RFC4568]). 1096 If the answer crypto line contains EKT parameters but the 1097 corresponding offered crypto line did not, or if the parameters don't 1098 match or are invalid, then the offerer MUST consider the crypto line 1099 invalid (see Section 7.1.3 of [RFC4568] for further operation). 1101 The EKT parameter set is established when the answer is received, 1102 however there are a couple of special cases to consider here. First 1103 of all, if an SRTCP packet is received prior to the answer, then the 1104 EKT parameter set is established provisionally based on the SPI 1105 included. Once the answer (which may include declarative session 1106 parameters) is received, the EKT parameter set is fully established. 1107 The second case involves receipt of multiple answers due to SIP 1108 forking. In this case, there will be multiple EKT parameter sets; 1109 one for each SRTP session. As mentioned earlier, reliable 1110 correlation of SIP dialogs to SRTP sessions requires extensions, and 1111 hence if one or more of the answers include declarative session 1112 parameters, it may be difficult to fully establish the EKT parameter 1113 set for each SRTP session. In the absence of a specific correlation 1114 mechanism, it is RECOMMENDED, that such correlation be done based on 1115 the signaled receive IP-address in the SDP and the observed source 1116 IP-address in incoming SRTP/SRTCP packets, and, if necessary, the 1117 signaled receive UDP port and the observed source UDP port. 1119 3.6. SRTP-Specific Use Outside Offer/Answer 1121 Security Descriptions use for SRTP is not defined outside offer/ 1122 answer and hence neither does Security Descriptions with EKT. 1124 3.7. Modifying the Session 1126 When a media stream using the SRTP security descriptions has been 1127 established, and a new offer/answer exchange is performed, the 1128 offerer and answerer MUST follow the steps in Section 7.1.4 of 1129 [RFC4568] as well as the following steps. SDESC allows for all 1130 parameters of the session to be modified, and the EKT session 1131 parameters are no exception to that, however, there are a few 1132 additional rules to be adhered to when using EKT. 1134 It is permissible to start a session without the use of EKT, and then 1135 subsequently start using EKT, however the converse is not. Thus, 1136 once use of EKT has been negotiated on a particular media stream, EKT 1137 MUST continue to be used on that media stream in all subsequent 1138 offer/answer exchanges. 1140 The reason for this is that both SDESC and EKT communicate the SRTP 1141 Master Key with EKT Master Keys taking precedence. Reverting back to 1142 an SDESC-controlled master key in a synchronized manner is difficult. 1144 Once EKT is being used, the salt for the direct SRTP session MUST NOT 1145 be changed. Thus, a new offer/answer which does not create a new 1146 SRTP session (e.g., because it reuses the same IP address and port) 1147 MUST use the same salt for all crypto attributes as is currently used 1148 for the direct SRTP session. 1150 Finally, subsequent offer/answer exchanges MUST NOT remap a given SPI 1151 value to a different EKT parameter set until 2^32 other mappings have 1152 been used within the SRTP session. In practice, this requirements is 1153 most easily met by using a monotonically increasing SPI value (modulo 1154 2^32 and starting with zero) per direct SRTP session. Note that a 1155 direct SRTP session may span multiple SIP dialogs, and in such cases 1156 coordination of SPI values across those SIP dialogs will be required. 1157 In the simple point-to-point unicast case without translators, the 1158 requirement simply applies within each media line in the SDP. In the 1159 point-to-multipoint case, the requirement applies across all the 1160 associated SIP dialogs. 1162 3.8. Backwards Compatibility Considerations 1164 Backwards compatibility can be achieved in a couple of ways. First 1165 of all, SDESC allows for session parameters to be prefixed with "-" 1166 to indicate that they are optional. If the answerer does not support 1167 the EKT session parameters, such optional parameters will simply be 1168 ignored. When the answer is received, absence of the parameters will 1169 indicate that EKT is not being used. Receipt of SRTCP packets prior 1170 to receipt of such an answer will obviously be problematic (as is 1171 normally the case for SDESC without EKT). 1173 Alternatively, SDESC allows for multiple crypto lines to be included 1174 for a particular media stream. Thus, two crypto lines that differ in 1175 their use of EKT parameters (presence in one, absence in the other) 1176 can be used as a way to negotiate use of EKT. When the answer is 1177 received, the accepted crypto attribute will indicate whether EKT is 1178 being used or not. 1180 3.9. Grammar 1182 The ABNF [RFC5234] syntax for the three new SDP Security Descriptions 1183 session parameters is shown in Figure 5. 1185 EKT = EKT_Cipher "|" EKT_Key "|" EKT_SPI 1186 EKT_Cipher = "EKT=" EKT_Cipher_Name 1187 EKT_Cipher_Name = 1*(ALPHA / DIGIT / "_") ; "AES_128", "AESKW_128" 1188 ; "AESKW_192" and 1189 ; "AESKW_256" defined in 1190 ; this document. 1191 EKT_Key = 1*(base64) ; See Section 4 of [RFC4648] 1192 base64 = ALPHA / DIGIT / "+" / "/" / "=" 1193 EKT_SPI = 4HEXDIG ; See [RFC5234] 1195 Figure 5: ABNF for the EKT session parameters 1197 Using the example from Figure 5 with the EKT extensions to SDP 1198 Security Descriptions results in the following example SDP: 1200 v=0 1201 o=sam 2890844526 2890842807 IN IP4 192.0.2.5 1202 s=SRTP Discussion 1203 i=A discussion of Secure RTP 1204 u=http://www.example.com/seminars/srtp.pdf 1205 e=marge@example.com (Marge Simpson) 1206 c=IN IP4 192.0.2.12 1207 t=2873397496 2873404696 1208 m=audio 49170 RTP/SAVP 0 1209 a=crypto:1 AES_CM_128_HMAC_SHA1_80 1210 inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|2^20|1:4 1211 FEC_ORDER=FEC_SRTP EKT=AES_128|FE9C|AAE0 1212 a=crypto:2 F8_128_HMAC_SHA1_80 1213 inline:MTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5QUJjZGVm|2^20|1:4; 1214 inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20|2:4 1215 FEC_ORDER=FEC_SRTP EKT=AES_128|FE9C|AAE0 1217 For legibility the SDP shows line breaks that are not present on the 1218 wire. 1220 4. Use of EKT with DTLS-SRTP Key Transport 1222 This document defines an extension to DTLS-SRTP called Key Transport. 1223 Using EKT with the DTLS-SRTP Key Transport extensions allows securely 1224 transporting SRTP keying material from one DTLS-SRTP peer to another, 1225 so the same SRTP keying material can be used by those peers and so 1226 those peers can process EKT keys. This combination of protocols is 1227 valuable because it combines the advantages of DTLS (strong 1228 authentication of the endpoint and flexibility) with the advantages 1229 of EKT (allowing secure multiparty RTP with loose coordination and 1230 efficient communication of per-source keys). 1232 4.1. EKT Extensions to DTLS-SRTP 1234 This document adds a new TLS negotiated extension called "ekt". This 1235 adds a new TLS content type, EKT, and a new negotiated extension EKT. 1236 The negotiated extension MUST only be requested in conjunction with 1237 the "use_srtp" extension (Section 3.2 of [RFC5764]). The DTLS server 1238 indicates its support for EKT by including "dtls-srtp-ekt" in its SDP 1239 and "ekt" in its TLS ServerHello message. If a DTLS client includes 1240 "ekt" in its ClientHello, but does not receive "ekt" in the 1241 ServerHello, the DTLS client MUST NOT send DTLS packets with the 1242 "ekt" content-type. 1244 Using the syntax described in DTLS [I-D.ietf-tls-rfc4347-bis], the 1245 following structures are used: 1247 enum { 1248 ekt_key(0), 1249 ekt_key_ack(1), 1250 ekt_key_error(254), 1251 (255) 1252 } SRTPKeyTransportType; 1254 struct { 1255 SRTPKeyTransportType keytrans_type; 1256 uint24 length; 1257 uint16 message_seq; 1258 uint24 fragment_offset; 1259 uint24 fragment_length; 1260 select (SRTPKeyTransportType) { 1261 case ekt_key: 1262 EKTkey; 1263 }; 1264 } KeyTransport; 1266 enum { 1267 AES_128(0), 1268 AESKW_128(1), 1269 AESKW_192(2), 1270 AESKW_256(3), 1271 } ektcipher; 1273 struct { 1274 ektcipher EKT_Cipher; 1275 uint EKT_Key_Value<1..256>; 1276 uint EKT_Master_Salt<1..256>; 1277 uint16 EKT_SPI; 1278 } EKTkey; 1280 Figure 6: Additional TLS Data Structures 1282 The diagram below shows a message flow of DTLS client and DTLS server 1283 using the DTLS-SRTP Key Transport extension. SRTP packets exchanged 1284 prior to the ekt_message are encrypted using the SRTP master key 1285 derived from the normal DTLS-SRTP key derivation function. After the 1286 ekt_key message, they can be encrypted using the EKT key. 1288 Editor's note: do we need reliability for the ekt_key messages? 1289 Client Server 1291 ClientHello + use_srtp + EKT 1292 --------> 1293 ServerHello + use_srtp + EKT 1294 Certificate* 1295 ServerKeyExchange* 1296 CertificateRequest* 1297 <-------- ServerHelloDone 1298 Certificate* 1299 ClientKeyExchange 1300 CertificateVerify* 1301 [ChangeCipherSpec] 1302 Finished --------> 1303 [ChangeCipherSpec] 1304 <-------- Finished 1305 SRTP packets <-------> SRTP packets 1306 SRTP packets <-------> SRTP packets 1307 ekt_key --------> 1308 SRTP packets <-------> SRTP packets 1309 SRTP packets <-------> SRTP packets 1311 Figure 7: Handshake Message Flow 1313 4.1.1. Scaling to Large Groups 1315 In certain scenarios it is useful to perform DTLS-SRTP with a device 1316 that is not the RTP peer. A common scenario is multicast, where it 1317 is necessary to distribute the DTLS-SRTP (and EKT distribution) to 1318 several devices. To allow for this, a new SDP attribute, dtls-srtp- 1319 host, is defined which follows the general syntax specified in 1320 Section 5.13 of [RFC4566]. When signaled, it indicates this host 1321 controls the EKT keying for all group members. For the dtls-srtp- 1322 host attribute: 1324 o the name is the ASCII string "dtls-srtp-host" (lowercase) 1326 o the value is the IP address and port number used for DTLS-SRTP 1328 o This is a media-level attribute and MUST NOT appear at the session 1329 level 1331 The formal description of the attribute is defined by the following 1332 ABNF [RFC5234] syntax: 1334 attribute = "a=dtls-srtp-host:" 1335 dtls-srtp-host-info *(SP dtls-srtp-host-info) 1336 host-info = nettype space addrtype space 1337 connection-address space port CRLF 1339 Multiple IP/port pairs are provided for IPv6/IPv4 interworking, and 1340 to allow failover. The receiving host SHOULD attempt to use them in 1341 the order provided. 1343 An example of SDP containing the dtls-srtp-host attribute: 1345 v=0 1346 o=sam 2890844526 2890842807 IN IP4 192.0.2.5 1347 s=SRTP Discussion 1348 i=A discussion of Secure RTP 1349 u=http://www.example.com/seminars/srtp.pdf 1350 e=marge@example.com (Marge Simpson) 1351 c=IN IP4 192.0.2.12 1352 t=2873397496 2873404696 1353 m=audio 49170 UDP/TLS/RTP/SAVP 0 1354 a=fingerprint:SHA-1 1355 4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB 1356 a=dtls-srtp-ekt 1357 a=dtls-srtp-host:IN IP4 192.0.2.13 56789 1359 For legibility the SDP shows line breaks that are not present on the 1360 wire. 1362 4.2. Offer/Answer Considerations 1364 This section describes Offer/Answer considerations for the use of EKT 1365 together with DTLS-SRTP for unicast and multicast streams. The 1366 offerer and answerer MUST follow the procedures specified in 1367 [RFC5764] as well as the following ones. 1369 As most DTLS-SRTP processing is performed on the media channel, 1370 rather than in SDP, there is little processing performed in SDP other 1371 than informational and to redirect DTLS-SRTP to an alternate host. 1372 Advertising support for the extension is necessary in SDP because in 1373 some cases it is required to establish an SRTP call. For example, a 1374 mixer may be able to only support SRTP listeners if those listeners 1375 implement DTLS Key Transport (because it lacks the CPU cycles 1376 necessary to encrypt SRTP uniquely for each listener). 1378 4.2.1. Generating the Initial Offer 1380 The initial offer contains a new SDP attribute, "dtls-srtp-ekt", 1381 which contains no value. This indicates the offerer is capable of 1382 supporting DTLS-SRTP with EKT extensions, and indicates the desire to 1383 use the "ekt" extension during the DTLS-SRTP handshake. If the 1384 offerer wants another host to perform DTLS-SRTP-EKT processing, it 1385 also includes the dtls-srtp-host attribute in its offer 1386 (Section 4.1). 1388 An example of SDP containing the dtls-srtp-ekt attribute:: 1390 v=0 1391 o=sam 2890844526 2890842807 IN IP4 192.0.2.5 1392 s=SRTP Discussion 1393 i=A discussion of Secure RTP 1394 u=http://www.example.com/seminars/srtp.pdf 1395 e=marge@example.com (Marge Simpson) 1396 c=IN IP4 192.0.2.12 1397 t=2873397496 2873404696 1398 m=audio 49170 UDP/TLS/RTP/SAVP 0 1399 a=fingerprint:SHA-1 1400 4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB 1401 a=dtls-srtp-ekt 1403 For legibility the SDP shows line breaks that are not present on the 1404 wire. 1406 4.2.2. Generating the Initial Answer 1408 Upon receiving the initial offer, the presence of the dtls-srtp-ekt 1409 attribute indicates a desire to receive the EKT extension in the 1410 DTLS-SRTP handshake. The presence of the dtls-srtp-host attribute 1411 indicates an alternate host to send the DTLS-SRTP handshake (instead 1412 of the host on the c/m lines). DTLS messages should be constructed 1413 according to those two attributes. 1415 The SDP answer SHOULD contain the dtls-srtp-ekt attribute to indicate 1416 the answerer understands dtls-srtp. It should only contain the dtls- 1417 srtp-host attribute if the answerer also wishes to offload its DTLS- 1418 SRTP processing to another host. 1420 4.2.3. Processing the Initial Answer 1422 The presence of the dtls-srtp-ekt attribute indicates a desire by the 1423 answerer to perform DTLS-SRTP with EKT extensions, and the dtls-srtp- 1424 host attribute indicates an alternate host for DTLS-SRTP processing. 1426 After successful negotiation of the key_transport extension, the DTLS 1427 client and server MAY exchange SRTP packets, encrypted using the KDF 1428 described in [RFC5764]. This is normal and expected, even if Key 1429 Transport was negotiated by both sides, as neither side may (yet) 1430 have a need to alter the SRTP key. However, it is also possible that 1431 one (or both) peers will immediately send new_srtp_key message before 1432 sending any SRTP, and also possible that SRTP, encrypted with an 1433 unknown key, may be received before the new_srtp_key message is 1434 received. 1436 4.2.4. Modifying the Session 1438 As DTLS-SRTP-EKT processing is done on the DTLS-SRTP channel (media 1439 channel) rather than signaling, no special processing for modifying 1440 the session is necessary. 1442 5. Use of EKT with MIKEY 1444 The advantages outlined in Section 1 are useful in some scenarios in 1445 which MIKEY is used to establish SRTP sessions. In this section, we 1446 briefly review MIKEY and related work, and discuss these scenarios. 1448 An SRTP sender or a group controller can use MIKEY to establish a 1449 SRTP cryptographic context. This capability includes the 1450 distribution of a TEK generation key (TGK) or the TEK itself, 1451 security policy payload, crypto session bundle ID (CSB_ID) and a 1452 crypto session ID (CS_ID). The TEK directly maps to an SRTP master 1453 key, whereas the TGK is used along with the CSB_ID and a CS_ID to 1454 generate a TEK. The CS_ID is used to generate multiple TEKs (SRTP 1455 master keys) from a single TGK. For a media stream in SDP, MIKEY 1456 allocates two consecutive numbers for the crypto session IDs, so that 1457 each direction uses a different SRTP master key (see [RFC4567]). 1459 The MIKEY specification [RFC3830] defines three modes to exchange 1460 keys, associated parameters and to protect the MIKEY message: pre- 1461 shared key, public-key encryption and Diffie-Hellman key exchange. 1462 In the first two modes the MIKEY initiator only chooses and 1463 distributes the TGK or TEK, whereas in the third mode both MIKEY 1464 entities (the initiator and responder) contribute to the keys. All 1465 three MIKEY modes have in common that for establishing a SRTP session 1466 the exchanged key is valid for the send and receive direction. 1467 Especially for group communications it is desirable to update the 1468 SRTP master key individually per direction. EKT provides this 1469 property by distributing the SRTP master key within the SRTP/SRTCP 1470 packet. 1472 MIKEY already supports synchronization of ROC values between the 1473 MIKEY initiator and responder. The SSRC / ROC value pair is part of 1474 the MIKEY Common Header payload. This allows providing the current 1475 ROC value to late joiners of a session. However, in some scenarios a 1476 key management based ROC synchronization is not sufficient. For 1477 example, in mobile and wireless environments, members may go in and 1478 out of coverage and may miss a sequence number overrun. In point-to- 1479 multipoint translator scenarios it is desirable to not require the 1480 group controller to track the ROC values of each member, but to 1481 provide the ROC value by the originator of the SRTP packet. A better 1482 alternative to synchronize the ROC values is to send them directly 1483 via SRTP/SRTCP, as EKT does. A separate SRTP extension is being 1484 proposed [RFC4771] to include the ROC as part of a modified 1485 authentication tag. Unlike EKT, this extension uses only SRTP and 1486 not SRTCP as its transport and does not allow updating the SRTP 1487 master key. 1489 Besides the ROC, MIKEY synchronizes also the SSRC values of the SRTP 1490 streams. Each sender of a stream sends the associated SSRC within 1491 the MIKEY message to the other party. If a SRTP session participant 1492 starts a new SRTP source or a new participant is added to a group, 1493 subsequent SDP offer/answer and MIKEY exchanges are necessary to 1494 update the SSRC values. EKT improves these scenarios by updating the 1495 keys and SSRC values without coordination on the signaling channel. 1496 With EKT, SRTP can handle early media, since the EKT SPI allows the 1497 receiver to identify the cryptographic keys and parameters used by 1498 the source. 1500 The MIKEY specification [RFC3830] suggests the use of unicast for 1501 rekeying. This method does not scale well to large groups or 1502 interactive groups. The EKT extension of SRTP/SRTCP provides a 1503 solution for rekeying the SRTP master key and for ROC/SSRC 1504 synchronization. EKT is not a substitution for MIKEY, but rather a 1505 complementary addition to address the above described limitations of 1506 MIKEY. 1508 In the next section we provide an extension to MIKEY for support of 1509 EKT. EKT can be used only with the pre-shared key or public-key 1510 encryption MIKEY mode of [RFC3830]. The Diffie-Hellman exchange mode 1511 is not suitable in conjunction with EKT, because it is not possible 1512 to establish one common EKT key over multiple EKT entities. 1513 Additional MIKEY modes specified in separate documents are not 1514 considered for EKT. 1516 5.1. EKT extensions to MIKEY 1518 In order to use EKT with MIKEY, the EKT cipher, EKT key and EKT SPI 1519 must be negotiated in the MIKEY message exchange. 1521 For EKT we specify a new SRTP Policy Type in the Security Policy (SP) 1522 payload of MIKEY (see Section 6.10 of [RFC3830]). The SP payload 1523 contains a set of policies. Each policy consists of a number Policy 1524 Param TLVs. 1526 Prot type | Value 1527 ------------------- 1528 EKT | TBD (will be requested from IANA) 1530 For legibility the SDP shows line breaks that are not present on the 1531 wire. 1533 Figure 8: EKT Security Policy 1535 The EKT Security Policy has one parameter representing the EKT 1536 cipher. 1538 Type | Meaning | Possible values 1539 ---------------------------------------------------- 1540 0 | EKT cipher | see below 1542 Figure 9: EKT Security Policy Parameters 1544 EKT cipher | Value 1545 ------------------- 1546 AES_128 | 0 1547 AESKW_128 | 1 1548 AESKW_192 | 2 1549 AESKW_256 | 3 1551 Figure 10: EKT Cipher Parameters 1553 AES_128 is the default value for the EKT cipher. 1555 The two mandatory EKT parameters (EKT_Key and EKT_SPI) are 1556 transported in the MIKEY KEMAC payload within one separate Key Data 1557 sub-payload. As specified in Section 6.2 of [RFC3830], the KEMAC 1558 payload carries the TEK Generation Key (TGK) or the Traffic 1559 Encryption Key (TEK). One or more TGKs or TEKs are carried in 1560 individual Key Data sub-payloads within the KEMAC payload. The KEMAC 1561 payload is encrypted as part of MIKEY. The Key Data sub- payload, 1562 specified in Section 6.13 of [RFC3830], has the following format: 1564 1 2 3 1565 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 1566 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1567 | Next Payload | Type | KV | Key data length | 1568 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1569 : Key data : 1570 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1571 : Salt length (optional) ! Salt data (optional) : 1572 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1573 : KV data (optional) : 1574 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1576 Figure 11: Key Data Sub-Payload of MIKEY 1578 These fields are described below: 1580 Type: 4 bits in length, indicates the type of key included in the 1581 payload. We define Type = TBD (will be requested from IANA) to 1582 indicate transport of the EKT key. 1584 KV: (4 bits): indicates the type of key validity period specified. 1585 KV=1 is currently specified as an SPI. We use that value to 1586 indicate the KV_data contains the ETK_SPI for the key type 1587 EKT_Key. KV_data would be 16 bits in length, but it is also 1588 possible to interpret the length from the 'Key data len' field. 1589 KV data MUST NOT be optional for the key type EKT_Key when KV = 1. 1591 Salt length, Salt Data: These optional fields SHOULD be omitted for 1592 the key type EKT_Key, if the SRTP master salt is already present 1593 in the TGK or TEK Key Data sub-payload. The EKT_Key sub-payload 1594 MUST contain a SRTP master salt, if the SRTP master salt is not 1595 already present in the TGK or TEK Key Data sub-payload. 1597 KV Data: length determined by Key Data Length field. 1599 5.2. Offer/Answer considerations 1601 This section describes Offer/Answer considerations for the use of EKT 1602 together with MIKEY for unicast streams. The offerer and answerer 1603 MUST follow the procedures specified in [RFC3830] and [RFC4567] as 1604 well as the following ones. 1606 5.2.1. Generating the Initial Offer 1608 If it is intended to use MIKEY together with EKT, the offerer MUST 1609 include at least one MIKEY key-mgmt attribute with one EKT_Key Key 1610 Data sub-payload and the EKT_Cipher Security Policy payload. MIKEY 1611 can be used on session or media level. On session level, MIKEY 1612 provides the keys for multiple SRTP sessions in the SDP offer. The 1613 EKT SPI references a EKT parameter set including the Secure RTP 1614 parameters as specified in Section 8.2 in [RFC3711]. If MIKEY is 1615 used on session level, it is only possible to use one EKT SPI value. 1616 Therefore, the session-level MIKEY message MUST contain one SRTP 1617 Security Policy payload only, which is valid for all related SRTP 1618 media lines. If MIKEY is used on media level, different SRTP 1619 Security Policy parameters (and consequently different EKT SPI 1620 values) can be used for each media line. If MIKEY is used on session 1621 and media level, the medial level content overrides the session level 1622 content. 1624 EKT requires a single shared SRTP master salt between all 1625 participants in the direct SRTP session. If a MIKEY key-mgmt 1626 attribute contains more than one TGK or TEK Key Data sub-payload, all 1627 the sub-payloads MUST contain the same master salt value. 1628 Consequently, the EKT_Key Key Data sub-payload MAY also contain the 1629 same salt or MAY omit the salt value. If the SRTP master salt is not 1630 present in the TGK and TEK Key Data sub-payloads, the EKT_Key sub- 1631 payload MUST contain a master salt. 1633 5.2.2. Generating the Initial Answer 1635 For each media line in the offer using MIKEY, provided on session or/ 1636 and on media level, the answerer examines the related MIKEY key-mgmt 1637 attributes for the presence of EKT parameters. In order to accept 1638 the offered key-mgmt attribute, the MIKEY message MUST contain one 1639 EKT_Key Key Data sub-payload and the EKT_Cipher Security Policy 1640 payload. The answerer examines also the existence of a SRTP master 1641 salt in the TGK/TEK and/or the EKT_Key sub-payloads. If multiple 1642 salts are available, all values MUST be equal. If the salt values 1643 differ or no salt is present, the key-mgmt attribute MUST be 1644 considered as invalid. 1646 The MIKEY responder message in the SDP answer does not contain a 1647 MIKEY KEMAC or Security Policy payload and consequently does not 1648 contain any EKT parameters. If the key-mgmt attribute for a media 1649 line was accepted by the answerer, the EKT parameter set of the 1650 offerer is valid for both directions of the SRTP session. 1652 5.2.3. Processing the Initial Answer 1654 On reception of the answer, the offerer examines if EKT has been 1655 accepted for the offered media lines. If a MIKEY key-mgmt attribute 1656 is received containing a valid MIKEY responder message, EKT has been 1657 successfully negotiated. On receipt of a MIKEY error message, EKT 1658 negotiation has failed. For example, this may happen if an EKT 1659 extended MIKEY initiator message is sent to a MIKEY entity not 1660 supporting EKT. A MIKEY error code 'Invalid SP' or 'Invalid DT' is 1661 returned to indicate that the EKT_Cipher Security Policy payload or 1662 the EKT_Key sub-payload is not supported. In this case, the offerer 1663 may send a second SDP offer with a MIKEY key-mgmt attribute without 1664 the additional EKT extensions. 1666 This behavior can be improved by defining an additional key-mgmt 1667 prtcl-id value 'mikeyekt' and offering two key-mgmt SDP attributes. 1668 One attribute offers MIKEY together with EKT and the other one offers 1669 MIKEY without EKT. This is for further discussion. 1671 5.2.4. Modifying the Session 1673 Once a SRTP stream has been established, a new offer/answer exchange 1674 can modify the session including the EKT parameters. If the EKT key 1675 or EKT cipher is modified (i.e., a new EKT parameter set is created) 1676 the offerer MUST also provide a new EKT SPI value. The offerer MUST 1677 NOT remap an existing EKT SPI value to a new EKT parameter set. 1678 Similar, a modification of the SRTP Security Policy leads to a new 1679 EKT parameter set and requires a fresh EKT SPI, even the EKT key or 1680 cipher did not change. 1682 Once EKT is being used, the SRTP master salt for the SRTP session 1683 MUST NOT be changed. The salt in the Key Data sub-payloads within 1684 the subsequent offers MUST be the same as the one already used. 1686 After EKT has been successfully negotiated for a session and a SRTP 1687 master key has been transported by EKT, it is difficult to switch 1688 back to a pure MIKEY based key exchange in a synchronized way. 1689 Therefore, once EKT is being used for a session, EKT MUST be used 1690 also in all subsequent offer/answer exchanges for that session. 1692 6. Design Rationale 1694 From [RFC3550], a primary function of RTCP is to carry the CNAME, a 1695 "persistent transport-level identifier for an RTP source" since 1696 "receivers require the CNAME to keep track of each participant." EKT 1697 works in much the same way, using SRTCP to carry information needed 1698 for the proper processing of the SRTP traffic. 1700 With EKT, SRTP gains the ability to synchronize the creation of 1701 cryptographic contexts across all of the participants in a single 1702 session. This feature provides some, but not all, of the 1703 functionality that is present in IKE phase two (but not phase one). 1704 Importantly, EKT does not provide a way to indicate SRTP options. 1706 With EKT, external signaling mechanisms provide the SRTP options and 1707 the EKT Key, but need not provide the key(s) for each individual SRTP 1708 source. EKT provides a separation between the signaling mechanisms 1709 and the details of SRTP. The signaling system need not coordinate 1710 all SRTP streams, nor predict in advance how many streams will be 1711 present, nor communicate SRTP-level information (e.g., rollover 1712 counters) of current sessions. 1714 EKT is especially useful for multi-party sessions, and for the case 1715 where multiple RTP sessions are sent to the same destination 1716 transport address (see the example in the definition of "RTP session" 1717 in [RFC3550]). A SIP offer that is forked in parallel (sent to 1718 multiple endpoints at the same time) can cause multiple RTP sessions 1719 to be sent to the same transport address, making EKT useful for use 1720 with SIP. 1722 EKT can also be used in conjunction with a scalable group-key 1723 management system like GDOI [RFC3547]. Such a system provides a 1724 secure entity authentication method and a way to revoke group 1725 membership, both of which are out of scope of EKT. 1727 It is natural to use SRTCP to transport encrypted keying material for 1728 SRTP, as it provides a secure control channel for (S)RTP. However, 1729 there are several different places in SRTCP in which the encrypted 1730 SRTP master key and ROC could be conveyed. We briefly review some of 1731 the alternatives in order to motivate the particular choice used in 1732 this specification. One alternative is to have those values carried 1733 as a new SDESC item or RTCP packet. This would require that the 1734 normal SRTCP encryption be turned off for the packets containing that 1735 SDESC item, since on the receiver's side, SRTCP processing completes 1736 before the RTCP processing starts. This tension between encryption 1737 and the desire for RTCP privacy is highly undesirable. Additionally, 1738 this alternative makes SRTCP dependent upon the parsing of the RTCP 1739 compound packet, which adds complexity. It is simpler to carry the 1740 encrypted key in a new SRTCP field. One way to do this and to be 1741 backwards compatible with the existing specification is to define a 1742 new crypto function that incorporates the encrypted key. We define a 1743 new authentication transform because EKT relies on the normal SRTCP 1744 authentication to provide implicit authentication of the encrypted 1745 key. 1747 An SRTP packet containing an SSRC that has not been seen will be 1748 discarded. This practice may induce a burst of packet loss at the 1749 outset of an SRTP stream, due to the loss or reorder of the first 1750 SRTCP packet with the EKT containing the key and rollover counter for 1751 that stream. However, this practice matches the conservative RTP 1752 memory-allocation strategy; many existing applications accept this 1753 risk of initial packet loss. Alternatively, implementations may wish 1754 to delay discarding such packets for a short period of time as 1755 described in Section 2.4. 1757 When EKT is carried in SRTCP, it adds eight additional bytes to each 1758 SRTCP packet, plus the length of the Encrypted Master Key field. 1759 Using the SRTP and EKT defaults, the total overhead is 24 bytes. 1760 This overhead does not detract from the total bandwidth used by SRTP, 1761 since it is included in the RTCP bandwidth computation. However, it 1762 will cause the control protocol to issue packets less frequently. 1764 The main motivation for the use of the variable-length format is 1765 bandwidth conservation. If EKT is used of SRTP, there will be a loss 1766 of bandwidth due to the additional 24 bytes in each RTP packet. For 1767 some applications, this bandwidth loss is significant. 1769 7. Security Considerations 1771 With EKT, each SRTP sender and receiver can generate distinct SRTP 1772 master keys. This property avoids any security concern over the re- 1773 use of keys, by empowering the SRTP layer to create keys on demand. 1774 Note that the inputs of EKT are the same as for SRTP with key- 1775 sharing: a single key is provided to protect an entire SRTP session. 1776 However, EKT provides complete security, even in the absence of 1777 further out-of-band coordination of SSRCs, and even when SSRC values 1778 collide. 1780 EKT uses encrypted key transport with implicit authentication. A 1781 strong cipher is used to ensure the confidentiality of the master 1782 keys as they are transported. The authenticity of the master keys is 1783 ensured by the base authentication check, which uses the plaintext 1784 form of that key. If the base authentication function and the cipher 1785 cannot be defeated by a particular attacker, then that attacker will 1786 be unable to defeat the implicit authentication. 1788 In order to avoid potential security issues, the SRTP authentication 1789 tag length used by the base authentication method MUST be at least 1790 ten octets. 1792 8. IANA Considerations 1794 This section registers with IANA the following SRTP session 1795 parameters for SDP Security Descriptions [RFC4568]: 1797 o EKT_KEY 1799 o EKT_CIPHER 1801 o EKT_SPI 1803 The definition of these parameters is provided in Section 3.4. 1805 We request the following IANA assignments from existing MIKEY IANA 1806 tables: 1808 o From the Key Data payload name spaces, a value to indicate the 1809 type as the 'EKT_Key'. 1811 o From the Security Policy table name space, a new value to be 1812 assigned for 'EKT' (see Figure 8). 1814 Furthermore, we need the following two new IANA registries created, 1815 populated with the initial values in this document. New values for 1816 both of these registries can be defined via Specification Required 1817 [RFC5226]. 1819 o EKT parameter type (initially populated with the list from 1820 Figure 9) 1822 o EKT cipher (initially populated with the list from Figure 10) 1824 9. Acknowledgements 1826 Thanks to Lakshminath Dondeti for assistance with earlier versions of 1827 this document. Thanks to Nermeen Ismail, Eddy Lem, and Rob Raymond 1828 for fruitful discussions and comments. Thanks to Romain Biehlmann 1829 for his encouragement to add support DTLS-SRTP-EKT key servers for 1830 multicast. Thanks to Felix Wyss for his review and comments 1831 regarding ciphers. 1833 10. References 1835 10.1. Normative References 1837 [FIPS197] "The Advanced Encryption Standard (AES)", FIPS-197 Federal 1838 Information Processing Standard. 1840 [I-D.ietf-tls-rfc4347-bis] 1841 Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1842 Security version 1.2", draft-ietf-tls-rfc4347-bis-04 (work 1843 in progress), July 2010. 1845 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1846 Requirement Levels", BCP 14, RFC 2119, March 1997. 1848 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1849 A., Peterson, J., Sparks, R., Handley, M., and E. 1850 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1851 June 2002. 1853 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 1854 with Session Description Protocol (SDP)", RFC 3264, 1855 June 2002. 1857 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 1858 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 1860 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 1861 Jacobson, "RTP: A Transport Protocol for Real-Time 1862 Applications", STD 64, RFC 3550, July 2003. 1864 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 1865 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 1866 RFC 3711, March 2004. 1868 [RFC4563] Carrara, E., Lehtovirta, V., and K. Norrman, "The Key ID 1869 Information Type for the General Extension Payload in 1870 Multimedia Internet KEYing (MIKEY)", RFC 4563, June 2006. 1872 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 1873 Description Protocol", RFC 4566, July 2006. 1875 [RFC4567] Arkko, J., Lindholm, F., Naslund, M., Norrman, K., and E. 1876 Carrara, "Key Management Extensions for Session 1877 Description Protocol (SDP) and Real Time Streaming 1878 Protocol (RTSP)", RFC 4567, July 2006. 1880 [RFC4568] Andreasen, F., Baugher, M., and D. Wing, "Session 1881 Description Protocol (SDP) Security Descriptions for Media 1882 Streams", RFC 4568, July 2006. 1884 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 1885 Encodings", RFC 4648, October 2006. 1887 [RFC4771] Lehtovirta, V., Naslund, M., and K. Norrman, "Integrity 1888 Transform Carrying Roll-Over Counter for the Secure Real- 1889 time Transport Protocol (SRTP)", RFC 4771, January 2007. 1891 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1892 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 1893 May 2008. 1895 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 1896 Specifications: ABNF", STD 68, RFC 5234, January 2008. 1898 [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer 1899 Security (DTLS) Extension to Establish Keys for the Secure 1900 Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. 1902 10.2. Informative References 1904 [RFC3547] Baugher, M., Weis, B., Hardjono, T., and H. Harney, "The 1905 Group Domain of Interpretation", RFC 3547, July 2003. 1907 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 1908 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 1909 August 2004. 1911 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 1912 Internet Protocol", RFC 4301, December 2005. 1914 Appendix A. Using EKT to Optimize Interworking DTLS-SRTP with Security 1915 Descriptions 1917 Today, SDP Security Descriptions [RFC4568] is used for distributing 1918 SRTP keys in several different IP PBX systems and is expected to be 1919 used by 3GPP's Long Term Evolution (LTE). The IP PBX systems are 1920 typically used within a single enterprise, and LTE is used within the 1921 confines of a mobile operator's network. A Session Border Controller 1922 is a reasonable solution to interwork between Security Descriptions 1923 in one network and DTLS-SRTP in another network. For example, a 1924 mobile operator (or an Enterprise) could operate Security 1925 Descriptions within their network and DTLS-SRTP towards the Internet. 1927 However, due to the way Security Descriptions and DTLS-SRTP manage 1928 their SRTP keys, such an SBC has to authenticate, decrypt, re- 1929 encrypt, and re-authenticate the SRTP (and SRTCP) packets in one 1930 direction, as shown in Figure 12, below. This is computationally 1931 expensive. 1933 RFC4568 endpoint SBC DTLS-SRTP endpoint 1934 | | | 1935 1. |---key=A------------->| | 1936 2. | |<-DTLS-SRTP handshake->| 1937 3. |<--key=B--------------| | 1938 4. | |<--SRTP, encrypted w/B-| 1939 5. |<-SRTP, encrypted w/B-| | 1940 6. |-SRTP, encrypted w/A->| | 1941 7. | (decrypt, re-encrypt) | 1942 8. | |-SRTP, encrypted w/C-->| 1943 | | | 1945 Figure 12: Interworking Security Descriptions and DTLS-SRTP 1947 The message flow is as follows (similar steps occur with SRTCP): 1949 1. The Security Descriptions [RFC4568] endpoint discloses its SRTP 1950 key to the SBC, using a=crypto in its SDP. 1952 2. SBC completes DTLS-SRTP handshake. From this handshake, the SBC 1953 derives the SRTP key for traffic from the DTLS-SRTP endpoint (key 1954 B) and to the DTLS-SRTP endpoint (key C). 1956 3. The SBC communicates the SRTP encryption key (key B) to the 1957 Security Descriptions endpoint (using a=crypto). (There is no 1958 way, with DTLS-SRTP, to communicate the Security Descriptions key 1959 to the DTLS-SRTP key endpoint.) 1961 4. The DTLS-SRTP endpoint sends an SRTP key, encrypted with its key 1962 B. This is received by the SBC. 1964 5. The received SRTP packet is simply forwarded; the SBC does not 1965 need to do anything with this packet as its key (key B) was 1966 already communicated in step 3. 1968 6. The Security Descriptions endpoint sends an SRTP packet, 1969 encrypted with its key A. 1971 7. The SBC has to authenticate and decrypt the SRTP packet (using 1972 key A), and re-encrypt it and generate an HMAC (using key C). 1974 8. The SBC sends the new SRTP packet. 1976 If EKT is deployed on the DTLS-SRTP endpoints, EKT helps to avoid the 1977 computationally expensive operation so the SBC does not need not 1978 perform any per-packet operations on the SRTP (or SRTCP) packets in 1979 either direction. With EKT the SBC can simply forward the SRTP (and 1980 SRTCP) packets in both directions without per-packet HMAC or 1981 cryptographic operations. 1983 To accomplish this interworking, DTLS-SRTP EKT must be supported on 1984 the DTLS-SRTP endpoint, which allows the SBC to transport the 1985 Security Description key to the EKT endpoint and send the DTLS-SRTP 1986 key to the Security Descriptions endpoint. This works equally well 1987 for both incoming and outgoing calls. An abbreviated message flow is 1988 shown in Figure 13, below. 1990 RFC4568 endpoint SBC DTLS-SRTP endpoint 1991 | | | 1992 1. |---key=A------------->| | 1993 2. | |<-DTLS-SRTP handshake->| 1994 3. |<--key=B--------------| | 1995 4. | |--new_srtp_key:A------>| 1996 5. | |<--SRTP, encrypted w/B-| 1997 5. |<-SRTP, encrypted w/B-| | 1998 6. |-SRTP, encrypted w/A->| | 1999 7. | |-SRTP, encrypted w/A-->| 2000 | | | 2002 Figure 13: Interworking Security Descriptions and EKT 2004 The message flow is as follows (similar steps occur with SRTCP): 2006 1. Security Descriptions endpoint discloses its SRTP key to the SBC 2007 (a=crypto). 2009 2. SBC completes DTLS-SRTP handshake. From this handshake, the SBC 2010 derives the SRTP key for traffic from the DTLS-SRTP endpoint (key 2011 B) and to the DTLS-SRTP endpoint (key C). 2013 3. The SBC communicates the SRTP encryption key (key B) to the 2014 Security Descriptions endpoint. 2016 4. The SBC uses the EKT to indicate that SRTP packets will be 2017 encrypted with 'key A' towards the DTLS-SRTP endpoint. 2019 5. The DTLS-SRTP endpoint sends an SRTP key, encrypted with its key 2020 B. This is received by the SBC. 2022 6. The received SRTP packet is simply forwarded; the SBC does not 2023 need to do anything with this packet as its key (key B) was 2024 communicated in step 3. 2026 7. The Security Descriptions endpoint sends an SRTP packet, 2027 encrypted with its key A. 2029 8. The received SRTP packet is simply forwarded; the SBC does not 2030 need to do anything with this packet as its key (key A) was 2031 communicated in step 4. 2033 Authors' Addresses 2035 David A. McGrew 2036 Cisco Systems, Inc. 2037 510 McCarthy Blvd. 2038 Milpitas, CA 95035 2039 US 2041 Phone: (408) 525 8651 2042 Email: mcgrew@cisco.com 2043 URI: http://www.mindspring.com/~dmcgrew/dam.htm 2045 Flemming Andreason 2046 Cisco Systems, Inc. 2047 499 Thornall Street 2048 Edison, NJ 08837 2049 US 2051 Email: fandreas@cisco.com 2053 Dan Wing 2054 Cisco Systems, Inc. 2055 510 McCarthy Blvd. 2056 Milpitas, CA 95035 2057 US 2059 Phone: (408) 853 4197 2060 Email: dwing@cisco.com 2062 Kai Fischer 2063 Siemens Enterprise Communications GmbH & Co. KG 2064 Hofmannstr. 51 2065 Munich, Bavaria 81739 2066 Germany 2068 Email: kai.fischer@siemens-enterprise.com