maelchiotti / LocalMaterialNotes

Simple, local, material design notes
https://play.google.com/store/apps/details?id=com.maelchiotti.localmaterialnotes
GNU Affero General Public License v3.0
98 stars 7 forks source link

Encrypt the notes (in the JSON export) #106

Closed maelchiotti closed 2 months ago

maelchiotti commented 3 months ago

Feature requested in #105.

maelchiotti commented 3 months ago

Hi @HarriBuh. Could you describe a bit more what you want and why? Do you wish the hole file would be encrypted, or maybe just the actual user inputs (title and content)? And how would that benefit you, given that the file is just saved where you want? I'm not familiar at all with encryption, so I want to understand precisely what you wish for so that I can learn a bit more about this subject.

HarriBuh commented 3 months ago

I would like to see the backup file being encrypted when it's created to prevent anybody and anything except the app from reading it- atm, the file is saved in clear text, so opening it makes its content readable to everyone. I want my notes to be private.

As an example I would take https://github.com/keshav-space/safenotes.

It's a great note app, but its development has stalled since last year.

maelchiotti commented 3 months ago

Ok, thank you for the explanation and the example. It seems safenotes even encrypts notes directly in the database, not just in the export. That would make your notes a lot more secure, and if I can add encryption to the export I can probably do it for the database as well.

It would be a great security option for the app. I guess it would need to be enabled in the settings, by inputting a passphrase.

I can't say if I can add this for the next release, but I'll give it a go when I can 😊

maelchiotti commented 3 months ago

Hi @HarriBuh. The database library that I use, Isar, does support encrypting fields in its v4 beta version. This would be perfect as I could easily encrypt the title and the content of the notes, making them completely private in the local database as well an is the JSON export.

Sadly, the Isar maintainer has been absent for the last few months, and thus we are left wondering about when the next release will be, which would bring the encryption feature.

For the time being, I will leave this issue opened in hope that Isar v4 will soon be a thing, as that would clearly be the best way to add encryption.