当前位置:网站首页>BUU-CTF basic rsa
BUU-CTF basic rsa
2022-07-27 21:07:00 【[email protected]】
1.题目代码:
import gmpy2
from Crypto.Util.number import *
from binascii import a2b_hex,b2a_hex
flag = "*****************"
p = 262248800182277040650192055439906580479
q = 262854994239322828547925595487519915551
e = 65533
n = p*q
c = pow(int(b2a_hex(flag),16),e,n)
print c
# 27565231154623519221597938803435789010285480123476977081867877272451638645710
2.复现
import gmpy2
import libnum
from Crypto.Util.number import *
from binascii import a2b_hex,b2a_hex
flag = "*****************"
p = 262248800182277040650192055439906580479
q = 262854994239322828547925595487519915551
c=27565231154623519221597938803435789010285480123476977081867877272451638645710
e = 65533
n = p*q
phi=(p-1)*(q-1)
d=gmpy2.invert(e,phi)
m=pow(c,d,n)
print(libnum.n2s(int(m)))
# flag{B4by_Rs4}版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_61774705/article/details/124674090
边栏推荐
- Which one is better to request to merge -- three skills of interface request merging, and the performance directly explodes the table
- Socket interaction process of three handshakes
- urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: un
- Those "experiences and traps" in the data center
- Comparison between virtual memory and cache
- CPU的控制方式
- 进制转换方法
- 突发,微信重要通知
- NB-IoT产业的现状与未来:跨过1亿出货门槛,奔向5G大连接!
- Join hands with Changjiang storage, jiangbolong launches the world's smallest expansion card
猜你喜欢

C # delegate usage -- console project, which implements events through delegation

【C语言】通讯录(动态版本)

西门子PLC能否实时无线采集多处从站模拟量数据?

Is it really hard to understand? What level of cache is the recyclerview caching mechanism?
![[RoarCTF2019]RSA](/img/0e/8c8371ccf40094e5b03e502d6ae851.png)
[RoarCTF2019]RSA

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

JUC工具包学习
Software test function test full set of common interview questions [function test] interview summary 4-2

Interviewer: let's talk about the specific process of network data transmission

用3dmax做折扇的思路方法与步骤
随机推荐
Socket interaction process of three handshakes
Character stream learning 14.3
突发,微信重要通知
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: un
你的列表很卡?这4个优化能让你的列表丝般顺滑
Introduction to several common usage scenarios of message queue
[RoarCTF2019]babyRSA威尔逊定理
硬布线控制器的特点:
一位软件投资者的独白:我为什么不追逐快速增长的公司
BUUCTF-[BJDCTF2020]RSA1
用3dmax做折扇的思路方法与步骤
股价暴涨180.46%!国产大硅片龙头沪硅产业上市:近4年净利累计不足6000万
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
台积电3nm细节曝光:晶体管密度高达2.5亿个/mm²,性能及能效大幅提升
史上最简明的 Tcpdump 入门指南,看这一篇就够了
五子棋人机对战实现
2022/7/26
Apple releases new iPhone se: equipped with A13 bionic processor, priced from 3299 yuan
Reinforcement learning - pytorch realizes advantage actor critical (A2C)
Key points of data management