Possible Duplicate:
Can one generalize the Diffie-Hellman key exchange to three or more parties?

How can Alice, Bob, and Charlie share a common secret key using an extended version of the Diffie-Hellman key exchange protocol?

a=3, b=4, c=5
  • $\begingroup$ Welcome to Cryptography Stack Exchange. I closed your question as a duplicate to another already existing one, since it is quite similar. Please have a look at the answers there. $\endgroup$ – Paŭlo Ebermann Aug 30 '12 at 16:56
  1. Alice computes $A=g^a$, Bob computes $B=g^b$ and Charlie computes $C=g^c$.

  2. $A,B$ and $C$ are published.

  3. Alice computes $AC=C^a$ and $AB=B^a$ and Bob computes $BC=C^b$.

  4. $AB,AC$ and $BC$ are published.

  5. Alice computes $ABC=BC^a$, Bob computes $ABC=AC^b$ and Charlie computes $ABC=AB^c$.

  6. Everybody shares $ABC=g^{abc}$.

This can be generalized for any number of participants in a tree construction, however it becomes increasingly inefficient, because the number of rounds increases.

  • $\begingroup$ Do we use the p ? $\endgroup$ – Mu12 Aug 30 '12 at 7:10
  • $\begingroup$ I suppose you want to work in group $\mathbb{Z}_p^*$. The problem is that your numbers don't make sense. First of all the order of $\mathbb{Z}_p^*$ is 4, therefore valid exponents are $\{0,1,2,3\}$. Additionally you would usually want a group of prime order. But other than that, yes, if you work in $\mathbb{Z}_p^*$, the exponentiations are done $\mod p$ $\endgroup$ – Maeher Aug 30 '12 at 7:26
  • $\begingroup$ I tried doing Z∗p but it gave a very large number, also it didn't use the p which confused me! $\endgroup$ – Mu12 Aug 30 '12 at 7:42
  • $\begingroup$ @Mu12: Use the square-and-multiply method for exponentiation, and do modular reduction after each step, not only at the end. $\endgroup$ – Paŭlo Ebermann Sep 10 '12 at 18:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.