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.
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.