2018-07-17 20:58:18 +02:00
|
|
|
---
|
2025-08-27 08:39:05 +02:00
|
|
|
$schema: https://json-schema.org/draft/2020-12/schema
|
|
|
|
|
|
2018-07-17 20:58:18 +02:00
|
|
|
allOf:
|
|
|
|
|
- $ref: core-event-schema/event.yaml
|
|
|
|
|
|
|
|
|
|
description: |-
|
2022-10-19 00:02:27 +02:00
|
|
|
This event type is used to exchange keys for end-to-end encryption.
|
2024-11-14 12:11:34 +01:00
|
|
|
It is encrypted as an `m.room.encrypted` event using [Olm](/client-server-api/#molmv1curve25519-aes-sha2),
|
2022-10-19 00:02:27 +02:00
|
|
|
then sent as a [to-device](/client-server-api/#send-to-device-messaging) event.
|
2018-07-17 20:58:18 +02:00
|
|
|
properties:
|
|
|
|
|
content:
|
|
|
|
|
properties:
|
|
|
|
|
algorithm:
|
|
|
|
|
type: string
|
2018-07-31 18:59:09 +02:00
|
|
|
enum: ["m.megolm.v1.aes-sha2"]
|
2018-07-17 20:58:18 +02:00
|
|
|
description: |-
|
2018-07-31 18:59:09 +02:00
|
|
|
The encryption algorithm the key in this event is to be used with.
|
|
|
|
|
room_id:
|
|
|
|
|
type: string
|
|
|
|
|
description: The room where the key is used.
|
|
|
|
|
session_id:
|
|
|
|
|
type: string
|
|
|
|
|
description: The ID of the session that the key is for.
|
|
|
|
|
session_key:
|
|
|
|
|
type: string
|
|
|
|
|
description: The key to be exchanged.
|
2018-07-17 20:58:18 +02:00
|
|
|
required:
|
|
|
|
|
- algorithm
|
2018-07-31 18:59:09 +02:00
|
|
|
- room_id
|
|
|
|
|
- session_id
|
|
|
|
|
- session_key
|
2018-07-17 20:58:18 +02:00
|
|
|
type: object
|
|
|
|
|
type:
|
|
|
|
|
enum:
|
|
|
|
|
- m.room_key
|
|
|
|
|
type: string
|
|
|
|
|
type: object
|