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

Element-Android session doesn't encrypt for a dehydrated device #8836

Closed
giomfo opened this issue May 24, 2024 · 2 comments · Fixed by #8842
Closed

Element-Android session doesn't encrypt for a dehydrated device #8836

giomfo opened this issue May 24, 2024 · 2 comments · Fixed by #8842
Assignees
Labels
T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@giomfo
Copy link
Member

giomfo commented May 24, 2024

Steps to reproduce

  1. log an account userA in a Element-WebR client (this session will be the only one for userA)
  2. create an encrypted room and invite another account userB. The userB joins the room
  3. enable the device dehydration v2 feature on Element-WebR client for userA (see WebR full support for dehydrated device v2 element-meta#2278)
  4. log out the userA
  5. send a message in the encrypted room from userB
  6. log the userA in again

Outcome

What did you expect?

The userA is able to decrypt and read the message sent by userB

What happened instead?

The message is not decrypted on userA side (UTD message)

Your phone model

No response

Operating system version

No response

Application version and app store

v1.6.14

Homeserver

No response

Will you send logs?

No

Are you willing to provide a PR?

No

@giomfo giomfo added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label May 24, 2024
@giomfo
Copy link
Member Author

giomfo commented May 24, 2024

reproduced on E-iOS: element-hq/element-ios#7795

@giomfo
Copy link
Member Author

giomfo commented May 24, 2024

@uhoreg investigated this issue. He observed the following error in the logs:
2024-05-22T22:51:30*074GMT+00:00Z 97 D/ /Tag: WARN matrix_sdk_crypto::identities::manager: Failed to create a new device user_id="" device_id="" error=VerificationError(Signature(signature::Error { source: Some(Verification equation was not satisfied) }))

"Looking at the Android sources, it looks like when it makes the /keys/query request, if I'm reading it correctly, it parses the response into a KeysQueryResponse, the device_keys get parsed into a DeviceKeysWithUnsigned, which only has set properties. Since dehydrated is not one of the properties, it gets dropped, which means that the signature is no longer valid.

Something in there needs to be changed so that any unknown properties still get passed on, otherwise any device keys that have unknown properties will fail the signature check.

I haven't looked at the iOS code, but if it is also failing, then it may have a similar problem."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants