当前位置:网站首页>BUU-Crypto-[HDCTF2019]basic rsa
BUU-Crypto-[HDCTF2019]basic rsa
2022-07-04 05:26:00 【Seven pansy ink year】
[HDCTF2019]basic rsa
Title Description : Got flag Please wrap it flag{} Submit .
The problem solving steps : Open the attachment python file
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
The title gives p,q,e,c,c Namely # The number after :
27565231154623519221597938803435789010285480123476977081867877272451638645710 了 , Equivalent to known p,q,e,c,n, seek M that will do
exp as follows :
import gmpy2
import libnum
p = 262248800182277040650192055439906580479
q = 262854994239322828547925595487519915551
e = 65533
n = p * q
c = 27565231154623519221597938803435789010285480123476977081867877272451638645710
phi = (p - 1) * (q - 1)
d = gmpy2.invert(e, phi)
M = pow(c, d, n)
print libnum.n2s(M)
Run to get results flag
flag:flag{B4by_Rs4}
边栏推荐
- Trie数-字典树
- Zhongke panyun-2022 Guangdong Trojan horse information acquisition and analysis
- [matlab] matlab simulation modulation system - DSB system
- LM小型可编程控制器软件(基于CoDeSys)笔记二十二:错误4268/4052
- Encryption and decryption
- 拓扑排序和关键路径的图形化显示
- Electronic components mall and data manual download website summary
- Remote desktop client RDP
- Unity is connected to the weather system
- c语言经典指针和数组笔试题解析
猜你喜欢
Download kicad on Alibaba cloud image station
模拟小根堆
KMP match string
数据标注是一块肥肉,盯上这块肉的不止中国丨曼孚科技
c语言经典指针和数组笔试题解析
补某视频网站的js,进行视频解密
How to use postman to realize simple interface Association [add, delete, modify and query]
Automated testing selenium foundation -- webdriverapi
Solar insect killing system based on single chip microcomputer
【QT】制作MyComboBox点击事件
随机推荐
力扣 第 300 场周赛
小程序毕业设计---美食、菜谱小程序
Error response from daemon: You cannot remove a running container 8d6f0d2850250627cd6c2acb2497002fc3
企业级日志分析系统ELK(如果事与愿违那一定另有安排)
[QT] create mycombobox click event
Capturing and sorting out external Fiddler -- Conversation bar and filter
Flutter calls Gaode map app to realize location search, route planning and reverse geocoding
laravel 中获取刚刚插入的记录的id
Redis realizes ranking function
【QT】定时器
2022 R2 mobile pressure vessel filling retraining question bank and answers
Supplement the JS of a video website to decrypt the video
2022年T电梯修理操作证考试题库及模拟考试
远程桌面客户端 RDP
Easy change
KMP匹配字符串
[matlab] matlab simulation of modulation system - power spectrum and coherent demodulation of AM modulated signal
光模块字母含义及参数简称大全
补某视频网站的js,进行视频解密
Nodejs learning document