idnits 2.17.1 draft-mcgrew-srtp-ekt-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 17. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 1414. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1425. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1432. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1438. 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 Copyright Line does not match the current year == Line 657 has weird spacing: '... breaks are...' == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: The Initial Sequence Number field is set to zero, if the initial RTP packet protected using the current SRTP master key for this source preceded, or was concurrent with, the last roll-over of the RTP sequence number. Otherwise, that field is set to the value of the RTP sequence number of the initial RTP packet that was or will be protected by that key. When the SRTP master key corresponding to a source is changed, the new key SHOULD be communicated in advance via EKT. (Note that the ISN field allows the receiver to know when it should start using the new key to process SRTP packets.) This enables the rekeying event to be communicated before any RTP packets are protected with the new key. The rekeying event MUST not change the value of ROC (otherwise, the current value of the ROC would not be known to late joiners of existing sessions). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (March 4, 2007) is 6263 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: 'SRTP' is mentioned on line 583, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS197' -- Possible downref: Non-RFC (?) normative reference: ref. 'KEYID' -- Possible downref: Non-RFC (?) normative reference: ref. 'RCC' ** Downref: Normative reference to an Informational RFC: RFC 3394 ** Obsolete normative reference: RFC 3548 (Obsoleted by RFC 4648) ** Obsolete normative reference: RFC 4234 (Obsoleted by RFC 5234) -- Possible downref: Non-RFC (?) normative reference: ref. 'SDES' Summary: 4 errors (**), 0 flaws (~~), 4 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group D. McGrew 3 Internet-Draft F. Andreasen 4 Intended status: Standards Track Cisco Systems, Inc. 5 Expires: September 5, 2007 L. Dondeti 6 QUALCOMM 7 March 4, 2007 9 Encrypted Key Transport for Secure RTP 10 draft-mcgrew-srtp-ekt-02.txt 12 Status of this Memo 14 By submitting this Internet-Draft, each author represents that any 15 applicable patent or other IPR claims of which he or she is aware 16 have been or will be disclosed, and any of which he or she becomes 17 aware will be disclosed, in accordance with Section 6 of BCP 79. 19 Internet-Drafts are working documents of the Internet Engineering 20 Task Force (IETF), its areas, and its working groups. Note that 21 other groups may also distribute working documents as Internet- 22 Drafts. 24 Internet-Drafts are draft documents valid for a maximum of six months 25 and may be updated, replaced, or obsoleted by other documents at any 26 time. It is inappropriate to use Internet-Drafts as reference 27 material or to cite them other than as "work in progress." 29 The list of current Internet-Drafts can be accessed at 30 http://www.ietf.org/ietf/1id-abstracts.txt. 32 The list of Internet-Draft Shadow Directories can be accessed at 33 http://www.ietf.org/shadow.html. 35 This Internet-Draft will expire on September 5, 2007. 37 Copyright Notice 39 Copyright (C) The IETF Trust (2007). 41 Abstract 43 SRTP Encrypted Key Transport (EKT) is an extension to SRTP that 44 provides for the secure transport of SRTP master keys, Rollover 45 Counters, and other information, within SRTCP. This facility enables 46 SRTP to work for decentralized conferences with minimal control, and 47 to handle situations caused by SIP forking and early media. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 52 1.1. Conventions Used In This Document . . . . . . . . . . . . 5 53 2. Encrypted Key Transport . . . . . . . . . . . . . . . . . . . 6 54 2.1. Authentication Tag Format . . . . . . . . . . . . . . . . 6 55 2.2. Packet Processing and State Machine . . . . . . . . . . 8 56 2.2.1. Outbound (Tag Generation) . . . . . . . . . . . . . . 8 57 2.2.2. Inbound (Tag Verification) . . . . . . . . . . . . . . 9 58 2.3. Ciphers . . . . . . . . . . . . . . . . . . . . . . . . . 12 59 2.3.1. The Default Cipher . . . . . . . . . . . . . . . . . . 13 60 2.3.2. The AES Key Wrap Cipher . . . . . . . . . . . . . . . 13 61 2.3.3. Other EKT Ciphers . . . . . . . . . . . . . . . . . . 14 62 2.4. Synchronizing Operation . . . . . . . . . . . . . . . . 14 63 2.5. Timing and Reliability Consideration . . . . . . . . . . . 15 64 3. EKT and SDP Security Descriptions . . . . . . . . . . . . . . 16 65 3.1. SDP Security Descriptions Recap . . . . . . . . . . . . . 16 66 3.2. Relationship between EKT and SDP Security Descriptions . . 17 67 3.3. Overview of Combined EKT and SDP Security Description 68 Operation . . . . . . . . . . . . . . . . . . . . . . . . 19 69 3.4. EKT Extensions to SDP Security Descriptions . . . . . . . 19 70 3.4.1. EKT_Cipher . . . . . . . . . . . . . . . . . . . . . . 19 71 3.4.2. EKT_Key . . . . . . . . . . . . . . . . . . . . . . . 20 72 3.4.3. EKT_SPI . . . . . . . . . . . . . . . . . . . . . . . 20 73 3.5. Offer/Answer Procedures . . . . . . . . . . . . . . . . . 20 74 3.5.1. Generating the Initial Offer - Unicast Streams . . . . 20 75 3.5.2. Generating the Initial Answer - Unicast Streams . . . 22 76 3.5.3. Processing of the Initial Answer - Unicast Streams . . 23 77 3.6. SRTP-Specific Use Outside Offer/Answer . . . . . . . . . . 24 78 3.7. Modifying the Session . . . . . . . . . . . . . . . . . . 24 79 3.8. Backwards Compatibility Considerations . . . . . . . . . . 24 80 3.9. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 25 81 4. Use of EKT with MIKEY . . . . . . . . . . . . . . . . . . . . 26 82 4.1. EKT transform attribute mapping in MIKEY . . . . . . . . . 26 83 5. Design Rationale . . . . . . . . . . . . . . . . . . . . . . . 29 84 6. RTP Transport . . . . . . . . . . . . . . . . . . . . . . . . 31 85 7. Security Considerations . . . . . . . . . . . . . . . . . . . 32 86 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 87 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 34 88 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 35 89 10.1. Normative References . . . . . . . . . . . . . . . . . . . 35 90 10.2. Informative References . . . . . . . . . . . . . . . . . . 36 91 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 37 92 Intellectual Property and Copyright Statements . . . . . . . . . . 38 94 1. Introduction 96 RTP is designed to allow decentralized groups with minimal control to 97 establish sessions, e.g. for multimedia conferences. Unfortunately, 98 Secure RTP (SRTP, [RFC3711]) cannot be used in many minimal-control 99 scenarios, because it requires that SSRC values and other data be 100 coordinated among all of the participants in a session. For example, 101 if a participant joins a session that is already in progress, the 102 SRTP rollover counter (ROC) of each SRTP source in the session needs 103 to be provided to that participant. 105 The inability of SRTP to work in the absence of central control was 106 well understood during the design of that protocol; that omission was 107 considered less important than optimizations such as bandwidth 108 conservation. Additionally, in many situations SRTP is used in 109 conjunction with a signaling system that can provide most of the 110 central control needed by SRTP. However, there are several cases in 111 which conventional signaling systems cannot easily provide all of the 112 coordination required. It is also desirable to eliminate the layer 113 violations that occur when signaling systems coordinate certain SRTP 114 parameters, such as SSRC values and ROCs. 116 This document defines Encrypted Key Transport (EKT) for SRTP, an 117 extension to SRTP that fits within the SRTP framework and reduces the 118 amount of signaling control that is needed in an SRTP session. EKT 119 securely distributes the SRTP master key and other information for 120 each SRTP source, using SRTCP to transport that information. With 121 this method, SRTP entities are free to choose SSRC values as they see 122 fit, and to start up new SRTP sources with new SRTP master keys (see 123 Section 2.2) within a session without coordinating with other 124 entities via signaling or other external means. This fact allows to 125 reinstate the RTP collision detection and repair mechanism, which is 126 nullified by the current SRTP specification because of the need to 127 control SSRC values closely. An SRTP endpoint using EKT can generate 128 new keys whenever an existing SRTP master key has been overused, or 129 start up a new SRTP source to replace an old SRTP source that has 130 reached the packet-count limit. EKT also solves the problem in which 131 the burst loss of the N initial SRTP packets can confuse an SRTP 132 receiver, when the initial RTP sequence number is greater than or 133 equal to 2^16 - N. These features simplify many architectures that 134 implement SRTP. 136 EKT provides a way for an SRTP session participant, either sender or 137 receiver, to securely transport its SRTP master key and current SRTP 138 rollover counter to the other participants in the session. This 139 data, possibly in conjunction with additional data provided by an 140 external signaling protocol, furnishes the information needed by the 141 receiver to instantiate an SRTP/SRTCP receiver context. 143 EKT does not control the manner in which the SSRC and master key are 144 generated; it is concerned only with their secure transport. Those 145 values may be generated on demand by the SRTP endpoint, or may be 146 dictated by an external mechanism such as a signaling agent or a 147 secure group controller. 149 EKT is not intended to replace external key establishment mechanisms 150 such as SDP Security Descriptions [SDES] or MIKEY [RFC3830]. 151 Instead, it is used in conjunction with those methods, and it 152 relieves them of the burden of tightly coordinating every SRTP source 153 among every SRTP participant. 155 This document is organized as follows. A complete normative 156 definition of EKT is provided in Section 2. It consists of packet 157 processing algorithms (Section 2.2) and cryptographic definitions 158 (Section 2.3) . In Section 3, the use of EKT with SDP Security 159 Descriptions is defined. In Section 4 we outline the use of EKT with 160 MIKEY. Section 5 provides a design rationale. Security 161 Considerations are provided in Section 7, and IANA considerations are 162 provided in Section 8. 164 1.1. Conventions Used In This Document 166 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 167 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 168 document are to be interpreted as described in [RFC2119]. 170 2. Encrypted Key Transport 172 In EKT, an SRTP master key is encrypted with a Key Encrypting Key 173 (KEK), and the resulting ciphertext is transported in every SRTCP 174 packet. A single KEK suffices for a single SRTP session, regardless 175 of the number of participants in the session. However, there can be 176 multiple KEKs used within a particular session. 178 In order to convey the ciphertext of the SRTP master key, and other 179 additional information, the SRTCP Authentication Tag field is 180 subdivided as shown in Figure 1. EKT defines a new SRTCP 181 authentication function, which uses this format. It incorporates a 182 conventional SRTCP authentication function, which is called the base 183 authentication function in this specification. Any SRTCP 184 authentication function, such as the default one of HMAC-SHA1 with a 185 160-bit key and an 80-bit authentication tag, can be used as a base 186 authentication function. EKT also defines a new method of providing 187 SRTP master keys to an endpoint. 189 0 1 2 3 190 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 191 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 192 : Base Authentication Tag : 193 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 194 : Encrypted Master Key : 195 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 196 | Rollover Counter | 197 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 198 | Initial Sequence Number | Security Parameter Index | 199 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 201 Figure 1: The EKT Authentication Tag format. 203 2.1. Authentication Tag Format 205 The Authentication Tag field contains the following sub-fields: 207 Base Authentication Tag This field contains the authentication tag 208 computed by the base authentication function. The value of this 209 field is used to check the authenticity of the packet. 211 Encrypted Master Key The length of this field is variable, and is 212 equal to the ciphertext size N defined in Section 2.3. Note that 213 the length of the field is inferable from the SPI field, since the 214 particular EKT cipher used by the sender of a packet is inferable 215 from that field. The Encrypted Master Key field is included 216 outside of the authenticated portion of the SRTCP packet, 217 immediately following the Authentication Tag. It contains the 218 ciphertext value resulting from the encryption of the SRTP master 219 key corresponding to the SSRC contained in the packet. The 220 encryption and decryption of this value is done using a cipher as 221 defined in Section 2.3. 223 Rollover Counter The length of this field is fixed at 32 bits. This 224 field is set to the current value of the SRTP rollover counter in 225 the SRTP context associated with the SSRC in the SRTCP packet. 226 This field immediately follows the Encrypted Master Key field. 228 Initial Sequence Number (ISN) The length of this field is fixed at 229 16 bits. If this field is nonzero, then it indicates the RTP 230 sequence number of the initial RTP packet that is protected using 231 the SRTP master key conveyed (in encrypted form) by the Encrypted 232 Master Key field of this packet. If this field is zero, it 233 indicates that the initial RTP packet protected using the SRTP 234 master key conveyed in this packet preceded, or was concurrent 235 with, the last roll-over of the RTP sequence number. The ISN 236 field follows the Rollover Counter field. 238 Security Parameter Index (SPI) The length of this field is fixed at 239 16 bits. This field indicates the appropriate Key Encrypting Key 240 and other parameters for the receiver to use when processing the 241 packet. It is an "index" into a table of possibilities (which are 242 established via signaling or some other out-of-band means), much 243 like the IPsec Security Parameter Index [RFC4301]. The parameters 244 that are identified by this field are: 246 The Key Encrypting Key used to process the packet. 248 The EKT cipher used to process the packet. 250 The Secure RTP parameters associated with the SRTP Master Key 251 carried by the packet and the SSRC value in the packet. 252 Section 8.2. of [RFC3711] summarizes the parameters defined by 253 that specification. 255 Together, these elements are called an EKT parameter set. Within 256 each SRTP session, each distinct EKT parameter set that may be 257 used MUST be associated with a distinct SPI value, to avoid 258 ambiguity. The SPI field follows the Initial Sequence Number. 259 Since it is the last field in the packet, and has a fixed length, 260 it is always possible to unambiguously parse this field. 262 2.2. Packet Processing and State Machine 264 At any given time, each SRTP/SRTCP source has associated with it a 265 single EKT parameter set. This parameter set is used to process all 266 outbound packets, and is called the outbound parameter set. There 267 may be other EKT parameter sets that are used by other SRTP/SRTCP 268 sources in the same session. All of these EKT parameter sets SHOULD 269 be stored by all of the participants in an SRTP session, for use in 270 processing inbound SRTCP traffic. 272 We next review the SRTCP authentication method and show how the EKT 273 authentication method is built on top of the base method. An SRTCP 274 authentication method consists of a tag-generation function and a 275 verification function. The tag-generation function takes as input a 276 secret key, the data to be authenticated, and the SRTCP packet index. 277 It provides an authentication tag as its sole output, and is used in 278 the processing of outbound packets. The verification function takes 279 as input a secret key, the data to be authenticated, the SRTCP packet 280 index, and the authentication tag. It returns an indication of 281 whether or not the data, index, and tag are valid or not. It is used 282 in the processing of inbound packets. EKT defines a tag-generation 283 function in terms of the base tag-generation function, and defines a 284 verification function in terms of the base verification function. 285 The tag-generation function is used to process outbound packets, and 286 the verification function is used to process inbound packets. 288 2.2.1. Outbound (Tag Generation) 290 When an SRTCP packet needs to be sent, the EKT tag generation 291 function works as follows. Given an RTCP packet, the Rollover 292 Counter field in the SRTCP packet is set to the current value of the 293 SRTP rollover counter (represented as an unsigned integer in network 294 byte order). 296 The Initial Sequence Number field is set to zero, if the initial RTP 297 packet protected using the current SRTP master key for this source 298 preceded, or was concurrent with, the last roll-over of the RTP 299 sequence number. Otherwise, that field is set to the value of the 300 RTP sequence number of the initial RTP packet that was or will be 301 protected by that key. When the SRTP master key corresponding to a 302 source is changed, the new key SHOULD be communicated in advance via 303 EKT. (Note that the ISN field allows the receiver to know when it 304 should start using the new key to process SRTP packets.) This 305 enables the rekeying event to be communicated before any RTP packets 306 are protected with the new key. The rekeying event MUST not change 307 the value of ROC (otherwise, the current value of the ROC would not 308 be known to late joiners of existing sessions). 310 The Security Parameter Index field is set to the value of the 311 Security Parameter Index that is associated with the outbound 312 parameter set. 314 The Encrypted Master Key field is set to the ciphertext created by 315 encrypting the SRTP master key with the EKT cipher, using the KEK as 316 the encryption key. The encryption process is detailed in 317 Section 2.3. Implementations MAY cache the value of this field to 318 avoid recomputing it for each packet that is sent. 320 2.2.1.1. Base Authentication Tag 322 The Base Authentication Tag field is computed using the base tag- 323 generation function as follows. It can only be computed after all of 324 the other fields have been set. The authenticated input consists of 325 the following elements, in order: 327 the SRTCP authenticated portion, 329 a string of zero bits whose length exactly matches that of the 330 Base Authentication Tag field, 332 the Encrypted Master Key field, 334 the Rollover Counter field, 336 the Initial Sequence Number field, and 338 the Security Parameter Index field. 340 Implementation note: the string of zero bits is included in the 341 authenticated input in order to allow implementations to compute 342 the base authentication tag using a single pass of the base 343 authentication function. Implementations MAY write zeros into the 344 Base Authentication Tag field prior to computing that function, on 345 the sending side. 347 2.2.2. Inbound (Tag Verification) 349 The EKT verification function proceeds as follows (see Figure 2), or 350 uses an equivalent set of steps. Recall that the verification 351 function is a component of SRTCP processing. When a packet does not 352 pass the verification step, the function indicates this fact to the 353 SRTCP packet processing function when it returns control to that 354 function. 356 1. The Security Parameter Index field is checked to determine which 357 EKT parameter set should be used when processing the packet. If 358 multiple parameter sets been defined for the SRTP session, then 359 the one that is associated with the Security Parameter Index 360 value that matches the Security Parameter Index field in the 361 packet is used. This parameter set is called the matching 362 parameter set below. If there is no matching SPI, then the 363 verification function MUST return an indication of authentication 364 failure, and the steps described below are not performed. 366 2. The Encrypted Master Key field is decrypted using the EKT 367 cipher's decryption function. That field is used as the 368 ciphertext input, and the Key Encrypting Key in the matching 369 parameter set is used as the decryption key. The decryption 370 process is detailed in Section 2.3. The plaintext resulting from 371 this decryption is provisionally accepted as the SRTP master key 372 corresponding to the SSRC in the packet. If an MKI is present in 373 the packet, then the provisional key corresponds to the 374 particular SSRC and MKI combination. A provisional key MUST be 375 used only to process one single packet. A provisional SRTCP 376 authentication key is generated from the provisional master key, 377 and the SRTP master salt from the matching parameter set, using 378 the SRTP key derivation algorithm (see Section 4.3 of [RFC3711]). 380 3. An authentication check is performed on the packet, using the 381 provisional SRTCP authentication key. This key is provided to 382 the base SRTCP authentication function (see Figure 2), which is 383 evaluated as described in Section 2.2.1.1. If the Base 384 Authentication Tag field matches the tag computed by the base 385 authentication function, then the packet passes the check. 387 Implementation note: an SRTP receiver MAY copy the Base 388 Authentication Tag field into temporary storage, then write 389 zeros into that field, prior to computing the base 390 authentication tag value. This step allows the base 391 authentication function to be computed in a single pass. 393 4. If the base authentication check using the provisional key fails, 394 then the provisional key MUST be discarded and it MUST NOT affect 395 any subsequent processing. The verification function MUST return 396 an indication of authentication failure, and the steps described 397 below are not performed. 399 5. Otherwise, if the base authentication check is passed, the 400 provisional key is also accepted as the SRTP master key 401 corresponding to the SRTP source that sent the packet. If an MKI 402 is present in the packet, then the master key corresponds to the 403 particular SSRC and MKI combination. If there is no SRTP crypto 404 context corresponding to the SSRC in the packet, then a new 405 crypto context is created. The rollover counter in the context 406 is set to the value of the Rollover Counter field. 408 6. If the Initial Sequence Number field is nonzero, then the initial 409 sequence number for the SRTP master key is set to the packet 410 index created by appending that field to the current rollover 411 counter and treating the result as a 48-bit unsigned integer. 412 The initial sequence number for the master key is equivalent to 413 the "From" value of the < From, To > pair of indices (Section 414 8.1.1 of [RFC3711]) that can be associated with a master key. 416 7. The newly accepted SRTP master key, the SRTP parameters from the 417 matching parameter set, the SSRC from the packet, and the MKI 418 from the packet, if one is present, are stored in the crypto 419 context associated with the SRTP source. The SRTP Key Derivation 420 algorithm is run in order to compute the SRTP encryption and 421 authentication keys, and those keys are stored for use in SRTP 422 processing of inbound packets. 424 8. The verification function then returns an indication that the 425 packet passed the verification. 427 Implementation note: the value of the Encrypted Master Key 428 field is identical in successive packets protected by the same 429 KEK and SRTP master key. This value MAY be cached by an SRTP 430 receiver to minimize computational effort, by allowing it to 431 recognize when the SRTP master key is unchanged, and thus 432 avoid repeating Steps 2, 6, and 7. 434 +------- Encrypted Master Key 435 | 436 v 437 +------------+ 438 | Decryption | 439 | Function |<-------------------------- Key Encrypting Key 440 +------------+ 441 | +----------------+ EKT 442 +--------+-- provisional ---->| SRTCP |<-- master 443 | master key | Key Derivation | salt 444 | +----------------+ 445 | | 446 | provisional SRTCP authentication key 447 | | 448 | v 449 | +----------------+ 450 | authenticated portion --> | Base SRTCP | 451 | authentication tag -----> | Verification | 452 | +----------------+ 453 | | 454 | +----------------+ +---+ 455 | | return FAIL |<- FAIL -| ? | 456 | +----------------+ +---+ 457 | | 458 | +----------------+ | 459 +------->| set master key,|<- PASS ---+ 460 | ROC, and MKI | 461 +----------------+ 462 | 463 v 464 +----------------+ 465 | return PASS | 466 +----------------+ 468 Figure 2: EKT inbound processing. 470 2.3. Ciphers 472 EKT uses a cipher to encrypt the SRTP master keys. We first specify 473 the interface to the cipher, in order to abstract the interface away 474 from the details of that function. We then define the cipher that is 475 used in EKT by default. This cipher MUST be implemented, but another 476 cipher that conforms to this interface MAY be used, in which case its 477 use MUST be coordinated by external means (e.g. call signaling). 479 An EKT cipher consists of an encryption function and a decryption 480 function. The encryption function E(K, P) takes the following 481 inputs: 483 a secret key K with a length of L bytes, and 485 a plaintext value P with a length of M bytes. 487 The encryption function returns a ciphertext value C whose length is 488 N bytes, where N is at least M. The decryption function D(K, C) takes 489 the following inputs: 491 a secret key K with a length of L bytes, and 493 a ciphertext value C with a length of N bytes. 495 The decryption function returns a plaintext value P that is M bytes 496 long. These functions have the property that D(K, E(K, P)) = P for 497 all values of K and P. Each cipher also has a limit T on the number 498 of times that it can be used with any fixed key value. For each key, 499 the encryption function MUST NOT be invoked on more than T distinct 500 values of P, and the decryption function MUST NOT be invoked on more 501 than T distinct values of C. 503 An EKT cipher MUST resist attacks in which both ciphertexts and 504 plaintexts can be adaptively chosen. For each randomly chosen key, 505 the encryption and decryption functions cannot be distinguished from 506 a random permutation and its inverse with non-negligible advantage. 507 This must be true even for adversaries that can query both the 508 encryption and decryption functions adaptively. The advantage is 509 defined as the difference between the probability that the adversary 510 will identify the cipher as such and the probability that the 511 adversary will identify the random permutation as the cipher, when 512 each case is equally likely. 514 2.3.1. The Default Cipher 516 The default cipher is the Advanced Encryption Standard (AES) 517 [FIPS197] with 128-bit keys, in Electronic Codebook (ECB) Mode. Its 518 parameters are fixed at L=16, M=16, and T=2^48. Note that M matches 519 the size of the SRTP master keys used by the default SRTP key 520 derivation function; if an SRTP cipher with a different SRTP master 521 key length is to be used with EKT, then another EKT cipher must be 522 used. ECB is the simplest mode of operation of a block cipher, in 523 which the block cipher is used in its raw form. 525 2.3.2. The AES Key Wrap Cipher 527 The AES Key Wrap [RFC3394] defines a cipher that can be used with 528 plaintexts larger than 16 bytes in length. It requires a plaintext 529 length M that is a multiple of eight bytes, and it returns a 530 ciphertext with a length of N = M + 8 bytes. It can be used with key 531 sizes of L = 16, 24, and 32. The key size determines the length of 532 the AES key used by the Key Wrap algorithm. With this cipher, 533 T=2^48. 535 2.3.3. Other EKT Ciphers 537 Other specification MAY extend this one by defining other EKT 538 ciphers. This section defines how those ciphers interact with this 539 specification. 541 An EKT cipher determines how the Encrypted Master Key field is 542 written, and how it is processed when it is read. This field is 543 opaque to the other aspects of EKT processing. EKT ciphers are free 544 to use this field in any way, but they SHOULD NOT use other EKT or 545 SRTP fields as an input. The values of the parameters L, M, N, and T 546 MUST be defined by each EKT cipher, and those values MUST be 547 inferable from the EKT parameter set. 549 2.4. Synchronizing Operation 551 EKT is transported over SRTCP, but some of the information that it 552 conveys is used for SRTP processing; some elements of the EKT 553 parameter set apply to both SRTP and SRTCP. Furthermore, SRTCP 554 packets can be lost and both SRTP and SRTCP packets may be delivered 555 out-of-order. This can lead to various race conditions, which we 556 review below. 558 When joining an SRTP session, SRTP packets may be received before any 559 SRTCP (EKT) packets, which implies the crypto context has not been 560 established, unless other external signaling mechanism has done so. 561 Rather than automatically discarding such SRTP packets, the receiver 562 MAY want to provisionally place them in a jitter buffer and delay 563 discarding them until playout time. 565 When an SRTP source using EKT performs a rekeying operation, there is 566 a race between the actual rekeying signaled via SRTCP and the SRTP 567 packets secured by the new keying material. If the SRTP packets are 568 received first, they will fail authentication; alternatively, if 569 authentication is not being used, they will decrypt to unintelligible 570 random-looking plaintext. (Note, however, that [RFC3711] says that 571 SRTP "SHOULD NOT be used without message authentication".) In order 572 to address this problem, the rekeying event can be sent before 573 packets using the new SRTP master key are sent (by use of the ISN 574 field). Another solution involves using an MKI at the expense of 575 added overhead in each SRTP packet. Alternatively, receivers MAY 576 want to delay discarding packets from known SSRCs that fail 577 authentication in anticipation of receiving a rekeying event via EKT 578 (SRTCP) shortly. 580 The ROC signaled via EKT over SRTCP may be off by one when it is 581 received by the other party(ies) in the session. In order to deal 582 with this, receivers should simply follow the SRTP packet index 583 estimation procedures defined in [SRTP] Section 3.3.1. 585 2.5. Timing and Reliability Consideration 587 SRTCP communicates the master key and ROC for the SRTP session. 588 Thus, as explained above, if SRTP packets are received prior to the 589 corresponding SRTCP (EKT) packet, a race condition occurs. From an 590 EKT point of view, it is therefore desirable for an SRTP sender to 591 send an SRTCP packet as soon as possible, and in no case any later 592 than when the initial SRTP packet is sent. SRTCP however MUST obey 593 the timing rules associated with the profile under which it runs 594 (e.g. RTP/SAVP or RTP/SAVPF). Subject to that constraint, SRTP 595 senders SHOULD send an SRTCP packet as soon as possible after joining 596 a session. Note that there is no need for SRTP receivers to do so. 597 Also note, that per RFC 3550, Section 6.2, it is permissible to send 598 a compound RTCP packet immediately after joining a unicast session 599 (but not a multicast session). 601 SRTCP is not reliable and hence SRTCP packets may be lost. This is 602 obviously a problem for endpoints joining an SRTP session and 603 receiving SRTP traffic (as opposed to SRTCP), or for endpoints 604 receiving SRTP traffic following a rekeying event. To reduce the 605 impact of lost packets, SRTP senders SHOULD send SRTCP packets as 606 often as allowed by the profile under which they operate. 608 3. EKT and SDP Security Descriptions 610 The SDP Security Descriptions (SDES) [SDES] specification defines a 611 generic framework for negotiating security parameters for media 612 streams negotiated via the Session Description Protocol by use of a 613 new SDP "crypto" attribute and the Offer/Answer procedures defined in 614 [RFC3264]. In addition to the general framework, SDES also defines 615 how to use that framework specifically to negotiate security 616 parameters for Secure RTP. Below, we first provide a brief recap of 617 the crypto attribute when used for SRTP and we then explain how it is 618 complementary to EKT. In the rest of this Section, we provide 619 extensions to the crypto attribute and associated offer/answer 620 procedures to define its use with EKT. 622 3.1. SDP Security Descriptions Recap 624 The SRTP crypto attribute defined for SDP Security Descriptions 625 contains a tag followed by three types of parameters (refer to [SDES] 626 for details): 628 Crypto-suite. Identifies the encryption and authentication 629 transform 631 Key parameters. SRTP keying material and parameters. 633 Session parameters. Additional (optional) SRTP parameters such as 634 Key Derivation Rate, Forward Error Correction Order, use of 635 unencrypted SRTP, etc. 637 The crypto attributes in the example SDP in Figure 3 illustrate these 638 parameters. 640 v=0 641 o=sam 2890844526 2890842807 IN IP4 192.0.2.5 642 s=SRTP Discussion 643 i=A discussion of Secure RTP 644 u=http://www.example.com/seminars/srtp.pdf 645 e=marge@example.com (Marge Simpson) 646 c=IN IP4 192.0.2.12 647 t=2873397496 2873404696 648 m=audio 49170 RTP/SAVP 0 649 a=crypto:1 AES_CM_128_HMAC_SHA1_80 650 inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|2^20|1:4 651 FEC_ORDER=FEC_SRTP 652 a=crypto:2 F8_128_HMAC_SHA1_80 653 inline:MTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5QUJjZGVm|2^20|1:4; 654 inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20|2:4 655 FEC_ORDER=FEC_SRTP 657 Figure 3: SDP Security Descriptions example. Line breaks are 658 included for formatting purposes only. 660 The first crypto attribute has the tag "1" and uses the crypto-suite 661 "AES_CM_128_HMAC_SHA1_80". The "inline" parameter provides the SRTP 662 master key and salt, the master key lifetime (number of packets), and 663 the (optional) Master Key Identifier (MKI) whose value is "1" and has 664 a byte length of "4" in the SRTP packets. Finally, the FEC_ORDER 665 session parameter indicates the order of Forward Error Correction 666 used (FEC is applied before SRTP processing by the sender of the SRTP 667 media). 669 The second crypto attribute has the tag "2" and uses the crypto-suite 670 "F8_128_HMAC_SHA1_80". It includes two SRTP master keys and 671 associated salts. The first one is used with the MKI value 1, 672 whereas the second one is used with the MKI value 2. Finally, the 673 FEC_ORDER session parameter indicates the order of Forward Error 674 Correction used. 676 3.2. Relationship between EKT and SDP Security Descriptions 678 SDP Security Descriptions [SDES] define a generic framework for 679 negotiating security parameters for media streams negotiated via the 680 Session Description Protocol by use of the Offer/Answer procedures 681 defined in [RFC3264]. In addition to the general framework, SDP 682 Security Descriptions (SDES) also defines how to use it specifically 683 to negotiate security parameters for Secure RTP. 685 EKT and SDES are complementary. SDP Security Descriptions can 686 negotiate several of the SRTP security parameters (e.g. cipher and 687 use of Master Key Identifier/MKI) as well as SRTP master keys. SDP 688 Security Descriptions however does not negotiate SSRCs and their 689 associated Rollover Counter (ROC). Instead, SDES relies on a so- 690 called "late binding", where a newly observed SSRC will have its 691 crypto context initialized to a ROC value of zero. Clearly, this 692 does not work for participants joining an SRTP session that has been 693 established for a while and hence has a non-zero ROC. The use of EKT 694 solves this problem by communicating the ROC associated with the SSRC 695 in the media plane. 697 SDP Security Descriptions negotiates different SRTP master keys in 698 the send and receive direction. The offer contains the master key 699 used by the offerer to send media, and the answer contains the master 700 key used by the answerer to send media. Consequently, if media is 701 received by the offerer prior to the answer being received, the 702 offerer does not know the master key being used. Use of SDP security 703 preconditions can solve this problem, however it requires an 704 additional round-trip as well as a more complicated state machine. 705 EKT solves this problem by simply sending the master key used in the 706 media plane thereby avoiding the need for security preconditions. 708 If multiple crypto-suites were offered, the offerer also will not 709 know which of the crypto-suites offered was selected until the answer 710 is received. EKT solves this problem by using a correlator, the 711 Security Parameter Index (SPI), which uniquely identifies each crypto 712 attribute in the offer. 714 One of the primary call signaling protocols using offer/answer is the 715 Session Initiation Protocol (SIP) [RFC3261]. SIP uses the INVITE 716 message to initiate a media session and typically includes an offer 717 SDP in the INVITE. An INVITE may be "forked" to multiple recipients 718 which potentially can lead to multiple answers being received. SDP 719 Security Descriptions however does not properly support this 720 scenario, mainly because SDP and RTP/RTCP does not contain sufficient 721 information to allow for correlation of an incoming RTP/RTCP packet 722 with a particular answer SDP. Note that extensions providing this 723 correlation do exist, e.g. Interactive Connectivity Establishment 724 (ICE). SDP Security Descriptions addresses this point-to-multipoint 725 problem by moving each answer to a separate RTP transport address 726 thereby turning a point-to-multipoint scenario into multiple point- 727 to-point scenarios. There are however significant disadvantages to 728 doing so. As long as the crypto attribute in the answer does not 729 contain any declarative parameters that differ from those in the 730 offer, EKT solves this problem by use of the SPI correlator and 731 communication of the answerer's SRTP master key in EKT. 733 As can be seen from the above, the combination of EKT and SDES 734 provides a better solution to SRTP negotiation for offer/answer than 735 either of them alone. SDES negotiates the various SRTP crypto 736 parameters (which EKT does not), whereas EKT addresses the 737 shortcomings of SDES. 739 3.3. Overview of Combined EKT and SDP Security Description Operation 741 We define three session extension parameters to SDES to communicate 742 the EKT cipher, EKT key, and Security Parameter Index to the peer. 743 The original SDES parameters are used as defined in [SDES], however 744 the procedures associated with the SRTP master key differ slightly, 745 since both SDES and EKT communicate an SRTP master key. In 746 particular, the SRTP master key communicated via SDES is used only if 747 there is currently no crypto context established for the SSRC in 748 question. This will be the case when an entity has received only the 749 offer or answer, but has yet to receive a valid EKT message from the 750 peer. Once a valid EKT message is received for the SSRC, the crypto 751 context is initialized accordingly, and the SRTP master key will then 752 be derived from the EKT message. Subsequent offer/answer exchanges 753 do not change this: The most recent SRTP master key negotiated via 754 EKT will be used, or, if none is available for the SSRC in question, 755 the most recent SRTP master key negotiated via offer/answer will be 756 used. Note that with these rules, once a valid EKT message has been 757 received for a given SSRC, rekeying for that SSRC can only be done 758 via EKT. The associated SRTP crypto parameters however can be 759 changed via SDES. 761 3.4. EKT Extensions to SDP Security Descriptions 763 In order to use EKT and SDES in conjunction, we now define the 764 following new SDES session parameters, each of which MUST NOT appear 765 more than once in a given crypto attribute: 767 EKT_Cipher The EKT cipher used to encrypt the SRTP Master Key 769 EKT_Key The EKT key used to encrypt the SRTP Master Key 771 EKT_SPI The EKT Security Parameter Index 773 Below, we provide additional detail on each of these attributes. 775 3.4.1. EKT_Cipher 777 The (optional) EKT_Cipher parameter parameter defines the EKT cipher 778 used to encrypt the EKT key with in SRTCP packets. The default value 779 is "AES_128" in accordance with Section 2.3.1. For the AES Key Wrap 780 cipher (see Section 2.3.2, the values "AESKW_128", "AESKW_192", and 781 "AESKW_256" are defined for values of L=16, 24, and 32 respectively. 782 In the Offer/Answer model, the EKT_Cipher parameter is a negotiated 783 parameter. 785 3.4.2. EKT_Key 787 The (mandatory) EKT_Key parameter is the key K used to encrypt the 788 SRTP Master Key in SRTCP packets. The value is base64 encoded (see 789 [RFC3548], Section 3). When base64 decoding the key, padding 790 characters (i.e., one or two "=" at the end of the base64 encoded 791 data) are discarded (see [RFC3548] for details). Base64 encoding 792 assumes that the base64 encoding input is an integral number of 793 octets. If a given EKT cipher requires the use of a key with a 794 length that is not an integral number of octets, said cipher MUST 795 define a padding scheme that results in the base64 input being an 796 integral number of octets. For example, if the length defined was 797 250 bits, then 6 padding bits would be needed, which could be defined 798 to be the last 6 bits in a 256 bit input. In the Offer/Answer model, 799 the EKT_Key parameter is a negotiated parameter. 801 3.4.3. EKT_SPI 803 The (mandatory) EKT_SPI parameter is the Security Parameter Index. 804 It is encoded as an ASCII string representing the hexadecimal value 805 of the Security Parameter Index. The SPI identifies the *offer* 806 crypto attribute (including the EKT Key and Cipher) being used for 807 the associated SRTP session. A crypto attribute corresponds to an 808 EKT Parameter Set and hence the SPI effectively identifies a 809 particular EKT parameter set. Note that the scope of the SPI is the 810 SRTP session, which may or may not be limited to the scope of the 811 associated SIP dialog. In particular, if one of the participants in 812 an SRTP session is an SRTP translator, the scope of the SRTP session 813 is not limited to the scope of a single SIP dialog. However, if all 814 of the participants in the session are endpoints or mixers, the scope 815 of the SRTP session will correspond to a single SIP dialog. In the 816 Offer/Answer model, the EKT_SPI parameter is a negotiated parameter. 818 3.5. Offer/Answer Procedures 820 In this section, we provide the offer/answer procedures associated 821 with use of the three new SDES parameters defined in Section 822 Section 3.4. Since SDES is defined only for unicast streams, we 823 provide only offer/answer procedures for unicast streams here as 824 well. 826 3.5.1. Generating the Initial Offer - Unicast Streams 828 When the initial offer is generated, the offerer MUST follow the 829 steps defined in [SDES] Section 7.1.1 as well as the following steps. 831 For each unicast media line using SDES and where use of EKT is 832 desired, the offerer MUST include one EKT_Key parameter and one 833 EKT_SPI parameter in at least one "crypto" attribute (see [SDES]). 834 The EKT_SPI parameter serves to identify the EKT parameter set used 835 for a particular SRTCP packet. Consequently, within a single media 836 line, a given EKT_SPI value MUST NOT be used with multiple crypto 837 attributes. Note that the EKT parameter set to use for the session 838 is not yet established at this point; each offered crypto attribute 839 contains a candidate EKT parameter set. Furthermore, if the media 840 line refers to an existing SRTP session, then any SPI values used for 841 EKT parameter sets in that session MUST NOT be remapped to any 842 different EKT parameter sets. When an offer describes an SRTP 843 session that is already in progress, the offer SHOULD use an EKT 844 parameter set (incl. EKT_SPI and EKT_KEY) that is already in use. 846 If an EKT_Cipher other than the default cipher is to be used, then 847 the EKT_Cipher parameter MUST be included as well. 849 If a given crypto attribute includes more than one set of SRTP key 850 parameters (SRTP master key, salt, lifetime, MKI), they MUST all use 851 the same salt. (EKT requires a single shared salt between all the 852 participants in the direct SRTP session). 854 Important Note: The scope of the offer/answer exchange is the SIP 855 dialog(s) established as a result of the INVITE, however the scope of 856 EKT is the direct SRTP session, i.e. all the participants that are 857 able to receive SRTP and SRTCP packets directly. If an SRTP session 858 spans multiple SIP dialogs, the EKT parameter sets MUST be 859 synchronized between all the SIP dialogs where SRTP and SRTCP packets 860 can be exchanged. In the case where the SIP entity operates as an 861 RTP mixer (and hence re-originates SRTP and SRTCP packets with its 862 own SSRC), this is not an issue, unless the mixer receives traffic 863 from the various participants on the same destination IP address and 864 port, in which case further coordination of SPI values and crypto 865 parameters may be needed between the SIP dialogs (note that SIP 866 forking with multiple early media senders is an example of this). 867 However if it operates as an RTP translator, synchronized negotiation 868 of the EKT parameter sets on *all* the involved SIP dialogs will be 869 needed. This is non-trivial in a variety of use cases, and hence use 870 of the combined SDES/EKT mechanism with RTP translators should be 871 considered very carefully. It should be noted, that use of SRTP with 872 RTP translators in general should be considered very carefully as 873 well. 875 The EKT session parameters can either be included as optional or 876 mandatory parameters, however within a given crypto attribute, they 877 MUST all be either optional or mandatory. 879 3.5.2. Generating the Initial Answer - Unicast Streams 881 When the initial answer is generated, the answerer MUST follow the 882 steps defined in [SDES] Section 7.1.2 as well as the following steps. 884 For each unicast media line using SDES, the answerer examines the 885 associated crypto attribute(s) for the presence of EKT parameters. 886 If mandatory EKT parameters are included with a "crypto" attribute, 887 the answerer MUST support those parameters in order to accept that 888 offered crypto attribute. If optional EKT parameters are included 889 instead, the answerer MAY accept the offered crypto attribute without 890 using EKT. However, doing so will prevent the offerer from 891 processing any packets received before the answer. If neither 892 optional nor mandatory EKT parameters are included with a crypto 893 attribute, and that crypto attribute is accepted in the answer, EKT 894 MUST NOT be used. If a given a crypto attribute includes a mixture 895 of optional and mandatory EKT parameters, or an incomplete set of 896 mandatory EKT parameters, that crypto attribute MUST be considered 897 invalid. 899 When EKT is used with SDES, the offerer and answerer MUST use the 900 same SRTP salt. Thus, the SRTP key parameter(s) in the answer crypto 901 attribute MUST use the same salt as the one accepted from the offer. 903 When the answerer accepts the offered media line and EKT is being 904 used, the crypto attribute included in the answer MUST include the 905 same EKT parameter values as found in the accepted crypto attribute 906 from the offer (however, if the default EKT cipher is being used, it 907 may be omitted). Furthermore, the EKT parameters included MUST be 908 mandatory (i.e. no "-" prefix). 910 Acceptance of a crypto attribute with EKT parameters leads to 911 establishment of the EKT parameter set for the corresponding SRTP 912 session. Consequently, the answerer MUST send packets in accordance 913 with that particular EKT parameter set only. If the answerer wants 914 to enable the offerer to process SRTP packets received by the offerer 915 before it receives the answer, the answerer MUST NOT include any 916 declarative session parameters that either were not present in the 917 offered crypto attribute, or were present but with a different value. 918 Otherwise, the offerer's view of the EKT parameter set would differ 919 from the answerer's until the answer is received. Similarly, unless 920 the offerer and answerer has other means for correlating an answer 921 with a particular SRTP session, the answer SHOULD NOT include any 922 declarative session parameters that either were not present in the 923 offered crypto attribute, or were present but with a different value. 924 If this recommendation is not followed and the offerer receives 925 multiple answers (e.g. due to SIP forking), the offerer may not be 926 able to process incoming media stream packets correctly. 928 3.5.3. Processing of the Initial Answer - Unicast Streams 930 When the offerer receives the answer, it MUST perform the steps in 931 [SDES] Section 7.1.3 as well as the following steps for each SRTP 932 media stream it offered with one or more crypto lines containing EKT 933 parameters in it. 935 If the answer crypto line contains EKT parameters, and the 936 corresponding crypto line from the offer contained the same EKT 937 values, use of EKT has been negotiated successfully and MUST be used 938 for the media stream. When determining whether the values match, 939 optional and mandatory parameters MUST be considered equal. 940 Furthermore, if the default EKT cipher is being used, it MAY be 941 either present or absent in the offer and/or answer. 943 If the answer crypto line does not contain EKT parameters, then EKT 944 MUST NOT be used for the corresponding SRTP session. Note that per 945 [SDES] Section 5.1.3, if the accepted crypto attribute contained 946 mandatory EKT parameters in the offer, and the crypto attribute in 947 the answer does not contain EKT parameters, then negotiation has 948 failed. 950 If the answer crypto line contains EKT parameters but the 951 corresponding offered crypto line did not, or if the parameters don't 952 match or are invalid, then the offerer MUST consider the crypto line 953 invalid (see [SDES] Section 7.1.3 for further operation). 955 The EKT parameter set is established when the answer is received, 956 however there are a couple of special cases to consider here. First 957 of all, if an SRTCP packet is received prior to the answer, then the 958 EKT parameter set is established provisionally based on the SPI 959 included. Once the answer (which may include declarative session 960 parameters) is received, the EKT parameter set is fully established. 961 The second case involves receipt of multiple answers due to SIP 962 forking. In this case, there will be multiple EKT parameter sets; 963 one for each SRTP session. As mentioned earlier, reliable 964 correlation of SIP dialogs to SRTP sessions requires extensions, and 965 hence if one or more of the answers include declarative session 966 parameters, it may be difficult to fully establish the EKT parameter 967 set for each SRTP session. In the absence of a specific correlation 968 mechanism, it is RECOMMENDED, that such correlation be done based on 969 the signaled receive IP-address in the SDP and the observed source 970 IP-address in incoming SRTP/SRTCP packets, and, if necessary, the 971 signaled receive UDP port and the observed source UDP port. 973 3.6. SRTP-Specific Use Outside Offer/Answer 975 SDES use for SRTP is not defined outside offer/answer and hence 976 neither is SDES with EKT. 978 3.7. Modifying the Session 980 When a media stream using the SRTP security descriptions has been 981 established, and a new offer/answer exchange is performed, the 982 offerer and answerer MUST follow the steps in [SDES] Section 7.1.4 as 983 well as the following steps. SDES allows for all parameters of the 984 session to be modified, and the EKT session parameters are no 985 exception to that, however, there are a few additional rules to be 986 adhered to when using EKT. 988 It is permissible to start a session without the use of EKT, and then 989 subsequently start using EKT, however the converse is not. Thus, 990 once use of EKT has been negotiated on a particular media stream, EKT 991 MUST continue to be used on that media stream in all subsequent 992 offer/answer exchanges. 994 The reason for this is that both SDES and EKT communicate the SRTP 995 Master Key with EKT Master Keys taking precedence. Reverting back to 996 an SDES controlled master key in a synchronized manner is difficult. 998 Once EKT is being used, the salt for the direct SRTP session MUST NOT 999 be changed. Thus, a new offer/answer which does not create a new 1000 SRTP session (e.g. because it reuses the same IP address and port) 1001 MUST use the same salt for all crypto attributes as is currently used 1002 for the direct SRTP session. 1004 Finally, subsequent offer/answer exchanges MUST NOT remap a given SPI 1005 value to a different EKT parameter set until 2^32 other mappings have 1006 been used within the SRTP session. In practice, this requirements is 1007 most easily met by using a monotonically increasing SPI value (modulo 1008 2^32 and starting with zero) per direct SRTP session. Note that a 1009 direct SRTP session may span multiple SIP dialogs, and in such cases 1010 coordination of SPI values across those SIP dialogs will be required. 1011 In the simple point-to-point unicast case without translators, the 1012 requirement simply applies within each media line in the SDP. In the 1013 point-to-multipoint case, the requirement applies across all the 1014 associated SIP dialogs. 1016 3.8. Backwards Compatibility Considerations 1018 Backwards compatibility can be achieved in a couple of ways. First 1019 of all, SDES allows for session parameters to be prefixed with "-" to 1020 indicate that they are optional. If the answerer does not support 1021 the EKT session parameters, such optional parameters will simply be 1022 ignored. When the answer is received, absence of the parameters will 1023 indicate that EKT is not being used. Receipt of SRTCP packets prior 1024 to receipt of such an answer will obviously be problematic (as is 1025 normally the case for SDES without EKT). 1027 Alternatively, SDES allows for multiple crypto lines to be included 1028 for a particular media stream. Thus, two crypto lines that differ in 1029 their use of EKT parameters (presence in one, absence in the other) 1030 can be used as a way to negotiate use of EKT. When the answer is 1031 received, the accepted crypto attribute will indicate whether EKT is 1032 being used or not. 1034 3.9. Grammar 1036 The Augmented Backus-Naur Form (ABNF) syntax [RFC4234] for the three 1037 new SDES session parameters is as in Figure 4. 1039 EKT_Cipher = "EKT_Cipher=" EKT_Cipher_Name 1040 EKT_Cipher_Name = 1*(ALPHA / DIGIT / "_") ; "AES_128", "AESKW_128" 1041 ; "AESKW_192" and "AESKW_256" 1042 ; defined in this document. 1043 EKT_Key = 1*(base64) ; See Section 3 in RFC3548 1044 base64 = ALPHA / DIGIT / "+" / "/" / "=" 1045 EKT_SPI = 4HEXDIG ; See RFC4234 1047 Figure 4: ABNF for the EKT session parameters. 1049 4. Use of EKT with MIKEY 1051 The advantages outlined in Section 1 are useful in some scenarios in 1052 which MIKEY is used to establish SRTP sessions. In this section, we 1053 briefly review MIKEY and related work, and discuss these scenarios. 1054 A n SRTP sender or a group controller can use MIKEY to establish a 1055 SRTP cryptographic context. This capability includes the 1056 distribution of the TEK or a TEK generation key (TGK) , security 1057 policy payload, crypto session bundle ID (CSB_ID), and a crypto 1058 session ID (CS_ID). The TEK directly maps to an SRTP master key, 1059 whereas the TGK is used along with the CSB_ID and a CS_ID to generate 1060 a TEK. The CS_ID can be used to generate multiple TEKs from a single 1061 TGK. For group communication, the sender or group controller sends 1062 the same TGK, CSB_ID, and CS_ID to all the members. For interactive 1063 conferencing, each sender distributes the same SRTP crypto context to 1064 the rest of the members. 1066 The MIKEY specification [RFC3830] suggests the use of unicast for 1067 rekeying. This method does not scale well to large groups or 1068 interactive groups. MIKEY also provides a way to provide ROC values 1069 to members when they join the group. It is desirable to not require 1070 the group controller to track the ROC values of each member. For 1071 example, in mobile and wireless environments, members may go in and 1072 out of coverage, and in those cases, key management based ROC 1073 synchronization is not reliable or sufficient. A better alternative 1074 to support ROC synchronization is to send ROC values via SRTP, as EKT 1075 does. A separate SRTP extension is being proposed [RCC] to include 1076 the ROC as part of a modified authentication tag. Unlike EKT, this 1077 extension uses SRTP and not SRTCP as its transport. A new MIKEY 1078 extension [KEYID] specifies the use of MIKEY to update group keys via 1079 multicast or broadcast for 3GPP MBMS networks. 1081 The EKT extension of SRTP/SRTCP provides a combined solution for 1082 rekeying and ROC synchronization. It also offers several advantages. 1083 With EKT, an SRTP session participant can start a new SRTP source 1084 without coordinating with a group controller about the selection of 1085 keys or SSRC values. With EKT, SRTP can handle early media, since 1086 its SPI allows the receiver to identify the cryptographic keys and 1087 parameters used by the source. EKT also allows SRTP to work with SIP 1088 forking. 1090 MIKEY can readily be extended so that it can establish the EKT key, 1091 cipher and SPI values. 1093 4.1. EKT transform attribute mapping in MIKEY 1095 Interactive group communication using MIKEY currently requires each 1096 member to send its own TGK and SSRC information to the other members, 1097 resulting in O(n^2) MIKEY sessions. That is not desirable. With 1098 EKT, the conference organizer or only one of the members needs to 1099 distribute the EKT parameters to all the members. After that, each 1100 member can distribute its SRTP master key and ROC values using EKT. 1101 Cryptographic policy initially distributed via MIKEY will apply to 1102 all sessions. MIKEY specifies a security policy (SP) payload to 1103 negotiate or distribute SRTP security policy. Policy payload 1104 attributes include Session Encryption key length, Authentication 1105 algorithm, Session Authentication key length, Session Salt key 1106 length, SRTP PRF, Authentication tag length and other fields (see 1107 Section 6.10.1 of RFC 3830). 1109 For the EKT_Cipher parameter, we propose to specify a new SRTP Policy 1110 Type in the Security Policy (SP) payload of MIKEY (see Section 6.10 1111 of RFC 3830). The SP payload contains a number of Policy Param TLVs. 1112 We define Type = TBD: (will be requested from IANA) for EKT_Cipher. 1113 As with other payloads specifying cryptographic algorithms, we only 1114 specify Type and Values only. 1116 EKT_Cipher | Value 1117 ------------------- 1118 AES_128 | 0 1119 AESKW_128 | 1 1120 AESKW_192 | 2 1121 AESKW_256 | 3 1123 Figure 5: EKT_Cipher Table 1125 We propose to use the KEMAC payload to transport the two mandatory 1126 EKT parameters: EKT_Key and EKT_SPI MIKEY KEMAC payload, as specified 1127 in RFC 3830 carries the Traffic Encryption Key (TEK) or the TEK 1128 Generation Key (TGK). One or more TEKs or TGKs are carried in 1129 individual Key Data sub-payloads within the KEMAC payload. The KEMAC 1130 payload is encrypted as part of MIKEY. The Key Data sub- payload, 1131 specified in Section 6.13 of RFC 3830, has the following format: 1133 1 2 3 1134 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 1135 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1136 ! Next Payload ! Type ! KV ! Key data len ! 1137 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1138 ! Key data ~ 1139 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1140 ! Salt len (optional) ! Salt data (optional) ~ 1141 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1142 ! KV data (optional) ~ 1143 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1145 Figure 6: Key Data Sub-Payload of MIKEY 1147 The Type field, 4 bits in length, indicates the type of key included 1148 in the payload. We define Type = TBD (will be requested from IANA) 1149 to indicate transport of EKT_Key. 1151 KV (4 bits): indicates the type of key validity period specified. 1152 KV=1 is currently specified as an SPI. We propose to use that value 1153 to indicate the KV_data contains the ETK_SPI. KV_data would be 16 1154 octets in length, but it is also possible to interpret the length 1155 from the 'Key data len' field. 1157 KV data MUST NOT be optional when KV = 1. 1159 5. Design Rationale 1161 From [RFC3550], a primary function of RTCP is to carry the CNAME, a 1162 "persistent transport-level identifier for an RTP source" since 1163 "receivers require the CNAME to keep track of each participant." EKT 1164 works in much the same way, using SRTCP to carry information needed 1165 for the proper processing of the SRTP traffic. 1167 With EKT, SRTP gains the ability to synchronize the creation of 1168 cryptographic contexts across all of the participants in a single 1169 session. This feature provides some, but not all, of the 1170 functionality that is present in IKE phase two (but not phase one). 1171 Importantly, EKT does not provide a way to indicate SRTP options. 1173 With EKT, external signaling mechanisms provide the SRTP options and 1174 the EKT Key, but need not provide the key(s) for each individual SRTP 1175 source. EKT provides a separation between the signaling mechanisms 1176 and the details of SRTP. The signaling system need not coordinate 1177 all SRTP streams, nor predict in advance how many streams will be 1178 present, nor communicate SRTP-level information (e.g. rollover 1179 counters) of current sessions. 1181 EKT is especially useful for multi-party sessions, and for the case 1182 where multiple RTP sessions are sent to the same destination 1183 transport address (see the example in the definition of "RTP session" 1184 in [RFC3550]). A SIP offer that is forked in parallel (sent to 1185 multiple endpoints at the same time) can cause multiple RTP sessions 1186 to be sent to the same transport address, making EKT useful for use 1187 with SIP. 1189 EKT can also be used in conjunction with a scalable group-key 1190 management system like GDOI. Such a system provides a secure entity 1191 authentication method and a way to revoke group membership, both of 1192 which are out of scope of EKT. 1194 It is natural to use SRTCP to transport encrypted keying material for 1195 SRTP, as it provides a secure control channel for (S)RTP. However, 1196 there are several different places in SRTCP in which the encrypted 1197 SRTP master key and ROC could be conveyed. We briefly review some of 1198 the alternatives in order to motivate the particular choice used in 1199 this specification. One alternative is to have those values carried 1200 as a new SDES item or RTCP packet. This would require that the 1201 normal SRTCP encryption be turned off for the packets containing that 1202 SDES item, since on the receiver's side, SRTCP processing completes 1203 before the RTCP processing starts. This tension between encryption 1204 and the desire for RTCP privacy is highly undesirable. Additionally, 1205 this alternative makes SRTCP dependent upon the parsing of the RTCP 1206 compound packet, which adds complexity. It is simpler to carry the 1207 encrypted key in a new SRTCP field. One way to do this and to be 1208 backwards compatible with the existing specification is to define a 1209 new crypto function that incorporates the encrypted key. We define a 1210 new authentication transform because EKT relies on the normal SRTCP 1211 authentication to provide implicit authentication of the encrypted 1212 key. 1214 An SRTP packet containing an SSRC that has not been seen will be 1215 discarded. This practice may induce a burst of packet loss at the 1216 outset of an SRTP stream, due to the loss or reorder of the first 1217 SRTCP packet with the EKT containing the key and rollover counter for 1218 that stream. However, this practice matches the conservative RTP 1219 memory-allocation strategy; many existing applications accept this 1220 risk of initial packet loss. Alternatively, implementations may wish 1221 to delay discarding such packets for a short period of time as 1222 described in Section 2.4. 1224 EKT adds eight additional bytes to each SRTCP packet, plus the length 1225 of the Encrypted Master Key field. Using the SRTP and EKT defaults, 1226 the total overhead is 24 bytes. This overhead does not detract from 1227 the total bandwidth used by SRTP, since it is included in the RTCP 1228 bandwidth computation. However, it will cause the control protocol 1229 to issue packets less frequently. 1231 If EKT is used of SRTP, there will be a loss of bandwidth due to the 1232 additional 24 bytes in each RTP packet. For some applications, this 1233 bandwidth loss is significant. It may be desirable to carry the EKT 1234 fields only in some of the SRTP packets, e.g. by adding a flag bit 1235 that indicates the presence or absence of those fields. We leave 1236 this point open for discussion. 1238 The only motivation for defining the ability to run EKT over SRTP 1239 instead of RTCP is the unfortunate fact that RTCP is not always 1240 available, because some RTP stacks are incomplete and some firewalls 1241 and NAT devices can pass RTP but not RTCP. 1243 6. RTP Transport 1245 EKT MAY be used over SRTP instead of SRTCP if the latter protocol is 1246 not available, though implementations SHOULD otherwise use SRTCP. If 1247 EKT over SRTP is used in an SRTP session in which SRTCP is available, 1248 then EKT MUST be used for both SRTP and SRTCP. 1250 The packet processing, state machine, and Authentication Tag format 1251 for EKT over SRTP is identical to that for EKT over SRTCP. 1253 7. Security Considerations 1255 With EKT, each SRTP sender and receiver can generate distinct SRTP 1256 master keys. This property avoids any security concern over the re- 1257 use of keys, by empowering the SRTP layer to create keys on demand. 1258 Note that the inputs of EKT are the same as for SRTP with key- 1259 sharing: a single key is provided to protect an entire SRTP session. 1260 However, EKT provides complete security, even in the absence of 1261 further out-of-band coordination of SSRCs, and even when SSRC values 1262 collide. 1264 EKT uses encrypted key transport with implicit authentication. A 1265 strong cipher is used to ensure the confidentiality of the master 1266 keys as they are transported. The authenticity of the master keys is 1267 ensured by the base authentication check, which uses the plaintext 1268 form of that key. If the base authentication function and the cipher 1269 cannot be defeated by a particular attacker, then that attacker will 1270 be unable to defeat the implicit authentication. 1272 In order to avoid potential security issues, the SRTP authentication 1273 tag length used by the base authentication method MUST be at least 1274 ten octets. 1276 8. IANA Considerations 1278 This section registers with IANA the following SRTP session 1279 parameters for SDP Security Descriptions [SDES]: 1281 EKT_KEY 1283 EKT_CIPHER 1285 EKT_SPI 1287 The definition of these parameters is provided in Section 3.4. 1289 We request the following IANA assignments from existing MIKEY IANA 1290 tables: 1292 From the "Key Data payload name spaces:" a value to indicate the 1293 type as the "EKT_Key." 1295 From the "SRTP" policy table name space, a new value to be 1296 assigned for "EKT_Cipher." 1298 Furthermore, we need a new table to be defined: 1300 EKT_Cipher | Value 1301 ------------------- 1302 AES_128 | 0 1303 AESKW_128 | 1 1304 AESKW_192 | 2 1305 AESKW_256 | 3 1307 Figure 7: EKT_Cipher Table 1309 9. Acknowledgements 1311 Thanks to Dan Wing and Rob Raymond for fruitful discussions. 1313 10. References 1315 10.1. Normative References 1317 [FIPS197] "The Advanced Encryption Standard (AES)", FIPS-197 Federal 1318 Information Processing Standard. 1320 [KEYID] Carrara, E., Lehtovirta, V., and K. Norrman, "The Key ID 1321 Information Type for the General Extension Payload in 1322 MIKEY", Work In 1323 Progress. . 1325 [RCC] Lehtovirta, V., Naslund, M., and K. Norrman, "Integrity 1326 Transform Carrying Roll-over Counter", Work In 1327 Progress. . 1329 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1330 Requirement Levels", BCP 14, RFC 2119, March 1997. 1332 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1333 A., Peterson, J., Sparks, R., Handley, M., and E. 1334 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1335 June 2002. 1337 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 1338 with Session Description Protocol (SDP)", RFC 3264, 1339 June 2002. 1341 [RFC3394] Schaad, J. and R. Housley, "Advanced Encryption Standard 1342 (AES) Key Wrap Algorithm", RFC 3394, September 2002. 1344 [RFC3548] Josefsson, S., "The Base16, Base32, and Base64 Data 1345 Encodings", RFC 3548, July 2003. 1347 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 1348 Jacobson, "RTP: A Transport Protocol for Real-Time 1349 Applications", STD 64, RFC 3550, July 2003. 1351 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 1352 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 1353 RFC 3711, March 2004. 1355 [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1356 Specifications: ABNF", RFC 4234, October 2005. 1358 [SDES] Andreasen, F., Baugher, M., and D. Wing, "Session 1359 Description Protocol Security Descriptions for Media 1360 Streams", Work In 1361 Progress. . 1363 10.2. Informative References 1365 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 1366 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 1367 August 2004. 1369 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 1370 Internet Protocol", RFC 4301, December 2005. 1372 Authors' Addresses 1374 David A. McGrew 1375 Cisco Systems, Inc. 1376 510 McCarthy Blvd. 1377 Milpitas, CA 95035 1378 US 1380 Phone: (408) 525 8651 1381 Email: mcgrew@cisco.com 1382 URI: http://www.mindspring.com/~dmcgrew/dam.htm 1384 Flemming Andreason 1385 Cisco Systems, Inc. 1386 499 Thornall Street 1387 Edison, NJ 08837 1388 US 1390 Email: fandreas@cisco.com 1392 Lakshminath Dondeti 1393 QUALCOMM 1394 5775 Morehouse Drive 1395 San Diego, CA 92121 1396 US 1398 Email: ldondeti@qualcomm.com 1400 Full Copyright Statement 1402 Copyright (C) The IETF Trust (2007). 1404 This document is subject to the rights, licenses and restrictions 1405 contained in BCP 78, and except as set forth therein, the authors 1406 retain all their rights. 1408 This document and the information contained herein are provided on an 1409 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1410 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 1411 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 1412 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1413 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1414 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1416 Intellectual Property 1418 The IETF takes no position regarding the validity or scope of any 1419 Intellectual Property Rights or other rights that might be claimed to 1420 pertain to the implementation or use of the technology described in 1421 this document or the extent to which any license under such rights 1422 might or might not be available; nor does it represent that it has 1423 made any independent effort to identify any such rights. Information 1424 on the procedures with respect to rights in RFC documents can be 1425 found in BCP 78 and BCP 79. 1427 Copies of IPR disclosures made to the IETF Secretariat and any 1428 assurances of licenses to be made available, or the result of an 1429 attempt made to obtain a general license or permission for the use of 1430 such proprietary rights by implementers or users of this 1431 specification can be obtained from the IETF on-line IPR repository at 1432 http://www.ietf.org/ipr. 1434 The IETF invites any interested party to bring to its attention any 1435 copyrights, patents or patent applications, or other proprietary 1436 rights that may cover technology that may be required to implement 1437 this standard. Please address the information to the IETF at 1438 ietf-ipr@ietf.org. 1440 Acknowledgment 1442 Funding for the RFC Editor function is provided by the IETF 1443 Administrative Support Activity (IASA).