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.
4.3.2Hashing, digital signatures, PKI, and authentication methods
- A hash function produces a fixed-length value (a hash) from data of any length, as a one-way function (it cannot be decrypted; the original data cannot be recovered). The same input always yields the same hash, so comparing hashes before and after transmission detects tampering. A digital signature is the hash of the data, encrypted with the sender's private key. The recipient decrypts it with the sender's public key and compares it against a freshly computed hash, verifying both authenticity (created by that sender) and integrity (not tampered with) at once.
- The PKI (public-key infrastructure) is the overall system that guarantees a public key genuinely belongs to its claimed owner. A certificate authority (CA) is a trusted third party that issues a digital certificate binding a public key to its owner's identity. A public key alone cannot prove "this really is that person's key," so a certificate signed by a CA is what guarantees authenticity.
- SSL/TLS encrypts communication between a web browser and a web server. The flow is: verify the server's authenticity via a server certificate (issued by a CA) -> securely exchange a session key using hybrid cryptography -> encrypt the rest of the session efficiently with symmetric-key cryptography — together delivering confidentiality, integrity, and authenticity. Indicated by a
https://URL. - Multi-factor authentication (MFA) combines two or more different types from knowledge factors (e.g. a password), possession factors (e.g. an IC card or smartphone), and inherence/biometric factors (e.g. fingerprint, iris). If one factor is compromised, the others still defend. Biometric authentication involves a tradeoff between the false rejection rate (FRR) and false acceptance rate (FAR). In challenge-response authentication, the server sends a random value that changes every time (a challenge), and the client returns only a computed result (a response) combining it with the password — the password itself never crosses the wire, defeating eavesdropping and replay attacks.
The staples: symmetric-key = fast but has the key-distribution problem; public-key = solves it but is slow; hybrid cryptography = combines both; a digital signature = encrypted with the private key, verified with the public key (authenticity + integrity); a CA guarantees a public key's validity; multi-factor authentication requires combining different types of factors (knowledge/possession/biometric).
Consider an online contract service that must "securely exchange contract data, and prevent the signer from later denying they signed it." The contract body is large, so it is encrypted quickly with symmetric-key cryptography. To deliver that symmetric (session) key to the counterpart securely, it is itself encrypted with the recipient's public key under public-key cryptography — this is the skeleton of hybrid cryptography. To prove "the signer genuinely agreed," a hash of the contract data is computed, and that hash, encrypted with the sender's (signer's) own private key, is attached as a digital signature. The recipient recomputes the hash from the received contract data and compares it against the hash obtained by decrypting the signature with the sender's public key. A match proves both that the data was not tampered with (integrity) and that the actual holder of the private key genuinely signed it (authenticity/non-repudiation) — simultaneously. But this verification only holds if a trusted third party guarantees that public key really belongs to the signer. That is where a certificate authority (CA) comes in: after verifying the signer's identity, it issues a digital certificate binding the public key to that identity, and the PKI framework dispels the concern of "is this an impersonator's public key?" Login to the service itself is also made multi-factor, combining a password (a knowledge factor) with a one-time code generated by a smartphone app (a possession factor), so that a leaked password alone cannot breach the account — completing the design.
| Scheme | How keys are used | Characteristics |
|---|---|---|
| Symmetric-key | Same key for encryption and decryption | Fast; has the key-distribution problem |
| Public-key (for confidentiality) | Encrypt with recipient's public key; decrypt with their private key | Solves key distribution; slower |
| Digital signature (for authenticity) | Encrypt with sender's private key; verify with their public key | Proves authenticity, integrity, and non-repudiation |
Trap: "Public-key cryptography is more secure than symmetric-key, so you should always use only public-key cryptography" is wrong. Public-key cryptography is slow, so in practice hybrid cryptography — encrypting the bulk data with symmetric-key cryptography and using public-key cryptography only to deliver the key — is the standard approach. Also, "a digital signature is created by encrypting with the sender's public key" is wrong: signing uses the sender's private key, and verification uses the sender's public key — the reverse of the key usage for confidentiality-purpose encryption, which is easy to mix up.
4.3.3Section summary
- Symmetric-key = fast but has key-distribution problem; public-key = solves it but slow. In practice, hybrid cryptography (symmetric-key for data, public-key for key exchange)
- Digital signature = encrypt with the private key, verify with the public key = authenticity + integrity + non-repudiation. CA/PKI guarantees the public key's validity
- MFA = two or more different types among knowledge, possession, and biometric factors. Challenge-response never sends the password itself, defeating eavesdropping and replay attacks
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. An online trading system with many counterparties struggled with the burden of securely distributing a key to each communication partner. Which encryption scheme is suited to resolving this challenge?
Q2. A file was sent with a digital signature attached. Which is the most appropriate pairing of the key the recipient uses to verify the signature, and the property that verification confirms?
Q3. A system's login was strengthened to require, in addition to a password, a one-time code generated by a smartphone app. What kind of factor combination does this correspond to?
Keep track of your progress
The full study guide is free to read. Sign up free to practice with the question bank, track what you have read, review your mistakes, and highlight passages.

