連分数展開

MidnightSun Finals 2021 | flaarb

#grocid #midnightsun2021finals sage: p1 = random_prime(2^2048) ....: p2 = next_prime(0xcafebabe * p1 + randint(0, 2^1024)) ....: ....: q1 = random_prime(2^512) ....: q2 = random_prime(2^512) ....: ....: n1 = ZZ(p1 * q1) ....: n2 = ZZ(p2 * …

SECCON 2020 | crypto01

kmov 連分数展開 https://furutsuki.hatenablog.com/entry/2020/10/11/172946#crypto01-393pts--4solves

RTACTF | Neighbor RSA

#rtactf import os # Plaintext (FLAG) plaintext = os.getenv("FLAG", "FAKE{sample_flag}").encode() plai = plaintext[:len(plaintext)//2] ntext = plaintext[len(plaintext)//2:] m1 = int.from_bytes(plai + os.urandom(128), 'big') m2 = int.from_by…