Created
April 15, 2016 12:22
-
-
Save AndyNovo/17a4541a5103922f30fa87ad2af33e5b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
p=2602970321841479 | |
g=2 | |
x=2064002103016912 | |
A=1376951019743626 | |
K=1443056703658992 | |
K_inv1 = power_mod(K, p-2, p) | |
K_inv2 = xgcd(p, K)[2] % p | |
K_inv3 = power_mod(A, p - 1- x, p) | |
print K_inv1* K % p | |
print K_inv2 * K % p | |
print K_inv3 * K % p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment