Skip to main content

Email security with diagram and protocols

Short answer

PGP provides end-to-end security via digital signatures and encryption. Sender hashes, signs with private key, encrypts with a random session key and receiver's public key. Radix-64 encoding makes it SMTP-compatible.

Discuss an email security known to you. Explain your answer with necessary diagram and protocols.

The e-mail security method discussed here is PGP / S/MIME-style end-to-end protection, backed by transport security (SMTP over TLS, STARTTLS). Plain e-mail (SMTP, POP3) is sent as readable text, so it can be read, altered or forged on the way.

Security services required

  • Confidentiality: only the receiver can read the message.
  • Authentication: the sender is who he claims to be.
  • Integrity: the message was not changed.
  • Non-repudiation: the sender cannot deny sending it.

Pretty Good Privacy (PGP)

PGP uses a hash, a public/private key pair and a one-time symmetric session key.

Sender

  1. Hash the message and encrypt the hash with the sender's private key (digital signature).
  2. Compress the message + signature.
  3. Encrypt it with a random session key (e.g. AES).
  4. Encrypt the session key with the receiver's public key.
  5. Convert to ASCII (Radix-64) and send via SMTP.

Receiver: reverses the steps. He decrypts the session key with his private key, decrypts the message, decompresses it, and verifies the signature using the sender's public key.

 SENDER                                   RECEIVER
 Msg -> Hash -> Sign(KR_A) -+
                            v
 Msg || Sig -> ZIP -> Enc(KS) --> [SMTP/Internet]
 KS -> Enc(KU_B) ----------------^        |
                                          v
        Dec(KR_B)->KS -> Dec(KS) -> UNZIP -> Msg || Sig
        Verify Sig with KU_A -> Authentic + Intact

Protocols involved

Layer / protocolRole
SMTP, POP3, IMAPCarry the mail (PGP data is Radix-64 text, so it passes through)
MIMEFormats attachments and non-text content
S/MIMESecure MIME with X.509 certificates, an alternative to PGP
SMTP with STARTTLS (port 587) or implicit TLS (port 465), POP3S 995, IMAPS 993Encrypt the link between client and server and between servers
SPF, DKIM, DMARCDomain-level authentication against spoofing and spam

Key management

  • PGP uses a web of trust: users sign each other's public keys.
  • S/MIME uses a certificate authority (CA) hierarchy.

Limitations

TLS protects only individual hops, while PGP/S/MIME protect the message end to end (but headers such as sender and subject stay visible).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Internet and Intranet chapter 3 questions →