This issue covers export and import for locked notes, behind featureFlag.noteLock.
Right now exports leak or lose them:
- JEX and RAW keep the ciphertext but not the key, so a backup restored into a fresh profile can never be decrypted, and a locked note's attachments are missing from the backup entirely
- Every other format writes the raw ciphertext out as the note body
- An imported locked note's attachments keep their old ids, so the orphan cleaner can delete them
Backups should stay encrypted and carry the encrypted note lock key with them, so a backup plus the password is always enough to recover. The readable formats should decrypt through the gated load once the session is unlocked, with an unlock prompt before the export and a count of anything skipped. Imports should read the key file and offer decrypting into the current profile key.
This issue covers export and import for locked notes, behind
featureFlag.noteLock.Right now exports leak or lose them:
Backups should stay encrypted and carry the encrypted note lock key with them, so a backup plus the password is always enough to recover. The readable formats should decrypt through the gated load once the session is unlocked, with an unlock prompt before the export and a count of anything skipped. Imports should read the key file and offer decrypting into the current profile key.