-
Notifications
You must be signed in to change notification settings - Fork 7
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
E2EE: event model lacks olm payload class #12
Comments
Done in 1f1fcd7 |
Hm, 1f1fcd7 fixed the issue specifically for Instead of augmenting the individual events it should be better to use a dedicated (abstract) event type that the events in question are derived from. That's what I meant above with What do you think? |
When an event is encrypted using
m.olm.v1.curve25519-aes-sha2
it needs to be augmented by a few additional attributes (see second code sample) prior encryption.For example: to start a new outbound group session one needs to exchange the megolm session details with the room's devices, using a
m.room_key
event. Before it is encrypted and subsequently packaged as theciphertext
payload of am.room.encrypted
event (see first code sample above), it needs to be augmented like this:Unfortunately the spec isn't as precise about this as it could be. I'm not sure how to implement this in the given event model, and I don't know which payload events (besides
m.room_key
) should be covered. I presume all of them. Thus I'd argue that we need a kind ofOlmPayloadEvent
that wraps any otherEvent
, augmenting it with the keys "sender", "recipient", "recipient_keys" and "keys" as illustrated above.FYI, my current workaround uses a
RoomKey
instance, serializes it to JSON, adds the "missing" properties and passes the final string tolibolm
'solm_encrypt()
(via my upcoming bindings library).Thanks
The text was updated successfully, but these errors were encountered: