diff --git a/xep-0384.xml b/xep-0384.xml
index 6c1f7226..430dc758 100644
--- a/xep-0384.xml
+++ b/xep-0384.xml
@@ -182,6 +182,9 @@
+ The key exchange is done just-in-time when sending the first message to a device. Thus, each key exchange message always also contains encrypted content as produced by the double ratchet algorithm below. +
NOTE: OMEMOMessage.proto, OMEMOAuthenticatedMessage.proto and OMEMOKeyExchange.proto refer to the protobuf structures as defined here.
@@ -210,6 +213,16 @@ ++ If encrypting this message required a key exchange, the X3DH key exchange header data is placed into a new OMEMOKeyExchange.proto structure together with the OMEMOAuthenticatedMessage.proto structure. +
++ To account for lost and out-of-order messages during the key exchange, OMEMOKeyExchange.proto structures are sent until a response by the recipient confirms that the key exchange was successfully completed. To do so, the X3DH key exchange header data is stored and added on each subsequent message until a response is received. This looks roughly as follows: +
+
@@ -471,23 +484,12 @@
- The SignalProtocol-library uses a trust model that doesn't work very well with
- OMEMO. For this reason it may be desirable to have the library consider all
- keys trusted, effectively disabling its trust management. This makes it
- necessary to implement trust handling oneself.
- Clients MUST NOT use a newly built session to transmit data without user intervention. If a client were to opportunistically start using sessions for sending without asking the user whether to trust a device first, an attacker could publish a fake device for this user, which would then receive copies of all messages sent by/to this user. A client MAY use such "not (yet) trusted" sessions for decryption of received messages, but in that case it SHOULD indicate the untrusted nature of such messages to the user. When prompting the user for a trust decision regarding a key, the client SHOULD present the user with a fingerprint in the form of a hex string, QR code, or other unique representation, such that it can be compared by the user. When prompting the user for a trust decision regarding a key, the client SHOULD present the user with a fingerprint in the form of a hex string, QR code, or other unique representation, such that it can be compared by the user. TODO: consistent color foo While it is RECOMMENDED that clients postpone private key deletion until after MAM catch-up and this standards mandates that clients MUST NOT use duplicate-PreKey sessions for sending, clients MAY delete such keys immediately for security reasons. For additional information on potential security impacts of this decision, refer to
- In order to be able to handle out-of-order messages, the SignalProtocol stack has to
- cache the keys belonging to "skipped" messages that have not been seen yet.
- It is up to the implementor to decide how long and how many of such keys to
- keep around.
- This document requires no interaction with the Internet Assigned Numbers Authority (IANA).