upgrade
upgrade

🔐Cryptography

Key Cryptographic Protocols

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

Why This Matters

Cryptographic protocols are the invisible infrastructure that makes secure digital communication possible. When you're studying for your cryptography exam, you're not just memorizing protocol names—you're being tested on the underlying mathematical problems that make each protocol secure, the trust models they employ, and the trade-offs between security, efficiency, and key management. Understanding why Diffie-Hellman relies on discrete logarithms while RSA depends on integer factorization helps you reason about their relative strengths and appropriate use cases.

These protocols fall into distinct categories based on their primary function: key exchange, encryption and signatures, secure communication channels, and authentication. Exam questions frequently ask you to compare protocols that solve similar problems differently, or to identify which protocol best fits a given scenario. Don't just memorize what each protocol does—know what mathematical hardness assumption it relies on, what trust model it uses, and where it fits in the broader cryptographic ecosystem.


Key Exchange Protocols

These protocols solve the fundamental challenge of establishing shared secrets over insecure channels. The core insight is that certain mathematical operations are easy to compute in one direction but computationally infeasible to reverse.

Diffie-Hellman Key Exchange

  • Enables secure key agreement over public channels—two parties can establish a shared secret without ever transmitting it directly
  • Relies on the discrete logarithm problem—computing gabmodpg^{ab} \mod p is easy, but extracting aa from gamodpg^a \mod p is computationally infeasible
  • Vulnerable to man-in-the-middle attacks without authentication—must be combined with digital signatures or certificates for real-world security

Elliptic Curve Cryptography (ECC)

  • Provides equivalent security with smaller key sizes—a 256-bit ECC key offers comparable security to a 3072-bit RSA key
  • Based on the elliptic curve discrete logarithm problem—finding kk given points PP and kPkP on an elliptic curve is computationally hard
  • Ideal for resource-constrained environments—mobile devices, IoT, and smart cards benefit from reduced computational and bandwidth requirements

Compare: Diffie-Hellman vs. ECC—both rely on discrete logarithm variants, but ECC achieves the same security with dramatically smaller keys. If an exam question asks about efficiency in constrained environments, ECC is your answer.


Asymmetric Encryption and Digital Signatures

These protocols use mathematically related key pairs where one key encrypts (or signs) and only the corresponding key can decrypt (or verify). The security depends on the computational difficulty of deriving the private key from the public key.

RSA (Rivest-Shamir-Adleman)

  • Security relies on integer factorization—given n=p×qn = p \times q where pp and qq are large primes, factoring nn is computationally infeasible
  • Supports both encryption and digital signatures—encrypt with public key for confidentiality, sign with private key for authenticity
  • Requires larger key sizes for modern security—2048 bits minimum, with 4096 bits recommended for long-term security

Digital Signature Algorithm (DSA)

  • Federal standard for digital signatures only—unlike RSA, DSA cannot be used for encryption
  • Based on discrete logarithms in a prime field—security derives from the same mathematical problem as Diffie-Hellman
  • Provides non-repudiation—the signer cannot credibly deny having signed, since only they possess the private key

Compare: RSA vs. DSA—RSA handles both encryption and signatures while DSA is signature-only. RSA's security comes from factorization; DSA's from discrete logarithms. For FRQs about choosing algorithms, consider whether you need encryption capability.


Secure Communication Protocols

These protocols combine multiple cryptographic primitives to create complete secure communication systems. They typically use asymmetric cryptography for key exchange and authentication, then switch to faster symmetric encryption for bulk data transfer.

SSL/TLS (Secure Sockets Layer/Transport Layer Security)

  • Hybrid approach combining asymmetric and symmetric cryptography—uses RSA or ECDH for key exchange, then AES or ChaCha20 for data encryption
  • TLS 1.3 is the current standard—SSL and earlier TLS versions are deprecated due to known vulnerabilities
  • Provides the "HTTPS" security layer—authenticates servers via certificates and encrypts all web traffic between client and server

