|
@ -526,7 +526,7 @@ class RSAKey(object): |
|
|
return False |
|
|
return False |
|
|
|
|
|
|
|
|
def generate(bits): |
|
|
def generate(bits): |
|
|
key = Python_RSAKey() |
|
|
key = RSAKey() |
|
|
p = getRandomPrime(bits//2, False) |
|
|
p = getRandomPrime(bits//2, False) |
|
|
q = getRandomPrime(bits//2, False) |
|
|
q = getRandomPrime(bits//2, False) |
|
|
t = lcm(p-1, q-1) |
|
|
t = lcm(p-1, q-1) |
|
@ -540,4 +540,3 @@ class RSAKey(object): |
|
|
key.qInv = invMod(q, p) |
|
|
key.qInv = invMod(q, p) |
|
|
return key |
|
|
return key |
|
|
generate = staticmethod(generate) |
|
|
generate = staticmethod(generate) |
|
|
|
|
|
|
|
|