element-hq / element-hq/element-x-android

"Key storage out of sync" flow gives misleading error message when 4S lacks the secret

Open
#4,343 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
2.4k
Forks
633
Avg merge
1d 14h
Merged PRs (30d)
149

Description

Given an account where:

  • 4S is set up (i.e., a configured m.secret_storage.default_key)
  • but 4S does not contain the master key (m.cross_signing.master is missing or empty)
  • EX is missing the private master key

(This is quite possible on older accounts: once upon a time, we did not store the master cross-signing key in 4S)

As expected, we see the "Your key storage is out of sync" toast. Click "Continue", enter the correct recovery key. Observe "Incorrect recovery key":

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the described key-storage out-of-sync flow with 4S configured but without m.cross_signing.master, then trace the Continue and recovery-key handling paths. Done means the correct recovery key is not reported as incorrect in this account state; the payload names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, rust
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.