element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
72 stars 12 forks source link

Ability to export megolm keys for a given room (or sessions within a room) #1287

Open ara4n opened 6 years ago

ara4n commented 6 years ago

If a user consciously wants to share the encryption keys for a chunk of room (for whatever reason; e.g. to help a user recover their lost history, or an out-of-band way to share history from before a user joined the room), it'd be nice to have an export keys button which provided a passphrased download that the other user can import.

ara4n commented 6 years ago

(this is scenario 5 from https://github.com/vector-im/riot-web/issues/5675)

ara4n commented 6 years ago

This looks quite easy actually; see thread over at https://twitter.com/RiotChat/status/981940170948784131

cyphar commented 5 years ago

Any progress on this? Right now the only way you can do this is to export all of your keys (using the normal key export feature) and share them with a third-party, but this seems like an absolutely awful way of doing it -- while the other user might not be able to access the room you've added keys of your own rooms to their keyring.

cyphar commented 5 years ago

I've written a python script which allows you to do this in a really crude way (you have to download your session data and then with jq you can filter out the rooms you are interested in). The pipeline looks like this:

% megolm_backup.py --from riot-keys.py |
    jq 'map(select(.room_id == "!foo:matrix.org"))' |
    megolm_backup.py --into > new-riot-keys.txt
a22sc commented 4 years ago

A button in the room settings would be useful to send the enc keys of a room to all its members. another thing could be, the user, who has lost their keys, could requests them from all members - very useful in private conversations also

penyuan commented 1 year ago

Is there an update on this issue or a current workaround to achieve this?

tim-seoss commented 1 year ago

Is there an update on this issue or a current workaround to achieve this?

cyphar's workaround worked for me last time I needed it: https://github.com/vector-im/element-meta/issues/1287#issuecomment-1488890451

penyuan commented 1 year ago

OK, thanks @tim-seoss I'll try @cyphar's solution for now. Still hoping that there's a better solution that will be implemented by the devs soon. This feels like a much-needed feature!