window.onload=function(){ /*页面加载完成之后生成博客目录*/ BlogDirectory.createBlogDirectory("cnblogs_post_body","h2","h3",20); }

[LitCTF 2023]Euler

题目分数:459

题目标签: RSA欧拉定理

题目描述:

- 题目描述:神秘北极圈,阿拉斯加的山巅
- 出题人:3tefanie丶zhouflag以NSSCTF{}形式提交
# 欧拉定理中n和m相等,因此本题化简可得c=m**phi+1,又因为phi+1>1所以可以从2开始尝试
# 解码
import gmpy2
import libnum

c = 406480424882876909664869928877322864482740577681292497936198951316587691545267772748204383995815523935005725558478033908575228532559165174398668885819826720515607326399097899572022020453298441
m=gmpy2.iroot(c,2)[0]
flag=libnum.n2s(int(m))
print(flag)
posted @ 2023-05-15 17:47  Kicky_Mu  阅读(134)  评论(0编辑  收藏  举报