In fact, you can establish an encrypted connection between completely strangers without a certificate using Diffie-Hellman exchange algorithms or similar keys.
Alice and Bob agree to a random number x. Alice calculates x a where a is a large prime known only to Alice and sends it to Bob. Bob calculates x b and sends it to Alice. Alice calculates (x b ) a and Bob calculates (x a ) b . Since (x a ) b = (x b ) a = x ab, Alice and Bob now know the number x ab and can use it as an encryption key. The beauty of this is that Bob does not know, Alice does not know b, and any eavesdroppers do not know a single number (since it would take years to calculate a from x a in the case of large numbers).
As the supercard emphasizes, this in itself is still subject to a man-in-the-middle attack, and therefore at least one end of the transaction must be authenticated using a certificate. To be precise, this is not a server that checks this, it is a browser, and most browsers will allow the user to continue if the certificate is invalid (or possibly even junk). In this case, the connection will be significantly safer than a regular connection. To listen, you will need to be able to manipulate IP routing or DNS lookups, and you will need to configure it before the connection is made, which is not easy to do.
By the way, the key pairs in not certificates used to encrypt actual traffic; they are used to create a new one-time key for a much faster symmetric cipher (like DES), which then does the rest of the work.
bobtato Mar 28 '13 at 3:04 on 2013-03-28 03:04
source share