Created
May 19, 2020 00:32
-
-
Save AntonKueltz/8ba3ee4c9338bb28c7c74cb6424d7227 to your computer and use it in GitHub Desktop.
fastecdsa scalar multiplication example
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
""" | |
In [1]: from fastecdsa.curve import P256 | |
In [2]: k = 0xdecafbad | |
In [3]: Q = k * P256.G | |
In [4]: Q | |
Out[4]: | |
X: 0x602d9279f2f00327f397a670f5fa85dc46b761ddd7f1615ab1d1be187c8ce9da | |
Y: 0x1da89524f75c3f7045e88fa5df94b1fa72499add4d7018a0816436188aeb98b2 | |
(On curve <P256>) | |
""" | |
from fastecdsa.curve import P256 | |
k = 0xdecafbad # example scalar | |
Q = k * G |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment