Skip to content

When a new key backup is created, fetch its key onto all devices #2865

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

Open
andybalaam opened this issue May 19, 2025 · 1 comment
Open

When a new key backup is created, fetch its key onto all devices #2865

andybalaam opened this issue May 19, 2025 · 1 comment

Comments

@andybalaam
Copy link
Member

andybalaam commented May 19, 2025

Otherwise it is very easy to get element-hq/element-web#29973

Currently, turning off & on Key Storage in one client breaks key storage on all the other clients.

This needs doing in EW and EX.

The fix is to notice when the current server-side key backup is different from our local, and send out a secret request to all trusted devices when we notice.

(In both EX and EW we already notice this because when we try to upload a key we receive an error that this is the wrong version.)

Do we ask the user? "Your key storage has been updated - do you want to use the new version? (Only say yes if you changed your key storage on another device. If you say no, you have no backup.)"

Current opinion: AJB&VDH: if an attacker already has your verified device, they can steal the existing secrets (including backup key), so there is no point (that we can see) in them fooling you into changing to a new backup. So we think we should accept this new backup and key silently.

^ This needs discussing with Security team.

(Possible future MSC: a new special type of secret send that doesn't require a request, does include a secret name, and the receiver has logic like: "if you would have requested this, then accept it". I.e. if the current backup is different from your local backup version, and the newly-sent secret matches the key of the current backup, then accept the secret (and obviously only if you trust the sender in the same way as the current secret send logic. Spec for secret send: https://spec.matrix.org/v1.14/client-server-api/#msecretsend )

@richvdh
Copy link
Member

richvdh commented May 19, 2025

element-hq/element-web#29171 and element-hq/element-web#29170 are somewhat related here

@andybalaam andybalaam changed the title When we create a new key backup, we should gossip its key to all devices When a new key backup is created, fetch its key onto all devices May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants