1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-22 07:38: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'>
<p>
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
AES-128 in Galois/Counter Mode (GCM).
encrypted. The client MUST use fresh, randomly generated key with
AES-256..
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,
i.e. both own devices as well as devices associated with the contact, the
@ -295,12 +295,16 @@
</p>
<example caption="Sending a message"><![CDATA[
<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'>
<key rid='31415'>BASE64ENCODED...</key>
<key prekey="true" rid='12321'>BASE64ENCODED...</key>
<!-- ... -->
<iv>BASE64ENCODED...</iv>
<keys jid='juliet@capulet.lit'>
<key rid='31415'>BASE64ENCODED...</key>
</keys>
<keys jid='remeo@montague.lit'>
<key rid='1337'>BASE64ENCODED...</key>
<key prekey="true" rid='12321'>BASE64ENCODED...</key>
<!-- ... -->
</keys>
</header>
<payload>BASE64ENCODED</payload>
</encrypted>
@ -310,8 +314,8 @@
<section2 topic='Sending a key' anchor='usecases-keysend'>
<p>
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
key/IV pair. The 16 bytes key and the GCM authentication tag (The tag
has to be generated. The client MUST generate a fresh, randomly generated key.
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, i.e. both own devices as well as devices associated
with the contact, this key is encrypted using the corresponding
@ -322,12 +326,13 @@
&lt;payload&gt; as follows:
</p>
<example caption="Sending a key"><![CDATA[
<encrypted xmlns='eu.siacs.conversations.axolotl'>
<encrypted xmlns='urn:xmpp:omemo:1'>
<header sid='27183'>
<key rid='31415'>BASE64ENCODED...</key>
<key prekey="true" rid='12321'>BASE64ENCODED...</key>
<!-- ... -->
<iv>BASE64ENCODED...</iv>
<keys jid='remeo@montague.lit'>
<key rid='31415'>BASE64ENCODED...</key>
<key prekey="true" rid='12321'>BASE64ENCODED...</key>
<!-- ... -->
</keys>
</header>
</encrypted>]]></example>
<p>This KeyTransportElement can then be sent over any applicable transport mechanism.</p>