Security in Computer Networks

Learn how cryptography keeps network communication confidential, unaltered and authenticated, and how real protocols put it to work. Compute small RSA and Diffie–Hellman examples, compare MACs with digital signatures, and see how certificates and nonces stop impersonation and replay. Trace the TLS 1.3 handshake, follow a packet through an IPsec VPN, compare WPA2, WPA3 and 4G/5G authentication, and write firewall rules and judge intrusion detection alerts.

IntermediateLesson 8 of 8 in Computer Networks Course

What you will learn

  1. Describe what secure communication requires, then use symmetric-key and public-key cryptography to hide message contents and agree on shared keys.
    • Describe what secure communication needs and what attackers can do
      Name the security properties a network protocol aims for, describe passive and active attackers, and see which layer of the protocol stack each defense protects.
    • Encrypt and decrypt with symmetric-key ciphers
      Explain how a shared secret key turns plaintext into ciphertext, why key length and cipher mode matter, and why sharing the key is the hard part.
    • Agree on keys and encrypt with public-key cryptography
      Use key pairs to encrypt without a pre-shared secret, compute small RSA and Diffie–Hellman examples, and explain session keys and forward secrecy.
  2. Detect altered messages with hashes and message authentication codes, sign messages and trust public keys through certificates, and design authentication protocols that resist replay and impersonation.
    • Detect tampering with hash functions and message authentication codes
      Explain the properties of cryptographic hash functions, why a checksum is not enough, and how a shared-key MAC lets the receiver detect changed messages.
    • Sign messages and trust public keys with certificates
      Create and verify digital signatures, compare them with MACs, and explain how certificates and a chain of trust bind a public key to its owner.
    • Design and attack end-point authentication protocols
      Build an authentication protocol step by step, see how spoofing, eavesdropping and replay defeat the weak versions, and use nonces to make it secure.
  3. Explain how TLS turns a TCP connection into an authenticated, encrypted channel, trace the TLS 1.3 handshake, and recognize what TLS does and does not protect.
    • Explain how TLS builds a secure channel on top of TCP
      Describe where TLS sits, how it derives keys, and how records with hidden sequence numbers and a protected close stop modification, reordering, replay and truncation.
    • Trace the TLS 1.3 handshake
      Follow the messages of a full TLS 1.3 handshake, explain what each proves, count its round trips, and describe resumption, 0-RTT data and post-quantum key exchange.
    • Validate the server's identity and recognize what TLS leaves exposed
      Check a server certificate the way a client does, explain why skipping the check undoes TLS, and list what an observer can still see or attack.
  4. Explain how IPsec protects datagrams at the network layer, follow a packet through a site-to-site VPN, and describe how IKE sets up the keys.
    • Explain IPsec security associations, protocols and modes
      Distinguish AH from ESP and transport mode from tunnel mode, and describe the state an IPsec security association keeps.
    • Follow an ESP packet through a VPN and set up keys with IKE
      Trace a datagram through a site-to-site VPN step by step, explain sequence numbers and the anti-replay window, and describe how IKEv2 and NAT traversal set up the tunnel.
  5. Explain why early Wi-Fi security failed, how WPA2 and WPA3 authenticate devices and derive keys, and how 4G and 5G networks authenticate subscribers.
    • Explain why WEP failed and how WPA2 protects Wi-Fi
      Identify the flaws of WEP and describe how WPA2 Personal and Enterprise authenticate devices and derive fresh keys in the four-way handshake.
    • Compare WPA3 with authentication in 4G and 5G networks
      Explain what WPA3 adds over WPA2, and describe how cellular networks use a SIM-held key for mutual authentication and how 5G conceals the subscriber's identity.
  6. Write and evaluate packet-filter rules, explain how stateful filters and application gateways improve on them, and describe how intrusion detection and prevention systems find attacks.
    • Filter packets with stateless firewall rules
      Describe what a firewall does, write an ordered rule table for a packet filter, evaluate packets against it, and recognize the limits of stateless filtering.
    • Track connections with stateful filters and application gateways
      Explain how a stateful filter uses a connection table, what an application gateway adds, and how a DMZ and defense in depth place these tools in a network.
    • Detect attacks with intrusion detection and prevention systems
      Compare signature-based and anomaly-based detection, reason about false alarms with real numbers, and place sensors while knowing what encryption hides from them.

Security in Computer Networks study guide

6 chapters

1

Keep messages confidential

Network protection begins with the property a threat can break. Encryption hides contents, but key handling, cipher modes, and authenticated key agreement determine whether that protection holds. Move from attacker capabilities to shared-key encryption, then work through small RSA and Diffie–Hellman calculations to see how two parties establish the secrets used by real protocols.

1.1 Security goals and attacker powers

A message can be private but still be altered, or come from an impostor. Secure communication therefore needs several properties, each answering a different question about the exchange.

Name the property at risk
PropertyQuestion it answersTypical defense
ConfidentialityWho can read the contents?Encryption
Message integrityCan changes be detected?A MAC, signature, or AEAD
End-point authenticationWho is communicating now?An authenticated handshake
Operational securityCan the network keep serving its users?Filtering and intrusion detection

Alice and Bob are the communicating parties; Trudy is the attacker. A passive attacker captures traffic without changing it. Reading a password is eavesdropping. Inferring a busy work schedule from connection times is traffic analysis, even when the contents are encrypted. An active attacker injects, changes, deletes, or replays packets. Spoofing claims a false source identity; hijacking takes over an existing exchange; flooding tries to exhaust resources.

Internet routers generally forward packets without proving that their source addresses are genuine. Packets also cross networks outside either user's control. On Wi-Fi, another radio in range can capture transmitted frames. Protocols must protect communication even when an attacker controls the path.

Follow one exposed login

Bob connects to a café hotspot and logs in using plain HTTP. Trudy reads the password: confidentiality has failed. She changes a download link in the reply: integrity has failed. If she supplies a fake hotspot with the café's name, Bob also lacks a reliable check of the access point's identity. Encrypting just the password would not repair every one of these failures. An attacker can alter some encrypted messages without understanding them, and can replay a captured authentication message unchanged.

Keep the key secret

Kerckhoffs's principle says security must survive disclosure of the algorithm. The secret is the key. A homemade secret algorithm can be recovered from software; changing and distributing an entire algorithm is also harder than replacing a key. Replacing an exposed key protects future traffic, but does not make recordings under the old key safe.

Attacker knowledge matters too. A ciphertext-only attack starts with intercepted encrypted messages. A known-plaintext attack adds matching original messages, such as predictable HTTP/1.1 text beginning with "GET /". In a chosen-plaintext attack the attacker can obtain encryptions of messages she selects. Modern encryption is designed to resist these stronger situations.

Locate the protected path

Wi-Fi and cellular security protect a radio link. TLS protects communication between application endpoints. IPsec protects selected IP traffic between hosts or gateways. Message-level protection, such as secure email, can remain with a message during storage. A secure radio hop does not protect the rest of an internet route: after an access point removes link protection, another mechanism must protect the onward traffic.

Key Takeaways

  • Confidentiality, integrity, authentication, and operational security address different failures.
  • Passive attackers observe; active attackers also manipulate traffic.
  • Security rests on secret keys even when algorithms are public.
  • A defense protects the path between its own endpoints.

1.2 Shared keys, cipher modes, and authenticated encryption

A symmetric cipher uses the same secret key at both ends. Plaintext is the original message; ciphertext is its encrypted form. Write encryption as c=EKS(m) and decryption as m=DKS(c): the key is shared, but the two operations undo each other.

Key size and structural weaknesses

A Caesar shift of 3 turns "MEET AT NOON" into "PHHW DW QRRQ". Trying all 25 useful shifts breaks it. A substitution cipher has 26!≈4.03×1026 keys, yet it preserves letter frequencies. An attacker can use repeated letters and common words to recover the mapping without trying every key. Key-space size alone does not prove security.

AES is a block cipher with 128-bit blocks and 128-, 192-, or 256-bit keys. DES had 64-bit blocks and a 56-bit key; exhaustive search broke a DES key in 1998, and DES and Triple DES are retired from standard use. Each extra key bit doubles exhaustive-search work. At 1012 trials per second, searching all DES keys takes about 256/1012≈72,000 seconds, or 20 hours; average discovery takes half that. Searching all AES-128 keys at that rate takes about 1.1×1019 years.

The mode changes message protection

A mode of operation handles more than one block.

ModeHow it worksEssential limitation
ECBEncrypts each block independentlyEqual blocks reveal repeated patterns
CBCXORs each block with the previous ciphertext block, then encryptsNeeds a fresh, unpredictable IV and separate integrity protection
CTREncrypts counters to make a keystream, then XORs it with the messageMust never reuse a key-and-nonce combination

CBC's first block uses an initialization vector, or IV, in place of a previous ciphertext block. The IV is sent openly; unpredictability and freshness matter, not secrecy. Randomization hides direct equality patterns across messages. It does not itself detect tampering.

Work through keystream reuse

Suppose two messages use the same keystream k. Their ciphertexts are c1=m1⊕k and c2=m2⊕k. XORing them cancels the repeated keystream:

c1⊕c2=m1⊕m2.

Knowing one plaintext now reveals the other. WEP's repeated IVs caused this kind of failure. A longer encryption key does not repair a repeated keystream.

AEAD, authenticated encryption with associated data, combines confidentiality with integrity. AES-GCM and ChaCha20-Poly1305 authenticate the ciphertext and any associated data. Associated data, such as a routing field, remains readable but cannot be changed without failing verification. TLS 1.3 uses AEAD for every protected record.

Distribute the secret

Fast bulk encryption still requires a shared key. If every pair among n users needs a different key, the total is n(n−1)/2. For 100 users, that is 4,950 keys. Public-key mechanisms let parties establish session keys without distributing a separate secret to every pair beforehand.

Key Takeaways

  • AES key size and block size are different properties.
  • A large key space does not remove weaknesses in a cipher or its mode.
  • CBC needs an unpredictable IV; CTR needs unique key-and-nonce combinations.
  • Encryption alone does not authenticate a message.
  • AEAD authenticates readable associated data as well as encrypted contents.
  • Pairwise shared keys grow as n(n−1)/2.

1.3 Public keys, shared secrets, and forward secrecy

Bob publishes KB+ and keeps KB− private. Alice can encrypt for Bob without first sharing a secret with him. Recovering the private key from the public key must be computationally infeasible.

Calculate a toy RSA exchange

RSA starts with primes p and q. Compute n=pq and z=(p−1)(q−1). Choose a public exponent e relatively prime to z, then find d such that ed mod z=1. The public key is (n,e); the private key is (n,d). For a message number below n:

c=me mod n,m=cd mod n.

Use toy primes 11 and 13. Then n=143 and z=120. With e=7, choose d=103 because 7×103=721=6×120+1. For m=9, repeated squaring gives 92 mod 143=81 and 94 mod 143=126. Combining the powers gives 97 mod 143=48. Decryption returns 48103 mod 143=9.

These numbers expose the arithmetic; practical RSA uses moduli of at least 2,048 bits. Factoring the modulus reveals the primes and enables key recovery. Real RSA encryption also uses randomized OAEP padding: unpadded textbook RSA repeats its ciphertext for a repeated message.

Agree on a secret with Diffie–Hellman

Diffie–Hellman establishes a shared secret without sending that secret. Alice and Bob publish a prime p and generator g. Alice keeps a secret and sends A=ga mod p. Bob keeps b secret and sends B=gb mod p. Alice computes Ba mod p and Bob computes Ab mod p; both obtain gab mod p.

For p=29, g=2, a=5, and b=12, Alice sends 3 and Bob sends 7. Alice's calculation is 75 mod 29=16; Bob's is 312 mod 29=16. Their small example is easy to break; large groups make recovering the secret exponents infeasible. Elliptic-curve exchanges such as X25519 serve the same purpose with shorter keys.

Authenticate the exchange

Plain Diffie–Hellman does not identify either participant. Trudy can substitute her own public values and create two separate shared secrets, one with Alice and one with Bob. She then reads and re-encrypts traffic. An authenticated protocol binds the exchanged values to trusted identities, using signatures and certificates or an established shared secret.

Protocols use hybrid encryption: public-key work establishes a session key, and AES or ChaCha20 handles the bulk data. RSA can transport a random session key, but later theft of the RSA private key exposes recorded exchanges. Fresh ephemeral Diffie–Hellman values, deleted after use, provide forward secrecy against later theft of long-term authentication keys.

A sufficiently large quantum computer would break RSA and classical Diffie–Hellman. ML-KEM, standardized by NIST in FIPS 203 in 2024, addresses post-quantum key establishment. A hybrid such as X25519MLKEM768 combines classical and post-quantum components. This use of "hybrid" describes two key-establishment mechanisms; bulk data still uses symmetric encryption, including 256-bit keys for a strong security margin.

Key Takeaways

  • RSA uses a public exponent for encryption and a private exponent for decryption.
  • Diffie–Hellman exchanges public values, not the resulting shared secret.
  • Unauthenticated key exchange permits a man-in-the-middle attack.
  • Session keys let fast symmetric ciphers handle bulk data.
  • Forward secrecy depends on fresh session secrets that are erased.
