midnightsunctf2021quals
#midnightsunctf2021quals from hashlib import sha256 def keygen(password): while True: p = 2 * random_prime(2 ^ 521) + 1 if p.is_prime(proof=False): break base, h = 3, password for i in range(256): h = sha256(h).digest() x = int.from_bytes(…
midnightsunctf2021quals
confidence_ctf_2019_teaser|really_suspicious_acronym
suspicious_prime
multivariate_coppersmith
pbctf2020_|_special_gift
rsaで一部の値がわかっている時
#midnightsunctf2021quals u = getrandbits(512) p = next_prime(1337 * u + getrandbits(300)) q = next_prime(2021 * u + getrandbits(300)) n = p * q sage: n 376347864369130929314918003073529176189619811132906053032580291332225522349124770927556…