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-0262.xml 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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 ZRTP in Jingle RTP Sessions</title>
  10. <abstract>This specification defines how to use ZRTP (RFC 6189) 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>0262</number>
  13. <status>Draft</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 6189</spec>
  22. </dependencies>
  23. <supersedes/>
  24. <supersededby/>
  25. <shortname>jingle-zrtp</shortname>
  26. <schemaloc>
  27. <url>http://xmpp.org/schemas/jingle-apps-rtp-zrtp.xsd</url>
  28. </schemaloc>
  29. <discuss>jingle</discuss>
  30. &stpeter;
  31. <revision>
  32. <version>1.0</version>
  33. <date>2011-06-15</date>
  34. <initials>psa</initials>
  35. <remark><p>Per a vote of the XMPP Council, advanced specification to Draft.</p></remark>
  36. </revision>
  37. <revision>
  38. <version>0.3</version>
  39. <date>2011-04-12</date>
  40. <initials>psa</initials>
  41. <remark><p>Updated reference to reflect publication of RFC 6189; clarified that inclusion of the hash is optional.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.2</version>
  45. <date>2010-08-09</date>
  46. <initials>psa</initials>
  47. <remark><p>In harmony with the ZRTP spec, moved communication of &lt;zrtp-hash/&gt; element from Jingle session-info message to jingle-invite, specifically as a child of the &lt;encryption/&gt; element from XEP-0167; increased protocol version from zero to one.</p></remark>
  48. </revision>
  49. <revision>
  50. <version>0.1</version>
  51. <date>2009-02-25</date>
  52. <initials>psa</initials>
  53. <remark><p>Initial published version.</p></remark>
  54. </revision>
  55. <revision>
  56. <version>0.0.2</version>
  57. <date>2009-02-24</date>
  58. <initials>psa</initials>
  59. <remark><p>Defined dedicated namespace for the zrtp-hash element to improve service discovery and handling of session-info message; clarified protocol flow and security considerations.</p></remark>
  60. </revision>
  61. <revision>
  62. <version>0.0.1</version>
  63. <date>2009-02-17</date>
  64. <initials>psa</initials>
  65. <remark><p>First draft, copied from XEP-0167.</p></remark>
  66. </revision>
  67. </header>
  68. <section1 topic='Protocol' anchor='protocol'>
  69. <p>&xep0167; recommends the use of the Secure Real-time Transport Protocol (SRTP) for end-to-end encryption of RTP sessions negotiated using &xep0166;. An alternative approach to end-to-end encryption of RTP traffic is provided by &rfc6189;, developed by Phil Zimmermann, the inventor of "Pretty Good Privacy" (PGP). Although negotiation of ZRTP mainly occurs in the media channel rather than the signalling channel, the ZRTP specification defines one SDP attribute called "zrtp-hash" (this communicates the ZRTP version supported as well as a hash of the Hello message). Inclusion of this information is OPTIONAL in both SIP/SDP and Jingle.</p>
  70. <p>The SDP format is shown below.</p>
  71. <code>
  72. a=zrtp-hash:zrtp-version zrtp-hash-value
  73. </code>
  74. <p>An example follows.</p>
  75. <code>
  76. a=zrtp-hash:1.10 fe30efd02423cb054e50efd0248742ac7a52c8f91bc2df881ae642c371ba46df
  77. </code>
  78. <p>This SDP attribute can be translated into Jingle as a &lt;zrtp-hash/&gt; element qualified by the 'urn:xmpp:jingle:apps:rtp:zrtp:1' namespace, as shown below.</p>
  79. <code><![CDATA[
  80. <zrtp-hash version='zrtp-version' xmlns='urn:xmpp:jingle:apps:rtp:zrtp:1'>zrtp-hash-value</zrtp-hash>
  81. ]]></code>
  82. <p>An example follows.</p>
  83. <code><![CDATA[
  84. <zrtp-hash version='1.10' xmlns='urn:xmpp:jingle:apps:rtp:zrtp:1'>
  85. fe30efd02423cb054e50efd0248742ac7a52c8f91bc2df881ae642c371ba46df
  86. </zrtp-hash>
  87. ]]></code>
  88. <p>The &lt;zrtp-hash/&gt; element is sent as a child of the &lt;encryption/&gt; element defined in &xep0167;.</p>
  89. <p>If the Jingle initiator wishes to use ZRTP, it includes the &lt;zrtp-hash/&gt; element in its session invitation (where it hashes over its own Hello message as described in the ZRTP specification).</p>
  90. <example caption="Initiator sends session invitation with zrtp-hash"><![CDATA[
  91. <iq from='romeo@montague.lit/orchard'
  92. id='uz61v4m4'
  93. to='juliet@capulet.lit/balcony'
  94. type='set'>
  95. <jingle xmlns='urn:xmpp:jingle:1'
  96. action='session-initiate'
  97. initiator='romeo@montague.lit/orchard'
  98. sid='a73sjjvkla37jfea'>
  99. <content creator='initiator' name='voice'>
  100. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  101. <payload-type id='96' name='speex' clockrate='16000'/>
  102. <payload-type id='97' name='speex' clockrate='8000'/>
  103. <payload-type id='18' name='G729'/>
  104. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  105. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  106. <encryption required='true'>
  107. <zrtp-hash xmlns='urn:xmpp:jingle:apps:rtp:zrtp:1' version='1.10'>
  108. fe30efd02423cb054e50efd0248742ac7a52c8f91bc2df881ae642c371ba46df
  109. </zrtp-hash>
  110. </encryption>
  111. </description>
  112. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  113. pwd='asd88fgpdd777uzjYhagZg'
  114. ufrag='8hhy'>
  115. <candidate component='1'
  116. foundation='1'
  117. generation='0'
  118. id='el0747fg11'
  119. ip='10.0.1.1'
  120. network='1'
  121. port='8998'
  122. priority='2130706431'
  123. protocol='udp'
  124. type='host'/>
  125. <candidate component='1'
  126. foundation='2'
  127. generation='0'
  128. id='y3s2b30v3r'
  129. ip='192.0.2.3'
  130. network='1'
  131. port='45664'
  132. priority='1694498815'
  133. protocol='udp'
  134. rel-addr='10.0.1.1'
  135. rel-port='8998'
  136. type='srflx'/>
  137. </transport>
  138. </content>
  139. </jingle>
  140. </iq>
  141. ]]></example>
  142. <p>If the receiving party wishes to proceed with ZRTP negotiation, it also includes the &lt;zrtp-hash/&gt; element in its session-accept message (where it hashes over its own Hello message as described in the ZRTP specification).</p>
  143. <example caption="Responder sends session-accept"><![CDATA[
  144. <iq from='juliet@capulet.lit/balcony'
  145. id='pn2va48j'
  146. to='romeo@montague.lit/orchard'
  147. type='set'>
  148. <jingle xmlns='urn:xmpp:jingle:1'
  149. action='session-accept'
  150. initiator='romeo@montague.lit/orchard'
  151. responder='juliet@capulet.lit/balcony'
  152. sid='a73sjjvkla37jfea'>
  153. <content creator='initiator' name='voice'>
  154. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  155. <payload-type id='97' name='speex' clockrate='8000'/>
  156. <payload-type id='18' name='G729'/>
  157. <encryption>
  158. <zrtp-hash xmlns='urn:xmpp:jingle:apps:rtp:zrtp:1' version='1.10'>
  159. badfbe66ff87fe135750377509b09b0babd1c3ec25fa4314565e2bf7ccc30299
  160. </zrtp-hash>
  161. </encryption>
  162. </description>
  163. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  164. pwd='YH75Fviy6338Vbrhrlp8Yh'
  165. ufrag='9uB6'>
  166. <candidate component='1'
  167. foundation='1'
  168. generation='0'
  169. id='or2ii2syr1'
  170. ip='192.0.2.1'
  171. network='0'
  172. port='3478'
  173. priority='2130706431'
  174. protocol='udp'
  175. type='host'/>
  176. </transport>
  177. </content>
  178. </jingle>
  179. </iq>
  180. ]]></example>
  181. <p>Note that a unique zrtp-hash is needed for each media stream, since the hash for each stream is computed from a different ZRTP Hello message (e.g., if a session includes both audio and video then the value of the &lt;zrtp-hash/&gt; element included in the &lt;description/&gt; element for the audio stream will be different from the value for the video stream).</p>
  182. </section1>
  183. <section1 topic='Determining Support' anchor='disco'>
  184. <p>If an entity supports the use of ZRTP in Jingle as described in this document, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning a feature of "urn:xmpp:jingle:apps:rtp:zrtp:1":</p>
  185. <example caption='A disco#info query'><![CDATA[
  186. <iq type='get'
  187. from='calvin@usrobots.lit/lab'
  188. to='herbie@usrobots.lit/home'
  189. id='disco1'>
  190. <query xmlns='http://jabber.org/protocol/disco#info'/>
  191. </iq>
  192. ]]></example>
  193. <example caption='A disco#info response'><![CDATA[
  194. <iq type='result'
  195. from='herbie@usrobots.lit/home'
  196. to='calvin@usrobots.lit/lab'
  197. id='disco1'>
  198. <query xmlns='http://jabber.org/protocol/disco#info'>
  199. <feature var='urn:xmpp:jingle:1'/>
  200. <feature var='urn:xmpp:jingle:apps:rtp:zrtp:1'/>
  201. </query>
  202. </iq>
  203. ]]></example>
  204. <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>
  205. </section1>
  206. <section1 topic='Security Considerations' anchor='security'>
  207. <p>Security considerations for ZRTP itself are provided in <cite>RFC 6189</cite>.</p>
  208. <p>XMPP stanzas such as Jingle invite 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 ZRTP and therefore denying the parties an opportunity to use ZRTP. However, because the zrtp-hash is mostly advisory, the parties could still use ZRTP even if the signalling channel is compromised.</p>
  209. </section1>
  210. <section1 topic='IANA Considerations' anchor='iana'>
  211. <p>This document requires no interaction with &IANA;.</p>
  212. </section1>
  213. <section1 topic='Acknowledgements' anchor='acks'>
  214. <p>Thanks to Werner Dittmann and Emil Ivov for their implementation feedback.</p>
  215. </section1>
  216. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  217. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  218. <p>This specification defines the following XML namespace:</p>
  219. <ul>
  220. <li>urn:xmpp:jingle:apps:rtp:zrtp:1</li>
  221. </ul>
  222. <p>The &REGISTRAR; includes the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  223. </section2>
  224. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  225. &NSVER;
  226. </section2>
  227. </section1>
  228. <section1 topic='XML Schemas' anchor='schema'>
  229. <code><![CDATA[
  230. <?xml version='1.0' encoding='UTF-8'?>
  231. <xs:schema
  232. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  233. targetNamespace='urn:xmpp:jingle:apps:rtp:zrtp:1'
  234. xmlns='urn:xmpp:jingle:apps:rtp:zrtp:1'
  235. elementFormDefault='qualified'>
  236. <xs:annotation>
  237. <xs:documentation>
  238. The protocol documented by this schema is defined in
  239. XEP-0262: http://www.xmpp.org/extensions/xep-0262.html
  240. </xs:documentation>
  241. </xs:annotation>
  242. <xs:element name='zrtp-hash'>
  243. <xs:complexType>
  244. <xs:simpleContent>
  245. <xs:extension base='xs:string'>
  246. <xs:attribute name='version' type='xs:string' use='required'/>
  247. </xs:extension>
  248. </xs:simpleContent>
  249. </xs:complexType>
  250. </xs:element>
  251. </xs:schema>
  252. ]]></code>
  253. </section1>
  254. </xep>