**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.