Please bear with me...
I want to store some data in an untrusted location (a server). I will want to share this with other people.
I encrypt the data with AES encryption and a 20 character password. Then, if I know the RSA public key of the people I want to share the data with, I encrypt the password with their public key and upload those to the server also for them to retrieve and access the data at a later date. This much I have and is reasonably straight forward for me to implement.
My question comes when I do not know the public keys of recipients and I don't want to have to manually handle the encryption of the password to share with them each and every time.
One option is I allow the server to know the password and encrypt it for new recipients as and when, however I do not want the server knowing the password either.
I realise as writing this I might be asking for 'magic', however is there any encryption mechanism in which the server can encrypt the password for the recipient, without actually ever seeing the password in plaintext. I.e can it encrypt for a new recipient based off of an already encrypted version of the password (for say another recipient).
I'm wondering if I can do something like (and it won't be this but...) encrypt the ciphertext with the new key and XOR the ciphertext with the previous key it was encrypted with, in effect "swapping" the keys.
Or perhaps a homomorphic encryption mechanism could be used, where by the server can "do stuff" to the data all while not knowing what the data actually is. I am wondering if HE could be used to then allow a server to manage who can decrypt the data, but not be able to see the data itself....