当前位置:网站首页>[RoarCTF2019]RSA
[RoarCTF2019]RSA
2022-07-27 21:07:00 【[email protected]】
1.题目
# A=(((y%x)**5)%(x%y))**2019+y**316+(y+1)/x
# p=next_prime(z*x*y)
# q=next_prime(z)
# A = 2683349182678714524247469512793476009861014781004924905484127480308161377768192868061561886577048646432382128960881487463427414176114486885830693959404989743229103516924432512724195654425703453612710310587164417035878308390676612592848750287387318129424195208623440294647817367740878211949147526287091298307480502897462279102572556822231669438279317474828479089719046386411971105448723910594710418093977044179949800373224354729179833393219827789389078869290217569511230868967647963089430594258815146362187250855166897553056073744582946148472068334167445499314471518357535261186318756327890016183228412253724
# n = 117930806043507374325982291823027285148807239117987369609583515353889814856088099671454394340816761242974462268435911765045576377767711593100416932019831889059333166946263184861287975722954992219766493089630810876984781113645362450398009234556085330943125568377741065242183073882558834603430862598066786475299918395341014877416901185392905676043795425126968745185649565106322336954427505104906770493155723995382318346714944184577894150229037758434597242564815299174950147754426950251419204917376517360505024549691723683358170823416757973059354784142601436519500811159036795034676360028928301979780528294114933347127
# c = 41971850275428383625653350824107291609587853887037624239544762751558838294718672159979929266922528917912189124713273673948051464226519605803745171340724343705832198554680196798623263806617998072496026019940476324971696928551159371970207365741517064295956376809297272541800647747885170905737868568000101029143923792003486793278197051326716680212726111099439262589341050943913401067673851885114314709706016622157285023272496793595281054074260451116213815934843317894898883215362289599366101018081513215120728297131352439066930452281829446586562062242527329672575620261776042653626411730955819001674118193293313612128
2.复现
直接分解n,发现可以分解,然后就爆破e。
import gmpy2
import libnum
import sympy
A = 2683349182678714524247469512793476009861014781004924905484127480308161377768192868061561886577048646432382128960881487463427414176114486885830693959404989743229103516924432512724195654425703453612710310587164417035878308390676612592848750287387318129424195208623440294647817367740878211949147526287091298307480502897462279102572556822231669438279317474828479089719046386411971105448723910594710418093977044179949800373224354729179833393219827789389078869290217569511230868967647963089430594258815146362187250855166897553056073744582946148472068334167445499314471518357535261186318756327890016183228412253724
n = 117930806043507374325982291823027285148807239117987369609583515353889814856088099671454394340816761242974462268435911765045576377767711593100416932019831889059333166946263184861287975722954992219766493089630810876984781113645362450398009234556085330943125568377741065242183073882558834603430862598066786475299918395341014877416901185392905676043795425126968745185649565106322336954427505104906770493155723995382318346714944184577894150229037758434597242564815299174950147754426950251419204917376517360505024549691723683358170823416757973059354784142601436519500811159036795034676360028928301979780528294114933347127
c = 41971850275428383625653350824107291609587853887037624239544762751558838294718672159979929266922528917912189124713273673948051464226519605803745171340724343705832198554680196798623263806617998072496026019940476324971696928551159371970207365741517064295956376809297272541800647747885170905737868568000101029143923792003486793278197051326716680212726111099439262589341050943913401067673851885114314709706016622157285023272496793595281054074260451116213815934843317894898883215362289599366101018081513215120728297131352439066930452281829446586562062242527329672575620261776042653626411730955819001674118193293313612128
p=842868045681390934539739959201847552284980179958879667933078453950968566151662147267006293571765463137270594151138695778986165111380428806545593588078365331313084230014618714412959584843421586674162688321942889369912392031882620994944241987153078156389470370195514285850736541078623854327959382156753458569
q=139916095583110895133596833227506693679306709873174024876891023355860781981175916446323044732913066880786918629089023499311703408489151181886568535621008644997971982182426706592551291084007983387911006261442519635405457077292515085160744169867410973960652081452455371451222265819051559818441257438021073941183
phi=(p-1)*(q-1)
# 爆破e
for e in range(100000):
if(gmpy2.gcd(e,phi)==1):
d=gmpy2.invert(e,phi)
m=pow(c,d,n)
flag=libnum.n2s(int(m))
if('CTF' in str(flag)):
print(flag)
break
# b'RoarCTF{wm-l1l1ll1l1l1l111ll}'版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_61774705/article/details/124786931
边栏推荐
- NDK series (6): let's talk about the way and time to register JNI functions
- ZCMU--1720: 死亡如风,我要装逼
- C#委托用法--控制台项目,通过委托实现事件
- 解决5G使用痛点,魅族17 mSmart 5G快省稳技术发布
- 股价暴涨180.46%!国产大硅片龙头沪硅产业上市:近4年净利累计不足6000万
- 基于原生js实现今日新闻网站
- Arm32 for remote debugging
- 【C语言】通讯录(动态版本)
- Using the optical fingerprint scheme under the huiding screen, Samsung Galaxy a71 5g is listed
- 7.6万人停工!东芝宣布关闭日本所有工厂
猜你喜欢

Normality of confidence interval

他山之石 | 蚂蚁超大规模知识图谱构建及应用

Common Taylor expansion

Design and implementation of spark offline development framework

低代码开发前景如何,大家都真的看好低代码开发吗?

Remotely debug idea, configure remote debug, and add JVM startup parameter -xdebug in the program of remote server

消息队列常见的几种使用场景介绍

【12月海口】2022年第六届船舶,海洋与海事工程国际会议(NAOME 2022)

一位软件投资者的独白:我为什么不追逐快速增长的公司

Calling dht11/22 temperature and humidity sensor in Proteus simulation Arduino
随机推荐
Error:svn: E155010: ‘/Users/.../Desktop/wrokspace/xxx‘ is scheduled for addition, but is missing
Is it really hard to understand? What level of cache is the recyclerview caching mechanism?
RPA流程自动化机器人是什么技术?如何实现办公自动化?
面试官问线程安全的List,看完再也不怕了!
MySQL之数据查询(WHERE)
NDK 系列(6):说一下注册 JNI 函数的方式和时机
JS提升:JS中的数组扁平化问题
Character stream learning 14.3
Calling dht11/22 temperature and humidity sensor in Proteus simulation Arduino
Explain the idempotence of distributed system in detail
What are the advantages of Tita's OKR system over other similar products or shared documents?
CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021
Interviewer: let's talk about the specific process of network data transmission
This is the most concise guide to tcpdump in history. It's enough to read this one
ELK日志分析系统安装和部署
重新定义分析 - EventBridge 实时事件分析平台发布
js数组复制速度测试220320
2019年全球十大半导体厂商:英特尔重回第一,苹果逆势大涨
Your list is too laggy? These four optimizations can make your list silky smooth
他山之石 | 蚂蚁超大规模知识图谱构建及应用