« Unexpected costs | Main | Security Consultants vs. Simple Products »

Thursday, 16 October 2008

Diffie-Hellman and discrete logs

The security of the Diffie-Hellman key exchange is related to the difficulty of calculating discrete logarithms, but a closer look at the problems shows that it's actually a bit more subtle than you might first think.

We can describe the Diffie-Hellman key exchange roughly like this:

  1. Alice picks a value for g and uses her private key a to calculate ga, which she sends to Bob along with g
  2. Bob uses his private key b to calculate gb, which he sends to Alice
  3. Alice calculates the shared secret gab as (gb)a
  4. Bob calculates the shared secret gab as (ga)b

So an adversary who sees Alice and Bob carry out these steps sees g, ga and gb. From this information, the adversary wants to find the shared secret gab. We can summarize this in what's called the computational Diffie-Hellman problem (CDHP):

CDHP: Given g, ga, gb, find gab

We assume that the only way that an adversary can do this is by calculating discrete logarithms. In particular, we assume that they either need to find the value of a from ga and then use it to calculate gab, or to find the value of b from gb and then use it to calculate gab. There's no proof that this is actually the case, although it’s probably true. This means that there may be ways to defeat the security of the Diffie-Hellman key exchange that don't require calculating discrete logarithms. But if you can calculate discrete logarithms then you can clearly solve the CDHP.

So the security of the Diffie-Hellman key exchange is really based on two assumptions. The first is that the only way to solve the CDHP is by calculating discrete logarithms. The second is that calculating discrete logarithms is hard. So although people often talk about the security of the Diffie-Hellman key exchange as being based on the difficulty of calculating discrete logarithms, it's actually a bit more complicated than that. It's really based on the difficulty of solving the CDHP.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e55375ef1c883300e554e6288e8833

Listed below are links to weblogs that reference Diffie-Hellman and discrete logs:

Comments

Post a comment

If you have a TypeKey or TypePad account, please Sign In.

Voltage Data Breach Index

  • Grab the Voltage Data Breach Index

May 2012

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31