Encryption and Backup Failures

SymptomLikely causeFix
backup cannot restore on new devicekey only existed in old device secure storedesign recovery password/code or document device-bound backups
encrypted backup opens without passwordbackup was not actually encryptedadd automated negative test
user forgot passwordno recovery designdecide up front: unrecoverable, recovery code, or account recovery
CryptoKey export fails on webkey is non-extractablewrap/export data key intentionally or use password-derived backup key
desktop vault prompts repeatedlykeychain/Stronghold password flow brokencache only in memory and document unlock UX
Room DB encrypted but CSV is plaintextexport path bypassed encryption threat modelwarn user or encrypt export/backup separately

Negative Tests

Run these before shipping encrypted backup:

  1. Try to open backup with wrong password.
  2. Try to restore on a clean install.
  3. Try to restore after deleting local secure-store keys.
  4. Verify exported CSV/JSON warning copy for private data.
  5. Verify app behavior when key unlock is cancelled.

Warning: Do not promise recoverability unless a clean-device restore test proves it.