Chall
Chall
class LCG:
def __init__(self, a, b):
self.a = a
self.b = b
self.x = random.getrandbits(64) % MOD
def next(self):
self.x = (self.x * self.a + self.b) % MOD
return self.x % 2**32
class Cipher:
def __init__(self, a, b):
self.lcg = LCG(a, b)
for i in range(2):
cipher = Cipher(2**31, 2**37)
print(cipher.encrypt(flag).hex())
#
8f677a298b845380f3295cc44c9816d707a4b7b286ccbd3fee59c529cb94ce790a632054cc800c9bead
b92ef
#
aae87535d3e7a24cb83742fdfc5ff44e91988bc0e743760dc221bacc088b581d5293de9f4abf21525b3
a7079