How would you search through thousands of notes? Decrypt them all in memory, search and encrypt them again? How does this scale with attachments?
This is the one problem I don’t know how to go about solving for tens of thousands of notes.
If anyone has any solutions, please share.
Then you can hash the labels and keep an index of the hash. You can also symmetrically encrypt the hash, or slugify it first. The index can be a file, or many, that you load in memory and keep updated / synced on changes.
You can then do label-based searches on your notes by first hashing the input string and searching for an exact match in the index.
For something like full text search on encrypted data, I guess you'd need to use a database that already does that.