# DHE key exchange. Is it really secure?

## Context

I recently came across a video on the net showing the process of key exchange in Diffie Hellmann.

Alice and Bob want to communicate. Eve is the (wo)man in the middle.

This video is the basis of my question http://youtu.be/YEBfamv-_do?t=6m22s

## Question

Alice sends the modulo and the prefix to bob. Eve gets that.

What prevents Eve to have a giant table of all the calculations possible given a prefix and a modulo and the public value and intersect thos possibilities with the public value from bob ?

Yes the table would be very big but you can then iterate over the intersecting possibilities and try the numbers on the message up to the point to get something right.

i may miss something, but it is not that hard, even with very big numbers.

So what did I miss ?

Thanks

• You're underestimating what "very big" means. No conventional computer will ever be able to count to $2^{256}$ and that doesn't even consider storing that much. – CodesInChaos Nov 19 '14 at 8:55
• the "giant table" would be as large or larger than the observable universe for the key sizes currently used (4096-bits), and take more energy to search than was released by the big bang – Richie Frame Nov 19 '14 at 9:09
• What "prefix" does Alice send to Bob? $\;$ – user991 Nov 19 '14 at 10:30

A lot of modern cryptography is based on some mathematical assumptions and aims to achieve what is called Computational Security. That means that the adversary (Eve) could get some information about the plaintext with a negligible probability and the adversary is modeled as someone with bounded computational power, storage and bounded time. So all the (encryption) schemes are dimensioned in sort to achieve such level of security: that means that all mathematical elements are chosen to be large enough to make the best known attack feasible in a reasonable amount of time.

Even if this is a weaker notion of security, this assumption on the adversary is easy to accept in practice.

Other approach exists: Information theoretic Security or Perfect Security

So coming back to your solution based on a big table, if the scheme is correctly dimensioned the table you are supposed to use to attack the scheme would be so large that it cannot be stored in a (very very) large disk or to be (too) long to be generated.

• I think it is time for me to write a paper. – Larry Nov 19 '14 at 8:33
• What do you mean? – ddddavidee Nov 19 '14 at 8:34
• @Larry I look forward to your paper where you ridicule the entire cryptographic community. Please jot me down as the idiot that ridiculed you before you proved that the crypto community is a bunch of asses :) – Maarten Bodewes Nov 19 '14 at 10:10
• @Larry if you are somehow able to find a solution to storing $4.4*10^{598}$ times the total amount of storage in the world then I believe you will become far too rich to worry about breaking Diffie-Hellman. – flashbang Nov 19 '14 at 21:32
• Humans are so bad at understanding exponential growth... Best example is the question "How often can you fold a paper, and guess how thick it will be" -> typical are 6 or 7, record is at 12 atm – tylo Nov 24 '14 at 14:54

Guess the catch in the video is in how the participants exchange details 'publicly'.

If the Man-In-The-Middle can intercept and manipulate what is being 'publicly' shared, then the attempt to eavesdrop would still be successful.