You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I hope this is the right place to ask this question.
I am building a Matrix client library and I'm trying to decrypt group messages.
Currently I am testing this using the Element web client, but as far as I could tell they use this library.
I am using the C libolm, hopefully you can still help me.
When I receive a new message, an m.room_key event is sent, and I can create my OlmInboundGroupSession and decrypt the message.
But when I try to decrypt a past message and send an m.room_key_request, I get an m.forwarded_room_key event, and the session key is different from the one I initially got.
I noticed that the key has a length of SESSION_EXPORT_RAW_LENGTH instead of SESSION_KEY_RAW_LENGTH, so I tried using olm_import_inbound_group_session instead of olm_init_inbound_group_session, which seems to successfully initialize the session, but then I am not able to decrypt the message and I get a BAD_SIGNATURE error.
I tried looking at how room key events are handled in this library, but it looks like m.room_key and m.forwarded_room_key are handled the same way, which is what I wanted to do as well.
I'm guessing this is some stupid oversight on my part, but I couldn't figure it out, so I'm hoping someone can help me out.
The text was updated successfully, but these errors were encountered:
Hello, I hope this is the right place to ask this question.
I am building a Matrix client library and I'm trying to decrypt group messages.
Currently I am testing this using the Element web client, but as far as I could tell they use this library.
I am using the C libolm, hopefully you can still help me.
When I receive a new message, an m.room_key event is sent, and I can create my
OlmInboundGroupSession
and decrypt the message.But when I try to decrypt a past message and send an m.room_key_request, I get an m.forwarded_room_key event, and the session key is different from the one I initially got.
I noticed that the key has a length of SESSION_EXPORT_RAW_LENGTH instead of SESSION_KEY_RAW_LENGTH, so I tried using
olm_import_inbound_group_session
instead ofolm_init_inbound_group_session
, which seems to successfully initialize the session, but then I am not able to decrypt the message and I get aBAD_SIGNATURE
error.I tried looking at how room key events are handled in this library, but it looks like m.room_key and m.forwarded_room_key are handled the same way, which is what I wanted to do as well.
I'm guessing this is some stupid oversight on my part, but I couldn't figure it out, so I'm hoping someone can help me out.
The text was updated successfully, but these errors were encountered: