Question regarding encryption while sharing a file publicly

Hi there,

I just set up a nextcloud instance and was messing with encryption (per-user encryption of files, by disabling the master-key encryption system).

I would still need to share files publicly with a link from time to time and was trying to check that publicly shared files are not stored in plain-text, or encrypted with a key that is stored plaintext on my server. I couldnt find an answer, so my questions are the following :

  • Do publicly shared files (with a link) are stored in clear text in my server ?
  • Do publicly shared files (with a link) are stored encrypted with a key that is directly stored somewhere on my server (the secret in config.php ?) or indirectly (derived from a secret stored in clear text on my server) ?
  • Do protecting publicly shared files (with a link) with a password encrypts files shared publicly with that said password (with a key derived from it somehow) ?

Thanks a lot by advance for your insight !