Skip to content
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

Allow users to encrypt arbitrary to-device events #1453

Open
poljar opened this issue Feb 6, 2023 · 0 comments
Open

Allow users to encrypt arbitrary to-device events #1453

poljar opened this issue Feb 6, 2023 · 0 comments
Labels
encryption enhancement New feature or request

Comments

@poljar
Copy link
Contributor

poljar commented Feb 6, 2023

There have been some requests going around in the support room of the SDK that people would like to send encrypted to-device events.

While it would be trivial to expose a Device.send_event() method that sets up a Olm Session and allows people to send an event to a particular device, we need to be a bit careful about this.

If the user overuses an OlmSession it may lead to undecryptable messages on the others side. This will only happen in the case of to-device events also arriving out of order, but we don't have strict ordering guarantees for to-device events.

One idea was to use a different OlmSession for room key delivery and one for custom things. This way the room key delivery wouldn't be affected by whatever custom things the user might be doing. This sadly isn't possible since the other side will start using the new custom Session to deliver room keys to us.

Instead we might want to start looking at the message index of the individual Session and decide to rotate in case of overuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encryption enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant