Home
Writeups Misc About
Script Kiddie

Script Kiddie

Short and sweet challenge. The script has one fatal flaw when doing Diffie-Hellman:

g ^ b % p is equivalent to g ^ (b % p), and ^ is binary xor in Python, not pow. Hence, we can easily retrieve Bob's secret my doing B ^ g, as B = g ^ (b % p), and b < p, which leads to b % p = b.

With this figured out, decrypting the flag is trivial.