This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_pohlig_hellman(curve, generator=None): | |
""" | |
The Pohlig-Hellman algorithm allows for quick (EC)DLP solving if the order of the curve is smooth, | |
i.e its order is a product of multiple (small) primes. | |
The best general purpose algorithm for finding a discrete logarithm is the Baby-step giant-step | |
algorithm, with a running time of O(sqrt(n)). | |
If the order of the curve (over a finite field) is smooth, we can however solve the (EC)DLP | |
algorithm by solving the (EC)DLP for all the prime powers that make up the order, then using the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install postgresql@9.6 | |
brew unlink postgresql@9.6 | |
brew link postgresql |