What's changed: Initial version
4.3Cryptography and Authentication (Public-Key Cryptography, PKI, Multi-Factor Authentication)
Learn how symmetric-key cryptography and public-key cryptography work and when to use each, the hybrid cryptography that combines both, hash functions used to detect tampering, digital signatures that prove authorship, the PKI (public-key infrastructure) and certificate authorities (CAs) that guarantee a public key's validity, SSL/TLS that protects web communications, multi-factor authentication and biometric authentication that verify identity via multiple factors, and challenge-response authentication that prevents impersonation over a network.
Cryptography realizes "no one else can read this" (confidentiality), but it also has applications like digital signatures that prove integrity and authenticity — so equating "encryption" with "confidentiality" is a common misconception. This section organizes what symmetric-key cryptography, public-key cryptography, and hash functions are each good at, through the lens that how a key is used directly determines which property it can guarantee.
4.3.1Symmetric-key, public-key, and hybrid cryptography
- In symmetric-key cryptography, encryption and decryption use the same key (e.g. AES). It is fast, but sharing a key securely with each communication partner is the key distribution problem (the number of keys needed grows combinatorially as more people communicate). In public-key cryptography, a paired public key and private key are used (e.g. RSA). Content encrypted with the public key can only be decrypted with the matching private key, which solves the key distribution problem, but it is slower than symmetric-key cryptography.
- Public-key cryptography is used two ways with opposite roles: if the sender encrypts with the recipient's public key, only the recipient can decrypt it (confidentiality); if the sender encrypts with their own private key (signing), only that sender could have produced it (authenticity/non-repudiation). Distinguishing these two directions is the most important point.
- Hybrid cryptography is the mainstream approach in practice: the bulk data is encrypted with fast symmetric-key cryptography, while only that symmetric key (the session key) is encrypted with public-key cryptography for transport. This gets both the key-distribution advantage of public-key cryptography and the speed of symmetric-key cryptography. SSL/TLS key exchange is based on this scheme.
Continue reading — free sign-up
You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.

