# homomorphic division with scaling/Paillier

Let's say that I have to use fractions instead of integers and I am using Paillier cryptosystem. So, I use scaling to obtain integers. Assume that I have a secure division protocol. What happens if the result of the division is not an integer?

Scenario:

The scaling factor is 10.

• $$x = E(10)$$ // encryption of 1
• $$y = E(3)$$ // encryption of 0.3

• $$z = E(10/3)$$ // with a secure division protocol

Let's say that I choose parameters accordingly and 3 has inverse. Then, when I multiply 10 with 3 inverse homomorphically (interactive multiplication), I will see something different than 3.3. I cannot get this problem solved on my mind.

• You need the inverse of 3 to multiply. So the result is $E(10 \cdot 3^{-1})$ – kelalaka Jan 25 '19 at 19:19
• It is important to note that due to the properties of the Paillier system and the parameters selected at the time the keys are created, 3 may not have a modular multiplicative inverse in the group. – Ken Goss Jan 25 '19 at 20:31
• Possible duplicate of Division in paillier cryptosystem, if this is not solving your question let us know. – kelalaka Jan 26 '19 at 12:10
• Edited accordingly. This is not solving my question. – dilot Jan 27 '19 at 20:45
• The accepted answer says that: If $D\nmid M$ ($D$ does not divide $M$), even if the $gcd=1$, the result will not necessarily make sense. – kelalaka Jan 27 '19 at 22:14