No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0320.xml 13KB

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