rfjakob / gocryptfs

Encrypted overlay filesystem written in Go
https://nuetzlich.net/gocryptfs/
MIT License
3.4k stars 244 forks source link

Decrypt to folder #845

Closed vaibhav-kaushal closed 1 month ago

vaibhav-kaushal commented 2 months ago

I know that the default way gocryptfs is to be used is by mounting via FUSE. And that's okay. That's how I use it anyway. But I was wondering if it is possible to use gocryptfs to actually read an encrypted directory and decrypt it into another directory (and vice versa).

Basically it would be like copy-pasting the decrypted contents from a mounted directory to another place; but without the whole process of mounting the encrypted directory.

How can it be useful? Go is cross-platform and can target Windows, Linux, BSD and macOS for both ARM and AMD (and more). However, FUSE is pretty specific to Linux (macOS now wants me to lower the security which I am not comfortable with). With a facility like the one I just talked about, it would be possible to take the encrypted content with me in some format (external disk, dual-boot Windows+Linux, Cloud sync etc.) and at least be able to see my content!

rfjakob commented 1 month ago

There's https://github.com/slackner/gocryptfs-inspect which can decrypt individual files without FUSE. I guess it wouldn't be too hard to extend it to decrypt a whole folder.