mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
XEP-0448: Encryption for stateless file sharing v0.2.0
- Replace the ProtoXEP reference with a reference to the published XEP. - Add urn:xmpp:ciphers:aes-256-cbc-pkcs7:0 (same as used in XEP-0384).
This commit is contained in:
parent
7c46fc60c0
commit
7962924afa
35
xep-0448.xml
35
xep-0448.xml
@ -1,9 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<!--
|
|
||||||
Note to editor: Remove xep-sfs entity declared below and change all references from &xep-sfs; to respective &xepXXXX; to refeence sfs when moving to experimental.
|
|
||||||
-->
|
|
||||||
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
||||||
<!ENTITY xep-sfs "<span class='ref'><link url='./sfs.html'>Stateless file sharing (XEP-xxxx)</link></span> <note>XEP-xxxx: Stateless file sharing <<link url='./sfs.html'>https://xmpp.org/extensions/inbox/sfs.html</link>>.</note>" >
|
|
||||||
<!ENTITY % ents SYSTEM 'xep.ent'>
|
<!ENTITY % ents SYSTEM 'xep.ent'>
|
||||||
%ents;
|
%ents;
|
||||||
]>
|
]>
|
||||||
@ -11,7 +7,7 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
<xep>
|
<xep>
|
||||||
<header>
|
<header>
|
||||||
<title>Encryption for stateless file sharing</title>
|
<title>Encryption for stateless file sharing</title>
|
||||||
<abstract>This specification provides a protocol for sharing encrypted files using the stateless file sharing protocol (XEP-xxxx).</abstract>
|
<abstract>This specification provides a protocol for sharing encrypted files using the stateless file sharing protocol (XEP-0447).</abstract>
|
||||||
&LEGALNOTICE;
|
&LEGALNOTICE;
|
||||||
<number>0448</number>
|
<number>0448</number>
|
||||||
<status>Experimental</status>
|
<status>Experimental</status>
|
||||||
@ -21,12 +17,21 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<spec>XMPP Core</spec>
|
<spec>XMPP Core</spec>
|
||||||
<spec>XEP-0001</spec>
|
<spec>XEP-0001</spec>
|
||||||
<spec>XEP-xxxx</spec>
|
<spec>XEP-0447</spec>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<supersedes/>
|
<supersedes/>
|
||||||
<supersededby/>
|
<supersededby/>
|
||||||
<shortname>esfs</shortname>
|
<shortname>esfs</shortname>
|
||||||
&larma;
|
&larma;
|
||||||
|
<revision>
|
||||||
|
<version>0.2.0</version>
|
||||||
|
<date>2022-07-17</date>
|
||||||
|
<initials>lmw</initials>
|
||||||
|
<remark><ul>
|
||||||
|
<li>Replace the ProtoXEP reference with a reference to the published XEP.</li>
|
||||||
|
<li>Add urn:xmpp:ciphers:aes-256-cbc-pkcs7:0 (same as used in XEP-0384).</li>
|
||||||
|
</ul></remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
<date>2020-11-24</date>
|
<date>2020-11-24</date>
|
||||||
@ -47,10 +52,10 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
&xep0343; and &xep0391; specify protocols for establishing an encrypted transport using Jingle to share files using &xep0234;.
|
&xep0343; and &xep0391; specify protocols for establishing an encrypted transport using Jingle to share files using &xep0234;.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
&xep-sfs; describes a protocol that can be used to share files, previously uploaded using &xep0363;, but lacks means of encrypting files.
|
&xep0447; describes a protocol that can be used to share files, previously uploaded using &xep0363;, but lacks means of encrypting files.
|
||||||
This leaves files uploaded using &xep0363; without any standardized means of encrypting them.
|
This leaves files uploaded using &xep0363; without any standardized means of encrypting them.
|
||||||
</p>
|
</p>
|
||||||
<p>This XEP describes a protocol building on top of &xep-sfs; to allow encrypting files.</p>
|
<p>This XEP describes a protocol building on top of &xep0447; to allow encrypting files.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Requirements' anchor='reqs'>
|
<section1 topic='Requirements' anchor='reqs'>
|
||||||
<ul>
|
<ul>
|
||||||
@ -71,11 +76,11 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
Before sharing the file, the sending entity MUST create random symmetric private key and initialization vector (IV) as required by the selected encryption cipher (see <link url='#ciphers'>Ciphers</link>). The file is then encrypted using selected encryption cipher and the generated key and IV. After this it can be uploaded using &xep0363; or prepared for any other means of file sharing.
|
Before sharing the file, the sending entity MUST create random symmetric private key and initialization vector (IV) as required by the selected encryption cipher (see <link url='#ciphers'>Ciphers</link>). The file is then encrypted using selected encryption cipher and the generated key and IV. After this it can be uploaded using &xep0363; or prepared for any other means of file sharing.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The file is then shared using the protocol described in &xep-sfs;.
|
The file is then shared using the protocol described in &xep0447;.
|
||||||
The <tt><file/></tt> metadata element still refers to the original file, i.e. it describes the original file name, size and hashes. The <tt><size/></tt> element and one or multiple <tt><hash/></tt> elements are REQUIRED when sending encrypted files.
|
The <tt><file/></tt> metadata element still refers to the original file, i.e. it describes the original file name, size and hashes. The <tt><size/></tt> element and one or multiple <tt><hash/></tt> elements are REQUIRED when sending encrypted files.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
For the encrypted file, a source is added as an <tt><encrypted/></tt> element to the <tt><sources/></tt>. It carries an attribute <tt>cipher</tt> with the namespace of the encryption cipher being used. The <tt><encrypted/></tt> element contains a <tt><key/></tt> and an <tt><iv/></tt> element, containing both values as Base64-encoded strings. The <tt><encrypted/></tt> element MAY also include <tt><hash/></tt> elements as described in &xep0300;, referring to the hash of the encrypted file. At last, the <tt><encrypted/></tt> element also includes another <tt><sources/></tt> element as described in &xep-sfs;, specifying sources to obtain the encrypted file.
|
For the encrypted file, a source is added as an <tt><encrypted/></tt> element to the <tt><sources/></tt>. It carries an attribute <tt>cipher</tt> with the namespace of the encryption cipher being used. The <tt><encrypted/></tt> element contains a <tt><key/></tt> and an <tt><iv/></tt> element, containing both values as Base64-encoded strings. The <tt><encrypted/></tt> element MAY also include <tt><hash/></tt> elements as described in &xep0300;, referring to the hash of the encrypted file. At last, the <tt><encrypted/></tt> element also includes another <tt><sources/></tt> element as described in &xep0447;, specifying sources to obtain the encrypted file.
|
||||||
The outer <tt><sources/></tt> may contain additional sources that directly allow for end-to-end encrypted file transfers, for example &xep0234; using &xep0391;.
|
The outer <tt><sources/></tt> may contain additional sources that directly allow for end-to-end encrypted file transfers, for example &xep0234; using &xep0391;.
|
||||||
</p>
|
</p>
|
||||||
<example caption='Sharing summit.jpg with juliet@shakespeare.lit using encryption'><![CDATA[
|
<example caption='Sharing summit.jpg with juliet@shakespeare.lit using encryption'><![CDATA[
|
||||||
@ -110,7 +115,7 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
]]></example>
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Receiving a file' anchor='file-receive'>
|
<section2 topic='Receiving a file' anchor='file-receive'>
|
||||||
<p>On receive of a message including a <tt><file-sharing/></tt> element, that has an <tt><encrypted/></tt> element in its sources, normal processing as described in &xep-sfs; applies.</p>
|
<p>On receive of a message including a <tt><file-sharing/></tt> element, that has an <tt><encrypted/></tt> element in its sources, normal processing as described in &xep0447; applies.</p>
|
||||||
<p>
|
<p>
|
||||||
When the receiving entity tries to obtain the file from the source described by the <tt><encrypted/></tt> element, it will try to obtain any of its inner sources instead.
|
When the receiving entity tries to obtain the file from the source described by the <tt><encrypted/></tt> element, it will try to obtain any of its inner sources instead.
|
||||||
On success, it decrypts the obtained file using the encryption cipher, private key and IV provided.
|
On success, it decrypts the obtained file using the encryption cipher, private key and IV provided.
|
||||||
@ -119,7 +124,7 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Attaching a source' anchor='attach-source'>
|
<section2 topic='Attaching a source' anchor='attach-source'>
|
||||||
<p>
|
<p>
|
||||||
The protocol to attach a source described in &xep-sfs; can also be used to attach encrypted sources.
|
The protocol to attach a source described in &xep0447; can also be used to attach encrypted sources.
|
||||||
After receiving a file using encrypted means, it is RECOMMENDED to only attach additional sources that support encryption.
|
After receiving a file using encrypted means, it is RECOMMENDED to only attach additional sources that support encryption.
|
||||||
</p>
|
</p>
|
||||||
</section2>
|
</section2>
|
||||||
@ -146,6 +151,12 @@ Note to editor: Remove xep-sfs entity declared below and change all references f
|
|||||||
<td>Key: 256, IV: 96</td>
|
<td>Key: 256, IV: 96</td>
|
||||||
<td>GCM/NoPadding</td>
|
<td>GCM/NoPadding</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>urn:xmpp:ciphers:aes-256-cbc-pkcs7:0</td>
|
||||||
|
<td>AES</td>
|
||||||
|
<td>Key: 256, IV: 128</td>
|
||||||
|
<td>CBC/PKCS#7</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>For compatibility reasons, it is RECOMMENDED to append the GCM authentication tag to the uploaded file when using any AES cipher with GCM. The GCM authentication tag is not needed when using the protocol described in this document as a hash of the resulting file is transported independently.</p>
|
<p>For compatibility reasons, it is RECOMMENDED to append the GCM authentication tag to the uploaded file when using any AES cipher with GCM. The GCM authentication tag is not needed when using the protocol described in this document as a hash of the resulting file is transported independently.</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
Loading…
Reference in New Issue
Block a user