2

Authenticate messages and peers

Integrity and identity require evidence that an attacker cannot recreate. Hashes reveal changes only when their reference is trusted; shared-key tags and public-key signatures add authentication in different ways. Follow those differences into certificate trust and fresh challenge–response exchanges, where proving key possession must also establish who is participating now.

2.1 Hashes and shared-key message authentication

An integrity check must survive a deliberate attacker, not just accidental errors. A network checksum and a cryptographic hash serve different purposes, and neither authenticates a message by itself.

Understand the hash properties

A cryptographic hash function maps a message of any length to a fixed-size digest. SHA-256 produces 256 bits, usually written as 64 hexadecimal digits. Good hashes have three distinct resistance properties:

PropertyWhat the attacker must not be able to find
Preimage resistanceA message matching a supplied digest
Second-preimage resistanceA different message matching one supplied message's digest
Collision resistanceAny two different messages with the same digest

Collisions exist because a finite set of digests represents more possible messages. Security means finding a useful collision is infeasible. MD5 and SHA-1 have practical collision attacks and are unsuitable for signatures and certificates. SHA-3 supplies another modern hash family.

Small message changes spread across the digest: this is the avalanche effect. Changing "Pay Ana 100" to "Pay Ana 900" changes 124 bits of the SHA-256 output; the digests start with ECD0D31E and 21736708. By contrast, the Internet checksum of both "PAY 1290" and "PAY 9012" is 0xEC3B: swapping the relevant 16-bit words preserves their sum. A checksum designed to catch random damage is easy to preserve deliberately.

Add the secret an attacker lacks

Sending a message and its hash openly does not solve active tampering. Trudy replaces both the message and its digest, so the receiver's recalculation succeeds. A message authentication code, or MAC, adds a secret authentication key shared by Alice and Bob.

Alice sends m and MAC(s,m). Bob computes a tag from the received message and his own copy of s, then compares tags. If Trudy changes "Pay Ana 100" to "Pay Ana 900", Bob calculates the tag for the changed text. Trudy's copied old tag fails the comparison. The message can still be readable: a MAC supplies integrity and authentication of a key holder, not confidentiality.

HMAC uses a hash with two nested, keyed passes. HMAC-SHA256 is a standard choice. Simply using H(s∥m) with SHA-256 is unsafe: length extension can let an attacker append bytes and calculate a matching tag without learning the key. HMAC's construction avoids that failure.

Separate authenticity from freshness

An old message with its original MAC still has a valid tag. To reject replay, authenticate a sequence number or a fresh challenge along with the message, and check that freshness value at the receiver. Adding an unauthenticated number is insufficient because Trudy could change it.

Both shared-key holders can make valid tags. A third party therefore cannot use a MAC to decide which holder wrote a message. Digital signatures supply that publicly verifiable evidence. When combining encryption with a separate MAC, use separate keys and encrypt-then-MAC, authenticating the ciphertext; an AEAD construction provides an integrated alternative.

Key Takeaways

  • A hash is unkeyed; a MAC requires a shared secret.
  • Collision resistance means collisions are hard to find, not nonexistent.
  • An attacker can replace a message and its openly transmitted hash.
  • HMAC avoids the length-extension weakness of a simple secret-prefix SHA-256 hash.
  • Freshness checks must cover authenticated nonces or sequence numbers.

2.2 Digital signatures and certificate trust

A digital signature lets anyone check evidence created with one private key. The verifier needs both a sound signature check and a trustworthy link between the public key and the identity it represents.

Sign and verify a message

The signer uses a private key; a verifier uses the matching public key. Signatures bind their evidence to the message, so alteration fails verification. The private key must remain under the signer's control. This supports non-repudiation: independently verifiable evidence of signing, unlike a MAC that either shared-key holder could create.

Schemes process a digest or encoded representation of the message. In a simplified RSA model the signature is KB−(H(m)). The receiver computes the digest and compares it with the value recovered using Bob's public key. Actual RSA signatures add an encoding such as RSASSA-PSS; ECDSA and Ed25519 use different arithmetic. Signing is not a general-purpose method of encrypting a message with a private key.

For a toy RSA key with n=143, e=7, and d=103, let the digest number be 20. Bob calculates σ=20103 mod 143=58. Alice obtains 587 mod 143=20 and compares it with her own digest. If altered text has digest 21, the recovered 20 does not match. Collision resistance matters because two messages sharing a digest could otherwise share the same signing input.

FeatureMACDigital signature
Key used to create evidenceShared secretSigner's private key
Who can verify?Shared-key holdersAnyone with the public key
Who can create it?Every shared-key holderThe private-key holder
Typical protocol useBulk data authenticationHandshakes, certificates, updates
Bind a key to a name

Trudy can generate a perfectly valid key pair. If she labels its public key "Bob", successful signature verification alone will not expose the substitution. A certificate binds an identity to a public key under a certification authority's signature.

An X.509 website certificate contains domain names in the subject alternative name field, the subject's public key, an issuer, validity dates, and the issuer's signature. A server normally supplies its leaf certificate and intermediate certificates. The client checks this chain to a root already trusted in its operating system or browser. A root's self-signature is not what makes it trusted; inclusion in the trust store supplies that starting trust.

The verifier checks signatures along the path, validity dates, the intended name, permitted usage, and revocation information where available. A chain ending at an unknown root does not become trusted merely because its signatures are mathematically valid.

Require evidence of key possession

Certificates are public and can be copied. A server must also show control of the associated private key by signing fresh handshake data. A stolen certificate file alone cannot produce that signature. An ordinary valid website certificate establishes control of its domain name; it does not establish that the site's content or business is honest.

Key Takeaways

  • Sign with the private key and verify with the public key.
  • MAC holders can all generate tags; signatures provide independently checkable evidence.
  • A certificate binds a public key to an identity under an issuer signature.
  • A trusted chain starts with a root the client already accepts.
  • A certificate must be accompanied by proof of private-key possession.
  • A domain certificate does not certify a website’s honesty.

2.3 Fresh challenges and authenticated sessions

End-point authentication asks who is participating now. An old valid message may prove that someone once held a key, yet fail to prove that the present sender holds it.

Break the weak versions

Alice first sends "I am Alice". Trudy can send those same words. Adding Alice's source IP address fails because a datagram can carry a forged address. Sending a password exposes it to an observer. Encrypting a fixed password hides its contents but leaves a reusable proof: Trudy records the ciphertext and sends it in another login.

This is a replay attack. The attacker does not decrypt or change the old proof. The weakness is that Bob accepts the same bytes in a new session. A stronger cipher would not fix that protocol error.

Make the proof depend on this attempt

Bob sends a fresh, unpredictable nonce, a challenge used once in this authentication context. Alice returns a value that requires her secret key, such as an HMAC of the challenge. Bob computes the expected response with his copy of the key. A response copied from an earlier challenge will not match.

For example, Monday's challenge is 0x7F3A91C2. Trudy captures its valid response. On Tuesday Bob sends 0x0B66E4D9. Replaying Monday's response fails because Tuesday's expected tag is calculated from different bytes. The short hexadecimal values illustrate the exchange; real challenges need enough random bits to avoid useful prediction or repetition.

Unpredictability blocks advance collection too. If Bob's next challenge is easy to guess, Trudy can pose as Bob, ask Alice to answer that future challenge, and later present the collected response to Bob. A challenge must be tied to the current protocol exchange, not just look different from the last one.

Authenticate with public keys

Alice can sign a fresh challenge using her private key. Bob verifies it using her genuine public key. If Bob accepts a substitute public key supplied by Trudy, Trudy can sign Bob's challenge herself. Certificates establish the identity-to-key link; the fresh signature proves current possession of that key.

In mutual authentication, both peers prove their identities. A protocol must distinguish their roles and bind proofs to the session so one side's response cannot simply be reflected as the other's. Ordinary web TLS usually authenticates the server with a certificate; the user then authenticates inside that protected channel using a password or passkey. Service connections and VPNs often authenticate both endpoints.

Protect what comes after login

Successful authentication does not protect later plaintext traffic. Trudy could wait until login finishes and then inject commands or hijack the connection. Secure handshakes establish session keys, and subsequent messages carry integrity protection tied to that session.

Challenge–response also does not strengthen a weak human password automatically. If an observer can recompute a captured response for each password guess, she can run an offline dictionary attack. The freshness check stops replay while a strong secret or suitable password-authenticated exchange addresses guessing; the two protections solve different problems.

Key Takeaways

  • A fixed encrypted password can be replayed without being decrypted.
  • Challenge–response proves possession of a secret using a fresh unpredictable challenge.
  • Public-key authentication needs a trusted identity-to-key binding.
  • Authentication must lead into a protected session.
3

Build and check a TLS channel

TLS assembles key agreement, identity checks, and authenticated encryption into a channel for application data. Follow a record from its directional key and sequence number to its integrity check, then trace the messages that establish those keys. Handshake timing, resumption, certificate validation, and visible traffic metadata explain both the value and the limits of an HTTPS connection.

3.1 Protected records over TCP

TLS gives two application processes a confidential, authenticated channel over a reliable byte stream. In the common HTTPS case, HTTP uses TLS over TCP, normally on port 443. An application library such as OpenSSL or BoringSSL handles TLS; TCP transports its bytes without interpreting them.

Establish keys, then protect records

A handshake authenticates the peer and establishes shared keying material. Key derivation turns that material into separate secrets for handshake traffic and application data, with different keys for each direction. Alice's outgoing record cannot simply be reflected back as Bob's because the receiving direction uses different protection.

TLS splits data into records, allowing the receiver to verify one piece at a time. A plaintext record carries at most 214=16,384 bytes of content. Its short header includes a type, legacy version field, and length. Encryption adds overhead, so an encrypted record is larger than the original content. In TLS 1.3 the outer protected-record type does not directly reveal the enclosed application or handshake content type.

TLS 1.3 requires AEAD. The receiver verifies a record's authentication tag before releasing its plaintext to the application. If Trudy changes a protected HTTP request, the tag fails: the receiver terminates the connection, using bad_record_mac for a record-protection failure. TLS detects interference; it does not turn maliciously changed bytes back into a valid request.

Count records in each direction

Each sender and receiver maintains an implicit record sequence number. It is not sent in the TLS record header. TLS 1.3 XORs it with a per-direction IV to produce the AEAD nonce. Replaying an old record at a new position uses the wrong expected number and fails authentication. Deleting or reordering protected records similarly disrupts the expected sequence when later bytes are processed.

TCP's sequence numbers still handle ordinary delivery and reordering. They do not authenticate the peer: an attacker who controls the path can forge TCP headers. TLS's record count is bound to secret-key protection, so successful TCP delivery alone does not imply successful TLS verification.

Detect an incomplete ending

Suppose Bob expects a document but the TCP connection closes halfway through. A forged FIN or a broken link can end transport delivery without proving that the TLS sender finished. TLS uses the protected close_notify alert to signal an orderly end of its sending stream. Without it, the receiver must consider possible truncation and use the application's completeness rules; an unexpected TCP EOF is not an authenticated end marker.

An attacker can always discard packets and stop progress. Confidentiality and integrity do not guarantee availability. A complete HTTP message length may help an application recognize that one message arrived, but that is a separate check from orderly TLS closure.

Distinguish related protocols

TLS 1.3 is specified by RFC 9846, which replaced RFC 8446 in 2026. TLS 1.2 remains deployed; SSL 2.0/3.0 and TLS 1.0/1.1 are deprecated. DTLS adapts the security design to datagrams. QUIC carries the TLS 1.3 handshake within its UDP-based transport, then protects QUIC packets itself; it does not send ordinary TLS-over-TCP records over UDP.

Key Takeaways

  • TLS protects application data above a reliable transport.
  • Separate directional keys prevent simple record reflection.
  • AEAD and implicit record numbers detect tampering and sequence interference.
  • A protected close_notify supplies an authenticated end-of-stream signal.
  • TLS cannot force an attacker to deliver traffic.

3.2 The TLS 1.3 handshake and resumption

A TLS handshake must establish a secret and show whose secret it is. In a full certificate-based TLS 1.3 exchange, ephemeral key agreement provides fresh keying material and signatures bind the negotiation to the server's identity.

Follow the message flights
  1. ClientHello offers versions, AEAD cipher suites, key-exchange groups, signature algorithms, random data, and one or more key_share values. It usually names the server through SNI.
  2. ServerHello selects parameters and supplies the server's key share. Both peers compute shared keying material and derive handshake traffic keys.
  3. The server sends encrypted EncryptedExtensions, Certificate, CertificateVerify, and Finished messages. CertificateVerify signs a structured input including the handshake transcript hash; Finished authenticates the transcript with a derived MAC key.
  4. The client checks the chain, server name, signature, and Finished, then sends its own Finished. Application traffic uses separately derived traffic secrets.

The server's certificate associates a name with a public key. CertificateVerify proves control of the private key in this exchange. Finished detects interference with the negotiated transcript. These are separate checks: successfully deriving a shared secret does not establish server identity.

