PGP & S/MIME Email Security Demo

Prepared for Applied Information Assurance Projects
Date: October 2025


1. Executive summary

This project demonstrates end-to-end email protection using OpenPGP (GnuPG) and S/MIME in a controlled lab. It covers key generation, signing, encryption, verification, and trust models, emphasizing practical usability and operational controls for secure email exchange.

Scope: Local lab mailboxes and client installations (Thunderbird). All keys and test accounts are laboratory-only and sanitized for publication.


2. Key concepts

Both provide confidentiality and integrity for message bodies; note that standard headers (From, To, Subject) are usually not encrypted.


3. Lab topology & test setup

The PGP / S-MIME lab was implemented in an isolated virtual network to simulate secure email exchange between two test users. As shown in Figure 1, the environment consists of three primary virtual machines: the Attacker / Client VM (user-a-lab.local), the Transport / MTA server, and the Recipient VM (user-b-lab.local). This configuration enables end-to-end testing of message signing, encryption, and verification while remaining completely detached from production systems.

PGP/S-MIME Lab Topology (isolated)

Figure 1 — PGP / S-MIME Lab Topology (isolated)


4. High-level workflows (sanitized)

To execute the demonstration, both participants generated key pairs, exchanged public keys or certificates, and used Thunderbird to compose, sign, and verify messages. The sanitized command sequence used for these steps is shown in Figure 2 (see Section 5), which details the OpenPGP and S/MIME operations performed through GPG and OpenSSL utilities. These commands were executed only within the isolated environment, using placeholder addresses and self-signed certificates.

GPG — key generation (example)

# interactive guided generation (safe)
gpg --full-generate-key

# or non-interactive (replace placeholders)
gpg --batch --gen-key <<'EOF'
Key-Type: RSA
Key-Length: 3072
Name-Real: Test User A
Name-Email: test-a@lab.local
Expire-Date: 1y
%commit
EOF

Export & share public key

gpg --armor --export test-a@lab.local > test-a.pub.asc
# recipient imports
gpg --import test-a.pub.asc

Sign & encrypt example (local files)

# sign a file
gpg --armor --sign --output message.sig --detach-sig message.txt

# encrypt for recipient (assumes recipient's public key imported)
gpg --armor --encrypt -r test-b@lab.local -o message.asc message.txt

# decrypt (recipient)
gpg --decrypt message.asc > message.txt

S/MIME — certificate creation (lab CA)


5. Thunderbird client flows (visual)

Sanitized commands

Figure 2 — Sanitized GPG & S/MIME Commands for Lab Demo

This figure shows the sanitized command-line workflow used for PGP and S/MIME testing.
All email addresses and key data are placeholders. Do not commit private keys or passphrases.


6. Usability & trust considerations

7. Operational guidance

8. Limitations & privacy notes

9. References & resources

Download Report (PDF)