首页 > 解决方案 > 使用 N、c、e 进行 CTF RSA 解密

问题描述

给出 N, e, c 如下:

n = 35390004486354300347521848565413257959442624589297688131017877221807025004928966206454752329594506530598099849274956709610488234955109039874355077958460196991750855650029096905451

e = 65537

c = 34976328528100445602888072790831380493399287679380757676967266152942525578548886648293955777757882335796410272725253490310142371251759362170135820927390507970457244397459500624458

我尝试了几种方法来解密它,比如factordb, yafu ,甚至发现了一个由RsaCtfTool解决的类似问题。也许我的电脑的性能很糟糕......有人可以帮忙吗?非常感谢!

标签: encryptioncryptographyrsactf

解决方案


我尝试使用最新的 RsaCtfTool版本,它可以工作:

python3 ./RsaCtfTool.py -n 3539000448635430034752184856541325795944262458929768813101787722180702500492896620645475232959450653059809984927495670961048
8234955109039874355077958460196991750855650029096905451 -e 65537 --uncipher 3497632852810044560288807279083138049339928767938075767696726615294252557854888664829395577775788
2335796410272725253490310142371251759362170135820927390507970457244397459500624458

[*] Testing key /tmp/tmpimxbt566.
[*] Performing londahl attack on /tmp/tmpimxbt566.
[*] Performing mersenne_primes attack on /tmp/tmpimxbt566.
[*] Performing cube_root attack on /tmp/tmpimxbt566.
[*] Performing pollard_p_1 attack on /tmp/tmpimxbt566.
[*] Performing smallfraction attack on /tmp/tmpimxbt566.

Results for /tmp/tmpimxbt566:

Unciphered data :
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00CISCN{XXXX_XX_X_XXXXX_XXXX}\n'

(剧透:我是 RsaCtfTool 的开发者)


推荐阅读