当前位置:网站首页>BUUCTF-bbbbbbrsa
BUUCTF-bbbbbbrsa
2022-07-27 23:54:00 【[email protected]】
1. Title code :
from base64 import b64encode as b32encode
from gmpy2 import invert,gcd,iroot
from Crypto.Util.number import *
from binascii import a2b_hex,b2a_hex
import random
flag = "******************************"
nbit = 128
p = getPrime(nbit)
q = getPrime(nbit)
n = p*q
print p
print n
phi = (p-1)*(q-1)
e = random.randint(50000,70000)
while True:
if gcd(e,phi) == 1:
break;
else:
e -= 1;
c = pow(int(b2a_hex(flag),16),e,n)
print b32encode(str(c))[::-1]
# 2373740699529364991763589324200093466206785561836101840381622237225512234632
p = 177077389675257695042507998165006460849
n = 37421829509887796274897162249367329400988647145613325367337968063341372726061
c = ==gMzYDNzIjMxUTNyIzNzIjMyYTM4MDM0gTMwEjNzgTM2UTN4cjNwIjN2QzM5ADMwIDNyMTO4UzM2cTM5kDN2MTOyUTO5YDM0czM3MjM
2. Reappear
n,p,c We all know , It's actually blasting e, The scope is also given .
from gmpy2 import invert,gcd
import libnum
p = 177077389675257695042507998165006460849
n = 37421829509887796274897162249367329400988647145613325367337968063341372726061
c = 2373740699529364991763589324200093466206785561836101840381622237225512234632
q=n//p
phi=(p-1)*(q-1)
e=70000
while 1:
if(e<=1):
break
if(gcd(e,phi)==1):
d=invert(e,phi)
m=pow(c,d,n)
if(str(libnum.n2s(int(m)))[2]=='f'):
print(libnum.n2s(int(m)))
e=e-1
# b'f\xff\x8e\xaa\x8e\x82\xbd\x0f\x05\x18\xbe\xc5\x82\xd5\x9a\xd8f\xad\x92n\xc6J\xe4\x1a\xb0r=m7\xe6\xac'
# b'flag{rs4_1s_s1mpl3!#}'
# b'f\xcfNT\x9a\x90\xba\xe8\x98\x94\xc5?0\xc5\xa6\x0f5z\xcb\xeew\x07\xff\xab?u`\x91\x1f\xb4 '
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207272106553138.html
边栏推荐
- Those "experiences and traps" in the data center
- Features of hardwired controller:
- NDK 系列(6):说一下注册 JNI 函数的方式和时机
- 4小时定单破20000+,自称“百万内最豪华”,国产品牌飘了?
- BUUCTF-childRSA费马小定理
- Character stream learning 14.3
- What technology is RPA process automation robot? How to realize office automation?
- CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021
- Yijia will release ODM orders in 2020 and make efforts in the middle and low-end market
- js数组复制速度测试220320
猜你喜欢

Redis hash underlying data structure

真的很难理解?RecyclerView 缓存机制到底是几级缓存?

4小时定单破20000+,自称“百万内最豪华”,国产品牌飘了?

NDK series (6): let's talk about the way and time to register JNI functions

TCP的粘包拆包问题+解决方案

Character stream learning 14.3

远程调试 idea配置remote debug、在远程服务器的程序中,添加JVM启动参数-Xdebug

The first activity of togaf10 standard reading club was successfully held, and the wonderful moments were reviewed!

Design and implementation of spark offline development framework

Master data management theory and Practice
随机推荐
TCP的粘包拆包问题+解决方案
In 2019, the world's top ten semiconductor manufacturers: Intel returned to the first place, and apple rose sharply against the trend
Latex中如何加粗字体 & 如何打出圆圈序号
J9数字科普:Sui网络的双共识是如何工作的?
Latex common summary (2): input matrix (input matrix, diagonal matrix, equations, etc.)
The total investment is 60billion! Foxconn semiconductor high-end package test project officially settled in Qingdao
数据中台的那些“经验与陷阱”
如果我们是那晚负责修复 B 站崩了的开发人员
硬布线控制器的特点:
The 4-hour order exceeds 20000+, claiming to be "the most luxurious in a million". Is the domestic brand floating?
资深如何确定软件测试结束的标准
Redis distributed lock
My annual salary is 1million, and I don't have clothes more than 100 yuan all over my body: saving money is the top self-discipline
15million per day! BYD masks won a US $1billion order in California
TFRecord的Shuffle、划分和读取
Flutter pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:164:13: Error: Method not found: ‘descr
Bank Marketing预测一个客户购买理财产品的成功率
BUUCTF-[BJDCTF2020]RSA1
Current situation and future of Nb IOT industry: cross the threshold of 100million shipments and rush to 5g connection!
详解分布式系统的幂等