当前位置:网站首页>BUUCTF-Baby RSA
BUUCTF-Baby RSA
2022-07-27 23:54:00 【[email protected]】
1. Title code :
# p+q : 0x1232fecb92adead91613e7d9ae5e36fe6bb765317d6ed38ad890b4073539a6231a6620584cea5730b5af83a3e80cf30141282c97be4400e33307573af6b25e2ea
# (p+1)(q+1) : 0x5248becef1d925d45705a7302700d6a0ffe5877fddf9451a9c1181c4d82365806085fd86fbaab08b6fc66a967b2566d743c626547203b34ea3fdb1bc06dd3bb765fd8b919e3bd2cb15bc175c9498f9d9a0e216c2dde64d81255fa4c05a1ee619fc1fc505285a239e7bc655ec6605d9693078b800ee80931a7a0c84f33c851740
# e : 0xe6b1bee47bd63f615c7d0a43c529d219
# d : 0x2dde7fbaed477f6d62838d55b0d0964868cf6efb2c282a5f13e6008ce7317a24cb57aec49ef0d738919f47cdcd9677cd52ac2293ec5938aa198f962678b5cd0da344453f521a69b2ac03647cdd8339f4e38cec452d54e60698833d67f9315c02ddaa4c79ebaa902c605d7bda32ce970541b2d9a17d62b52df813b2fb0c5ab1a5
# enc_flag : 0x50ae00623211ba6089ddfae21e204ab616f6c9d294e913550af3d66e85d0c0693ed53ed55c46d8cca1d7c2ad44839030df26b70f22a8567171a759b76fe5f07b3c5a6ec89117ed0a36c0950956b9cde880c575737f779143f921d745ac3bb0e379c05d9a3cc6bf0bea8aa91e4d5e752c7eb46b2e023edbc07d24a7c460a34a9a
2. Reappear :
Mainly through p+q and (p+1)*(q+1) To calculate n Value .
import libnum
pjiaq=0x1232fecb92adead91613e7d9ae5e36fe6bb765317d6ed38ad890b4073539a6231a6620584cea5730b5af83a3e80cf30141282c97be4400e33307573af6b25e2ea
pjia1xqjia1=0x5248becef1d925d45705a7302700d6a0ffe5877fddf9451a9c1181c4d82365806085fd86fbaab08b6fc66a967b2566d743c626547203b34ea3fdb1bc06dd3bb765fd8b919e3bd2cb15bc175c9498f9d9a0e216c2dde64d81255fa4c05a1ee619fc1fc505285a239e7bc655ec6605d9693078b800ee80931a7a0c84f33c851740
e = 0xe6b1bee47bd63f615c7d0a43c529d219
d =0x2dde7fbaed477f6d62838d55b0d0964868cf6efb2c282a5f13e6008ce7317a24cb57aec49ef0d738919f47cdcd9677cd52ac2293ec5938aa198f962678b5cd0da344453f521a69b2ac03647cdd8339f4e38cec452d54e60698833d67f9315c02ddaa4c79ebaa902c605d7bda32ce970541b2d9a17d62b52df813b2fb0c5ab1a5
c=0x50ae00623211ba6089ddfae21e204ab616f6c9d294e913550af3d66e85d0c0693ed53ed55c46d8cca1d7c2ad44839030df26b70f22a8567171a759b76fe5f07b3c5a6ec89117ed0a36c0950956b9cde880c575737f779143f921d745ac3bb0e379c05d9a3cc6bf0bea8aa91e4d5e752c7eb46b2e023edbc07d24a7c460a34a9a
# (p+1)(q+1)=pq+p+q+1
# (p-1)(q-1)=pq-p-q-1
# (p-1)(q-1)=(p+1)(q+1)-2(p+q)-2
#n=pq=((p+1)(q+1)+(p-1)(q-1))/2
phi=pjia1xqjia1-2*pjiaq-2
n=(phi+pjia1xqjia1)//2
m=pow(c,d,n)
print(libnum.n2s(int(m)))
# b'flag{cc7490e-78ab-11e9-b422-8ba97e5da1fd}'版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207272106552794.html
边栏推荐
- 解密 OOM 崩溃下降 90% 的秘密~
- 如果我们是那晚负责修复 B 站崩了的开发人员
- Redis hash underlying data structure
- [C language] address book (dynamic version)
- Unity 实现简单画板画画功能(笔记)
- Construction and application of super large scale knowledge map of ants
- BUUCTF-Baby RSA
- 2022 International Conference on civil, building and Environmental Engineering (iccaee 2022)
- 2022年土木,建筑与环境工程国际会议(ICCAEE 2022)
- 消息队列常见的几种使用场景介绍
猜你喜欢

Technical certification | Tupo software and Huawei cloud create a new situation of win-win cooperation

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

BUUCTF-RSA roll

Spark 离线开发框架设计与实现

org.junit.runners.model.InvalidTestClassError: Invalid test class ‘com.zhj.esdemo.MysqlTests‘: 1.

Introduction to several common usage scenarios of message queue

BUUCTF-RSA

Unity 实现简单画板画画功能(笔记)

Xss.haozi.me practice customs clearance
随机推荐
Reduce error demonstration
UE4官方AEC蓝图案例课程学习笔记
Use of date
29.学习Highcharts 使用百分比的堆叠柱形图
Zcmu--1720: death is like the wind, I want to pretend to force
主数据管理理论与实践
[GWCTF 2019]BabyRSA1
Flutter pull_ to_ refresh-1.6.0/lib/src/internals/slivers. dart:164:13: Error: Method not found: ‘descr
In 2019, the world's top ten semiconductor manufacturers: Intel returned to the first place, and apple rose sharply against the trend
Character stream learning 14.3
How to bold font in Latex & how to make circle serial number
Redis hash underlying data structure
Realize today's news website based on native JS
远程调试 idea配置remote debug、在远程服务器的程序中,添加JVM启动参数-Xdebug
org.junit.runners.model.InvalidTestClassError: Invalid test class ‘com.zhj.esdemo.MysqlTests‘: 1.
Unity 实现简单画板画画功能(笔记)
4小时定单破20000+,自称“百万内最豪华”,国产品牌飘了?
Redis 哈希Hash底层数据结构
字符流学习14.3
面试官问线程安全的List,看完再也不怕了!