How to generate Multiple Encryption Keys for use in RSA polymorphic multiplication
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.