circle_city_con_2021

Circle City Con CTF 2021 | Random is also Valid

#circle_city_con_2021 import sys, json from collections import namedtuple from Crypto.Random.random import randrange q = 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab r = int(0x73eda7532…

Circle City Con CTF 2021 | No Stone Left Unturned

#circle_city_con_2021 from gmpy2 import next_prime, is_prime import random, os, sys if __name__ == "__main__": random.seed(os.urandom(32)) p = next_prime(random.randrange((1<<1024), (1<<1024) + (1<<600))) pp = (p * 7) // 11 q = next_prime(…

Circle City Con CTF 2021 | Poison Prime

#circle_city_con_2021 import Crypto.Util.number as cun import Crypto.Random.random as crr import Crypto.Util.Padding as cup from Crypto.Cipher import AES import os import hashlib class DiffieHellman: def __init__(self, p: int): self.p = p …