<title>Use of DTLS-SRTP in Jingle Sessions</title>
<abstract>This specification defines how to use DTLS-SRTP (RFC 5763) in the Jingle application type for the Real-time Transport Protocol (RTP) as a way to negotiate media path key agreement for secure RTP in one-to-one media sessions.</abstract>
<remark><p>Second draft, rewrite no longer based on XEP-0262.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2012-12-13</date>
<initials>ph</initials>
<remark><p>First draft, copied from XEP-0262.</p></remark>
</revision>
</header>
<section1topic='Protocol'anchor='protocol'>
<p>&xep0167; recommends the use of the Secure Real-time Transport Protocol (SRTP) for end-to-end encryption of RTP sessions negotiated using &xep0166;. &rfc5763; provides an approach to establish a Secure Real-time Transport Protocol (SRTP) security context using the Datagram Transport Layer Security (DTLS) protocol. A mechanism of transporting the fingerprint attribute that identifies the key that will be presented during the DTLS handshake in Jingle is defined herein. Inclusion of this information is OPTIONAL in both SIP/SDP and Jingle.</p>
<p>Note that while this specification only describes the use in the context of DTLS-SRTP, the fingerprint transported can be used in other contexts like for example establishing connections using SCTP over DTLS.</p>
<p>The SDP format (defined in &rfc4572;) is shown below.</p>
<p>Additionally, the SDP setup attribute defined in &rfc4145; must be mapped, whose usage for DTLS-SRTP is defined in <cite>RFC 5763</cite>.</p>
<code>
a=setup:role
</code>
<p>These SDP attributes can be translated into Jingle as a <fingerprint/> element qualified by the 'urn:xmpp:jingle:apps:dtls:0' namespace, as shown below.</p>
<p>Alternatively, if the receiving party wishes to expedite with ICE and DTLS negotiation without accepting the session, it MAY include the <fingerprint/> element when sending a transport-info message:</p>
<examplecaption="A transport-info containing a DTLS fingerprint"><![CDATA[
<p>If an entity supports establishing a Secure Real-time Transport Protocol security context using the Datagram Transport Layer Security protocol, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning a feature of "urn:xmpp:jingle:apps:dtls:0":</p>
<p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
<p>Security considerations for DTLS-SRTP itself are provided in <cite>RFC 5763</cite>.</p>
<p>XMPP stanzas such as Jingle messages and service discovery exchanges are not encrypted or signed. As a result, it is possible for an attacker to intercept these stanzas and modify them, thus convincing one party that the other party does not support DTLS-SRTP and therefore denying the parties an opportunity to use DTLS-SRTP.</p>