Given the finite cyclic, additive group (G, +), with |G| = n and generator = g, what are the computations and exchanged messages for Diffie-Hellman?
What I tried myself:
- Alice chooses a private $a$ and sends $p(|G|)$ and $g$ (generator) to Bob.
- Alice calculates $A = a\cdot g \mod p (|G|)$ and sends it to Bob.
- Bob chooses a private $b$ and calculates $B = b \cdot g \mod p (|G|)$ and sends it back to Alice.
- Alice calculates $a \cdot B \mod p (|G|)$ which is the shared key.
- Alice calculates $b \cdot A \mod p (|G|)$ which is the shared key.
Is this way of thinking correct? Because I'm not sure because the group is additive.