obsidian-encrypt
obsidian-encrypt copied to clipboard
Re-encrypt notes automatically
Would it be possible to re-encrypt a decrypted note automatically with the original password after a certain amount of time and/or on exit? I've found it a hassle to view and edit encrypted notes on a frequent basis, because I need to re-enter the original password twice every time I'm done working on an encrypted note (and it has to be twice so that I don't lose a note off of one mistyped password).
Hi @DJN0,
It may be possible to do something like that, but not cleanly with the current architecture of this plugin.
I may look into creating a new plugin for this workflow, I can see how it would be more convenient.
Alternatively, encrypting your whole vault with something like https://github.com/cryptomator/cryptomator may be a more reliable option.
+1 on this. Promt for password on open, auto encrypt on close.
Might be tricky AF since how would it handle 'force quit' or obsidian crashing?
+1 for this.
I wonder if Obsidian API actually allows the plugin to see any note. If it does, it seems just adding a thread with a timer to encrypt the note back would solve it. However, handling crashes, force quits, and kill -9
is indeed super tricky without any demon running on the host system...
Another though: maybe we could achieve the same result by a standalone, 3rd party app, that could decrypt an .md
file, and auto encrypt it after some time, leaving Obsidian just as a viewer? However, this would require the app to be mobile-friendly to be able to encrypt/decrypt the notes on the phones...
However, handling crashes, force quits, and kill -9 is indeed super tricky without any demon running on the host system...
Little food for thought that has not been mulled over too much so far: The crude solution to this is, when encrypting, to :
- Write an unencrypted copy besides the current note,
- Encrypt original version
- Ensure encryption is successful, checking if submitted password correctly decrypts
- if yes: delete backup
- if no: restore from backup
Of course you run into issues where you loose the security if the backup is synced to elsewhere before being deleted. I am not sure if that is possible to be prevented. It would be possible for normal sync by designating a folder into which you'd put the backup, and then set that folder up to not be synced. As for Github-sync/3rd-party syncing? No clue. Probably doable, but not natively supportable by the plugin itself probably ¯\(ツ)/¯
I guess you could also just hold the copy in a variable while performing the encryption, and then just restore from that - which should resolve the issue above.
Please check version v2.0.0 and see how you get on with the new standalone encrypted note setup.
It's amazing!!!! Thanks!
Please check version v2.0.0 and see how you get on with the new standalone encrypted note setup.
OK honeymoon's over. Can we have Markdown inside encrypted note? 🙏🙏🙏 pretty pretty pretty please?