billthefarmer / diary

Android personal diary - forked from http://git.savannah.gnu.org/cgit/diary.git
https://billthefarmer.github.io/diary
GNU General Public License v3.0
276 stars 58 forks source link

Feature Request: Encrypted Diary #59

Closed rscmendes closed 5 years ago

rscmendes commented 6 years ago

I don't think this app was initially thought with privacy in mind as daily notes are stored in plaintext and in a public path. I guess this can be useful if the user wants to migrate, store/save the diary to other system. However, this requires the storage permission and the notes are accessible by any other app with storage access and easily accessible through any file editor. This for me doesn't work as a diary should be personal and private.

A simple improvement could be to write the diary in the app's internal storage, which would remove the need for the storage permission, but at the same time increase the difficulty for common users to access the notes for migration/backup. So, this would require a mechanism for backup and restore. The problem would be that users with rooted phones would have the same problem, that is, the notes in plaintext would still be easily accessible.

In my view, the best solution would be to (optionally) add encryption to the daily notes, decryptable by a password, which is prompted when the user opens the app. This would still require the backup and restore mechanism, possibly with the option to do either in plaintext or cyphertext. The burden with this solution is the computation cost of decrypting the entries, which could be large fir a big number of entries. To solve this, maybe we could decrypt the current month's entries, and in case the user navigates to other months he is prompted for the password again (so that we don't store the password).

Well, let me know what you think about this. I will try to help with the implementation, in case you are interested.

billthefarmer commented 6 years ago

See #39

rscmendes commented 6 years ago

Oh, sorry. Should have checked the closed issues. Well, thanks. You can close this one too.