Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EncryptedNumber.decrease_exponent_to does not play nice with custom BASE #76

Open
wilko77 opened this issue Apr 29, 2019 · 0 comments
Open
Labels

Comments

@wilko77
Copy link
Collaborator

wilko77 commented Apr 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant