Rethink encrypted exports/imports with unique salt
Following https://tutut.delire.party/@kresus/106153720513172313 & https://community.kresus.org/t/exports-chiffres-repenser-lutilisation-du-sel-insert-diet-joke-here/280/2.
Issues:
- Users cannot migrate from one Kresus instance to another if the instances' salts differ.
- Salts should be used only once
Solution:
We should
- Use a different salt for each use (so, each export), dynamically generated instead of the salt in the config file
- Export the salt along in the json wrapping the encrypted export (we already have a
encrypted
boolean property, we could add asalt
property. - On import use this salt.
Questions:
- If the salt is missing from the export (export prior to the implementation), should we use the configuration's salt? That would mean we have to keep it in the configuration. Or should we ask the user for it?
- Should we then enforce encrypted exports from the UI? That would solve all the issues we have regarding lost credentials in plain text exports.
Edited by Nicolas Frandeboeuf