0x01 前言
pragyanCTF 2022的一道Crypto题目名为Blind_Scout,题目给了5个pub.pem证书,一个cipher.txt,记录下RSA题目中给了多个证书时如何求解flag。
0x02 求解
下载附件得到了5个pem证书和一个cipher.txt,利用factordb网站无法分解N,利用RSA公私钥分解网站发现5个证书的E都等于65537;
编写程序查找五个模的公因子:
from Crypto.PublicKey import RSA
from math import gcd
def checkMods():
pubkeys = []
for i in range(1,6):
with open(f'pub{i}.pem', 'r') as f:
data = ''.join(f.readlines(