Count round trips

At RTT 40 ms, ignoring processing and transmission delays, TCP setup takes 40 ms and a full TLS 1.3 handshake adds 40 ms. The client sends its request at 80 ms; a response can return around 120 ms. A full TLS 1.2 handshake adds two RTTs after TCP, so the corresponding times are 120 ms and 160 ms. QUIC combines transport setup with the TLS handshake, allowing a new connection to send its request after one RTT, at 40 ms.

A HelloRetryRequest adds a round trip when the server needs a different key share. Shared support for a group is not enough if the initial offer did not contain an acceptable share.

Bind negotiation and separate secrets

If Trudy removes strong cipher suites from a ClientHello in transit, the client and server record different transcripts. Authentication of those transcripts fails. TLS also includes version-downgrade signaling when a capable server negotiates an older version.

The key schedule uses HKDF, based on HMAC, to derive purpose-specific secrets. Handshake keys protect setup messages; application keys protect later data. KeyUpdate replaces application traffic keys during a long connection. TLS 1.3 removed static RSA key transport: an RSA certificate can still authenticate a handshake by signing, while ephemeral key agreement provides forward secrecy.

Resume without repeating certificate authentication

After setup, NewSessionTicket lets the peers prepare resumption. They derive a resumption PSK from the resumption secret and ticket nonce; the client later presents the ticket as the PSK's identifier and proves possession of that PSK. Resumption can include fresh Diffie–Hellman for forward secrecy.

0-RTT sends early data with the first flight, but that early data can be replayed. Use it only where repeating a request is safe, never for an unprotected repeatable payment action. The later handshake's protections do not retroactively make early data replay-resistant.

Mutual TLS adds a requested client certificate and proof of its private key. Post-quantum hybrid groups such as X25519MLKEM768, defined in RFC 10024, combine X25519 and ML-KEM-768 so secrecy survives if either component remains secure.

Key Takeaways

  • ClientHello and ServerHello establish parameters and shared keying material.
  • CertificateVerify proves private-key possession; Finished authenticates the transcript.
  • A full TLS 1.3 handshake normally adds one RTT after TCP setup.
  • TLS 1.3 removes RSA key transport, not RSA signatures.
  • A resumption ticket identifies a PSK; possession of the ticket alone is not the authentication proof.
  • 0-RTT data carries replay risk.
  • Hybrid post-quantum exchange combines two sources of keying material.

3.3 Server identity and the limits of TLS

Encryption is useful only when it reaches the intended peer. A client must validate the identity behind the keys before sending sensitive application data.

Check the whole identity claim

A TLS client checks that the certificate chain reaches a root in its trust store, that signatures and validity periods pass, that the requested name matches the certificate, and that the certificate permits TLS server authentication. Where it checks revocation, that must pass too. CertificateVerify then demonstrates possession of the corresponding private key.

Name matching is about the host the client intended to contact, not a name the server suggests after connecting. A certificate for *.example.com covers www.example.com and mail.example.com. It covers neither example.com nor a.b.example.com: the wildcard replaces exactly one label. A perfectly valid certificate for the wrong domain still fails authentication.

For example, a client requests shop.example.net but receives a trusted, current certificate for *.example.com. The chain and dates may pass; the name check fails. The client must reject that connection. A certificate is not a general license for its holder to impersonate any server.

Understand an encrypted interception

If certificate verification is disabled, Trudy can terminate TLS from the client and create a second TLS connection to the real server. Both links are encrypted, but Trudy has the plaintext between them. Checking for encryption without checking the peer therefore misses the attack. Keep certificate validation enabled and treat a failed identity check as a failed connection.

An organization's TLS inspection proxy follows a related structure deliberately. Managed devices trust the organization's root, allowing its proxy to issue certificates they accept. The proxy terminates one secure connection and starts another. The browser-to-server path then has an additional trusted endpoint with access to plaintext.

Protect the first request

In SSL stripping, an attacker keeps the user's side on HTTP while contacting the site through HTTPS. This can begin when a browser first tries a bare address over HTTP. HSTS tells a browser to use HTTPS for later visits. A preload entry can enforce HTTPS even before the first visit; a policy learned only after a successful HTTPS visit cannot protect an earlier HTTP request retroactively.

Identify what remains visible

TLS 1.3 encrypts the server certificate and application contents, but observers still see network addresses, ports, timing, and record sizes. Ordinary ClientHello SNI exposes the requested server name. Encrypted Client Hello, standardized in RFC 9849, protects that name when deployed. A separately unprotected DNS lookup can also reveal the destination name.

TLS protects data between its endpoints while it travels. It cannot repair malware on the client, a compromised server, insecure stored data, or application flaws. It also cannot prevent packet dropping. IPsec addresses a different scope: it applies network-layer protection to selected IP traffic without requiring each application to invoke TLS. Using both can protect different stretches of the same route.

Key Takeaways

  • Certificate checks include the intended name as well as the chain and dates.
  • A wildcard covers one label, not the base domain or deeper names.
  • Disabling identity validation enables encrypted interception.
  • HSTS preload can protect a first visit from HTTP downgrade.
  • TLS leaves traffic metadata visible and does not secure compromised endpoints.
4

Protect datagrams through a VPN

IPsec moves protection below individual applications, allowing hosts or gateways to secure selected IP datagrams. Protocol and mode determine which headers remain visible, while security associations supply the keys and counters. Trace a site-to-site packet through encapsulation and replay checks, then see how IKEv2 authenticates peers and prepares those associations.

4.1 IPsec protocols, modes, and security associations

IPsec applies protection at the IP layer, where it can cover TCP, UDP, and ICMP traffic without changing their applications. Its endpoints may be individual hosts or gateways connecting whole networks.

Choose a protocol and mode
ChoiceWhat is protected?What stays readable?
AHIntegrity and origin authentication, including immutable IP header fieldsAll contents; AH does not encrypt
ESP transportThe transport segment, with encryption and integrity in the protected configurationOriginal IP header
ESP tunnelThe original datagram, including its inner IP headerNew outer IP header

AH uses IP protocol number 51; ESP uses 50. ESP is the usual choice for modern VPN traffic. AH's protection includes address fields that NAT rewrites, making ordinary address translation incompatible with its authentication check. ESP does not authenticate the outer IP header.

In transport mode, the ESP header sits between the original IP header and the transport segment. Routers still see the original source and destination. In tunnel mode, a new IP header addresses the two tunnel endpoints, and the original IP datagram travels inside. With encrypted ESP tunnel mode, outside observers cannot read the original hosts' addresses or transport ports, but they can read the gateways' addresses needed for forwarding. AH in tunnel mode still supplies no confidentiality.

IPsec can provide confidentiality, integrity, origin authentication, and anti-replay protection. The actual services depend on protocol, algorithms, and policy; choosing AH does not supply encryption merely because it belongs to IPsec.

Keep state in each direction

A security association, or SA, defines one direction of protected traffic. It holds algorithms, keys, mode, endpoints, sequence state, replay-window state, and a lifetime. A 32-bit security parameter index, or SPI, helps the receiver select the right SA. It is an identifier, not an encryption key, and can travel openly in the ESP header.

Two-way traffic needs two IPsec SAs. A headquarters gateway serving one branch and 50 traveling laptops has 51 peers. With one ESP pair per peer it needs 2×51=102 ESP SAs, plus an IKE SA per peer for management. Rekeying or separate traffic classes can add further SAs; the count here follows the stated one-pair design.

Although IP forwarding is connectionless, this cryptographic state is maintained at the protecting endpoints. Routers between them need not know the session keys or maintain the IPsec SA.

Separate policy from active protection state

The Security Policy Database (SPD) matches traffic selectors such as addresses, protocols, and ports. Its decision is to protect selected traffic, bypass protection, or discard it. The Security Association Database (SAD) stores the parameters and changing state of established SAs. A receiver uses the packet's SPI and relevant context to find that state.

The SPD answers "What should happen to this traffic?" The SAD answers "Which established keys and counters implement that protection?" A VPN policy can protect office subnets while letting another destination bypass it. Having IPsec enabled does not mean that every packet a host sends enters a tunnel.

Key Takeaways

  • AH authenticates but never encrypts; ESP can provide encrypted, authenticated traffic.
  • ESP transport exposes the original IP header; encrypted ESP tunnel mode hides the inner header.
  • The outer tunnel header remains readable for routing.
  • IPsec SAs are one-way, so bidirectional traffic needs a pair.
  • The SPD selects policy; the SAD stores active SA state.

4.2 An ESP tunnel from setup to delivery

A site-to-site VPN joins two networks through gateways; a remote-access VPN joins a user's device to a gateway. Both encapsulate traffic so that ordinary internet routers can carry it between protecting endpoints.

Establish the associations

IKEv2 sets up keys and SAs. IKE_SA_INIT exchanges algorithm proposals, Diffie–Hellman values, and nonces. The resulting keys protect IKE_AUTH, where peers authenticate their identities and create the first pair of ESP SAs. With signatures or a pre-shared key this normally takes four messages in two round trips. EAP authentication can add IKE_AUTH exchanges. Later exchanges create more SAs or replace expiring keys.

IKE initially uses UDP port 500. When NAT is detected, IKE and UDP-encapsulated ESP use port 4500. ESP itself has no TCP or UDP ports; encapsulation lets port-based NAT mappings carry it reliably, including multiple clients. The outer transport changes, while ESP still protects the inner traffic.

Send one datagram

Host 10.1.0.5 sends to 10.2.0.9. The branch gateway is 198.51.100.1; headquarters uses 203.0.113.1.

  1. The branch SPD selects tunnel protection for the destination subnet, and the gateway obtains the matching SA.
  2. It treats the complete original datagram as ESP's inner payload, adding a trailer with padding, pad length, and Next Header 4 for IPv4.
  3. It encrypts the inner datagram and trailer, and adds the ESP header containing the SPI and next sequence number. Integrity protection covers the ESP header and protected payload; an AEAD algorithm integrates encryption and tag generation.
  4. It adds the outer IP header, addressed from branch gateway to headquarters gateway. Native ESP uses protocol 50; NAT traversal carries ESP inside UDP.

Internet routers see the outer endpoint addresses. The internal addresses and ports are inside the encrypted payload.

Receive and authenticate

Headquarters uses the SPI to select an SA, preliminarily checks the sequence number, verifies integrity, and decrypts. It updates trusted replay state only after authentication succeeds. It removes the tunnel protection and forwards the recovered original datagram to 10.2.0.9. Next Header identifies the recovered payload: 4 for IPv4, 41 for IPv6, or 6 for TCP in an ESP transport-mode example.

Allow reordering but reject replay

A 64-packet anti-replay window with highest authenticated number 1000 covers 937 through 1000. Unseen packet 990 can arrive late and be accepted. Its next copy is rejected. Packet 930 is too old. A valid packet 1005 moves the range to 942 through 1005. An attacker cannot move the trusted window just by sending an unauthenticated packet with a large number.

A VPN protects only its endpoints' intervening path. After tunnel removal, internal delivery needs its own protection where required. Split tunneling sends some traffic outside the VPN. A commercial VPN makes its provider another trusted network operator. TLS/DTLS-based VPNs and WireGuard use other protocols to implement tunnels; "VPN" names the network arrangement, not one mandatory encryption protocol.

Key Takeaways

  • IKE_SA_INIT establishes keying material; IKE_AUTH authenticates peers and creates ESP SAs.
  • ESP tunnel mode wraps and protects the whole original datagram.
  • Replay windows admit unseen reordered packets but reject duplicates and old packets.
  • Only authenticated packets update trusted replay state.
  • NAT traversal carries ESP in UDP on port 4500.
  • VPN protection ends at the tunnel endpoint.
5

Authenticate wireless access

Wireless security starts on a link that nearby radios can observe. WEP shows how a small IV space and an unkeyed integrity check undermine encryption; WPA2 and WPA3 build stronger authentication and traffic keys. Compare these Wi-Fi exchanges with the SIM-based trust used by cellular networks, including how 5G conceals a permanent subscriber identity.

5.1 From broken WEP to WPA2 session keys

A Wi-Fi frame is available to radios in range. A nearby attacker can capture traffic or advertise an evil twin, a fake access point using a familiar network name. Wireless security must authenticate access and protect frames, not merely hide the network name.

Why WEP failed

WEP combined a shared 40- or 104-bit secret with a 24-bit public IV to initialize RC4. Its CRC-32 check detected errors but was not a keyed authenticator. The IV space has only 224=16,777,216 possibilities; randomly selected IVs reach about a 50% repeat chance after roughly 4,823 frames.

A repeated IV under the same key repeats the keystream. XORing two ciphertexts then reveals the XOR of the plaintexts. CRC-32's linear structure also lets an attacker modify bits and adjust the error check. Weak RC4 key scheduling enabled key recovery from captured frames. These failures involve nonce reuse, unauthenticated integrity, and cipher construction; simply choosing a less obvious network name fixes none of them.

Replace the frame protection

