Rating: 5.0

# Paint - 100 points - 74 solves
## Diffie-Hellman challenge with weak modulus

We must find `secret` to get `shared_mix = your_mix**secret mod palette`. We only know that `my_mix = base**secret mod palette`.

So to find `secret`, we need to solve the discrete logarithm problem in the integers modulo `palette` with generator `base`. By Lagrange's theorem, we know that the order of `base` is a power of two (since it divides `phi(palette)=2**2047`). By looping over possible orders `2**i, 0

Original writeup (https://github.com/wborgeaud/ctf-writeups/blob/master/angstromctf2019/Paint.md).