mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 19:44:09 +01:00
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
---
|
|
allOf:
|
|
- $ref: core-event-schema/event.yaml
|
|
|
|
description: |-
|
|
This event type is used to exchange keys for end-to-end encryption.
|
|
It is encrypted as an `m.room.encrypted` event using [Olm](#molmv1curve25519-aes-sha2),
|
|
then sent as a [to-device](/client-server-api/#send-to-device-messaging) event.
|
|
properties:
|
|
content:
|
|
properties:
|
|
algorithm:
|
|
type: string
|
|
enum: ["m.megolm.v1.aes-sha2"]
|
|
description: |-
|
|
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.
|
|
shared_history:
|
|
type: boolean
|
|
description: |-
|
|
Whether the key may be forwarded to users who join the room after the
|
|
messages encrypted with this key have been sent. Defaults to
|
|
`false`.
|
|
|
|
This can be set to `true` if the history visibility settings of the
|
|
room allow users to read events in the room from before they have
|
|
joined, that is, if the `m.room.history_visibility` state event is
|
|
`"world_readable"` or `"shared"`. For more information, see [Key
|
|
requests and forwarding](#key-requests-and-forwarding).
|
|
required:
|
|
- algorithm
|
|
- room_id
|
|
- session_id
|
|
- session_key
|
|
type: object
|
|
type:
|
|
enum:
|
|
- m.room_key
|
|
type: string
|
|
type: object
|