-
-
Notifications
You must be signed in to change notification settings - Fork 117
Spec PR - MSC4147: Including device keys with Olm-encrypted events #2122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6b7268a
MSC4147: Including device keys with Olm-encrypted events
Johennes 00fdf60
Add changelog
Johennes 6656f00
Add missing x-addedInMatrixVersion
Johennes c1894e0
Merge remote-tracking branch 'origin/main' into johannes/msc4147
richvdh 3f3c0ca
Expand description of validation and verification
Johennes 6862c70
Merge branch 'main' into johannes/msc4147
Johennes 9eba6b5
Update content/client-server-api/modules/end_to_end_encryption.md
Johennes 63edffb
Update content/client-server-api/modules/end_to_end_encryption.md
Johennes c0ac74e
Update content/client-server-api/modules/end_to_end_encryption.md
Johennes 910afe1
Update content/client-server-api/modules/end_to_end_encryption.md
Johennes ed878f1
Update end_to_end_encryption.md
Johennes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Include device keys with Olm-encrypted events as per [MSC4147](https://github.com/matrix-org/matrix-spec-proposals/pull/4147). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Copyright 2025 The Matrix.org Foundation C.I.C | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
type: object | ||
title: OlmPayload | ||
description: |- | ||
The plaintext payload of Olm message events. | ||
properties: | ||
type: | ||
type: string | ||
description: The type of the event. | ||
content: | ||
type: object | ||
description: The event content. | ||
sender: | ||
type: string | ||
description: The user ID of the event sender. | ||
recipient: | ||
type: string | ||
description: The user ID of the intended event recipient. | ||
recipient_keys: | ||
description: The recipient's signing keys of the encrypted event. | ||
$ref: "#/components/schemas/SigningKeys" | ||
keys: | ||
$ref: "#/components/schemas/SigningKeys" | ||
description: The sender's signing keys of the encrypted event. | ||
sender_device_keys: | ||
$ref: device_keys.yaml | ||
description: The sender's device keys. | ||
x-addedInMatrixVersion: "1.15" | ||
required: | ||
- type | ||
- content | ||
- sender | ||
- recipient | ||
- recipient_keys | ||
- keys | ||
components: | ||
schemas: | ||
SigningKeys: | ||
type: object | ||
title: SigningKeys | ||
description: Public keys used for an `m.olm.v1.curve25519-aes-sha2` event. | ||
properties: | ||
ed25519: | ||
type: string | ||
description: The Ed25519 public key encoded using unpadded base64. | ||
required: | ||
- ed25519 | ||
example: { | ||
"type": "<type of the plaintext event>", | ||
"content": "<content for the plaintext event>", | ||
"sender": "<sender_user_id>", | ||
"recipient": "<recipient_user_id>", | ||
"recipient_keys": { | ||
"ed25519": "<our_ed25519_key>" | ||
}, | ||
"keys": { | ||
"ed25519": "<sender_ed25519_key>" | ||
}, | ||
"sender_device_keys": { | ||
"algorithms": ["<supported>", "<algorithms>"], | ||
"user_id": "<user_id>", | ||
"device_id": "<device_id>", | ||
"keys": { | ||
"ed25519:<device_id>": "<sender_ed25519_key>", | ||
"curve25519:<device_id>": "<sender_curve25519_key>" | ||
}, | ||
"signatures": { | ||
"<user_id>": { | ||
"ed25519:<device_id>": "<device_signature>", | ||
"ed25519:<ssk_id>": "<ssk_signature>", | ||
} | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced the example with a schema because that allows us to reuse
device_keys.yaml
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and it's just generally Better. We're trying to phase out these old-style json blocks)