WPA2, based on IEEE 802.11i, uses CCMP: AES counter-mode encryption combined with CBC-MAC integrity. Its packet number helps construct unique nonces and reject replay. Earlier WPA/TKIP was a transitional measure for old hardware and is deprecated.

Connection proceeds through discovery, authentication that establishes a pairwise master key (PMK), the four-way handshake, and protected transfer. In WPA2-Personal, a passphrase and network name produce a 256-bit PMK through PBKDF2 with 4,096 HMAC-SHA1 iterations. Everyone using that passphrase and SSID derives the same PMK. Authentication has not yet supplied a fresh per-association traffic key.

Follow the four-way handshake
  1. The access point sends ANonce.
  2. The station generates SNonce and derives the PTK from the PMK, both nonces, and both MAC addresses. It sends SNonce and a message integrity code (MIC).
  3. The access point derives the same PTK and checks the MIC. It supplies the group traffic key (GTK) in a protected message.
  4. The station confirms receipt and installation.

The PMK is not sent in the handshake. Fresh nonces produce fresh session keys from the existing PMK. The GTK serves group traffic, while the pairwise key serves communication between that station and the access point.

Know what the password permits

A captured WPA2-Personal handshake gives an offline guessing test: derive a candidate PMK and PTK, recompute the MIC, and compare it with the capture. A user who already knows the network passphrase can also derive another user's PTK from that user's captured handshake. KRACK exploited key reinstallation and nonce reuse in implementations; patches address that defect.

WPA2-Enterprise uses 802.1X. The station is the supplicant; the access point is the authenticator and relays EAP to an authentication server, commonly through RADIUS. EAP-TLS uses client certificates; PEAP and EAP-TTLS carry credentials inside TLS protection. Users obtain individual keying material and can have access revoked separately. In either mode, Wi-Fi protection ends at the access point; TLS can continue protection to an application server.

Key Takeaways

  • WEP combines a small IV space, repeated keystreams, and unkeyed integrity.
  • WPA2 CCMP provides both encryption and integrity.
  • The four-way handshake derives fresh PTKs without transmitting the PMK.
  • WPA2-Personal captures allow offline password guessing.
  • Enterprise authentication supplies individual user keying material.

5.2 WPA3, open hotspots, and cellular authentication

A protected wireless link needs a sound way to establish its keys. WPA3 changes password-based Wi-Fi key establishment, while cellular networks start with a subscriber secret held by the SIM and home network.

Improve password-based Wi-Fi

WPA3-Personal uses SAE, Simultaneous Authentication of Equals, to establish the PMK. A captured SAE exchange does not provide the WPA2-style offline password test: each guess requires active interaction. SAE also provides forward secrecy, so learning the password later does not expose recorded past sessions. The four-way handshake then derives traffic keys from the PMK.

WPA3 requires Protected Management Frames (PMF), which authenticate robust management frames such as deauthentication messages. This blocks forged teardown messages; it cannot stop radio jamming. WPA3-Enterprise retains 802.1X and offers an optional 192-bit security mode using stronger algorithm choices such as GCMP-256.

Transition mode accepts WPA2 and WPA3 under one network name. Its compatibility can expose devices to the weaker WPA2 path. In 6 GHz operation, WPA3 or Enhanced Open is required, and WPA2 transition mode is not permitted; WPA3-Personal uses SAE's hash-to-element method.

Enhanced Open, based on OWE, establishes encryption without a password through Diffie–Hellman. It prevents passive listeners from reading frames, but it does not authenticate the hotspot. An evil twin can establish its own encrypted link with the user.

Authenticate a cellular subscriber

A long-term secret K resides in the USIM and the home network's authentication infrastructure: HSS in 4G and UDM/ARPF in 5G. A visited network receives authentication material without learning that long-term secret.

In 4G AKA, the visited network's MME obtains a vector containing RAND, AUTN, XRES, and key material from the home HSS. The phone receives the random challenge RAND and authentication token AUTN. Its USIM checks AUTN to authenticate the network and freshness, then computes RES. The visited network accepts the subscriber when RES matches XRES. Derived keys protect later communication.

This is mutual authentication. Earlier 2G GSM authenticated the phone to the network but did not give the phone an equivalent check of the network, enabling fake-base-station attacks. Mutual authentication still needs secure algorithms and correct key handling; the long-term secret never needs to be sent to the visited network.

Conceal the permanent identity

In 5G, the home network makes the final authentication decision. The phone can also conceal the subscriber-specific part of its permanent identity, SUPI, using the home network's public key to form SUCI. Routing information remains readable so the request can reach the right home network.

Concealment requires a provisioned protection scheme. The null scheme leaves the identity unprotected. Protected SUCI reduces exposure to devices that request permanent identities; it does not make all radio activity anonymous. After registration, temporary identifiers reduce routine use of the permanent identity. Cellular access security still does not protect the full route to an app server: TLS supplies that separate application-endpoint protection.

Key Takeaways

  • SAE resists offline password guessing and provides forward secrecy.
  • PMF authenticates robust management frames but cannot prevent jamming.
  • OWE encrypts an open link without authenticating the access point.
  • Cellular AKA authenticates using a SIM-held secret that the visited network never receives.
  • 4G and 5G support mutual authentication; 5G adds protected SUCI and home-network confirmation.
  • The SUCI null scheme supplies no identity concealment.
6

Filter traffic and detect attacks

Operational defenses decide which traffic may enter and look for attacks inside permitted flows. Start with ordered header rules, then add connection history, application processing, and network separation. Detection methods bring another kind of decision: whether suspicious behavior is an attack. Expected alert counts show why even a small false-positive rate matters on a busy network.

6.1 Ordered stateless firewall rules

A firewall enforces a policy between networks or network segments. It works only when the relevant traffic passes through it, and the firewall itself must resist compromise. A stateless filter makes a fresh decision for each packet using header fields.

Read a rule precisely

A rule can match source and destination IP addresses, transport protocol, ports, TCP flags, ICMP type, interface, and direction. Rules are evaluated in order: the first match decides. A final default deny drops packets that no allow rule matched.

For network 203.0.113.0/24, consider a web server at 203.0.113.10:

OrderMatchAction
1Inbound TCP to 203.0.113.10, destination port 443Allow
2Outbound TCP from 203.0.113.10, source port 443, ACK setAllow
3Everything elseDeny

A SYN from 198.51.100.7:50000 to the web server's port 443 matches rule 1. A SYN to its port 22 reaches rule 3 and is dropped. A reply from the server's port 443 with ACK set matches rule 2. Every field in a rule matters: a packet using UDP port 443 does not match an allow rule for TCP.

Find shadowed rules

Suppose an earlier rule says "allow inbound TCP to any host in 203.0.113.0/24 on any port". A later rule denying SSH to 203.0.113.10 has no effect: the earlier broad allow has already decided. Check rule order along with the words of each rule. Put intended exceptions before the general rule that would otherwise match them.

Default deny is useful because adding a new service does not silently make it reachable. Default allow has the opposite consequence: any traffic not explicitly blocked passes. Neither default corrects a badly ordered rule table.

Recognize the ACK shortcut

A policy can block inbound SYN packets with ACK clear to stop new outside-initiated TCP connections. To permit replies to inside clients, a stateless filter might allow inbound TCP from source port 443 when ACK is set. Trudy can craft both that source port and that flag. The filter has no memory proving that an inside host actually opened the connection.

A TCP ACK flag is a field the sender chooses, not a certificate of an established session. Stateful filtering improves this decision by consulting connection history.

Filter forged addresses

Ingress filtering can reject internet-facing packets claiming an internal source address or a private address that should not arrive there. Egress filtering rejects outgoing packets whose source lies outside the organization's assigned ranges. These checks reduce spoofing of disallowed ranges; they do not identify an individual host or stop a machine impersonating another permitted internal address.

Stateless filters inspect headers, not application meaning. Port 443 does not prove that traffic is HTTPS or harmless. An allowed connection may carry malicious content. Packet filtering therefore works alongside application gateways, endpoint controls, and intrusion detection.

Key Takeaways

  • The first matching rule decides; later rules cannot override it.
  • Default deny drops traffic that lacks an explicit matching permission.
  • ACK bits and source ports do not prove an established connection.
  • Address filtering limits spoofed ranges but does not authenticate hosts.
  • Header-based permission does not establish that an application payload is safe.

6.2 Connection state, proxies, and network separation

A stateful firewall adds context to packet filtering. An application gateway adds understanding of one application's requests. Network separation limits where a compromised public server can reach.

Track the actual flow

A stateful packet filter records addresses, ports, protocol, and connection state. When an inside client opens a permitted connection, the firewall creates an entry and permits appropriate returning packets. A new inbound connection still needs its own explicit permission. Entries expire when the connection closes or becomes inactive.

Suppose the table records an established TCP flow from 203.0.113.25:51000 to 198.51.100.80:443. An inbound segment reversing that address-and-port pair can match its state. An ACK from 192.0.2.66:443 to 203.0.113.30:52000 does not match the entry. Its source port and ACK flag would satisfy a loose stateless reply rule, but they do not establish membership in the tracked connection.

UDP lacks TCP connection setup. Stateful filters approximate a conversation by tracking recently used address-and-port pairs with a timeout. A DNS query to a chosen server opens a limited opportunity for the corresponding reply, not permission for every packet claiming to be DNS.

Inspect the application request

An application gateway, or proxy, receives and processes application traffic on users' behalf. A web proxy can authenticate a user and check a requested address or content against policy. To enforce that path, the packet filter must block clients from opening direct connections that bypass the proxy.

A proxy has protocol-specific logic, processing costs, and potential bottlenecks. Clients may need configuration, or the network may intercept traffic transparently. Encrypted content remains hidden from a proxy unless it terminates the TLS connection and creates another connection onward. That changes the set of endpoints trusted with plaintext.

DefenseEvidence used for its decisionImportant limit
Stateless filterThis packet's headersNo connection history
Stateful filterHeaders plus tracked flow stateAllowed flows can carry attacks
Application gatewayApplication requests and policyRequires application-specific processing and visibility
Isolate public servers

A DMZ is a separate segment for public services. The firewall permits selected internet-to-DMZ traffic while restricting access from the DMZ to the internal network. If a web server is compromised, the attacker does not automatically obtain unrestricted internal access. Any necessary DMZ-to-internal connection should have a specific policy.

This is defense in depth: several controls reduce different paths of failure. A host firewall still matters when an infected laptop is already inside or another link bypasses the perimeter. A zero-trust design does not grant access simply because a device is on an internal subnet; it authenticates and authorizes requests. The network location can inform policy, but cannot replace identity and permission checks.

Key Takeaways

  • Stateful filters check tracked flows, including addresses, ports, and state.
  • UDP tracking uses recent traffic and timeouts rather than TCP-style connections.
  • A required proxy is effective only when direct bypass paths are blocked.
  • TLS inspection requires access to plaintext at a terminating endpoint.
  • A DMZ restricts the consequences of a compromised public server.
  • Defense in depth combines controls that address different failure paths.

6.3 Intrusion detection and the false-alarm problem

A firewall can permit a connection that carries an attack. Intrusion detection examines traffic content and patterns for signs of misuse; intrusion prevention can act directly on those findings.

Choose detection and placement

An IDS usually observes copied traffic and raises alerts. An IPS sits inline and can drop suspicious traffic. Inline placement allows immediate blocking but adds processing delay and risks interrupting legitimate use when a detection is wrong.

MethodBasis for detectionStrength and limit
Signature-basedKnown byte patterns or traffic sequencesRecognizes known attacks; needs updates and misses unrecognized forms
Anomaly-basedDeviation from a learned baselineCan expose new attacks; unusual legitimate use can trigger alerts

Snort and Suricata are examples of signature-capable systems. A rule might recognize the request path ../../etc/passwd, more than 20 new connections to SSH port 22 from one source within a minute, or SYNs to hundreds of ports. These patterns indicate suspicious behavior; a match alone does not prove a successful intrusion.

An anomaly detector might flag a large change in traffic rate or protocol mix. A new legitimate backup job can look unusual too. A false positive is an alert on harmless activity; a false negative is an attack the detector misses. Moving a sensitivity threshold usually exchanges one kind of error for the other.

Calculate what an alert means

Consider 1,000,000 harmless connections and 10 attacks per day. A detector catches 99% of attacks and falsely alerts on 0.1% of harmless connections.

  1. Expected true alerts: 10×0.99=9.9.
  2. Expected false alerts: 1,000,000×0.001=1,000.
  3. Expected true fraction among alerts: 9.9/(9.9+1,000)≈0.0098, or about 1%.

These are expected counts across repeated days, so 9.9 need not be a whole-number daily outcome. The 99% detection rate is the share of attacks detected, not the chance that an alert is an attack. Rare attacks and a huge harmless population explain the difference: this is the base-rate problem.

Put sensors where they can see

Sensors just inside the firewall observe traffic that passed it. DMZ sensors observe public-service traffic; internal sensors can reveal attacks that never cross the perimeter. A sensor must keep up with the traffic it receives. It must also reassemble fragments and TCP segments consistently with the target; otherwise an attack split across packets may evade a pattern check.

