Moin moin,
Let‘s assume there are two keypairs (d1,e1) and (d2,e2), where d1 and d2 are unrelated private keys and e1 and e2 the corresponding public keys. Imagine Alice knowing neither d1 nor d2 and Bob only d1, not d2. Alice has a ciphertext c resulting from encrypting a message m with e1 using RSA. She cannot decrypt it because she doesn‘t know d1. Alice encrypts c again with e2 using an asymmetric cipher (remains to be chosen) and sends it to Bob. Bob can‘t decrypt it since he doesn‘t have d2. Can he then use some kind of algorithm and d1 to produce something which he can send to me that can be decrypted with d1 and d2 resulting in the original message?
What I want is, that Alice and Bob cannot read the message, only the combined knowledge of both secret keys would allow them to decipher it.
Pseudocode:
m is the message
c := RSAEncrypt(m, using: e1)
Alice does:
c2 := AsymEncrypt(c, using: e2)
Bob does:
c3 := RSADecryptAlgo(c2, using: d1)
I want to:
m = SomeDecryptionAlgo(c3, using: d2)
Is this scenario (though quite strange) even possible? If so, does anyone know a googleable term or an algorithm/s which would fit my case?
Thanks in advance
Edit: The keypairs do not share the same modulus