Last active
March 15, 2021 11:08
-
-
Save RDxR10/4882da5a1d7abeb5783aa1737ec3f3a2 to your computer and use it in GitHub Desktop.
Diff hell
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
p = 69691 | |
g = 1001 | |
A = 17016 | |
B = 47643 | |
arr = [] | |
arr1 = [] | |
for a in range(1, p): | |
if pow(g, a, p) == A: | |
arr.append(a) | |
for b in range(1, p): | |
if pow(g, b, p) == B: | |
arr1.append(b) | |
a = arr[0] | |
b = arr1[0] | |
ka = int(pow(int(pow(g,b,p)),a,p)) | |
kb = int(pow(int(pow(g,a,p)),b,p)) | |
if(ka==kb): | |
print(ka|kb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment