m0lecon2021

m0leCon 2021 | Obscurity-fixed

#m0lecon2021

m0leCon 2021 | babysign

#m0lecon2021 from secret import flag from Crypto.Util.number import bytes_to_long, getStrongPrime, inverse from hashlib import sha256 import os def prepare(m): if len(m)>64: m = m[:64] elif len(m)<64: l = 64-len(m) m = m + os.urandom(l) as…

m0leCon 2021 | obscurity

#m0lecon2021 import random from functools import reduce import sys from math import log2 from secret import flag def xor(a, b): return bytes(x^y for x,y in zip(a,b)) class LFSR(object): def __init__(self, s, p): self.s = s self.p = p def c…

m0leCon 2021 | Alternating key exchange

#m0lecon2021 chall.sageとoutput.txtがもらえる from Crypto.Cipher import AES from Crypto.Util.Padding import pad from hashlib import sha256 import random n = 42 m = 20 G = AlternatingGroup(m) pub_a = [G.random_element() for _ in range(n)] p…

m0leCon 2021 | Giant log

#m0lecon2021 #good_challenges_2021 https://keltecc.github.io/ctf/writeup/2021/05/15/m0lecon-ctf-2021-teaser-giant-log.html import random from secret import flag, fast_exp import signal p = 0x83f39daf527c6cf6360999dc47c4f0944ca1a67858a11bd9…