I made a stream cipher!
nc crypto.2020.chall.actf.co 20601
- Download: actf2020-chall-stream.py
The challenge code is a stream cipher and it encrypts that flag bit by bit by xorring against the stream cipher. After that it print the encrypted string. But the server also lets us input 3 values (a, b, c) that will build the key for the stream cipher. Even though the stream cipher has some random elements, we can choose these 3 values such that the key is very small and the stream cipher will only output 0's. Xorring with 0 does nothing, so the 'encrypted' flag is then equal to the actual flag.