I'm looking for some sort of three way encryption algorithm. So you three pairs of data (components) are encrypted, and one encrypted component can be decrypted by a key that is derived from the other two encrypted components. I thought I read about an algorithm like this in my uni years, but I can't seem to find it. I would appreciate any of the pointers I can get on this.
So to get down on what I mean, let's say I have the values A, B, C. Where encrypted versions of these are denoted as A', B', C'. In order to decrypt A' into A, a decryption key has to be derived from B' and C'. In this sense the components store the actual data intended to hide, but also store the decryption key for the other component, so the encryption can be lifted when all three components are known.
Initially I thought with the cumulative nature of the xor operation it could be accomplished with that. My idea was by creating a A' = A ^ sha1(B) ^ sha1(C), B' = B ^ sha1(A) ^ sha1(C). You could combine the keys and cancel out sha1 components. But this doesn't seem to work. So I'm looking for some algorithm that could work like what is mentioned above.