**TL;DR** The server is doing Diffie-Hellman key exchange, but doesn't give us its public key. By submitting a public key of 1, we can just use a shared secret of 1 to bootstrap encryption and get the flag.
Original writeup (https://an00brektn.github.io/htb-cyber-apocalypse-crypto-short-and-sweet/#android-in-the-middle).