Lab Activity
Scenario: Alice wants to send a signed, authenticated email to Bob. You will walk through the complete PKI workflow — from key generation and certificate issuance to signing, transmitting, and verifying the message. Complete each step in order. No cryptographic knowledge is required — the lab simulates the math for you.
STEP 1 Generate RSA Key Pairs for Alice & Bob
In RSA, a key pair consists of a public key (shared freely) and a private key (kept secret). The keys are mathematically linked: data encrypted with one can only be decrypted with the other.
A
Alice
📧 Sender — will sign the email
B
Bob
📥 Recipient — will verify the signature
STEP 2 Certificate Authority Issues X.509 Certificates
A Certificate Authority (CA) is a trusted third party that vouches for the binding between a public key and an identity. The CA signs a certificate with its own private key. Anyone who trusts the CA can verify the certificate.
CA
TrustRoot CA
🏛️ Trusted Certificate Authority — signs certificates
🔑 CA Root Key Pair
Generate below to see CA keys.
A
Alice Requests a Certificate (CSR → Certificate)
This will be embedded in the certificate.
B
Bob Requests a Certificate
STEP 3 Alice Composes, Hashes, and Signs the Email
How Digital Signing Works
✉️
Compose
Message
#
Hash
(SHA-256)
🔒
Encrypt Hash
with Private Key
📎
Attach
Signature
📤
Send to
Bob
A
Alice's Email Compose
STEP 4 Bob Verifies the Digital Signature
To verify Alice's signature, Bob: (1) extracts Alice's public key from her certificate, (2) verifies the certificate was signed by a trusted CA, (3) decrypts the signature with Alice's public key to recover the original hash, then (4) re-computes the hash of the received message and compares. If they match — the message is authentic and unaltered.
Bob's Verification Pipeline
📜
Check
Certificate
🔓
Decrypt Sig
w/ Public Key
#
Re-hash
Message
⚖️
Compare
Hashes
Accept or
Reject
B
Bob's Verification
STEP 5 Attack Scenarios — What Happens When Things Go Wrong?
Select an attack scenario and run the verification to see how digital signatures detect tampering and impersonation.
Choose an Attack Scenario

The message content is altered in transit (e.g., amount changed from $124,500 to $999,500). The signature was created over the original message.

An attacker attempts to create a valid signature using a different (unknown) key and attach it to an otherwise legitimate message.

Attacker creates a certificate with Alice's name but their own public key — and does NOT have it signed by the trusted CA.

The original email and signature are valid, but the email was sent months ago. Bob receives it again with the same valid signature.

STEP 6 Knowledge Check — 5 Questions