How unit 4 is examined
Network threats and controls, firewalls, email security (PGP, S/MIME), IPSec (AH, ESP, IKE), SSL/TLS and SET; the marks sit in firewalls, PGP, IPSec/AH/ESP and the SSL handshake.
Threats in Networks
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. A network threat is any circumstance that can exploit a weakness in a network to break confidentiality, integrity or availability.
Key points.
- Eavesdropping and wiretapping read data in transit and break confidentiality.
- Spoofing, masquerade and session hijacking impersonate a legitimate party and break authentication.
- Modification, replay and man-in-the-middle attacks alter or resend messages and break integrity.
- Denial of service (SYN flood, ping flood) exhausts a server or link and breaks availability.
<mark>A network threat attacks confidentiality by sniffing, integrity by modification or replay, and availability by flooding.</mark>
Network Security Controls-Architecture
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Network security architecture is the layered placement of controls so that no single failure exposes the network, called defense in depth.
Key points.
- Segmentation with a DMZ keeps public servers apart from the internal LAN.
- Firewalls filter at the perimeter and IDS/IPS watch for attacks behind it.
- Link encryption protects each hop, while end-to-end encryption (SSL, IPSec, PGP) protects data between the two ends.
<mark>Defense in depth layers perimeter, network, host and data controls so that one failure is not fatal.</mark>
Wireless Security
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Wireless security protects 802.11 networks whose radio signals can be received by anyone in range.
Key points.
- WEP uses RC4 with a 24-bit IV and is broken because IVs repeat.
- WPA adds TKIP as an interim fix, and WPA2 (802.11i) uses AES-CCMP and is the standard choice.
- Typical attacks are rogue access points, evil twin, SSID spoofing and war driving.
<mark>WEP is broken; WPA2 with AES-CCMP is the secure wireless standard.</mark>
Honey pots
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. A honeypot is a decoy system deliberately made attractive and weakly defended so that attackers probe it, letting defenders detect and study attacks.
Key points.
- A low-interaction honeypot only emulates services (for example Honeyd), so it is safe but easy to detect.
- A high-interaction honeypot runs real systems, so it gathers rich data but carries more risk.
- A production honeypot sits in the organisation's network to detect intruders and distract them from real servers.
- A research honeypot (honeynet) is used to learn attacker tools and methods.
- Honeypots see almost no legitimate traffic so alerts are reliable, but a compromised one can be used to attack others.
<mark>A honeypot is a decoy system whose only value is being probed, attacked or compromised.</mark>
Asked: [7 marks] (Nov 2022) What is a Honeypot? Explain types of honeypot.
Traffic Flow Security
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. Traffic flow security hides the pattern of communication (who talks to whom, how much, how often), and the paper uses this topic for firewall design, whose full answer is in the next section.
Key points.
- Even encrypted traffic leaks information through source, destination, message length and timing, called traffic analysis.
- Padding makes messages the same length, and dummy (cover) traffic keeps the link busy so real bursts are hidden.
- A firewall controls which flows may enter or leave, so it is the main traffic control at the network edge.
<mark>Traffic flow security hides the pattern of communication using padding, dummy traffic and header protection, while a firewall controls which flows are allowed.</mark>
Answer frame. For the firewall design question, write the Firewalls section: definition and placement, diagram, design goals, types, rule base, default policy, uses; close with the limitation that a firewall cannot stop insiders.
Asked: [7 marks] (Dec 2020, Jun 2025, Dec 2025) Discuss the design of Firewall and its use / Define firewalls, explain types and their role in network security architecture / Explain technical details of a firewall and describe any three types with neat diagram. (Answer: Firewalls section.)
Firewalls - Design and Types of Firewalls
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. A firewall is a hardware or software barrier between a trusted internal network and an untrusted network that inspects all traffic and permits or blocks it according to a security policy.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-01" viewBox="0 0 424 252" width="424" height="252" role="img" aria-label="Firewall between the Internet (Net), the internal network (LAN) and the DMZ holding public servers"><style>#dsfig-u4-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-01 .t{fill:#16181D;font-weight:500}#dsfig-u4-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-01 .dot{fill:#16181D}#dsfig-u4-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-01 .ah{fill:#454C5A}#dsfig-u4-01 .ah.hi{fill:#2340B8}#dsfig-u4-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-01 .e{stroke:#B1B7C3}html.dark #dsfig-u4-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-01 .t{fill:#E6E8ED}html.dark #dsfig-u4-01 .t.inv{fill:#0F1115}html.dark #dsfig-u4-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-01 .dot{fill:#E6E8ED}html.dark #dsfig-u4-01 .ann{fill:#8FA3FF}html.dark #dsfig-u4-01 .lbl{fill:#858D9C}html.dark #dsfig-u4-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-01 .ah{fill:#B1B7C3}html.dark #dsfig-u4-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M61,40 L191,40" marker-end="url(#ah10)" marker-start="url(#ah10)"/><path class="e" d="M233,40 L363,40" marker-end="url(#ah10)" marker-start="url(#ah10)"/><path class="e" d="M212,61 L212,191" marker-end="url(#ah10)" marker-start="url(#ah10)"/><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">Net</text><circle class="n" cx="212" cy="40" r="18"/><text class="t" x="212" y="40" dy=".35em" text-anchor="middle">FW</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">LAN</text><circle class="n" cx="212" cy="212" r="18"/><text class="t" x="212" y="212" dy=".35em" text-anchor="middle">DMZ</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Firewall between the Internet (Net), the internal network (LAN) and the DMZ holding public servers</figcaption></figure>
Key points.
- Design goals are that all traffic passes through the firewall, only authorised traffic is allowed, and the firewall itself is immune to penetration.
- The rule base is an ordered list of rules on source, destination, protocol and port, checked top to bottom, and the first match decides.
- The default policy is either default deny (safer) or default permit (easier but weaker).
- Placement is at the network edge, often with a bastion host and a DMZ (screened subnet) isolating public servers from the LAN.
- Uses are access control, attack prevention, logging and auditing, NAT that hides internal addresses, and VPN termination.
- Limitations are that it cannot stop insiders, traffic that bypasses it, or malicious content in allowed traffic.
| Type | Inspects | Weakness |
|---|---|---|
| Packet filter (layer 3-4) | Headers per packet: IP, port, protocol | Stateless, no payload check, spoofing |
| Stateful inspection | Headers plus connection state table | No application awareness |
| Circuit-level gateway (layer 5) | Relays a TCP connection after handshake | Does not check data |
| Application proxy (layer 7) | Content of HTTP, FTP, SMTP | Slow, one proxy per application |
| NGFW | Deep packet inspection, user identity, IPS | Costly |
Example. Rules: (1) Allow Any to Mail server TCP 25; (2) Allow Internal to Any TCP 80, 443; (3) Deny Any to Any (default deny).
<mark>A firewall is a choke point that inspects every packet between networks and enforces the security policy by allow or deny rules.</mark>
Answer frame. Open with the definition and placement; draw the diagram, then a small box each for the three chosen types showing what they inspect; develop points 1-6 then the table; close with layered firewalls plus IDS giving defense in depth.
Pitfall: A packet filter looks only at headers; only the proxy or NGFW reads application content.
Asked: [14 marks] (Nov 2022, Nov 2023) Write short notes on any two: (a) Firewall and its types, (b) DSS, (c) Triple DES, (d) Schnorr identification scheme. What is a firewall? Explain different types in detail. (Parts b, c, d are in Units 3, 1, 2.) Asked: [7 marks] (Dec 2020, Jun 2025, Dec 2025) Firewall design, use, types, role in network security architecture, any three types with diagram.
Personal Firewalls
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. A personal firewall is software on a single host that controls that computer's inbound and outbound connections.
Key points.
- It applies rules per application and port, for example allowing the browser but blocking unknown programs.
- It protects laptops outside the corporate firewall and blocks inbound scans.
- Its weakness is that malware with admin rights can disable it.
<mark>A personal firewall is a host-based firewall that filters traffic for one machine per application.</mark>
IDS
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. An intrusion detection system monitors network or host activity and alerts when it finds malicious behaviour.
Key points.
- A network IDS sniffs a segment, whereas a host IDS examines logs, files and system calls on one host.
- Signature-based detection matches known patterns, so it misses new attacks.
- Anomaly-based detection flags deviation from normal behaviour, so it finds new attacks but gives false positives.
<mark>An IDS detects intrusions by signatures or anomalies and alerts; it does not block.</mark>
Email Security: Services Security for Email Attacks Through Emails
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Email security provides confidentiality, integrity, authentication and non-repudiation for messages and defends against attacks carried by email.
Key points.
- Confidentiality encrypts the message with a symmetric key so only the recipient can read it.
- Integrity and authentication use a hash and digital signature so tampering and forged senders are detected.
- Non-repudiation means the sender cannot deny sending, since the signature uses the sender's private key.
- Email attacks are spoofing, phishing, spam, malware attachments and eavesdropping; PGP and S/MIME are the standard defences.
| Point | PGP | S/MIME |
|---|---|---|
| Trust model | Web of trust | CA hierarchy, X.509 certificates |
| Use | Personal email | Corporate email, built into clients |
| Algorithms | RSA/DSS, CAST/IDEA/3DES | RSA/DSS, 3DES/AES, SHA |
<mark>Email security gives confidentiality, integrity, authentication and non-repudiation, and PGP and S/MIME provide them.</mark>
Asked: [7 marks] (Dec 2025) Discuss Email Security services and explain the working of PGP and S/MIME. (Working: PGP and S-MIME sections.)
Privacy-Authentication of Source Message
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Privacy means only the intended receiver can read a message, and source authentication means the receiver can verify who sent it and that it was unaltered.
Key points.
- Privacy comes from encrypting with a session key that is protected by the receiver's public key.
- Source authentication uses a MAC (shared key) or a digital signature (sender's private key).
- Only a digital signature also gives non-repudiation.
<mark>Encryption gives privacy; a MAC or digital signature authenticates the source.</mark>
Pretty Good Privacy (PGP)
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. PGP is an email security package that provides authentication, confidentiality, compression and email compatibility using public-key and symmetric cryptography.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-02" viewBox="0 0 424 80" width="424" height="80" role="img" aria-label="PGP sender order: Message, Sign (hash with private key), Zip compress, Encrypt with session key (wrapped by recipient public key), Radix-64"><style>#dsfig-u4-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-02 .t{fill:#16181D;font-weight:500}#dsfig-u4-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-02 .dot{fill:#16181D}#dsfig-u4-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-02 .ah{fill:#454C5A}#dsfig-u4-02 .ah.hi{fill:#2340B8}#dsfig-u4-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-02 .e{stroke:#B1B7C3}html.dark #dsfig-u4-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-02 .t{fill:#E6E8ED}html.dark #dsfig-u4-02 .t.inv{fill:#0F1115}html.dark #dsfig-u4-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-02 .dot{fill:#E6E8ED}html.dark #dsfig-u4-02 .ann{fill:#8FA3FF}html.dark #dsfig-u4-02 .lbl{fill:#858D9C}html.dark #dsfig-u4-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-02 .ah{fill:#B1B7C3}html.dark #dsfig-u4-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L105,40" marker-end="url(#ah11)"/><path class="e" d="M145,40 L191,40" marker-end="url(#ah11)"/><path class="e" d="M231,40 L277,40" marker-end="url(#ah11)"/><path class="e" d="M317,40 L363,40" marker-end="url(#ah11)"/><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">M</text><circle class="n" cx="126" cy="40" r="18"/><text class="t" x="126" y="40" dy=".35em" text-anchor="middle">Sig</text><circle class="n" cx="212" cy="40" r="18"/><text class="t" x="212" y="40" dy=".35em" text-anchor="middle">Zip</text><circle class="n" cx="298" cy="40" r="18"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">Enc</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">R64</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">PGP sender order: Message, Sign (hash with private key), Zip compress, Encrypt with session key (wrapped by recipient public key), Radix-64</figcaption></figure>
Key points.
- Authentication: the sender hashes the message (SHA-1), signs the hash with the sender's private key, and the receiver verifies with the sender's public key.
- Confidentiality: the sender generates a random one-time session key, encrypts the message with it (CAST-128, IDEA or 3DES) and encrypts the session key with the recipient's public key (RSA or ElGamal).
- Public and private keys are used only for the signature and for wrapping the session key, because public-key encryption of a whole message is slow.
- The receiver recovers the session key with the receiver's private key, then decrypts the message; the session key is discarded after use.
- Compression (ZIP) is applied after signing and before encryption, and radix-64 is applied last for email compatibility.
- The signature is made before compression so it verifies the original text, since another ZIP version could compress differently and break verification.
- Compression before encryption saves space and transmission time and removes redundancy, which makes cryptanalysis harder.
- Keys are held in a private-key ring (passphrase protected) and a public-key ring, each key identified by a 64-bit key ID.
<mark>PGP signs the hash with the private key, compresses, encrypts with a one-time session key, and wraps that key with the recipient's public key.</mark>
Answer frame. For the compression question, open with the PGP services, give points 5-7 stressing sign, compress, encrypt order; for the keys question, draw the diagram, develop points 1-4 and 8; close that the session key gives speed while public keys give safe distribution.
Asked: [7 marks] (Nov 2022) Why does PGP compress the message? What are the reasons for compressing the signature but before encryption? Asked: [7 marks] (Nov 2023) Write about the usage of Session keys, Public and Private keys in PGP.
S-MIME
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. S/MIME (Secure/Multipurpose Internet Mail Extensions) adds signing and encryption to MIME email using X.509 certificates.
Key points.
- Functions are enveloped data (encrypted content plus encrypted session key), signed data, clear-signed data and signed-and-enveloped data.
- Algorithms are SHA-1 for hashing, DSS or RSA for signatures, ElGamal or RSA to encrypt the session key, and 3DES, AES or RC2 for message encryption.
- Certificate processing: the sender obtains an X.509 v3 certificate from a CA, and the receiver checks the CA signature, validity and revocation before trusting the public key.
<mark>S/MIME secures MIME email using hashes, digital signatures, symmetric encryption and X.509 certificates issued by CAs.</mark>
Asked: [7 marks] (Nov 2023) Analyze the cryptographic algorithms used in S-MIME. Explain S-MIME certification processing.
IP Security: Overview of IPSec
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. IPSec is a suite of protocols that secures communication at the IP layer, giving access control, integrity, authentication, anti-replay and confidentiality to every application above it.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-03" viewBox="0 0 286 198" width="286" height="198" role="img" aria-label="IPSec architecture: AH and ESP protocols, security associations (policy and database) and IKE key management"><style>#dsfig-u4-03 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-03 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-03 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-03 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-03 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-03 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-03 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-03 .t{fill:#16181D;font-weight:500}#dsfig-u4-03 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-03 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-03 .dot{fill:#16181D}#dsfig-u4-03 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-03 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-03 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-03 .ah{fill:#454C5A}#dsfig-u4-03 .ah.hi{fill:#2340B8}#dsfig-u4-03 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-03 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-03 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-03 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-03 .e{stroke:#B1B7C3}html.dark #dsfig-u4-03 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-03 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-03 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-03 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-03 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-03 .t{fill:#E6E8ED}html.dark #dsfig-u4-03 .t.inv{fill:#0F1115}html.dark #dsfig-u4-03 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-03 .dot{fill:#E6E8ED}html.dark #dsfig-u4-03 .ann{fill:#8FA3FF}html.dark #dsfig-u4-03 .lbl{fill:#858D9C}html.dark #dsfig-u4-03 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-03 .ah{fill:#B1B7C3}html.dark #dsfig-u4-03 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-03 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-03 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-03 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="131" y1="39" x2="31" y2="103"/><line class="e" x1="131" y1="39" x2="81" y2="103"/><line class="e" x1="131" y1="39" x2="156" y2="103"/><line class="e" x1="131" y1="39" x2="231" y2="103"/><line class="e" x1="156" y1="103" x2="131" y2="167"/><line class="e" x1="156" y1="103" x2="181" y2="167"/><rect class="n" x="101.5" y="24" width="59" height="30" rx="8"/><text class="t" x="131" y="39" dy=".35em" text-anchor="middle">IPSec</text><circle class="n" cx="31" cy="103" r="17"/><text class="t" x="31" y="103" dy=".35em" text-anchor="middle">AH</text><circle class="n" cx="81" cy="103" r="17"/><text class="t" x="81" y="103" dy=".35em" text-anchor="middle">ESP</text><circle class="n" cx="156" cy="103" r="17"/><text class="t" x="156" y="103" dy=".35em" text-anchor="middle">SA</text><circle class="n" cx="131" cy="167" r="17"/><text class="t" x="131" y="167" dy=".35em" text-anchor="middle">SPD</text><circle class="n" cx="181" cy="167" r="17"/><text class="t" x="181" y="167" dy=".35em" text-anchor="middle">SAD</text><circle class="n" cx="231" cy="103" r="17"/><text class="t" x="231" y="103" dy=".35em" text-anchor="middle">IKE</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">IPSec architecture: AH and ESP protocols, security associations (policy and database) and IKE key management</figcaption></figure>
Key points.
- AH gives integrity and authentication, and ESP gives confidentiality with optional authentication.
- Transport mode protects the payload of the original packet host to host, while tunnel mode encapsulates the whole packet in a new IP header between gateways (VPN).
- A Security Association (SA) is a one-way logical relationship between sender and receiver, so two SAs are needed for two-way traffic.
- An SA is identified by the Security Parameters Index (SPI), the destination IP address and the security protocol (AH or ESP).
- The Security Policy Database (SPD) decides whether a packet is protected, bypassed or discarded, and the Security Association Database (SAD) holds the active SAs.
- For secure transmission the sender consults the SPD, picks the SA from the SAD and applies AH and/or ESP, and the receiver uses the SPI to find the same SA and verify or decrypt.
<mark>IPSec secures IP packets using AH for authentication and ESP for encryption, with parameters stored in security associations.</mark>
Answer frame. For the architecture question, open with the definition, draw the tree, develop points 1-5 and close with IKE; for the AH and ESP question, give points 1, 2 and 6, then the AH and ESP sections.
Asked: [7 marks] (Dec 2020) Explain about IPSec architecture and security association. Asked: [7 marks] (Dec 2025) Explain IPSec protocols AH and ESP. How are these used for secure data transmission?
IP & IP version 6 Authentication
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. The Authentication Header (AH) gives integrity, data-origin authentication and anti-replay protection to IPv4 and IPv6 packets, but no encryption.
| Bits 0-7 | Bits 8-15 | Bits 16-31 |
|---|---|---|
| Next Header (8) | Payload Length (8) | Reserved (16) |
| Security Parameters Index SPI (32) | ||
| Sequence Number (32) | ||
| Authentication Data / ICV (variable, multiple of 32) |
Key points.
- Next Header identifies the protocol of the payload that follows, such as TCP or, in tunnel mode, IP.
- Payload Length is the AH length in 32-bit words minus 2, and Reserved is zero.
- The SPI with the destination address and protocol identifies the SA, and the Sequence Number is a counter starting at 1 that gives anti-replay protection.
- Authentication Data (ICV) is an HMAC (for example HMAC-SHA-1-96) over the packet, giving integrity and origin authentication.
<mark>AH authenticates the whole packet with an HMAC-based ICV and a sequence number but does not encrypt.</mark>
Asked: [7 marks] (Jun 2025) Draw the IP security authentication header and describe the function of each field.
Encapsulation Security Payload ESP
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. ESP is the IPSec protocol that provides confidentiality by encrypting the payload, and optionally integrity, authentication and anti-replay protection.
| ESP packet part | Fields |
|---|---|
| Header | SPI (32), Sequence Number (32) |
| Payload data (encrypted) | variable |
| Trailer (encrypted) | Padding (0-255 bytes), Pad Length (8), Next Header (8) |
| Authentication (optional) | ICV, variable |
Key points.
- The SPI identifies the SA and the Sequence Number gives anti-replay protection.
- Padding aligns data to the cipher block size, and Next Header names the payload protocol.
- Encryption uses 3DES or AES-CBC, and authentication uses HMAC-SHA-1-96.
- Encryption covers payload, padding, pad length and next header, while the ICV covers the ESP header through the trailer but not the outer IP header.
- Transport mode order is IP header, ESP header, TCP and data, trailer, auth; only the transport-layer data is protected, host to host.
- Tunnel mode order is new IP header, ESP header, original IP header, TCP and data, trailer, auth; the whole original packet is protected, which suits VPN gateways.
| Point | Transport mode | Tunnel mode |
|---|---|---|
| Protects | Payload only | Whole original packet |
| IP header | Original, in the clear | New outer header added |
<mark>ESP encrypts the payload and optionally authenticates it, in transport mode for the payload and in tunnel mode for the whole packet.</mark>
Answer frame. Open by defining ESP; draw the field table, develop points 1-4; for the transport versus tunnel question draw both packet layouts and the comparison table; close with the services ESP gives (confidentiality, authentication, anti-replay).
Asked: [7 marks] (Nov 2023, Jun 2025) Discuss about Encapsulating Security Payload. / Discuss transport mode and tunnel mode authentication in IP; describe how ESP is applied to both modes.
Internet Key Exchange IKE
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. IKE is the IPSec key management protocol that authenticates the peers and automatically creates SAs and session keys.
Key points.
- IKE combines ISAKMP (message formats, UDP port 500) with the Oakley Diffie-Hellman key exchange.
- Phase 1 builds a secure ISAKMP SA and authenticates peers using pre-shared keys, signatures or public-key encryption.
- Phase 2 (quick mode) negotiates the IPSec SAs for AH or ESP under phase 1 protection.
<mark>IKE authenticates peers, runs Diffie-Hellman and negotiates IPSec SAs in two phases.</mark>
Web Security: SSL/TLS
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. SSL/TLS is a protocol between TCP and the application that provides authentication, confidentiality and integrity for web traffic, and its handshake protocol negotiates the cipher and keys for each session.
| Phase | Client to Server | Server to Client |
|---|---|---|
| 1 Hello | ClientHello: version, random, session ID, cipher suites | ServerHello: version, random, chosen cipher suite |
| 2 Server side | Certificate, ServerKeyExchange, ServerHelloDone | |
| 3 Client side | ClientKeyExchange (pre-master secret encrypted with server public key) | |
| 4 Finish | ChangeCipherSpec, Finished | ChangeCipherSpec, Finished |
Key points.
- The handshake establishes a new session in four phases, after which application data flows under the Record Protocol.
- In phase 1 the two sides agree on version, exchange random values and select the cipher suite and compression.
- In phase 2 the server sends its X.509 certificate to authenticate itself, plus key-exchange parameters if needed, and ends with ServerHelloDone.
- In phase 3 the client verifies the certificate and sends a pre-master secret encrypted with the server's public key (or a Diffie-Hellman value); client certificate is optional.
- Both sides compute the master secret from the pre-master secret and the two random values, then derive the MAC keys, encryption keys and IVs.
- In phase 4 both send ChangeCipherSpec to switch to the new cipher and a Finished message that verifies the whole handshake.
<mark>The SSL handshake authenticates the server by certificate, negotiates the cipher suite and derives shared session keys from a pre-master secret.</mark>
Answer frame. Open with the purpose (authentication, cipher negotiation, key establishment); draw the four-phase client-server message flow with arrows; develop points 2-6 in phase order; close that the Record Protocol then protects application data.
Asked: [7 marks] (Dec 2020, Nov 2022) Explain about SSL Handshake protocol. / Explain the sequence of steps in the SSL handshake for establishing a new session, and draw a diagram showing the action of the Handshake Protocol.
Basic protocols of security.
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Basic security protocols are agreed message exchanges that let parties authenticate each other and establish keys safely.
Key points.
- Challenge-response authentication proves knowledge of a secret without sending it, using a random nonce.
- Nonces and timestamps defeat replay attacks.
- Key-exchange protocols such as Diffie-Hellman and Needham-Schroeder (with a trusted server, as in Kerberos) set up session keys.
<mark>A security protocol is a defined message exchange for authentication and key establishment, made safe with nonces and signatures.</mark>
Encoding -Secure Electronic Transaction SET
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. SET is a Visa and MasterCard protocol that secures credit-card payments over the Internet using certificates and digital signatures.
Key points.
- The parties are cardholder, merchant, issuer, acquirer, payment gateway and certificate authority.
- The dual signature links order information (OI) and payment information (PI) so the merchant sees only the order and the bank only the payment.
- It is $DS = E_{PR_c}[H(H(PI) \Vert H(OI))]$, signed with the customer's private key.
<mark>SET's dual signature lets the merchant and the bank each verify their own part without seeing the other.</mark>
Last-minute revision
- A firewall is a choke point; the rule base is checked top to bottom and the default policy should be deny.
- Firewall types: packet filter (headers), stateful (state table), circuit gateway (TCP relay), application proxy (content), NGFW.
- PGP order is sign, compress (ZIP), encrypt (session key), radix-64; the session key is wrapped with the recipient's public key.
- AH gives integrity and authentication only; ESP adds confidentiality.
- AH fields: Next Header 8, Payload Length 8, Reserved 16, SPI 32, Sequence Number 32, ICV variable.
- An SA is one-way, identified by SPI, destination address and protocol; SPD holds policy and SAD holds active SAs.
- IKE phase 1 makes the ISAKMP SA and phase 2 makes the IPSec SAs.
- SSL handshake: hello, server certificate and key exchange, client key exchange, ChangeCipherSpec and Finished.
Memory hooks
- PGP order: "Sign, Zip, Encrypt", then radix-64 last.
- AH = Authenticates only; ESP = Encrypts too.
Coverage checklist
- Threats in Networks
- Network Security Controls-Architecture
- Wireless Security
- Honey pots: Q4 (Nov 2022)
- Traffic Flow Security: Q11 (Dec 2020, Jun 2025, Dec 2025)
- Firewalls - Design and Types of Firewalls: Q1 (Nov 2022, Nov 2023), Q11
- Personal Firewalls
- IDS
- Email Security: Services Security for Email Attacks Through Emails: Q2 (Dec 2025)
- Privacy-Authentication of Source Message
- Pretty Good Privacy (PGP): Q8 (Nov 2022), Q9 (Nov 2023)
- S-MIME: Q10 (Nov 2023)
- IP Security: Overview of IPSec: Q6 (Dec 2020), Q7 (Dec 2025)
- IP & IP version 6 Authentication: Q5 (Jun 2025)
- Encapsulation Security Payload ESP: Q3 (Nov 2023, Jun 2025)
- Internet Key Exchange IKE
- Web Security: SSL/TLS: Q12 (Dec 2020, Nov 2022)
- Basic protocols of security.
- Encoding -Secure Electronic Transaction SET