Hacker News new | ask | show | jobs
by mateuszf 1491 days ago
Out of curiosity:

Does org-mode have encryption mode? Where all the files and maybe their names get encrypted on disk?

That's a must have for me for the multiple devices scenario with storing data on 3rd party service.

Right now I'm using obsidian because it has client side encryption, but it's not open source so not optimal.

4 comments

It's emacs so I'm guessing it's possible. e.g. https://www.emacswiki.org/emacs/AutoEncryption
Yeah, that supports handling encrypted files, but the question is if org indexes such files to handle interlinking, file completion, agendas and stuff.

I guess it doesn't.

It depends on how you do it. Org maintains a reference to what id's you use in links, so if you have an encrypted file with an id link, those links are active and you'll be taken to the right file when following the link (and asked to decrypt it etc.)

for example:

encryptedfile.org.gpg

* someheading

:PROPERTIES:

:ID: bf15277c-8505-4888-9497-a5533829217d

:END:

EOF

otherfile.org

[[id:bf15277c-8505-4888-9497-a5533829217d][this link will work]]

EOF

I'm not sure about agenda and file completion though.

Agenda opens every underlying file in the emacs session so I would assume it would work. I've never used encryption, though.
Org supports both full-file encryption and encryption of the text of entries but not the headings and properties (org-crypt). It's your choice.
In issues for Orgzly, support for org-crypt was mentioned as a wanted feature, so I guess that's what some people use. However, it sounds like it encrypts text inside files, maybe on per-note basis.

On desktop, encrypting files is usually easier done in separate software, like Veracrypt or the multiple Linux filesystems. However, it's rather slim pickings for that on phones—Cryptomator is one that does that (iirc), but it's actually not open-source for phones.

Out of curiosity, why would you store data on a third party service without encrypting it automatically? rclone can easily encrypt file names as you want to.
git-crypt is also a user-friendly solution for transparent encryption/decryption for git repositories.

I have been using this for my logseq notes synced across multiple computers (through a private git repo) and works fairly well.