I’d like to give my users some private network storage (private from me, ie. something encrypted at rest with keys that root cannot obtain).

Do you have any recommendations?

Ideally, it should be something where files are only decrypted on the client, but server-side decryption would be acceptable too as long as the server doesn’t save the decryption keys to disk.

Before someone suggests that, I know I could just put lucks-encrypted disk images on the NAS, but I’d like the whole thing to have decent performance (the idea is to allow people to store their photos/videos, so some may have several GB of files).


edit:

Thanks everyone for your comments!

TLDR: cryfs

Turns out I was looking at the problem from the wrong point of view: I was looking at sftpgo and wondering what I could do on the server side, but you made me realise this is really a client issue (and a solved one at that).

Here’s a few notes after investigating the matter:

  • The use case is exactly the same as using client-side encryption with cloud storage (dropbox and those other things we self-hoster never use).
  • As an admin I don’t have to do anything to support this use case, except maybe guiding my users in choosing what solution to adopt.
  • Most of the solutions (possibly all except cryfs?) encrypt file names and contents, leaking the directory structure and file size (meaning I could pretty much guess if they are storing their photos or… unsavory movies).
  • F-droid has an Android app (called DroidFS) that support gocryptfs and cryfs

I’ll recommend my users try cryfs before any other solution. Others that may be worth it looking at (in order): gocryptfs, cryptomator, securefs.

I’ll recommend my users to avoid cryptomator if possible, despite its popularity: it’s one of those commecrial open source projects with arbitrary limitations (5 seats, whatever that means) and may have nag screens or require people to migrate to some fork in the future.

ecryptfs is to be avoid at all costs, as it seems unamaintaned.

  • Avid Amoeba@lemmy.ca
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    1 day ago

    Cryptomator encrypts files individually right?

    E:

    For the curious like me, here’s how Cryptomator makes a directory with multiple encrypted files appear as a single vol when decrypted. From mount:

    fuse-nio-adapter on $HOME/.local/share/Cryptomator/mnt/test type fuse.fuse-nio-adapter (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
    

    It uses its own fuse module to present it as a volume. The real directory has its own file structure:

    ~/test/test$ find
    .
    ./c
    ./vault.cryptomator
    ./vault.cryptomator.12A05032.bkup
    ./d
    ./d/LO
    ./d/LO/AYYSWMZO35ASQ2HOACU3I7LRVIAMH4
    ./d/LO/AYYSWMZO35ASQ2HOACU3I7LRVIAMH4/PmAyroZAF5W7kGoHxr3Fhi-NeQIeO7SZcufE.c9r
    ./d/LO/AYYSWMZO35ASQ2HOACU3I7LRVIAMH4/dirid.c9r
    ./IMPORTANT.rtf
    ./masterkey.cryptomator.7DB56291.bkup
    ./masterkey.cryptomator
    

    This looks like a good option. Perhaps more flexible than using LUKS/VeraCrypt file, but those should work too if the underlying dir is on NFS/SAMBA.

      • Avid Amoeba@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        Yup. VeraCrypt is also portable but it would play badly with web-backed storage that uploads/downlaods whole files. Would only be usable on local NAS storage. That said, I’m curious to see how Cryptomator performs on local NAS for high-perf applications compared to VC or LUKS. E.g. if you want to have a large photo collection with Immich on top of it. 😀 Sadly I don’t have NAS anymore to test it out.