Explore Zero‐knowledge proof to auth the user - radumarias/rfs GitHub Wiki
User could have a private key, system has corresponding pub key. When user wants to access the file we send him a challenge which he signs with private and we check with pub.
Similarly we can combine it with end-to-end encryption as file will be encrypted with a key encrypted with user's pub key. Like that we ensure only user has access to the file. Also we could share file with another user as we would encrypt the encryption key with user's 2 pub.