TLS and IPsec hide encrypted payloads from a network sensor without decryption access. Addresses, ports, timing, lengths, and unencrypted handshake fields can still help. Payload inspection can occur at an endpoint where decryption happens, but an ordinary copied encrypted stream does not supply that plaintext.

A honeypot is a decoy with no intended ordinary users. Contact is therefore suspicious and can expose scanning or attack techniques with less background noise. Misconfigured clients or harmless automated traffic can still contact it, so a decoy does not make every alert conclusive.

Key Takeaways

  • An IDS alerts; an inline IPS can block and can also disrupt legitimate traffic.
  • Signatures recognize known patterns; anomalies identify departures from normal behavior.
  • False positives concern harmless traffic; false negatives concern missed attacks.
  • The proportion of true alerts depends on attack prevalence as well as detection quality.
  • Reassembly and sensor placement determine which attack patterns are visible.
  • Encryption hides payloads from sensors that lack decryption access.
  • A honeypot reduces ordinary background traffic but does not make every contact malicious.

Security in Computer Networks examples

6 Walkthroughs

1

Build a secret across an untrusted path

16 steps
Move from attacker powers to symmetric encryption, then calculate RSA and Diffie–Hellman key establishment.
  1. 1
    IntroductionStart with an exposed exchange

    Alice needs to send Bob a private command over a path Trudy can observe and change. Hiding the words is one requirement; confirming Bob and detecting changes are separate requirements.

    Follow how cipher choices and key establishment address that problem. Small arithmetic examples make the operations visible, while the attacker model stays the same throughout: the path cannot be trusted.

  2. 2
    ExplanationIdentify what failed

    Suppose Trudy reads a command, changes its destination, and later resends an old login proof. These are different actions. Reading breaks confidentiality; alteration breaks integrity; replay attacks the freshness of authentication.

    Passive observation can also expose connection times and volumes without exposing plaintext. Encrypting the command does not remove that traffic metadata or automatically stop its replay.

  3. 3
    ChallengeClassify observation and interference

    Trudy first measures when Bob contacts a server. She then drops his next request. Which action is passive, and which is active?

    ---reveal---

    Measuring connection times is passive traffic analysis. Dropping a request is active interference that can harm availability. The classification depends on whether she changes delivery, not on whether she learns the plaintext.

  4. 4
    Key InsightPut secrecy in the key

    Kerckhoffs’s principle assumes Trudy knows the algorithm. A public, studied algorithm can remain secure while its key stays secret.

    That matters because software can be inspected and copied. Changing an exposed key is practical; replacing a secret algorithm everywhere is harder. A replacement key protects future exchanges, but cannot undo exposure of recorded traffic under a compromised old key.

  5. 5
    ExplanationSeparate key size from mode

    AES encrypts 128-bit blocks using a 128-, 192-, or 256-bit key. More key bits increase exhaustive-search work. They do not change what the mode does with repeated blocks.

    ECB encrypts blocks independently, exposing equal blocks. CBC chains them and needs a fresh unpredictable IV. CTR makes a keystream and requires a unique nonce for each use of a key. None of these encryption modes alone supplies message authentication.

  6. 6
    ExampleCancel a repeated keystream

    Use four-bit toy values to see CTR's reuse problem. Let the keystream be 1011. Plaintext 0110 encrypts to 1101; plaintext 0011 encrypts to 1000.

    XORing the ciphertexts gives 0101. XORing the plaintexts gives the same 0101: the two copies of the keystream cancel. Knowing the first plaintext therefore lets Trudy recover the second, without finding the encryption key.

  7. 7
    ChallengeChoose the protection for a readable header

    A packet must hide its payload, keep its routing field readable, and reject changes to either. What kind of protection fits, and where does the routing field go?

    ---reveal---

    Use AEAD. Encrypt the payload and supply the routing field as associated data. The field remains readable but is covered by the authentication check. Encryption without authentication would not meet the change-detection requirement.

  8. 8
    ExplanationUse a public and a private key

    Bob can publish his encryption key without publishing his decryption key. Alice uses the public key to encrypt for him; his private key recovers the message.

    Public-key operations are slower than symmetric encryption. A practical hybrid therefore establishes a short random session key, then uses AES or ChaCha20 for the data. Distributing a public key also requires a trustworthy identity binding, or Trudy can substitute her own.

  9. 9
    ExampleChoose a toy RSA key

    Choose toy primes p=7 and q=11. The modulus is n=77, and z=(7−1)(11−1)=60.

    Pick e=7. Its inverse modulo 60 is d=43 because 7×43=301=5×60+1. Publish (77,7) and keep the private exponent secret. These small values illustrate the method; real RSA uses large moduli and defined padding.

  10. 10
    ExampleEncrypt the message number

    Encrypt message number m=2 using the toy public key (77,7):

    c=27 mod 77=128 mod 77=51.

    Bob decrypts with 5143 mod 77=2. The exponents undo each other modulo the chosen modulus. Real RSA encryption adds randomized OAEP padding, so a repeated message does not reveal itself through deterministic textbook encryption.

  11. 11
    ExampleExchange DH public values

    Now use toy Diffie–Hellman with public p=23 and g=5. Alice chooses private a=2 and sends A=52 mod 23=2. Bob chooses private b=3 and sends B=53 mod 23=10.

    Only the public values 2 and 10 cross the path. The private exponents remain at their endpoints. Trudy sees the exchange, but large real groups make recovering the secret exponents infeasible.

  12. 12
    ExampleDerive the same DH value

    Alice raises Bob's value to her exponent: 102 mod 23=8. Bob raises Alice's value to his exponent: 23 mod 23=8.

    Both obtain 8 because the two paths compute the same underlying exponent product. A real protocol derives traffic keys from the shared result; it does not use this tiny toy number directly. It must also authenticate the exchange, which plain DH has not done.

  13. 13
    ChallengeExpose the substituted key shares

    Trudy replaces Alice’s and Bob’s DH public values with her own and establishes one secret with each. Does a larger DH group alone stop her?

    ---reveal---

    No. She does not solve either peer’s difficult discrete-logarithm problem; she participates using her own secrets. The protocol must authenticate the exchanged values and identities. Increasing group size addresses secret recovery, not this substitution attack.

  14. 14
    ConnectionKeep old sessions safe after key theft

    Suppose Bob’s long-term signing key is stolen next year. If today’s session used fresh ephemeral DH secrets and erased them, that signing key cannot reconstruct today’s session secret. This is forward secrecy.

    RSA transport of a session key lacks that property. Post-quantum hybrids such as X25519MLKEM768 address a different threat: future quantum recovery of classical exchange secrets from recorded traffic.

  15. 15
    ChallengeCombine identity and data protection

    Alice wants efficient bulk encryption to Bob, protection from key substitution, and secrecy for old sessions after later signing-key theft. What combination supplies these properties?

    ---reveal---

    Use authenticated ephemeral key agreement, bind Bob’s signing key to his identity, erase ephemeral secrets, and derive symmetric AEAD traffic keys. Authentication prevents Trudy’s substitution; ephemeral exchange provides forward secrecy; AEAD protects the bulk data and its integrity.

  16. 16
    RecapFollow the keys and the protected path

    Ask three linked questions: which property needs protection, how is the shared secret established, and how is each message protected?

    A sound design keeps security in its keys, authenticates public-key establishment, and avoids repeated keystreams. Fresh erased exchange secrets protect past sessions from later authentication-key theft; AEAD then protects data while leaving explicitly associated fields readable.

2

Turn a message into trustworthy evidence

14 steps
Build message authentication, verify a certificate-backed signature, and repair a replayable login.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionDecide what the evidence must show
  2. 2
    ExplanationHashing does not add a secret
  3. 3
    ExampleCheck a keyed tag
  4. 4
    ChallengeSeparate modification from replay
  5. 5
    ExplanationChange who can create the evidence
  6. 6
    ExampleVerify a toy signature
  7. 7
    ExplanationTrace trust from a known root
  8. 8
    ChallengeChoose publicly checkable evidence
  9. 9
    ExampleReplay the fixed login proof
  10. 10
    ExplanationBind proof to a fresh challenge
  11. 11
    ChallengePredict the result of a new nonce
  12. 12
    Key InsightContinue protection after login
  13. 13
    ChallengeRepair two different weaknesses
  14. 14
    RecapDistinguish the proof from its freshness
3

Trace a TLS connection from setup to closure

16 steps
Follow handshake messages, calculate request timing, and evaluate certificate and record checks.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionBuild trust before sending a request
  2. 2
    ExplanationProtect pieces of the byte stream
  3. 3
    ExampleExpect the next protected record
  4. 4
    ChallengeInterpret a silent transport ending
  5. 5
    ExplanationOffer parameters and a key share
  6. 6
    ExplanationDerive handshake keys
  7. 7
    ExplanationCheck three kinds of evidence
  8. 8
    ExamplePlace the request on a timeline
  9. 9
    ChallengeAdd a retry to the setup
  10. 10
    Key InsightResume without replay-safe early data
  11. 11
    ExampleMatch the intended server name
  12. 12
    ExplanationKeep identity checks enabled
  13. 13
    ChallengeLocate the remaining visible information
  14. 14
    ConnectionProtect the first contact too
  15. 15
    ChallengeEvaluate the whole secure channel
  16. 16
    RecapCheck setup, records, and scope
4

Carry a datagram through an IPsec VPN

13 steps
Choose the IPsec mode, establish associations, and trace encapsulation and replay handling.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionSeparate the two packets
  2. 2
    ExplanationChoose what the header reveals
  3. 3
    ExampleCount the direction-specific state
  4. 4
    ChallengeSelect policy before keys
  5. 5
    ExplanationAuthenticate the gateways with IKE
  6. 6
    ExampleStart with the inner datagram
  7. 7
    ExampleAdd the visible routing envelope
  8. 8
    ExampleAuthenticate before forwarding
  9. 9
    ExampleMove a replay window
  10. 10
    ChallengeKeep the inclusive lower edge
  11. 11
    ConnectionCross NAT and recognize the endpoint
  12. 12
    ChallengeSeparate tunnel trust from application trust
  13. 13
    RecapTrack policy, association, and encapsulation
5

Establish wireless keys and identities

13 steps
Explain WEP’s failure, derive WPA2 traffic keys, and compare SAE with cellular AKA.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionAssume the radio can be observed
  2. 2
    ExplanationSee why a long-lived WEP key fails
  3. 3
    ChallengeIdentify two independent WEP weaknesses
  4. 4
    ExplanationEstablish the master key first
  5. 5
    ExampleDerive the station’s PTK
  6. 6
    ExampleInstall pairwise and group protection
  7. 7
    ChallengeTest a guessed passphrase
  8. 8
    ExplanationReplace the offline password test
  9. 9
    Key InsightDistinguish encryption from hotspot identity
  10. 10
    ExampleKeep the cellular secret at home
  11. 11
    ExplanationConceal a permanent identity
  12. 12
    ChallengeCompare three access links
  13. 13
    RecapTrace the source of trust
6

Enforce access and interpret detections

14 steps
Evaluate ordered rules, add connection and application context, and calculate the share of useful alerts.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionPermit a flow without trusting its contents
  2. 2
    ExampleApply the first matching rule
  3. 3
    ChallengePredict a shadowed exception
  4. 4
    Key InsightDo not trust a reply-looking header
  5. 5
    ExampleMatch both ends of a recorded connection
  6. 6
    ExplanationRequire the application gateway path
  7. 7
    ChallengeContain a compromised public service
  8. 8
    ExplanationChoose the detection evidence
  9. 9
    ExampleCalculate true and false alert counts
  10. 10
    ExampleUse the alert denominator
  11. 11
    ChallengeRecalculate after a threshold change
  12. 12
    TipInspect where plaintext is available
  13. 13
    ChallengeCombine access control and detection
  14. 14
    RecapUse each control for its decision

Security in Computer Networks practice questions

50 Practice Questions in 5 sets

Set 1: Keys, identities, and protected paths10 Practice Questions

Question 1 of 10

A service uses AES with a 256-bit key but encrypts equal blocks independently under that key. Why can repeated record fields still be recognized?
  1. The AES block length is too short.
  2. CTR repeats a nonce for every block.
  3. CBC keeps a fixed IV for every block.
  4. ECB preserves repeated-block equality.
Show answerHide answer
Answer: D
Independent encryption of equal blocks under one key is ECB, so repeated plaintext blocks produce repeated ciphertext blocks. A larger AES key increases brute-force cost but does not remove that equality pattern. The block size does not expose the secret key.

Question 2 of 10

An authentication server accepts the same encrypted password every time. Trudy records one successful exchange. How can she impersonate the user without discovering the password?
  1. Replay the captured encrypted proof.
  2. Decrypt the password first.
  3. Increment the old ciphertext.
  4. Send the password’s digest.
Show answerHide answer
Answer: A
The server accepts a fixed proof, so resending its captured bytes is enough to attempt the same authentication. Trudy need not decrypt the password. Encryption conceals the password’s contents but does not make this unchanged proof specific to a fresh login attempt.

Question 3 of 10

