How to generate Multiple Encryption Keys for use in RSA polymorphic multiplication I am a long time scroller, first time poster in the crypto stack. I've recently been finding myself leaving the realm of mainstream/standard crypto (imo that consists of symmetric/asymmetric encryption, some ciphers and one way hash functions ect). I am currently faced with a problem regarding using the RSA algorithm through multiparty computation. I am using RSA to conduct multiplicative homomorphic encryption using multiple keys. I am able to provably generate the encryption keys along with the final cipher text after multiplying all the values together. However I am not able to generate the correct decryption keys.
Process for encryption using RSA MPC
\begin{align}
C_1 &amp;= a^{e_1} \pmod n \\
C_2 &amp;= a^{e_2} \pmod n  \\
C_{final}&amp;= C_1 \cdot C_2 = a^{e} \pmod n,\ \text{where} \ e=e_1 + e_2
\end{align}
The issue is that this only I can only really do this with a single encryption key (so if you consider $e_1=e_2$), whereas I would like to use multiple encryption keys ($e = e_1 + e_2$ or something equivalent), encrypt a value do some operation on that encrypted value then be able to decrypt it and receive some meaningful output.
Can someone help me with the problem of where to find details on using multiple encryption keys in RSA and working with the encrypted values directly ?
Research I based my working from: https://www.researchgate.net/publication/335743662_Enhanced_Homomorphic_Encryption_technique_using_RSA_ALGORITHM_with_multiple_keys
Besides the answer Dimitree gave to himself, I' like to add something even if I am not sure whether I understand the original problem he wanted to solve.
You used the same message a and encrypted it with different values for e, but used the same modulus N. And you added the different exponents e.
As far as I know, the homomorphic multiplicative feature of RSA is defined in a way, that the same e and N are used, and you either want to get a multiple of m by just manipulating c or you want to multiply two c values.
Simple encryption and decryption of numbers in RSA is straightforward: To encrypt a number m, one computes c = m^e mod N. To decrypt a ciphertext c, one only needs to compute m' = c^d mod N = m^(e*d) mod N = m.
To see that RSA is partially homomorphic, consider two numbers m1 and m2 and their respective ciphertexts c1 and c2. To compute the product m1 * m2 homomorphically, one computes the product of the ciphertexts, c1 * c2. This then decrypts to m1 * m2: (c1 * c2)^d mod N = (c1^d) * (c2^d) mod N = (m1^(e * d)) * (m2^(e * d)) mod N = m1 * m2.
The RSA scheme is only partially homomorphic because one is only able to perform multiplications.
In a similar way you may build an attack modifying c to c' such that the receiver gets m' = k*m.
However, I might not have understand the problem and you are talking of another kind of multiparty communication. If so could you explain the scenario a bit more detailled.