Home
Writeups Misc About
Static Client

Static Client

The solution is unnecessary nuking of the challenge. We were given the Diffie-Hellman key exchange between Alice and Bob, with some flag encrypted using the shared secret from that session. We can easily verify that Bob is still reusing his secret b in the communication with us.

There are two ways to solve this challenge. The most straightforward way is to use the value A from Alice as the generator g we sent, p as the prime in the Diffie-Hellman key exchange between Alice and Bob earlier, the value of A does not matter. Since the original secret is Abmodp, the public key B that Bob sent will be (g)b=Abmodp. Hence the new public key from Bob is the secret key that we need. Very straightforward.

Otherwise, we can use some "nukes". This is similar to the Let's Decrypt Again challenge, where we construct some group that it is easy to solve discrete log in. One such group is one in the form of p ^ k, where p is a smooth number. Then it is easy to solve discrete log in such group, using Pohlig-Hellman, as the factorization can be easily done.

Sage Implementation: