☰
Writeup 4 ByteMe CTF 2026 Vormir Common Modulus
2026/10/14 2:01:51 网站建设 项目流程

Writeup 4 ByteMe CTF 2026 Vormir Common Modulus

分类:Cryptography
难度:Easy |分数:100
附件:params.txt(386 字节)
作者:Pratik Jadhav

题目描述:

Two custodians encrypted the same Soul Vault secret using RSA with a shared modulus but different public exponents. Recover the plaintext.

数据:

n = 16380649768533394557837493376413306403300053927332145442950164332328030751564185489519565597585555867737606727528343 e1 = 65537 e2 = 65539 c1 = 13717084049277399427945358975177210874446528287993178469838547381506741616766449871863462627142297960244208456711847 c2 = 4601321998457411971134687661444766716276847022305030736758227088246554672740623255330037934526510403437754437399162

解题脚本:

fromCrypto.Util.numberimportlong_to_bytesimportgmpy2 n=...e1=65537e2=65539c1=...c2=...g,a,b=gmpy2.gcdext(e1,e2)ifa<0:a=-a c1=gmpy2.invert(c1,n)ifb<0:b=-b c2=gmpy2.invert(c2,n)m=(pow(c1,a,n)*pow(c2,b,n))%nprint(long_to_bytes(m))

Flag:

OWASP{c0mm0n_m0dulu5_1s_n0t_s4f3}

知识点:

  • RSA 共模攻击:同n,同明文,不同e1、e2
  • gcd(e1, e2) = 1时可用扩展欧几里得
  • 不需要分解 n,不需要私钥 d

Rambo

2026年10月13日

🎉🎉🎉

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询