From 066acda849fa1bd6d87aa57d456cc3990ae23768 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 25 Jan 2022 16:38:13 +0200 Subject: [PATCH 1/3] MSC3673: Encrypted ephemeral data units --- .../3673-encrypted-ephemeral-data-units.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 proposals/3673-encrypted-ephemeral-data-units.md diff --git a/proposals/3673-encrypted-ephemeral-data-units.md b/proposals/3673-encrypted-ephemeral-data-units.md new file mode 100644 index 00000000000..3b0ee8cc5c2 --- /dev/null +++ b/proposals/3673-encrypted-ephemeral-data-units.md @@ -0,0 +1,45 @@ +# MSC3673 - Encrypting ephemeral data units + +## Problem + +With the introduction of [MSC2476](https://github.com/ananace/matrix-doc/blob/user-defined-edus/proposals/2477-user-defined-ephemeral-events.md) +we now have the ability to send and receive custom, user-defined ephemeral data +units. This is a great mechanism for transferring short-lived data, applicable in +a variety of situations where persistence is not desired. + +Unfortunately E2E encryption for EDUs isn't currently defined and some +situations, like live user location sharing, come with privacy concerns, moment +in which that becomes a problem. + +## Proposal + +This MSC proposes a generic mechanism for end to end encrypted ephemeral data +units, building on top of MSC2476](https://github.com/ananace/matrix-doc/blob/user-defined-edus/proposals/2477-user-defined-ephemeral-events.md) + +We would like to wrap them inside the standard encryption envelope: + +```json5 +{ + "algorithm": "m.megolm.v1.aes-sha2", + "sender_key": "", + "device_id": "", + "session_id": "", + "ciphertext": "" +} +``` + +in which the `ciphertext` will contain the custom EDUs payload and which will be +sent to `rooms/{roomId}/ephemeral/m.room.encrypted/{txnId}`, similar to +encrypted timeline events . + +The Megolm keys required to decrypt this EDU should be shared over Olm just like +regular encrypted timeline events. + +Clients will receive the encrypted payloads in the `/sync`s `ephemeral` +dictionary where `type` will be equal to `m.room.encrypted` and which can be +decrypted using the pre-shared Megolm keys. + +## Alternatives + +We are not aware of any other straightforward solution for sharing sensisitive +ephemeral data between users. From 7ba8e27b71e45f25d0e0a1a94adb6c95e152326b Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 25 Jan 2022 16:50:20 +0200 Subject: [PATCH 2/3] Update proposals/3673-encrypted-ephemeral-data-units.md Co-authored-by: Stuart Mumford --- proposals/3673-encrypted-ephemeral-data-units.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3673-encrypted-ephemeral-data-units.md b/proposals/3673-encrypted-ephemeral-data-units.md index 3b0ee8cc5c2..2cf561a0246 100644 --- a/proposals/3673-encrypted-ephemeral-data-units.md +++ b/proposals/3673-encrypted-ephemeral-data-units.md @@ -14,7 +14,7 @@ in which that becomes a problem. ## Proposal This MSC proposes a generic mechanism for end to end encrypted ephemeral data -units, building on top of MSC2476](https://github.com/ananace/matrix-doc/blob/user-defined-edus/proposals/2477-user-defined-ephemeral-events.md) +units, building on top of [MSC2476](https://github.com/ananace/matrix-doc/blob/user-defined-edus/proposals/2477-user-defined-ephemeral-events.md) We would like to wrap them inside the standard encryption envelope: From 7fdf81ae803b555a3c36532ca57811460b59941c Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 26 Jan 2022 10:09:59 +0200 Subject: [PATCH 3/3] Reference MSCs through PR link instead of rendered. --- proposals/3673-encrypted-ephemeral-data-units.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/3673-encrypted-ephemeral-data-units.md b/proposals/3673-encrypted-ephemeral-data-units.md index 2cf561a0246..9a9dc6abd30 100644 --- a/proposals/3673-encrypted-ephemeral-data-units.md +++ b/proposals/3673-encrypted-ephemeral-data-units.md @@ -2,7 +2,7 @@ ## Problem -With the introduction of [MSC2476](https://github.com/ananace/matrix-doc/blob/user-defined-edus/proposals/2477-user-defined-ephemeral-events.md) +With the introduction of [MSC2477](https://github.com/matrix-org/matrix-doc/pull/2477) we now have the ability to send and receive custom, user-defined ephemeral data units. This is a great mechanism for transferring short-lived data, applicable in a variety of situations where persistence is not desired. @@ -14,7 +14,7 @@ in which that becomes a problem. ## Proposal This MSC proposes a generic mechanism for end to end encrypted ephemeral data -units, building on top of [MSC2476](https://github.com/ananace/matrix-doc/blob/user-defined-edus/proposals/2477-user-defined-ephemeral-events.md) +units, building on top of [MSC2477](https://github.com/matrix-org/matrix-doc/pull/2477) We would like to wrap them inside the standard encryption envelope: