Commit graph

7 commits

Author SHA1 Message Date
Sofía Aritz 68011d61ee Start implementing settings page 2023-03-11 21:17:14 +01:00
Sofía Aritz 2078c82f45 Add a migration system for the new password system
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.
2023-03-06 18:23:37 +01:00
Sofía Aritz f4b5a0541d Improve security of encrypted notes
Closes #1.

The password is hashed using Argon2, with the salt being `SHA256(password)`. The output hash is then encoded using hex.

The password-checking function checks if the "note database" is encrypted using the plain password (and returns it) or if it is encrypted using the hashed+salted password (and returns the value). This allows older databases to work properly.

A migration path may be added in the future.
2023-03-05 17:35:04 +01:00
Sofía Aritz fcdbfbc932 Implement "hide notes" and "show notes", retry on failed password and minor fixes
* implemented "hide notes"
* implemented "show notes" (internally "unhide")
* improved the title and metadata renderer to use enums and return values instead of callbacks
* added system to retry on password fails (adds `native-dialog` dep for convenience)
2023-03-02 22:40:36 +01:00
Sofía Aritz b599f628de Sort notes my newest, save note ID in the Note struct, add ID-based note removal
This adds a weird callback-based system to properly update the state once a note is removed.

This system isn't very nice, and it can be quite messy, but I'll improve it in the future
2023-02-27 16:57:00 +01:00
Sofía Aritz 159bf20447 Add readme 2023-02-27 15:28:19 +01:00
Sofía Aritz 4abecc7971 Initial release
This is an initial release, I'm aware that this doesn't have the best structure and that there's lots of copying, but performance isn't relevant right now
2023-02-27 15:22:30 +01:00