CTF-BUUCTF-CRPTO-RSAROLL

 1、n=920139713,yafu分解,或这么小的n,代码跑也是很快。

得出

p=49891
q=18443

2、根据题意,Only number and a-z,可以知道,每个密文是一个字符,python跑一下。代码如下

#!/usr/bin/env python
# -*- coding:utf-8 -*-

import gmpy2
import rsa
#{920139713,19}

n=920139713
e=19
c=[704796792,752211152,274704164,18414022,368270835,483295235,263072905,459788476,483295235,459788476,
663551792,475206804,459788476,428313374,475206804,459788476,425392137,704796792,458265677,341524652,
483295235,534149509,425392137,428313374,425392137,341524652,458265677,263072905,483295235,828509797,
341524652,425392137,475206804,428313374,483295235,475206804,459788476,306220148]
p=49891
q=18443
d = gmpy2.invert(e , (p-1) * (q-1))

print (''.join(chr(pow(i,d,n)) for i in c))

3、得到 flag{13212je2ue28fy71w8u87y31r78eu1e2}

 

你可能感兴趣的:(CTF,python)