A valid certificate has only the name *.example.org. A client requests reports.eu.example.org. What should its name check decide?
  1. Accept any matching suffix.
  2. Accept multi-label matches.
  3. Reject the name mismatch.
  4. Reject all wildcard names.
Show answerHide answer
Answer: C
The wildcard replaces exactly one label, so it can match eu.example.org but not reports.eu.example.org. A trusted signature and valid dates do not extend the wildcard to deeper names. Rejecting every wildcard would also be wrong: one-label matches are permitted.

Question 4 of 10

An ESP receiver’s 32-packet window ends at 460. Packet 440 has not been accepted before and passes authentication. What should the replay check do?
  1. Reject it as below the highest number.
  2. Accept it without moving the upper edge.
  3. Accept it and lower the upper edge to 440.
  4. Reject it since a sequence gap means replay.
Show answerHide answer
Answer: B
A 32-packet window ending at 460 covers 429 through 460, so unseen authenticated packet 440 is eligible. It marks that position received without changing the highest number. Being below the highest number does not alone make a packet a replay; the window tolerates reordering.

Question 5 of 10

What does Enhanced Open provide to a user connecting to a password-free hotspot?
  1. Hotspot authentication without encryption.
  2. Encryption without hotspot authentication.
  3. Encryption with certified hotspot identity.
  4. Neither encryption nor hotspot authentication.
Show answerHide answer
Answer: B
Enhanced Open uses OWE to encrypt the wireless link without a password, protecting against passive listeners. It does not authenticate the access point. A fake hotspot can negotiate its own encrypted connection, so encryption alone does not rule out an evil twin.

Question 6 of 10

A stateful firewall tracks TCP from 203.0.113.61:53020 to 192.0.2.90:443. An ACK arrives from 192.0.2.91:443 to 203.0.113.61:53020, with no matching new-connection permission. Why is it dropped?
  1. Its source does not match the flow.
  2. Every ACK needs a new allow rule.
  3. Source port 443 is never allowed.
  4. The client port must also be 443.
Show answerHide answer
Answer: A
The tracked remote endpoint is 192.0.2.90:443, while this packet comes from 192.0.2.91:443. Its ACK flag and familiar source port do not make it part of the recorded flow. Legitimate replies can use the client’s high port; that port is not the reason for rejection.

Question 7 of 10

Two CTR ciphertexts reuse one keystream. Trudy knows both ciphertexts and the complete first plaintext. What can she recover from those values?
  1. The XOR of plaintexts, but not either plaintext.
  2. The AES key, but no complete plaintext.
  3. Only the second plaintext’s repeated blocks.
  4. The second plaintext over the reused span.
Show answerHide answer
Answer: D
XORing the first ciphertext with its known plaintext recovers the reused keystream. XORing that keystream with the second ciphertext recovers the second plaintext over the shared length. This does not require recovering the AES key; knowing the keystream is enough for these ciphertext bytes.

Question 8 of 10

A device receives an old command with a valid HMAC. Its protocol checks no nonce or sequence number. What security failure remains possible?
  1. Undetected command modification.
  2. Recovery of the shared secret.
  3. Replay of the unchanged old command.
  4. Forgery using an old tag.
Show answerHide answer
Answer: C
The old message still has its authentic matching tag, so a bare HMAC check accepts the same pair again. Rejecting replay requires authenticated freshness data and a receiver check. HMAC’s integrity protection does not itself identify an old command as already executed.

Question 9 of 10

A TLS resumption adds fresh Diffie–Hellman and later completes Finished checks. Before that, a client sends a funds-transfer instruction as 0-RTT data. Trudy resends its captured first flight without decrypting it. Why does the application still need to prevent duplicate transfers?
  1. Finished checks cancel replayed early data.
  2. Fresh DH blocks every early-data replay.
  3. Ticket checks allow only one early request.
  4. Fresh DH does not remove early-data replay.
Show answerHide answer
Answer: D
Early data is sent before the fresh handshake completes and lacks its ordinary replay guarantees. Fresh Diffie–Hellman can protect later session secrets, but cannot make that earlier transfer execute only once. Trudy needs neither plaintext nor a signing key to replay the captured flight.

Question 10 of 10

An organization wants to remove one employee’s Wi-Fi access without replacing a passphrase shared by all users. Which authentication design supports that requirement?
  1. WPA2-Personal with one longer shared passphrase.
  2. WEP with a separate IV on every transmitted frame.
  3. WPA2-Enterprise with individual credentials.
  4. WPA2-Personal with one hidden network identifier.
Show answerHide answer
Answer: C
Enterprise authentication supplies individual credentials and keying material, allowing one user’s access to be revoked separately. A longer shared Personal passphrase still gives everyone the same shared basis for access. Hiding the SSID does not create separate user authentication.
Set 2: Security properties across the network10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Trudy records connection times and packet lengths without changing traffic. What kind of attacker behavior is this?
  1. Active connection hijacking.
  2. Passive analysis of metadata.
  3. Active source spoofing.
  4. Passive plaintext recovery.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

Alice wants to send a confidential public-key-encrypted message to Bob. Whose key should she use to encrypt it?
  1. Alice’s private key.
  2. Alice’s public key.
  3. Bob’s public key.
  4. Bob’s private key.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A sender transmits a report and its SHA-256 digest over a path controlled by Trudy. Why can Trudy replace the report without failing this check?
  1. Recompute the replacement’s digest.
  2. Find an original-digest collision.
  3. Recover the original message.
  4. Reuse the original digest.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A client receives a trusted, current server certificate copied by an impostor. What additional evidence must a certificate-based handshake obtain from the peer?
  1. Another copy of the certificate.
  2. A hash of the public certificate.
  3. A matching public-key fingerprint.
  4. A signature on fresh handshake data.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

In TLS 1.3, where is the record sequence number carried?
  1. It is carried in TCP’s sequence-number field.
  2. It is sent openly in each TLS record header.
  3. It is sent as an encrypted field in every record.
  4. It is maintained implicitly by each direction.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A new TCP connection uses a full TLS 1.3 handshake with no retry. RTT is 24 ms and other delays are negligible. When can the client first send its HTTP request?
  1. About 24 ms after starting TCP.
  2. About 72 ms after starting TCP.
  3. About 48 ms after starting TCP.
  4. About 96 ms after starting TCP.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A gateway maintains one bidirectional ESP pair for each of nine remote peers. How many ESP security associations does it need?
  1. 18 ESP SAs, one for each direction.
  2. 9 ESP SAs, one for each peer.
  3. 10 ESP SAs, including one shared.
  4. 36 ESP SAs, two pairs per peer.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Trudy captures a WPA2-Personal four-way handshake but does not know the passphrase. How can she test a guess without sending more Wi-Fi frames?
  1. Derive the PMK using the ANonce alone.
  2. Derive candidate keys and compare a MIC.
  3. Compare a password hash sent in message two.
  4. Decrypt the PMK transmitted with the handshake.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

An inbound TCP rule table allows any destination in 203.0.113.0/24, then denies port 22 to 203.0.113.44, then denies all. What smallest rule-table change blocks SSH to that host while retaining the other TCP access?
  1. Move default deny before both TCP rules.
  2. Add another SSH deny after the first deny.
  3. Move the SSH deny before the broad allow.
  4. Change the final default deny to allow.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A sensor sees 200,000 harmless connections and 40 attacks. It detects 75% of attacks and falsely alerts on 0.05% of harmless connections. About what share of its alerts are true attacks?
  1. About 23%.
  2. About 75%.
  3. About 0.05%.
  4. About 30%.
Show answerHide answer

Save this lesson to see this answer.

Set 3: Protocol state and authentication failures10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Trudy changes a server reply’s download address while leaving the rest of the reply readable. Which message property has she directly violated?
  1. Confidentiality.
  2. Availability.
  3. Message integrity.
  4. Peer authentication.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

In toy RSA, primes are 5 and 11, the public exponent is 3, and the message is 2. What private exponent below 40 and ciphertext satisfy this setup?
  1. Private exponent 3; ciphertext 8.
  2. Private exponent 27; ciphertext 8.
  3. Private exponent 27; ciphertext 6.
  4. Private exponent 13; ciphertext 8.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A distributor wants customers to verify a software release without giving them the ability to authenticate forged releases. What kind of evidence should it publish with the release?
  1. An HMAC with its shared secret key.
  2. An unkeyed digest beside the release.
  3. A ciphertext with its decryption key.
  4. A publicly verifiable digital signature.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

Bob sends a new random challenge, and Alice returns its HMAC under their shared secret. Trudy reuses Alice’s response to yesterday’s different challenge. Why does Bob reject it?
  1. The response does not match this challenge.
  2. An old tag expires automatically.
  3. Each challenge changes the key.
  4. Nonces prevent earlier captures.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A client receives a TCP close before any TLS close_notify, while waiting for more application data. What can it conclude about completion?
  1. TCP FIN authenticates TLS closure.
  2. TCP checksums confirm completeness.
  3. A final ACK authenticates TLS closure.
  4. TLS has not authenticated the ending.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A client disables certificate validation. Trudy intercepts its connection and establishes another TLS connection to the intended server. Why can both links report encryption while Trudy reads the requests?
  1. Both links reuse the server’s keys.
  2. Trudy terminates both encrypted links.
  3. Only pre-encryption data is visible.
  4. Only server replies are encrypted.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Two gateways use encrypted ESP tunnel mode. Which source and destination IP addresses can routers between them read directly?
  1. The internal host addresses in the inner header.
  2. Both sets of addresses in a single clear header.
  3. The gateway addresses in the outer header.
  4. Neither set because ESP encrypts all IP headers.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A 16-packet ESP window ends at 300. The receiver authenticates previously unseen packet 309, then receives previously unseen authenticated packet 294. What happens?
  1. Accept both; window ends at 309.
  2. Accept only 309; window ends at 309.
  3. Accept only 294; window ends at 300.
  4. Accept both; window ends at 300.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A roaming 4G phone checks AUTN before returning RES. What is that check intended to establish?
  1. Subscriber authenticity only.
  2. Application-server identity.
  3. Disclosure of the SIM key.
  4. Network authenticity and freshness.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

An internet-facing ingress filter receives a packet claiming source 10.8.4.2. The policy rejects private source ranges on that interface. What should happen?
  1. Drop it under the ingress policy.
  2. Accept the claimed internal host.
  3. Trust the private source.
  4. Allow the familiar service port.
Show answerHide answer

Save this lesson to see this answer.

Set 4: Apply defenses under realistic constraints10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A system changes from a 128-bit to a 132-bit key while its brute-force trial rate stays fixed. How does exhaustive-search time change?
  1. It becomes four times as long.
  2. It becomes 16 times as long.
  3. It becomes 132/128 times as long.
  4. It becomes twice as long overall.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

Alice and Bob use toy DH with p=31 and g=3. Alice’s private exponent is 4; Bob’s public value is 17. What shared value does Alice derive?
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Which hash property concerns finding a different message with the same digest as one particular supplied message?
  1. Second-preimage resistance.
  2. Preimage resistance.
  3. Collision resistance.
  4. The avalanche effect.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A server sends a leaf certificate and an intermediate signed by a self-signed root absent from the client’s trust store. All signatures verify. Why does the path still fail the trust check?
  1. The root signed its own certificate.
  2. The server kept its private key.
  3. It lacks an accepted trust anchor.
  4. The leaf and CA use different keys.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

Trudy reflects a client’s protected TLS record back to that same client as if the server had sent it. Why does using separate directional keys matter?
  1. The receiving key does not validate it.
  2. The certificate verifies each record.
  3. TCP drops all reflected traffic.
  4. A shared key prevents reflection.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A client offers two acceptable DH groups but sends a key share for only the first. The server selects the second through HelloRetryRequest. With RTT 18 ms and new TCP, when can the client send its request after full TLS setup?
  1. About 18 ms.
  2. About 36 ms.
  3. About 54 ms.
  4. About 72 ms.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

An attacker sends an ESP packet with an enormous sequence number but an invalid integrity tag. Why must the receiver avoid advancing trusted replay state?
  1. Replay state must advance before a tag can be checked.
  2. An unseen high number takes priority over a bad tag.
  3. A bad tag should reset the replay window back to zero.
  4. Forged advancement could make genuine packets too old.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A WPA2-Personal user knows the network passphrase and captures a second station’s complete four-way handshake. Why can that user derive the second station’s pairwise key?
  1. The PMK is sent by the station in message two.
  2. The capture supplies the other PTK inputs.
  3. The PTK depends on only the passphrase and SSID.
  4. Knowing the GTK directly reveals each station’s PTK.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

What is the main purpose of placing a public web server in a DMZ with restricted access to the internal network?
  1. Prevent every attack on the web server.
  2. Limit internal access after server compromise.
  3. Authenticate all external web users.
  4. Hide internal addresses in public DNS.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A reverse proxy terminates TLS and opens a second TLS connection to an app server. A harmful request contains a signature split across two TCP segments. Which observation point and processing can reveal the complete plaintext signature?
  1. At the app, before TLS, after stream reassembly.
  2. Between proxy and app, after stream reassembly.
  3. At the app, after TLS and stream reassembly.
  4. At the app, after TLS, inspecting each segment.
Show answerHide answer

Save this lesson to see this answer.

Set 5: Reason across layers and failure modes10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Bob uses WPA3 to reach an access point, then sends plain HTTP to a distant server. An observer is on the route after the access point. Why can the observer still read the request?
  1. WPA3 secures authentication, not data.
  2. HTTP bypasses encryption on the radio hop.
  3. Wi-Fi protection ends at the access point.
  4. Wi-Fi keys protect only outgoing frames.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A server uses predictable increasing challenges and accepts HMAC(key, challenge). Trudy can pose as the server to the user before attacking the real server. How can predictability undermine the freshness design?
  1. She can collect a future response in advance.
  2. She can reuse an old response for a new counter.
  3. She can increment an old response by one.
  4. She can answer from the public counter alone.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A browser has no stored HSTS policy and no preload entry for a site. It first sends plain HTTP. Trudy keeps that side on HTTP while using HTTPS to the real site. Why does the site’s later HSTS header not guarantee protection of this first request?
  1. HSTS takes effect only after TCP closes.
  2. The browser had not learned the policy yet.
  3. HSTS governs certificates, not HTTPS use.
  4. HSTS must arrive in a plain HTTP reply.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A gateway has four peers, with one bidirectional ESP pair per peer. Its SPD protects 10.70.0.0/16 using tunnel endpoint 198.51.100.8 and bypasses other destinations. It sends to 10.70.4.6 and 192.0.2.200. How many ESP SAs are needed, and which packet receives outer destination 198.51.100.8?
  1. Four SAs; only the packet to 10.70.4.6.
  2. Eight SAs; both of the outgoing packets.
  3. Eight SAs; only the packet to 192.0.2.200.
  4. Eight SAs; only the packet to 10.70.4.6.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A roaming subscriber uses 5G with the SUCI null scheme and completes home-confirmed authentication. The phone then sends plain HTTP beyond the cellular network to a remote server. What has this established, and which exposure remains?
  1. Subscriber authentication, but no identity concealment or end-to-end HTTP secrecy.
  2. Subscriber authentication and identity concealment, but no end-to-end HTTP secrecy.
  3. Subscriber authentication and end-to-end HTTP secrecy, but no identity concealment.
  4. Identity concealment and end-to-end HTTP secrecy, but no subscriber authentication.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A stateless rule allows inbound TCP packets with source port 443 and ACK set. Can an outside attacker construct a packet that matches those fields without an established connection?
  1. No; ACK requires a genuine prior reply.
  2. No; port 443 requires a valid certificate.
  3. Yes; both fields are sender-controlled.
  4. No; a connection-table entry must exist first.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A network requires web use through an authenticating proxy, but clients can also connect directly to external TCP port 443. What policy change enforces the intended proxy path?
  1. Point clients to the proxy’s DNS server.
  2. Block direct client web connections.
  3. Allow direct traffic only with ACK set.
  4. Keep direct access but log requests.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Sensor A detects 90% of attacks with a 0.1% false-positive rate. Sensor B detects 80% with a 0.01% false-positive rate. For 100 attacks and 100,000 harmless connections, which has the higher true-alert fraction?
  1. A, with about 90% true alerts.
  2. A, with about 47% true alerts.
  3. B, with about 44% true alerts.
  4. B, with about 89% true alerts.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Two past encrypted sessions are recorded. Session X transported its key under a long-term RSA key; session Y used authenticated ephemeral DH and erased its private exponents. Those long-term authentication keys are stolen later. Which session key becomes recoverable by that theft alone?
  1. Both X’s and Y’s keys.
  2. Y’s key only.
  3. Neither X’s nor Y’s key.
  4. X’s key only.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Trudy substitutes her own DH shares between a TLS 1.3 client and server, deriving separate handshake secrets with each. She copies the genuine server certificate. Why can she not impersonate the server merely by computing valid Finished messages for her two exchanges?
  1. She cannot forge the server’s transcript signature.
  2. Finished requires the server’s private signing key.
  3. No handshake keys exist until certificate checks pass.
  4. Each DH share needs encryption with the server’s key.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

109 Key Terms, each with its definition

A

Active attacker
An active attacker manipulates communication by injecting, changing, deleting, or replaying traffic or disrupting delivery.
An active attacker replays an earlier login message to impersonate a user without knowing the password.
AEAD
AEAD is authenticated encryption with associated data, protecting ciphertext integrity and readable associated fields along with confidentiality.
A packet header can be associated data in AEAD, remaining visible while changes to it fail verification.
AES
AES is the Advanced Encryption Standard, a symmetric block cipher with 128-bit blocks and a choice of 128-, 192-, or 256-bit keys.
Choosing an AES-256 key increases key-search work while the algorithm continues to process 128-bit blocks.
AH
AH is IPsec's Authentication Header protocol, providing integrity and origin authentication, including immutable IP fields, but no encryption.
NAT address rewriting interferes with AH because the receiving integrity check covers the changed address fields.
AKA
AKA is authentication and key agreement in cellular systems, using subscriber secrets and fresh authentication material to establish access keys.
In 4G AKA, the phone checks AUTN and the visited network compares its returned RES with the expected XRES.
Anomaly-based detection
Anomaly-based detection flags departures from a learned baseline, potentially exposing new attacks as well as unusual legitimate behavior.
Anomaly-based detection may flag a new backup job because its traffic volume differs sharply from the baseline.
Anti-replay window
An anti-replay window records recently accepted sequence numbers, admitting unseen reordered packets while rejecting duplicates and old traffic.
A valid packet above the current anti-replay window advances it only after the packet passes authentication.
Application gateway
An application gateway is a protocol-specific proxy that processes requests on users' behalf and applies application-level access policy.
A web application gateway authenticates users while the firewall blocks direct connections that would bypass it.

B

Base-rate problem
The base-rate problem occurs when rare attacks and abundant harmless traffic make false alerts dominate despite a high detection rate.
With many harmless connections, the base-rate problem can make only a small fraction of IDS alerts real attacks.
Block cipher
A block cipher is a keyed algorithm that reversibly transforms fixed-size plaintext blocks into ciphertext blocks of the same size.
AES is a block cipher with 128-bit blocks, even when its selected secret key contains 256 bits.
Brute-force attack
A brute-force attack tries possible keys exhaustively until one works; adding a key bit doubles the number of candidates.
A brute-force attack against a 56-bit key is far cheaper than the same search against a 128-bit key.

C

CBC
CBC is a block-cipher mode that XORs each plaintext block with the preceding ciphertext block before encrypting it.
A CBC sender supplies a fresh unpredictable IV to process the first block without a previous ciphertext.
CCMP
CCMP is Wi-Fi frame protection combining AES counter-mode confidentiality with CBC-MAC integrity and packet-number-based replay handling.
WPA2 uses CCMP to authenticate a protected frame instead of relying on WEP's easily manipulated CRC alone.
Certificate
A certificate is an issuer-signed record binding an identity to a public key, with information such as validity and permitted use.
A website's certificate names its domain, but the server must also prove possession of the matching private key.
CertificateVerify
CertificateVerify is a handshake signature bound to the current transcript, proving control of the certificate's private key.
A copied certificate cannot produce a valid CertificateVerify without access to its corresponding private key.
Certification authority
A certification authority is an entity that signs certificates to attest to identity-to-public-key bindings under its issuing policy.
A certification authority signs an intermediate certificate whose key later verifies a website's certificate.
Chain of trust
A chain of trust is a sequence of certificate signatures connecting a presented identity and key to an already trusted root.
A client's chain of trust fails if the final root is absent from the client's accepted trust store.
Challenge–response
Challenge–response is authentication in which a verifier sends a fresh challenge and checks a response that requires a secret.
A challenge–response exchange can use an HMAC of the verifier's random nonce as the proof of key possession.
Ciphertext
Ciphertext is the encrypted form of a message, intended to conceal its contents from observers who lack the required decryption key.
Trudy records ciphertext from a TLS connection but still sees the surrounding packet addresses and timing.
ClientHello
ClientHello is the TLS client's opening handshake message offering parameters such as versions, cipher suites, groups, and key shares.
A ClientHello can list a supported group without including its key share, causing an extra exchange if selected.
close_notify
The close_notify alert is TLS's protected signal that a peer has finished sending, distinguishing orderly closure from a bare transport ending.
A client awaiting more data treats a TCP EOF without close_notify as a potentially incomplete TLS stream.
Collision resistance
Collision resistance is the difficulty of finding any two different messages with the same digest, despite collisions existing.
A signature scheme needs collision resistance so an attacker cannot prepare two texts with one signing digest.
Confidentiality
Confidentiality is the property that keeps message contents readable only by the sender and intended recipients.
A captured TLS record preserves confidentiality even though its length and destination remain visible.
Cryptographic hash function
A cryptographic hash function maps arbitrary-length input to a fixed-size digest while resisting useful preimage and collision searches.
A cryptographic hash function produces a new digest when a signed document's wording changes.
CTR
CTR is a mode that makes a keystream from encrypted counter inputs and XORs it with plaintext; its key-and-nonce pairs must be unique.
Reusing a nonce under one CTR key lets Trudy cancel the keystream by XORing the two captured ciphertexts.

D

Default deny
Default deny is a firewall policy that drops traffic unless an explicit permission matches it, limiting access to allowed traffic classes.
With default deny, adding a new listening service does not by itself make that service reachable from outside.
Defense in depth
Defense in depth combines several controls so that a weakness or bypass in one layer does not remove every remaining protection.
A DMZ, host firewall, and authenticated application channel provide defense in depth against different attack paths.
Diffie–Hellman
Diffie–Hellman is a key-agreement method in which exchanged public values and private exponents produce the same shared secret.
Alice and Bob derive matching secrets with Diffie–Hellman while sending only their public values.
Digital signature
A digital signature is private-key evidence bound to a message that anyone with the corresponding genuine public key can verify.
Customers verify a digital signature on an update without gaining the ability to sign their own updates.
DMZ
A DMZ is a separate segment for publicly reachable services, with restricted paths into an organization's internal network.
A compromised DMZ web server still faces filtering before it can reach protected internal databases.

E

ECB
ECB is a block-cipher mode that encrypts each block independently under one key, exposing equality between repeated plaintext blocks.
Repeated fixed fields produce repeated ciphertext blocks when a database export is encrypted with ECB.
ECH
ECH is Encrypted Client Hello, a TLS mechanism that protects the inner ClientHello, including the intended server name.
ECH conceals the inner server name, while outside observers can still see the connection's destination address.
Egress filtering
Egress filtering restricts outgoing traffic, including source addresses, to reduce forged traffic leaving an organization's network.
Egress filtering rejects an outbound source outside assigned ranges but cannot identify a spoofed address inside them.
End-point authentication
End-point authentication is the process of confirming the identity of a peer taking part in the current network exchange.
A fresh signed challenge provides end-point authentication after the verifier checks the signer's public key.
ESP
ESP is IPsec's Encapsulating Security Payload protocol, supporting encryption, integrity, origin authentication, and anti-replay services.
Encrypted ESP tunnel mode hides the original datagram while leaving a new routing header visible.
Evil twin
An evil twin is a rogue wireless access point that imitates a legitimate network identity to attract connecting users.
An evil twin can offer an encrypted OWE link because OWE alone does not authenticate the hotspot's identity.

F

False negative
A false negative is an attack that a detector fails to identify, leaving malicious behavior without the expected warning or block.
An unseen attack pattern can produce a false negative when a sensor relies only on an outdated signature set.
False positive
A false positive is a detection that labels harmless traffic as suspicious or malicious, increasing the number of alerts to assess.
A legitimate burst of SSH administration can trigger a false positive in a rule designed to notice password guessing.
Finished
Finished is a TLS handshake message authenticating the accumulated transcript with a MAC under a key derived for that purpose.
A changed ClientHello produces different transcripts and causes the Finished authentication checks to fail.
First-match rule
A first-match rule policy takes the decision of the earliest matching firewall entry and stops evaluating the remaining entries.
Under a first-match rule policy, a broad allow can shadow a later deny for a specific destination port.
Forward secrecy
Forward secrecy protects past session secrets against later theft of long-term authentication keys by using erased ephemeral secrets.
A recorded ephemeral DH session retains forward secrecy after the server's later signing-key compromise.
Four-way handshake
The four-way handshake is the Wi-Fi exchange that confirms master-key possession and derives and installs fresh traffic keys.
The four-way handshake carries nonces and MICs, not the shared PMK that both peers already possess.

H

HKDF
HKDF is an HMAC-based key-derivation construction used to produce distinct secrets for different purposes from keying material.
TLS applies HKDF to separate handshake secrets from the keys that protect later application traffic.
HMAC
HMAC is a message authentication construction that applies a hash in two nested keyed passes to avoid simple secret-prefix weaknesses.
HMAC-SHA256 authenticates a device message without sending the shared authentication key with it.
Honeypot
A honeypot is a decoy with no intended ordinary users, making contact suspicious and reducing the background noise of detection.
A scan reaching a honeypot reveals probing activity, although a harmless misconfigured client may also contact it.
HSTS
HSTS is an HTTP policy telling browsers to require HTTPS for a site, with preloading able to apply the rule before a first visit.
A browser with a preloaded HSTS entry avoids sending the initial HTTP request used in SSL stripping.
Hybrid encryption
Hybrid encryption combines public-key key establishment with symmetric encryption of bulk data under a resulting session key.
A file transfer uses hybrid encryption to avoid performing a slow public-key operation on every data block.

I

IDS
An IDS is an intrusion detection system that examines traffic or activity for suspicious patterns and raises alerts, often from a copy.
An IDS on an internal segment can observe lateral traffic that never passes the internet-facing firewall.
IKEv2
IKEv2 is a key-management protocol that authenticates IPsec peers, establishes security associations, and maintains or replaces their keys.
IKEv2 creates the first ESP pair through IKE_SA_INIT and IKE_AUTH instead of requiring manually distributed keys.
Ingress filtering
Ingress filtering rejects incoming traffic that violates source-address or other boundary policy, reducing disallowed address spoofing.
An internet-facing ingress filtering rule drops packets claiming to come from the organization's internal subnet.
Initialization vector
An initialization vector is an input that starts a cipher mode; CBC requires it to be fresh and unpredictable but not secret.
The initialization vector travels beside a CBC ciphertext so the receiver can decrypt its first block.
IPS
An IPS is an inline intrusion prevention system that can block suspicious traffic, risking false blocking and added processing delay.
An IPS drops a matched malicious request immediately, while a passive sensor would normally only alert.
IPsec
IPsec is a network-layer security architecture applying policy-selected protection to IP traffic between hosts or security gateways.
A gateway uses IPsec to protect selected traffic from an office subnet without modifying each application.

K

Kerckhoffs's principle
Kerckhoffs's principle states that a cryptographic system must remain secure when the algorithm is known and only its key is secret.
Using a public, studied cipher with a protected key follows Kerckhoffs's principle better than hiding a homemade cipher.

M

MAC
A MAC is a message authentication code computed with a shared secret, allowing key holders to detect changes and authenticate the data.
Bob checks a command's MAC before using it, then separately checks its sequence number for freshness.
Man-in-the-middle attack
A man-in-the-middle attack interposes an attacker who establishes separate exchanges with peers and relays or alters their communication.
Unauthenticated Diffie–Hellman permits a man-in-the-middle attack that substitutes both exchanged public values.
Message integrity
Message integrity is the ability to detect changes to received contents, including deliberate tampering during transmission.
An authenticated tag protects message integrity when Trudy edits a command before it reaches Bob.
ML-KEM
ML-KEM is a NIST-standardized post-quantum key-encapsulation mechanism designed to establish secrets against quantum-capable attackers.
A hybrid TLS group combines ML-KEM with X25519 instead of relying solely on classical key agreement.
Mutual authentication
Mutual authentication confirms both peers' identities, with proofs bound to the exchange and the distinct roles of its participants.
Service-to-service mutual authentication can require a certificate and private-key proof from each endpoint.

N

NAT traversal
NAT traversal carries ESP in UDP so address translators can maintain port-based mappings, normally using UDP port 4500.
Two VPN clients behind one translator can use NAT traversal instead of relying on native ESP port information.
Non-repudiation
Non-repudiation is support for independently verifiable evidence of signing, relying on the signer retaining control of the private key.
A digital signature supports non-repudiation in a way a tag made with a shared MAC key cannot.
Nonce
A nonce is a value used once in its protocol context; an authentication challenge uses an unpredictable nonce to prevent advance collection.
Bob changes the nonce for a new login so Monday's recorded response cannot authenticate Tuesday's attempt.

O

Operational security
Operational security protects a network’s continued safe use through controls such as filtering, intrusion detection, and restricted access.
A firewall contributes to operational security by allowing public web access while blocking unwanted inbound services.
OWE
OWE is Opportunistic Wireless Encryption, a password-free exchange providing link encryption without authenticating the access point.
Enhanced Open uses OWE to protect hotspot users from passive listeners while still leaving evil-twin risk.

P

Passive attacker
A passive attacker observes network traffic without modifying it, reading exposed contents or analyzing timing and volume.
A passive attacker can infer busy periods from encrypted traffic without learning the message contents.
Plaintext
Plaintext is the original intelligible message supplied to encryption or recovered by decryption, before considering its transport encoding.
Alice’s command is plaintext before AES encrypts it, even if the application represents its characters as binary bytes.
PMF
PMF means Protected Management Frames, which authenticate robust Wi-Fi management traffic such as deauthentication messages.
PMF blocks a forged teardown frame but does not stop an attacker from jamming the radio channel.
PMK
A PMK is a pairwise master key used as input to Wi-Fi session-key derivation, obtained from a password or an authentication exchange.
In WPA2-Personal, the passphrase and SSID derive the PMK before the four-way handshake establishes traffic keys.
Preimage resistance
Preimage resistance is the difficulty of finding an input that produces a particular supplied cryptographic digest.
Preimage resistance prevents treating a SHA-256 digest as a readily reversible encoding of its message.
Private key
A private key is the secret member of a key pair, enabling its holder to decrypt addressed ciphertexts or create signatures.
Stealing a server's private key can enable impersonation even though its public certificate was never secret.
PTK
A PTK is a pairwise transient key derived from the PMK, both peers' nonces, and MAC addresses for a Wi-Fi association.
Fresh handshake nonces give a new PTK when a station associates again while the shared PMK remains unchanged.
Public key
A public key is the openly distributed member of a key pair, used to encrypt for its owner or verify that owner's signatures.
Alice needs Bob's genuine public key before encrypting a session key intended for Bob alone.

R

Replay attack
A replay attack resends previously valid traffic to make a receiver accept an old proof or operation as a new one.
A replay attack can reuse an encrypted password even when the attacker cannot read the password inside.
Resumption PSK
A resumption PSK is a pre-shared secret derived from a previous TLS connection and used to authenticate a later resumed exchange.
A ticket identifies the resumption PSK, while the new handshake proves that the client actually holds it.
RSA
RSA is a public-key cryptographic family using modular exponentiation, with key recovery enabled by factoring its modulus.
A toy RSA modulus of 143 is easy to factor; practical systems use much larger moduli and defined padding.

S

SAD
The SAD is the Security Association Database holding established IPsec associations and their keys and changing protocol state.
The receiving gateway consults the SAD to find the algorithms and replay state associated with an ESP SPI.
SAE
SAE is Simultaneous Authentication of Equals, WPA3-Personal's password-authenticated key exchange that resists offline guessing from captures.
WPA3 runs SAE before the four-way handshake to establish a PMK with forward secrecy.
Second-preimage resistance
Second-preimage resistance is the difficulty of finding another message with the same digest as one particular given message.
Changing an existing signed contract without changing its digest would defeat second-preimage resistance.
Security association
A security association is one-way IPsec state defining keys, algorithms, mode, lifetime, sequence numbers, and replay handling.
Two peers need a security association in each direction to carry protected traffic both ways.
ServerHello
ServerHello is the TLS message selecting initial handshake parameters and providing the server's contribution to key establishment.
After ServerHello, the peers derive keys that protect the server's subsequent handshake messages.
Session key
A session key is a short-lived shared secret used to protect one exchange or traffic context, usually derived during key establishment.
A hybrid protocol establishes a session key first, then uses it for efficient symmetric protection of a large transfer.
Signature-based detection
Signature-based detection compares observations with known attack patterns, including content strings and sequences of network events.
Signature-based detection can recognize a known traversal path but miss a new attack with no matching rule.
SPD
The SPD is the Security Policy Database that selects protect, bypass, or discard processing for matching classes of IP traffic.
An SPD rule protects office-subnet traffic while a separate rule permits another destination to bypass IPsec.
SPI
An SPI is a security parameter index carried in an IPsec packet to help the receiver identify the association used for its protection.
The visible SPI directs an arriving ESP packet to the right stored keys; it is not itself a secret key.
Split tunneling
Split tunneling is a VPN policy that sends selected traffic through the protected tunnel while other traffic uses a separate route.
A local internet request may bypass the gateway under split tunneling even though an office connection enters the VPN.
SSL stripping
SSL stripping is an attack that keeps a user's connection on HTTP while the attacker uses HTTPS to the intended site.
A first HTTP visit without an existing HSTS policy can expose a browser to SSL stripping on an untrusted path.
Stateful packet filter
A stateful packet filter consults connection history as well as packet fields to distinguish permitted traffic from unrelated arrivals.
A stateful packet filter checks that an incoming ACK reverses the endpoints of a recorded allowed flow.
Stateless packet filter
A stateless packet filter permits or rejects each packet from header fields alone, without consulting a record of previous packets.
A stateless packet filter can match source port 443 and ACK set even when an attacker forged those fields.
Subject alternative name
A subject alternative name is a certificate field listing identities, including the domain names a TLS client checks against its target.
The requested host must match an appropriate subject alternative name, even when the certificate chain is trusted.
SUCI
A SUCI is a concealed form of the permanent subscriber identity that keeps routing information visible; its null scheme provides no concealment.
A protected SUCI uses the home network's public key so a radio observer cannot simply read the subscriber-specific identity.
SUPI
A SUPI is a 5G subscriber's permanent identifier, whose subscriber-specific part can be concealed before transmission during identification.
A phone forms a SUCI to reduce direct exposure of its SUPI when a non-null protection scheme is provisioned.
Symmetric-key cryptography
Symmetric-key cryptography uses one shared secret key for encryption and decryption, making it efficient for bulk data protection.
TLS uses symmetric-key cryptography to protect application records after its handshake establishes secrets.

T

TLS
TLS is a protocol that establishes an authenticated, confidential, integrity-protected channel over a reliable ordered byte stream.
HTTPS uses TLS to protect HTTP between the browser and the server that terminates the secure connection.
TLS record
A TLS record is an independently protected unit of the TLS stream, with a short header and bounded plaintext content.
A modified TLS record fails its authentication check before its contents reach the application as trusted data.
Traffic analysis
Traffic analysis infers communication patterns from metadata such as endpoints, timing, and volume, even when message contents are encrypted.
An observer uses traffic analysis to identify a busy server without decrypting any application requests.
Traffic key
A traffic key is a derived secret used to protect records in a particular direction and phase of a secure connection.
The client-to-server traffic key differs from the key used to protect records sent back by the server.
Transport mode
Transport mode is IPsec processing that protects the original datagram’s transport payload while retaining its original outer IP header.
In ESP transport mode, routers can still read the original host addresses even when the TCP segment is encrypted.
Truncation attack
A truncation attack ends delivery early so that a receiver might treat an incomplete protected exchange as complete.
A forged TCP FIN can start a truncation attack, but a missing protected closure warns the TLS receiver.
Trust store
A trust store is the collection of accepted trust anchors used by a client to decide which certificate paths it can trust.
Installing an organization's root in the trust store allows its authorized inspection proxy to be accepted.
Tunnel mode
Tunnel mode is IPsec processing that encapsulates an entire original IP datagram within a new datagram addressed to tunnel endpoints.
In encrypted ESP tunnel mode, an outside router sees gateway addresses while the original host addresses remain hidden.

U

USIM
A USIM is the subscriber application holding a cellular identity and long-term authentication secret shared with the home network.
The USIM checks network authentication material without sending its long-term key to the visited operator.

V

VPN
A VPN is a protected network arrangement that carries private traffic across another network through tunnels between chosen endpoints.
A site-to-site VPN connects office networks through gateways that encrypt and later recover the inner datagrams.

W

WEP
WEP is an obsolete Wi-Fi security protocol whose RC4 key construction, short IV, and unkeyed CRC integrity check enabled practical attacks.
A repeated WEP IV under the same shared key repeats the keystream and exposes relationships between captured plaintexts.
Wildcard certificate
A wildcard certificate covers names using a wildcard for exactly one domain label, without covering the base name or deeper labels.
A wildcard certificate for *.example.net covers api.example.net but does not cover east.api.example.net.
WPA2
WPA2 is a Wi-Fi security generation based on IEEE 802.11i, using authentication and AES-based CCMP to protect wireless data frames.
A WPA2-Personal station derives fresh association keys, but a captured handshake still permits offline passphrase tests.
WPA3
WPA3 is a Wi-Fi security generation requiring protected management frames and using SAE for Personal-mode password authentication.
A WPA3-Personal session resists later password disclosure through SAE’s forward-secret key establishment.

Z

Zero trust
Zero trust is a security approach that authenticates and authorizes access without treating internal network location as sufficient trust.
A zero trust service still checks a request's identity and permission when it arrives from an internal subnet.

#

0-RTT
The term 0-RTT describes early data sent with the first flight of a resumed TLS connection, before a fresh handshake completes.
A server must account for replay before accepting a state-changing instruction carried as 0-RTT data.
802.1X
IEEE 802.1X is a network-access authentication framework with a supplicant, an authenticator, and an authentication server.
WPA2-Enterprise uses 802.1X so the access point relays the station's EAP exchange to an authentication server.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started