Better implementation of division operation
mpnd opened this issue · comments
mpnd commented
Currently a / b
(where a
can be an EncryptedNumber
, an EncodedNumber
or a Number
and b
is either a long
or a double
) is computed as a * (1 / b)
. Is there a better way to calculate a / b
without computing 1 / b
?
Wilko Henecka commented
I can't see an alternative for EncryptedNumber
, as Paillier only supports multiplication and not division.
For the other cases, there might be alternatives, but is that really an issue? You might be able to save one multiplication, but they are pretty cheap even for humongous numbers.