IPsec (Internet Protocol Security)

  • Operates at the network layer (Layer 3)—secures all traffic between endpoints regardless of application
  • Two modes: transport and tunneltransport mode encrypts only the payload; tunnel mode encrypts the entire original IP packet and adds a new header
  • Foundation for VPN technology—creates secure tunnels for remote access and site-to-site connections

SSH (Secure Shell)

  • Secure replacement for telnet and rsh—provides encrypted remote login and command execution
  • Supports multiple authentication methods—password, public key, and certificate-based authentication available
  • Enables secure file transfer and port forwarding—SCP and SFTP protocols built on SSH for secure file operations

Compare: TLS vs. IPsec—TLS operates at the transport layer and secures individual connections (like HTTPS), while IPsec operates at the network layer and can secure all traffic between hosts. TLS is application-aware; IPsec is transparent to applications.


Authentication Protocols

These protocols verify identity before granting access to resources. They must protect against replay attacks, credential theft, and impersonation while remaining practical for users.

Kerberos

  • Uses a trusted third party (Key Distribution Center)—the KDC issues time-limited tickets that grant access to services
  • Employs symmetric key cryptography throughout—both the authentication server and ticket-granting server share secrets with clients and services
  • Time-sensitive tickets prevent replay attacks—tickets expire quickly, and synchronized clocks are essential for the protocol to function

PGP (Pretty Good Privacy)

  • Decentralized web of trust model—users verify each other's keys directly rather than relying on certificate authorities
  • Hybrid encryption for efficiency—encrypts data with a random symmetric key, then encrypts that key with the recipient's public key
  • Standard for secure email communication—OpenPGP specification allows interoperability between implementations

Compare: Kerberos vs. PGP—Kerberos uses centralized trust (the KDC) and symmetric cryptography, ideal for enterprise networks. PGP uses decentralized trust (web of trust) and asymmetric cryptography, suited for peer-to-peer communication. Know which trust model fits which scenario.


Advanced Cryptographic Techniques

These protocols represent cutting-edge approaches that enable new security properties beyond traditional encryption and authentication.

Zero-Knowledge Proofs

  • Prove knowledge without revealing the secret—a prover can convince a verifier they know a value without disclosing any information about it
  • Three essential properties: completeness, soundness, and zero-knowledgehonest provers always convince, cheaters almost never succeed, and verifiers learn nothing beyond the claim's validity
  • Critical for privacy-preserving applications—enables anonymous authentication, blockchain privacy (like Zcash), and secure voting systems

Compare: Traditional authentication vs. Zero-Knowledge Proofs—traditional methods require revealing credentials (passwords, keys) to verify identity, creating exposure risk. ZK proofs verify without disclosure, fundamentally changing the security model for sensitive applications.


Quick Reference Table

ConceptBest Examples
Discrete logarithm securityDiffie-Hellman, DSA, ECC
Integer factorization securityRSA
Key exchangeDiffie-Hellman, ECC (ECDH), RSA
Digital signaturesRSA, DSA, ECC (ECDSA)
Hybrid encryption schemesTLS, PGP, SSH
Network-layer securityIPsec
Centralized trust modelKerberos, TLS (certificate authorities)
Decentralized trust modelPGP (web of trust)

Self-Check Questions

  1. Both Diffie-Hellman and DSA rely on the same underlying mathematical problem. What is it, and how does ECC relate to this problem?

  2. Compare the trust models of Kerberos and PGP. In what organizational context would each be most appropriate, and why?

  3. An FRQ asks you to design a secure communication system for a mobile banking app. Which protocols would you combine, and what role would each play in providing confidentiality, integrity, and authentication?

  4. Why does ECC provide equivalent security to RSA with much smaller key sizes? What practical advantage does this create, and in what environments is this most significant?

  5. Explain how zero-knowledge proofs differ fundamentally from traditional authentication. Give one real-world application where this difference is critical for the system's security properties.