4 ms·
But the black magic lies exactly in the handshake. You need to generate the RSA key (or more broadly, an asymmetric key) in order for the handshake to take plac
by oggy 11y ago
But the black magic lies exactly in the handshake. You need to generate the RSA key (or more broadly, an asymmetric key) in order for the handshake to take place.
An analogy I like to use are boxes with locks. Imagine that, given a lock design, I can produce a bunch of boxes with the exact copies of the lock and keys for the lock. Symmetric crypto corresponds to everyday locks: if you have the key for the lock, you can open or close the lock as you wish. Asymmetric crypto corresponds to a special kind of lock, which comes with two keys: one kind for locking the lock (the public keys), another for unlocking (the private keys).
Now if somebody wants to communicate with me securely, the choice of lock affects the key distribution significantly. If I have just symmetric locks, for each person I want to talk to, I have to create a new box with a separate lock, and make sure they are the only ones having a key for this lock. The latter I have to in person. Meaning, if I want to talk to somebody on the Internet, I first have to meet them in person (that is, out of band), before we can communicate securely. This doesn't scale well. With asymmetric crypto, however, I can just leave a bunch of open boxes and corresponding locking (public) keys lying around (the keys for the different boxes can be same or different, doesn't matter). If Assange now wants to send me a message, he writes it on a piece of paper, puts it in one of the open boxes, and locks it with the locking key. I'm the only person with the unlocking (private) key for this lock so I'm the only one who can read the message. This is just basic asymmetric crypto.
Another thing Assange could do is, instead of leaving a piece of paper with the message, to leave a piece of paper with a fresh design of a symmetric lock. Now I can safely create my own symmetric box according to the design, put messages inside, lock them and leave them around for Assange to pick up. This is secure since he's created the design and he's the only one apart from me who can open such boxes.
This is a 10,000 foot view of how to do the switch from asymmetric to symmetric crypto, but there are many other questions that need to be addressed to get an actual protocol. Thes include "how does Assange know this public key belongs to me" (answer: certificates and certificate authorities), "how do I know the message came from Assange" (answer: digital signatures), "what purpose does this message serve" (tagging and nonces), "what kind of designs I can produce locks for" (ciphersuite negotiation) and so on. Additionally, there's all kinds of things that can go wrong when implementing this - basically, even though we know how to check the security of a high-level design of a protocol using formal methods (the so-called "symbolic verification" tools), we don't really have a systematic way of translating these designs into actual implementations while preserving the security guarantees.
Also, there are direct key-exchange protocols (such as Diffie-Hellman) which work differently than the basic idea above.