当前位置:网站首页>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
边栏推荐
- Master data management theory and Practice
- Solve 5g pain points, Meizu 17 smart 5g fast and stable technology release
- 资深如何确定软件测试结束的标准
- Control mode of CPU
- NDK 系列(6):说一下注册 JNI 函数的方式和时机
- Interviewer: let's talk about the specific process of network data transmission
- XSS Payload 学习浏览器解码
- Why do I need to wait for 2msl?
- Is it really hard to understand? What level of cache is the recyclerview caching mechanism?
- Edit the copy and paste judgment problem (bug?), WYSIWYG display symbol problem feedback.
猜你喜欢

基于原生js实现今日新闻网站

TOGAF10标准读书会首场活动圆满举办,精彩时刻回顾!

Use of date

Introduction to several common usage scenarios of message queue

2022 International Conference on civil, building and Environmental Engineering (iccaee 2022)

Lua basic grammar learning

解密 OOM 崩溃下降 90% 的秘密~
![[NCTF2019]babyRSA1](/img/c1/52e79b6e40390374d48783725311ba.gif)
[NCTF2019]babyRSA1

五子棋人机对战实现
![[RoarCTF2019]babyRSA威尔逊定理](/img/c1/52e79b6e40390374d48783725311ba.gif)
[RoarCTF2019]babyRSA威尔逊定理
随机推荐
Shuffle, partition and read of tfrecord
Calling dht11/22 temperature and humidity sensor in Proteus simulation Arduino
Is it really hard to understand? What level of cache is the recyclerview caching mechanism?
如果我们是那晚负责修复 B 站崩了的开发人员
【12月海口】2022年第六届船舶,海洋与海事工程国际会议(NAOME 2022)
BUUCTF-RSA
JS array copy speed test 220320
Your list is too laggy? These four optimizations can make your list silky smooth
Unity 实现简单画板画画功能(笔记)
重新定义分析 - EventBridge 实时事件分析平台发布
【zer0pts CTF 2022】 Anti-Fermat
Arm32进行远程调试
BUU-CTF basic rsa
How Flink uses savepoint
Master data management theory and Practice
Sudden, wechat important notice
File & recursion 14.1
2022/7/26
What technology is RPA process automation robot? How to realize office automation?
What is the difference between concurrency and parallelism?