mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-19 01:44:09 +01:00
Update e2e spec: Group ciphertext by device key rather than device id, add return to docs for /keys/upload, Use "m.room.encrypted" for now, rather than trying to add an encrypted content to arbitrary event types
This commit is contained in:
parent
42ad1f8612
commit
6f69707c71
|
|
@ -94,6 +94,17 @@ The JSON object is signed using the process given by `Signing JSON`_.
|
||||||
"<algorithm>:<key_id>": "<key_base64>"
|
"<algorithm>:<key_id>": "<key_base64>"
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
.. code:: http
|
||||||
|
|
||||||
|
200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"one_time_key_counts": {
|
||||||
|
"<algorithm>": 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Downloading Keys
|
Downloading Keys
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
@ -209,10 +220,10 @@ Encrypted messages are sent in the form.
|
||||||
.. code:: json
|
.. code:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "m.room.message"
|
"type": "m.room.encrypted"
|
||||||
"content": {}
|
"content": {
|
||||||
"encrypted": {
|
|
||||||
"algorithm": "<algorithm_name>"
|
"algorithm": "<algorithm_name>"
|
||||||
|
}
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -220,13 +231,18 @@ Encrypted messages are sent in the form.
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "m.room.message"
|
"type": "m.room.message"
|
||||||
"content": {}
|
"content": {
|
||||||
"encrypted": {
|
|
||||||
"algorithm": "m.olm.v1.curve25519-aes-sha2",
|
"algorithm": "m.olm.v1.curve25519-aes-sha2",
|
||||||
|
"sender_key": <sender_curve25519_key>,
|
||||||
"ciphertexts": {
|
"ciphertexts": {
|
||||||
"<user_id>" {
|
"<device_curve25519_key>: {
|
||||||
"<device_id">: {
|
"type": 0,
|
||||||
"type": 0,
|
"body": "<base_64>"
|
||||||
"body": "<base_64>"
|
} } } }
|
||||||
} } } } }
|
|
||||||
|
|
||||||
|
|
||||||
|
The plaintext payload is of the form:
|
||||||
|
|
||||||
|
.. code:: json
|
||||||
|
|
||||||
|
TODO: SPEC the JSON plaintext format
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue