At work we have a pretty complex problem(for me at least) and I have no idea what a fitting solution would be. To give a bit of context, the company I work for is a data processor/provider for big corporations that need sensitive user data such as; social security numbers, how much a person earns, all their past addresses where they have lived, if they have every collected welfare, etc.
The problem we are facing is that we have to encrypt the user data so if we ever get compromised the data of the end-users is safe. How we do this is, the end-users fills their data-vault(this vault contains all the data I gave as an example in the paragraph above), and we encrypt all the data en keep the key to decrypt the data in our system.
We however do not want this, we are looking for a fitting solution in where the end-user can fill their data-vault, we encrypt it and create hashes of their data(So our customers can verify if the data is actually valid after decrypting it) and at the end we throw away the key so our system no longer has it. Once our customer wants to access the data-vault of a certain end-user, the end-user has to exchange their key with said customer so in turn our customer can decrypt the data on their own system.
We looked into asymmetric encryption but the issue is we only want to encrypt the data-vault once so the end-user does not need to constantly re-encrypt their data. To make it a bit clear read examples below in where the data-vault is created and shared:
End-user Bob want to share his personal information with Netflix and Facebook, Bob signs up at the site of my company. He fills his personal data-vault which we in turn encrypt and throw away the key used (bob still has this key).
Company A and Company B request data out of the data-vault of user Bob (Company A want his social security number and Company B wants to know if the user ever collected welfare), our system gives them that part of his vault, and we ask Bob to send the keys to Company A and Company B (using a webhook or something). Bob then sends both Company A and Company B his key, so they can decrypt his data.
Does anybody have an idea what I could use to do this? I looked into just using basic encryption and decryption (AES) and just sharing the key used to encrypt the data, but I am not sure how secure/smart this is.