n1analytics / javallier

A Java library for Paillier partially homomorphic encryption.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

encoding double 0.0 generates an EncodedNumber with exponent -1057

wilko77 opened this issue · comments

In javallier version 0.5.0, the encoding of the double value 0.0 is an EncodedNumber with a significant of 0 and an exponent of -1057. And although this is a valid encodoing of zero, it will lead quite quickly to overflows in the Paillier arithmetic. I suggest setting the exponent to 0.

addressed in commit 0968333