Add description of the olm type and body JSON keys
This commit is contained in:
parent
c83e8480e8
commit
e1f201f9e6
1 changed files with 15 additions and 0 deletions
|
@ -256,6 +256,21 @@ Using Olm
|
|||
"body": "<base_64>"
|
||||
} } } }
|
||||
|
||||
The ciphertext is a mapping from device curve25519 key to an encypted payload
|
||||
for that device. The ``body`` is a base64 encoded message body. The type is an
|
||||
integer indicating the type of the message body: 0 for the intial pre-key
|
||||
message, 1 for ordinary messages.
|
||||
|
||||
Olm sessions will generate messages with a type of 0 until they receive a
|
||||
message. Once a session has decrypted a message it will produce messages with
|
||||
a type of 1.
|
||||
|
||||
When a client receives a message with a type of 0 it must first check if it
|
||||
already has a matching session. If it does then it will use that session to
|
||||
try to decrypt the message. If there is no existing session then the client
|
||||
must create a new session and use the new session to decrypt the message. A
|
||||
client must not persist a session or remove one-time keys used by a session
|
||||
until it has sucessfully decrypted a message using that session.
|
||||
|
||||
The plaintext payload is of the form:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue