0Pricing
Cryptology Academy · Lesson

What Makes a Secure Protocol

Identify the goals of cryptographic protocols: authentication, confidentiality, integrity, and non-repudiation.

What Makes a Secure Protocol is a free Cryptology Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Authentication: Knowing Who You Are Talking To

Authentication is the goal of establishing the identity of communication partners. Without authentication, a protocol is vulnerable to impersonation: an attacker can pretend to be a trusted server and intercept communications. Authentication in protocols is typically achieved using digital certificates, pre-shared keys, or challenge-response mechanisms that prove knowledge of a secret without revealing it.

Confidentiality: Only Intended Parties Read Messages

Confidentiality ensures that message content is accessible only to intended recipients. It is achieved through encryption using keys known only to the parties involved. A confidentiality failure means an eavesdropper can read messages in transit. Confidentiality alone does not prevent an attacker from tampering with messages or replay attacks; it must be combined with integrity protection.

Integrity: Detecting Message Modification

Integrity protection ensures that received messages are exactly what the sender transmitted, with no additions, deletions, or modifications. Message Authentication Codes and authenticated encryption modes provide integrity. Without integrity protection, an attacker who cannot read ciphertext may still be able to flip specific bits in a predictable way to alter the decrypted plaintext, as exploited in padding oracle attacks.

Non-Repudiation: Sender Cannot Deny Sending

Non-repudiation means that a sender cannot later deny having sent a message. It is achieved through digital signatures using asymmetric keys: only the holder of the private key could have produced the signature, and the corresponding public key verifies it. MACs do not provide non-repudiation because both sender and receiver know the shared secret and either could have produced the MAC.

Freshness: Rejecting Replayed Messages

Freshness ensures that an old, previously valid message cannot be replayed by an attacker to trigger the same effect again. Freshness mechanisms include nonces (random values included in messages that must not repeat), timestamps with narrow validity windows, and sequence numbers that must be strictly increasing. Without freshness, replaying a captured authentication message can bypass authentication entirely.

Perfect Forward Secrecy

Perfect forward secrecy ensures that compromise of long-term keys does not expose past session keys. It is achieved by generating ephemeral (temporary) key pairs for each session using Diffie-Hellman. The session keys are computed from the ephemeral keys and discarded after use. Even if the server's long-term private key is later stolen, the attacker cannot decrypt previously recorded sessions because the ephemeral keys no longer exist.

Mutual vs One-Way Authentication

One-way authentication verifies only one party: in HTTPS, the server presents a certificate that the client verifies, but the server typically does not verify the client's identity. Mutual authentication (or mutual TLS, mTLS) requires both parties to present and verify certificates. mTLS is common in microservice architectures, API gateways, and enterprise VPNs where both endpoints must be verified before exchanging sensitive data.

Formal Security Goals vs Intuition

Protocol designers cannot rely on intuition alone. A protocol that seems obviously secure can fail in subtle ways. The Needham-Schroeder public key protocol was published in 1978 and believed secure. In 1995, Gavin Lowe found a flaw that allowed an impersonation attack using a formal verification tool. Formal verification using model checkers like Tamarin or ProVerif has become standard practice for security-critical protocol design.

The Dolev-Yao Threat Model

The Dolev-Yao model is the standard threat model for analysing cryptographic protocols. It assumes the attacker controls the entire network: they can intercept, block, modify, replay, and inject any message. Cryptographic primitives are assumed to be perfect (no mathematical weaknesses). In this model, a protocol is secure only if it achieves its goals even when the attacker has complete control of all communications.

Why Protocol Design Is Hard

Cryptographic protocol design is notoriously difficult because flaws are often subtle and non-obvious. The interaction of multiple messages, nonces, timestamps, and keys can create unexpected attack paths. Principals may have different views of the protocol state. Concurrent sessions can interfere with each other. Every major deployed protocol, including SSL, TLS, WPA2, and 802.11, has had significant vulnerabilities discovered after deployment.

Real-World Protocol Failures

SSL 3.0 was broken by the POODLE attack. TLS 1.0 and 1.1 were deprecated due to multiple weaknesses. WEP WiFi encryption was completely broken within its first year of deployment. PPTP VPN is considered insecure due to MS-CHAPv2 weaknesses. Each failure taught the security community something about the gap between informal security intuitions and provably correct protocol design under the Dolev-Yao model.

Protocol Security Goals

Which security property ensures that a message recorded by an attacker today cannot be successfully resent to the server later to repeat an action?

Secure Protocol Goals: Key Takeaways

Secure protocols must achieve authentication, confidentiality, integrity, non-repudiation, and freshness. Perfect forward secrecy protects past sessions from future key compromise. Mutual authentication verifies both parties. The Dolev-Yao model assumes a fully adversarial network. Protocol design requires formal verification, not just intuition. Every major protocol has had vulnerabilities found after deployment, driving the ongoing evolution of cryptographic standards.

Frequently asked questions

Is the “What Makes a Secure Protocol” lesson free?

Yes — the full text of “What Makes a Secure Protocol” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.

What will I learn in “What Makes a Secure Protocol”?

Identify the goals of cryptographic protocols: authentication, confidentiality, integrity, and non-repudiation. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cryptology Academy?

No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “What Makes a Secure Protocol” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cryptology Academy lesson?

Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. What Makes a Secure Protocol
  2. SSH: Securing Remote Access
  3. SFTP and SCP: Secure File Transfer
  4. DNSSEC: Authenticating DNS Responses
← Back to Cryptology Academy