Created
December 23, 2021 09:36
-
-
Save CCCougar/6145d4e828b4f12faf53c31b3d5af314 to your computer and use it in GitHub Desktop.
获得大量RSA公私钥对
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
# 获得所有e,d公私钥匙对 | |
from Crypto.Util.number import GCD | |
p = 206373637029902328657596154026109496537 | |
q = 230573583664314101337547147157742312101 | |
N = p * q | |
phi = (p - 1) * (q - 1) | |
# group = {} | |
for test_e in range(1, phi): | |
if GCD(test_e, phi) == 1: | |
test_d = pow(test_e, -1, phi) | |
print("e:", test_e, "d:", test_d) | |
# group[test_e] = test_d | |
# print(group) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment