I'm trying to design a system using proxy re-encryption (PRE) to allow the sharing of data between a user (delegator) and other users he delegates access to (delegatees). The goal is to use a PRE scheme to prevent the sharing of the delegator's private key.
I wanted to have a DB where all data is encrypted, each delegator's data encrypted under his private key. If someone requests access to a delegator's data there are 2 options:
- Has legitimate access permission, in which case data should be returned;
- Doesn't have access to what was requested, data should not be returned;
The proxy would have a re-encryption key and the delegatee would have another key to convert the proxy's (partially decrypted) ciphertext to plaintext.
My problem: if I have my records encrypted under my symmetric key and I allow a delegatee to see that key (after the proxy partially decrypts that key, the definition of delegatee would mean he's someone who can finalise decryption), he can then have access to all delegator files.
I was thinking a solution could be to have each record encrypted under a different key, so the delegatee would only have access to the key which encrypts the files he requested. This seems like it would have insane computational/storage overheads.
Another alternative would be to have some sort of proxy to DB which could generate keys on fly and encrypt data before sending it to a valid delegatee. Problem here is that that data was encrypted in the DB so the proxy would have to be able to decrypt it before encrypting it again under this new key. This means the proxy would have to know the key, defeating the whole point of a PRE scheme (also, the delegator would not know the key which encrypts his own files, which is undesirable).
Finally, the reason I'm posting this here is because I believe this is related to the understanding of PRE schemes and how they can be used in practise.