from Crypto.Util.number import *
from gmpy2 import *
e = 2953544268002866703872076551930953722572317122777861299293407053391808199220655289235983088986372630141821049118015752017412642148934113723174855236142887
n = 6006128121276172470274143101473619963750725942458450119252491144009018469845917986523007748831362674341219814935241703026024431390531323127620970750816983
c = 4082777468662493175049853412968913980472986215497247773911290709560282223053863513029985115855416847643274608394467813391117463817805000754191093158289399
m = 2
for dp in range(1000000, 1, -1):
if dp % 10000 == 0:
print(dp)
t = (powmod(m, e * dp, n) + n - m) % n
p = gmpy2.gcd(n, t)
if p != 1 and n % p == 0:
q = n // p
d = gmpy2.invert(e, (p - 1) * (q - 1))
print(long_to_bytes(powmod(c, d, n)))
break
【Write Up】crtrsa
19011343447 2025-06-07 11:13:55 187 0


作者:19011343447
7
提交0
收入相关WriteUP
-
SusCTF2017-Caesar cipher
***收费WriteUP请购买后查看,VIP用户可免费查看***
- Crypto
- 4年前
-
easy_crypto
***收费WriteUP请购买后查看,VIP用户可免费查看***
- Crypto
- 4年前
-
简单加密
***收费WriteUP请购买后查看,VIP用户可免费查看***
- Crypto
- 4年前
-
2018-鼎网杯-3-track_hacker
***收费WriteUP请购买后查看,VIP用户可免费查看***
- Crypto
- 1年前
-
强网杯-强网先锋辅助
***收费WriteUP请购买后查看,VIP用户可免费查看***
- Crypto
- 1年前