Created
November 9, 2016 16:59
-
-
Save AndyNovo/e1f3182fe190ad2def5e5dbf53869534 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
from Crypto.Util.number import * | |
p = getStrongPrime(512) | |
a = getRandomRange(2, p-2) | |
print GCD(a, p-1) | |
#loop until you get a GCD of 1 with p-1 | |
base = 2 | |
A = pow(base, a, p) | |
print p, base, A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment