forked from xsf/xeps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxep-0320.xml
339 lines (329 loc) · 13.4 KB
/
xep-0320.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<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>
&LEGALNOTICE;
<number>0320</number>
<status>Draft</status>
<lastcall>2020-05-19</lastcall>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0166</spec>
<spec>XEP-0167</spec>
<spec>RFC 4145</spec>
<spec>RFC 4572</spec>
<spec>RFC 5763</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<!--
<schemaloc>
<url>TBD</url>
</schemaloc>
-->
<discuss>jingle</discuss>
&fippo;
<revision>
<version>1.0.0</version>
<date>2020-05-26</date>
<initials>XEP Editor (jsc)</initials>
<remark><p>Move to Draft as per Council vote from 2020-05-20.</p></remark>
</revision>
<revision>
<version>0.3.1</version>
<date>2015-10-15</date>
<initials>ph</initials>
<remark>
<ul>
<li>Noted that whitespace is not significant in examples.</li>
</ul>
</remark>
</revision>
<revision>
<version>0.3</version>
<date>2015-09-28</date>
<initials>ph</initials>
<remark>
<ul>
<li>Clarified that holdconn setup role is not mapped.</li>
</ul>
</remark>
</revision>
<revision>
<version>0.2</version>
<date>2013-10-22</date>
<initials>ph</initials>
<remark>
<ul>
<li>Changed namespace to urn:xmpp:jingle:apps:dtls:0.</li>
<li>Removed "required" attribute based on implementation feedback.</li>
<li>Added setup attribute to map SDP setup attribute.</li>
</ul>
</remark>
</revision>
<revision>
<version>0.1</version>
<date>2013-04-16</date>
<initials>psa</initials>
<remark><p>Initial published version approved by the XMPP Council.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2013-02-18</date>
<initials>ph</initials>
<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>
<section1 topic='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 as described in &xep0343;.</p>
<p>The SDP format (defined in &rfc4572;) is shown below.</p>
<code>
a=fingerprint:hash-func fingerprint
</code>
<p>An example follows.</p>
<code>
a=fingerprint:sha-256 02:1A:CC:54:27:AB:EB:9C:53:3F:3E:4B:65:2E:7D:46:3F:54:42:CD:54:F1:7A:03:A2:7D:F9:B0:7F:46:19:B2
</code>
<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>Note that no mapping for the 'holdconn' role is defined herein.</p>
<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>
<code><![CDATA[
<fingerprint xmlns='urn:xmpp:jingle:apps:dtls:0' hash='hash-func' setup='role'>
fingerprint
</fingerprint>
]]></code>
<p>An example follows. Note that the whitespace would not appear in actual XML content.</p>
<code><![CDATA[
<fingerprint xmlns='urn:xmpp:jingle:apps:dtls:0' hash='sha-256' setup='actpass'>
02:1A:CC:54:27:AB:EB:9C:53:3F:3E:4B:65:2E:7D:46:3F:54:42:CD:54:F1:7A:03:A2:7D:F9:B0:7F:46:19:B2
</fingerprint>
]]></code>
<p>If the Jingle initiator wishes to use DTLS-SRTP, it includes the <fingerprint/> element in its session invitation.</p>
<example caption="Initiator sends session invitation with DTLS fingerprint"><![CDATA[
<iq from='[email protected]/orchard'
id='uz61v4m4'
to='[email protected]/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:1'
action='session-initiate'
initiator='[email protected]/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
<payload-type id='96' name='speex' clockrate='16000'/>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
<payload-type id='103' name='L16' clockrate='16000' channels='2'/>
<payload-type id='98' name='x-ISAC' clockrate='8000'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
pwd='asd88fgpdd777uzjYhagZg'
ufrag='8hhy'>
<fingerprint xmlns='urn:xmpp:jingle:apps:dtls:0' hash='sha-256' setup='actpass'>
02:1A:CC:54:27:AB:EB:9C:53:3F:3E:4B:65:2E:7D:46:3F:54:42:CD:54:F1:7A:03:A2:7D:F9:B0:7F:46:19:B2
</fingerprint>
<candidate component='1'
foundation='1'
generation='0'
id='el0747fg11'
ip='10.0.1.1'
network='1'
port='8998'
priority='2130706431'
protocol='udp'
type='host'/>
<candidate component='1'
foundation='2'
generation='0'
id='y3s2b30v3r'
ip='192.0.2.3'
network='1'
port='45664'
priority='1694498815'
protocol='udp'
rel-addr='10.0.1.1'
rel-port='8998'
type='srflx'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>If the receiving party wishes to use DTLS, it also includes the <fingerprint/> element in its session-accept message.</p>
<example caption="Responder sends session-accept"><![CDATA[
<iq from='[email protected]/balcony'
id='pn2va48j'
to='[email protected]/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:1'
action='session-accept'
initiator='[email protected]/orchard'
responder='[email protected]/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
pwd='YH75Fviy6338Vbrhrlp8Yh'
ufrag='9uB6'>
<fingerprint xmlns='urn:xmpp:jingle:apps:dtls:0' hash='sha-256' setup='active'>
BD:E8:2C:D3:BD:B6:98:50:45:7D:5B:36:89:53:31:15:52:25:88:82:06:95:88:A3:3D:A5:43:8D:5C:21:21:66
</fingerprint>
<candidate component='1'
foundation='1'
generation='0'
id='or2ii2syr1'
ip='192.0.2.1'
network='0'
port='3478'
priority='2130706431'
protocol='udp'
type='host'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<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>
<example caption="A transport-info containing a DTLS fingerprint"><![CDATA[
<iq from='[email protected]/balcony'
id='pn2va48j'
to='[email protected]/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-info'
initiator='[email protected]/orchard'
responder='[email protected]/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
pwd='YH75Fviy6338Vbrhrlp8Yh'
ufrag='9uB6'>
<fingerprint xmlns='urn:xmpp:jingle:apps:dtls:0' hash='sha-256' setup='active'>
BD:E8:2C:D3:BD:B6:98:50:45:7D:5B:36:89:53:31:15:52:25:88:82:06:95:88:A3:3D:A5:43:8D:5C:21:21:66
</fingerprint>
<candidate component='1'
foundation='1'
generation='0'
id='or2ii2syr1'
ip='192.0.2.1'
network='0'
port='3478'
priority='2130706431'
protocol='udp'
type='host'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
</section1>
<section1 topic='Determining Support' anchor='disco'>
<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>
<example caption='A disco#info query'><![CDATA[
<iq type='get'
from='[email protected]/lab'
to='[email protected]/home'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='A disco#info response'><![CDATA[
<iq type='result'
from='[email protected]/home'
to='[email protected]/lab'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:jingle:1'/>
<feature var='urn:xmpp:jingle:apps:dtls:0'/>
</query>
</iq>
]]></example>
<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>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<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>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='Acknowledgements' anchor='acks'>
<p>Thanks to Justin Uberti, Peter Saint-Andre and Lance Stout.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>This specification defines the following XML namespace:</p>
<ul>
<li>urn:xmpp:jingle:apps:dtls:0</li>
</ul>
<p>The ®ISTRAR; includes the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
</section2>
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
&NSVER;
</section2>
</section1>
<section1 topic='XML Schemas' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:jingle:apps:dtls:0'
xmlns='urn:xmpp:jingle:apps:dtls:0'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-xxxx: http://www.xmpp.org/extensions/xep-xxxx.html
</xs:documentation>
</xs:annotation>
<xs:element name='fingerprint'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='hash' type='xs:string' use='required'/>
<xs:attribute name='setup' use='required'/>
<xs:simpleType>
<xs:restriction base='xs:NCName'>
<xs:enumeration value='active'/>
<xs:enumeration value='passive'/>
<xs:enumeration value='actpass'/>
<xs:enumeration value='holdconn'/>
<xs:annotation>
<xs:documentation>
the 'holdconn' value is not used and included only for completeness.
</xs:documentation>
</xs:annotation>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
]]></code>
</section1>
</xep>