Created
September 16, 2019 10:54
-
-
Save mcieno/c751c54cc16cb3d7f1822545e5c5afce to your computer and use it in GitHub Desktop.
Solve DLP on Elliptic Curves.
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
# Curve parameters | |
p = 1048583 | |
a, b = 1, -1 | |
# Target secret key | |
d = 4121 | |
# Setup curve | |
E = EllipticCurve(GF(p), [a, b]) | |
G = E.gen(0) | |
P = d * G # (429940 : 231132 : 1) | |
dl = discrete_log(P, G, G.order(), operation='+') | |
assert dl == d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment