serengil / LightPHE

A Lightweight Partially Homomorphic Encryption Library for Python
https://bit.ly/46vWz9w
MIT License
53 stars 5 forks source link

solving dlp and ecdlp not with brute borce #2

Open serengil opened 10 months ago

serengil commented 10 months ago

In the decryption steps of algorithms Benaloh, Naccache-Stern, and Exponential ElGamal, we are solving discrete logarithm problem with brute force. Instead, we can use some faster algorithms such as baby step giant step. Luckily, sympy has out-of-the-box modulo for this.

Similarly, the decryption step of Elliptic Curve ElGamal requires to solve elliptic curve discrete logarithm problem. We should adopt something similar to ones mentioned above.

PS: I gave the links with dedicated DLP and ECDLP lines above.