1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-22 15:48:52 -05:00

XEP-0384: wrap key elements in keys with jid attribute

This commit is contained in:
Daniel Gultsch 2020-03-08 11:08:20 +01:00
parent 5ffb1279ad
commit efd28fd648
2 changed files with 396 additions and 14 deletions

377
xep-0384.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -281,8 +281,8 @@
<section2 topic='Sending a message' anchor='usecases-messagesend'> <section2 topic='Sending a message' anchor='usecases-messagesend'>
<p> <p>
In order to send a chat message, its &lt;body&gt; first has to be In order to send a chat message, its &lt;body&gt; first has to be
encrypted. The client MUST use fresh, randomly generated key/IV pairs with encrypted. The client MUST use fresh, randomly generated key with
AES-128 in Galois/Counter Mode (GCM). AES-256..
The 16 bytes key and the GCM authentication tag (The tag SHOULD have at least The 16 bytes key and the GCM authentication tag (The tag SHOULD have at least
128 bit) are concatenated and for each intended recipient device, 128 bit) are concatenated and for each intended recipient device,
i.e. both own devices as well as devices associated with the contact, the i.e. both own devices as well as devices associated with the contact, the
@ -295,12 +295,16 @@
</p> </p>
<example caption="Sending a message"><![CDATA[ <example caption="Sending a message"><![CDATA[
<message to='juliet@capulet.lit' from='romeo@montague.lit' id='send1'> <message to='juliet@capulet.lit' from='romeo@montague.lit' id='send1'>
<encrypted xmlns='eu.siacs.conversations.axolotl'> <encrypted xmlns='urn:xmpp:omemo:1'>
<header sid='27183'> <header sid='27183'>
<keys jid='juliet@capulet.lit'>
<key rid='31415'>BASE64ENCODED...</key> <key rid='31415'>BASE64ENCODED...</key>
</keys>
<keys jid='remeo@montague.lit'>
<key rid='1337'>BASE64ENCODED...</key>
<key prekey="true" rid='12321'>BASE64ENCODED...</key> <key prekey="true" rid='12321'>BASE64ENCODED...</key>
<!-- ... --> <!-- ... -->
<iv>BASE64ENCODED...</iv> </keys>
</header> </header>
<payload>BASE64ENCODED</payload> <payload>BASE64ENCODED</payload>
</encrypted> </encrypted>
@ -310,8 +314,8 @@
<section2 topic='Sending a key' anchor='usecases-keysend'> <section2 topic='Sending a key' anchor='usecases-keysend'>
<p> <p>
The client may wish to transmit keying material to the contact. This first The client may wish to transmit keying material to the contact. This first
has to be generated. The client MUST generate a fresh, randomly generated has to be generated. The client MUST generate a fresh, randomly generated key.
key/IV pair. The 16 bytes key and the GCM authentication tag (The tag The 16 bytes key and the GCM authentication tag (The tag
SHOULD have at least 128 bit) are concatenated and for each intended SHOULD have at least 128 bit) are concatenated and for each intended
recipient device, i.e. both own devices as well as devices associated recipient device, i.e. both own devices as well as devices associated
with the contact, this key is encrypted using the corresponding with the contact, this key is encrypted using the corresponding
@ -322,12 +326,13 @@
&lt;payload&gt; as follows: &lt;payload&gt; as follows:
</p> </p>
<example caption="Sending a key"><![CDATA[ <example caption="Sending a key"><![CDATA[
<encrypted xmlns='eu.siacs.conversations.axolotl'> <encrypted xmlns='urn:xmpp:omemo:1'>
<header sid='27183'> <header sid='27183'>
<keys jid='remeo@montague.lit'>
<key rid='31415'>BASE64ENCODED...</key> <key rid='31415'>BASE64ENCODED...</key>
<key prekey="true" rid='12321'>BASE64ENCODED...</key> <key prekey="true" rid='12321'>BASE64ENCODED...</key>
<!-- ... --> <!-- ... -->
<iv>BASE64ENCODED...</iv> </keys>
</header> </header>
</encrypted>]]></example> </encrypted>]]></example>
<p>This KeyTransportElement can then be sent over any applicable transport mechanism.</p> <p>This KeyTransportElement can then be sent over any applicable transport mechanism.</p>