with open('output.txt', 'r') as f:
exec(f.read())
mod = 1; k = n
for i in range(2, 2 ** 16):
cnt = 0
while k % i == 0:
k //= i
cnt += 1
if cnt > 0:
mod *= ((i ** cnt) - (i ** (cnt-1)))
print(f'{i} ^ {cnt}')
print(f'mod = {mod}')
from gmpy2 import invert, powmod, gcd
d = invert(e, mod)
m = powmod(flag, d, n)
from Cryptodome.Util.number import long_to_bytes
print(long_to_bytes(m))
【Write Up】Many Primes
19011343447 2025-08-22 10:31:37 46 0 返回题目详情


作者:19011343447
18
提交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
- 2年前
-
强网杯-强网先锋辅助
***收费WriteUP请购买后查看,VIP用户可免费查看***
- Crypto
- 2年前