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

could it be faster in this way #111

Open
Sky19980923 opened this issue Apr 12, 2023 · 0 comments
Open

could it be faster in this way #111

Sky19980923 opened this issue Apr 12, 2023 · 0 comments

Comments

@Sky19980923
Copy link

As self.g = n + 1, would it be better to replace
return invert(self.l_function(powmod(self.public_key.g, x - 1, xsquare),x), x)
with
return invert(self.l_function((self.n * (x - 1) + 1) % xsquare , x), x)
in phe/paillier.py/h_function(self, x, xsquare), it may allow it to be faster

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

No branches or pull requests

1 participant