Created
January 16, 2024 21:13
-
-
Save tjsharp1/6cc5423f161b0a74c7398d62f905f34b to your computer and use it in GitHub Desktop.
ZK Hack puzzle #1 write-up
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
The solution to this puzzle has to do with the fact that only the x-coordinate | |
of an elliptic curve point is used as the leaf node. However there are 2 possible | |
points with the same x-coordinate, so we just need to find the other one. | |
If the given point is (secret * G), we need to find (-secret * G), to find the other point. | |
`leaked_secret` is specified in `MNT4BigFr`, but the x-coordinate is computed over `MNT6BigFr`, | |
so we need to compute `-leaked_secret % M` with `M` being the modulus of `MNT6BigFr`. | |
We can do that by computing MNT6BigFr::MODULUS - leaked_secret. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment