python-paillier icon indicating copy to clipboard operation
python-paillier copied to clipboard

`EncryptedNumber.decrease_exponent_to` does not play nice with custom BASE

Open wilko77 opened this issue 5 years ago • 0 comments

decrease_exponent_to contains this line: https://github.com/n1analytics/python-paillier/blob/955f8c0bfa9623be15b75462b121d28acf70f04b/phe/paillier.py#L592

It basically just uses the default EncodedNumber.BASE, irrespective of the actual base that was used to encode that particular encrypted number.

See also the problem raised in issue #75: If you run the alternative_base.py example with numbers that have a non-zero exponent, then the addition will produce a wrong result.

wilko77 avatar Apr 29 '19 08:04 wilko77