Secure Protocols and Their Use Cases
Secure protocols apply cryptography to communication. This lesson explains IPsec, TLS, S/MIME and DKIM, which protocol fits common use cases, and the limitations and vulnerabilities that practitioners must manage.
Learning outcomes
After completing this lesson, you will be able to:
- Describe IPsec protocols and modes.
- Describe TLS and its current versions.
- Distinguish S/MIME and DKIM.
- Choose protocols for common use cases and identify their limitations.
IPsec
Internet Protocol Security (IPsec) protects traffic at the network layer, so it can secure any application without changes. It has two main protocols. The Authentication Header (AH) provides integrity and authentication of packets but no encryption, and it is incompatible with NAT. The Encapsulating Security Payload (ESP) provides confidentiality as well as integrity and authentication, and it is the protocol used in practice.
IPsec operates in two modes. Transport mode protects the payload of each packet between two hosts, leaving the original IP header visible. Tunnel mode encrypts the entire original packet and wraps it in a new IP header, so it is used between gateways for site-to-site VPNs and for many remote access VPNs. Internet Key Exchange (IKE), version 2 today, authenticates the peers (with certificates or pre-shared keys) and negotiates security associations, the agreed algorithms and keys.
Transport or tunnel mode?
TLS
Transport Layer Security (TLS) secures connections between applications, most visibly HTTPS, but also email transfer (SMTP with STARTTLS), directory access (LDAPS), file transfer (FTPS) and many APIs. In a TLS handshake, the server presents its certificate, client and server agree on keys (with ephemeral ECDHE in TLS 1.3, giving forward secrecy) and then protect data with authenticated symmetric encryption. Mutual TLS adds a client certificate.
TLS 1.3 (2018) removed obsolete features and weak ciphers, made forward secrecy mandatory and shortened the handshake. TLS 1.2 remains acceptable with strong cipher suites. SSL 2.0, SSL 3.0, TLS 1.0 and TLS 1.1 are deprecated.
S/MIME and DKIM
Email needs protection beyond the connection between servers. Secure/Multipurpose Internet Mail Extensions (S/MIME) signs and encrypts individual messages using X.509 certificates issued to users. A signature proves who sent the message and that it was not altered; encryption with the recipient's public key keeps it confidential end to end, even on mail servers. Both parties need certificates, which limits its use to organisations that deploy them.
DomainKeys Identified Mail (DKIM) works at the domain level. The sending mail server signs selected headers and the body of outgoing messages with the domain's private key, and receiving servers verify the signature using a public key published in the sender's DNS. DKIM shows that a message really came from the domain and was not modified in transit, which helps fight spoofing and phishing. It does not encrypt messages. DKIM works with SPF (Sender Policy Framework), which lists the servers allowed to send for a domain, and DMARC, which tells receivers what to do with messages that fail and sends reports.
The following comparison summarises the four protocols.
The following diagram shows how the three controls work together.

Common use cases
The SSCP outline names five use cases. The following table shows the usual protocol choices.
| Use case | Typical protection |
|---|---|
| Credit card processing | TLS 1.2+ for transmission, plus tokenisation or encryption of stored card data under PCI DSS; point-to-point encryption from card readers |
| File transfer | SFTP (over SSH) or FTPS (FTP over TLS), or HTTPS-based managed file transfer; never plain FTP |
| Web client | HTTPS with TLS 1.2 or 1.3, valid certificates and HSTS |
| Virtual private network | IPsec (IKEv2) or TLS-based VPNs, with MFA for users |
| Transmission of PII | TLS for transport, plus message- or file-level encryption (S/MIME, PGP, encrypted archives) when data passes through intermediaries or must stay protected at rest |
A key distinction is hop-by-hop versus end-to-end protection. TLS protects each connection; data is decrypted at each server it passes through. S/MIME and PGP protect the message itself from sender to recipient.
Protocols by use case
Limitations and vulnerabilities
Secure protocols are only as secure as their versions, configuration and certificates. Old versions have known attacks, such as POODLE against SSL 3.0 and BEAST against TLS 1.0, and attackers attempt downgrade attacks to force their use. Weak cipher suites, short keys and missing forward secrecy reduce protection. Certificate problems (expired, self-signed, mismatched names) train users to ignore warnings, which enables man-in-the-middle attacks. Implementation flaws, such as Heartbleed in OpenSSL, require prompt patching of cryptographic libraries.
Protocols also have inherent limits. Encryption in transit does not protect data at rest at either end, or from a compromised endpoint. TLS inspection proxies decrypt traffic, creating a sensitive point that must itself be protected. IPsec can be blocked by firewalls and complicated by NAT (NAT traversal encapsulates it in UDP 4500). DKIM proves the domain, not the individual sender, and does not encrypt. Configuration should be checked regularly with scanning tools.
Protocol weaknesses
Choosing protection
A payroll provider must send monthly files containing employee bank details to a client. The files pass through the client's file gateway and are stored there for a week. What protection is appropriate?
Use SFTP or FTPS so that the transfer is encrypted, and also encrypt the files themselves, for example with PGP using the client's public key, so that they stay protected at rest on the gateway and only the intended recipients can decrypt them. TLS alone would protect only the connection, not the stored files.
Spoofed email
Customers receive phishing emails that appear to come from the company's domain. Which controls help receiving servers reject them?
Publish an SPF record listing authorised sending servers, DKIM-sign all legitimate outgoing mail, and publish a DMARC policy, eventually set to reject, so that receivers discard messages that fail SPF and DKIM alignment and send reports. These protect the domain's reputation; they do not encrypt mail.
Which IPsec protocol provides confidentiality?
Show answer
The Encapsulating Security Payload (ESP); the Authentication Header provides integrity and authentication only.
Exam Tips
Remember for the exam
- ESP encrypts; AH does not. Tunnel mode suits site-to-site VPNs.
- Use TLS 1.2 or 1.3; disable SSL and TLS 1.0 and 1.1.
- DKIM signs at the domain level; S/MIME protects messages end to end; TLS is hop by hop.