Home
Writeups Misc About
Additive

Additive

This video from NUS Greyhats should help you with this challenge. Basically, in the additive group of Fp, the discrete logarithms are simply the inverses.

Denote a,b as the secret keys of Alice and Bob. The public key of Alice and Bob are given by A=agmodp and B=bgmodp (it's normally ga, but we are working with addition here, hence).

Hence, the secret key a can be recovered by multiplying the multiplicative inverse of g on both sides of A=agmodp.

We have:

Ag1=agg1modp
Ag1=amodp

With this, we can derive the secret key of Alice, then create the shared secret to retrieve the flag.

Python Implementation: