According to Paillier cryptosystem the product of two ciphertexts will decrypt to the sum of their corresponding plaintexts.
I have two separate integer sequences X and Y that have same number of values. I want to calculate the 1-1 combination that minimizes the sum (e.g, x1+y1 IF and ONLY IF x1+y1 <= x2+y2 AND x1+y1 <= x3+y3
)
Original Data:
X: {x1,x2,x3}
Y: {y1,y2,y3}
I then Paillier encrypt the X sequence with public key r1 and the Y sequence with public key r2.
Encrypted Data:
X: {E(x1),E(x2),E(x3)} (with public key r1)
Y: {E(y1),E(y2),E(y3)} (with public key r2)
If E(x) the cyphertext for message x, then I can calculate E(x1)E(y1), E(x2)E(y2),E(x3)E(y3)
, decrypt them and then get the correct minimum result x1+x2.
If indeed x1+y1 <= x2+y2 AND x1+y1 <= x3+y3
does the Pailler encryption guarantees that also E(x1)E(y1) <= E(x2)E(y2) AND E(x1)E(y1) <= E(x3)E(y3)
. My intuition is that NO, because that would also mean that if x<y then E(x)<E(y)
for the same r.
Is my understanding correct, that Paillier cryptosystem despite its homomorphic properties cannot preserve ordering of sums for the two sets X and Y when X set is encrypted by r1 and Y set is encrypted by r2? Is there any other cryptosystem that can support this?