Added an automatic migration system for notes before the #1 redesign. Ths system works as follows: 1. Checks the password system used. 2. If it's the old system, the migration is started. 3. The data directory is backed up. 4. The notes are decrypted using the old password. 5. The notes are encrypted and saved using the `KDF(password)` This commit also adds documentation related to future migrations of the "password system" and which migrations will be supported by each future version. This documents also showcases that when v1 is released, support for `PasswordSystem::V0` will be completely removed.
1.4 KiB
1.4 KiB
Password migrations
After issue #1, the migration of old "databases" was required. Right now, this isn't very useful because the only user is (probably) me, but this serves as an exercise for the future.
Password systems
Currently, there are two password systems on-the-wild:
PasswordSystem::V0
. The system used before issue #1PasswordSystem::V1
. The system used after issue #1 (with the KDF)
Support
Only the latest and previous password system are going to be supported at any point in time.
Example
v1
usesPasswordSystem::V1
and supports migration fromPasswordSystem::V0
v2
is released with thePasswordSystem::V2
and migration fromPasswordSystem::V1
, those who are still on thePasswordSystem::V0
are redirected to the latestv1
release.
Currently supported systems
v0.*
:PasswordSystem::V1
and migration fromPasswordSystem::V0
v1.*
:- If a new system is used:
PasswordSystem::V2
and migration fromPasswordSystem::V1
- If no new system is used:
PasswordSystem::V1
- If a new system is used:
v2.*
:- If a new system is used:
PasswordSystem::V3
and migration fromPasswordSystem::V2
- If no new system is used:
PasswordSystem::V2
and migration fromPasswordSystem::V1
- If a new system is used: