当前位置:网站首页>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}
边栏推荐
- RSA加密应用常见缺陷的原理与实践
- TCP状态转换图
- SQL performance optimization skills
- ETCD数据库源码分析——初始化总览
- 【兴趣阅读】Adversarial Filtering Modeling on Long-term User Behavior Sequences for Click-Through Rate Pre
- Headache delayed double deletion
- 19.Frambuffer应用编程
- Just do it with your hands 7 - * project construction details 2 - hook configuration
- [matlab] matlab simulation modulation system FM system
- 模拟小根堆
猜你喜欢
1480. 一维数组的动态和
C语言简易学生管理系统(含源码)
Appearance of LabVIEW error dialog box
Headache delayed double deletion
模拟小根堆
[paper summary] zero shot semantic segmentation
补某视频网站的js,进行视频解密
Introduction To AMBA 简单理解
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
2022 t elevator repair operation certificate examination question bank and simulation examination
随机推荐
Simulink and Arduino serial port communication
JS string splicing enhancement
[matlab] matlab simulates digital baseband transmission system - digital baseband transmission system
Simulink与Arduino串口通信
[matlab] matlab simulates digital bandpass transmission system ask, PSK, FSK system
Daily question brushing record (12)
Flutter calls Gaode map app to realize location search, route planning and reverse geocoding
光模塊字母含義及參數簡稱大全
补某视频网站的js,进行视频解密
Flask
力扣(LeetCode)184. 部门工资最高的员工(2022.07.03)
Talk about the SQL server version of DTM sub transaction barrier function
Rollup各组件作用
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
Several smart watch related chips Bluetooth chip low power consumption
[matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
空洞卷积、可变形卷积、可变形ROI Pooling
简易零钱通
远程桌面客户端 RDP
Evolution of system architecture: differences and connections between SOA and microservice architecture