Lesson 3 of 7 · 7 min read
Public-Key Cryptography and Key Exchange
Public-key cryptography gives each party a key pair: a public key that can be shared and a private key that never leaves its owner. It enables signatures and key exchange, which lets two parties who have never met agree on a shared secret over an observed network. Protocols use it to set up a session and then switch to fast symmetric encryption. Its weak point is knowing whose public key you have, and its long-term threat is quantum computing.
free sign-in, no card required
Practise it as an interviewer asks it
Explain encoding, encryption, hashing and signing, and when you would use each.Symmetric versus asymmetric cryptography: when is each used, and why do real protocols use both?Walk through a TLS 1.3 handshake. What does each step protect against?How is a certificate chain validated, and what goes wrong in practice?How should passwords be stored, and why not a fast hash?What does a MAC prove, what does a signature prove, and why can a MAC not give non-repudiation?