Cipher Workbench
0 / 100 points

Cipher Workbench

A hands-on review of everything from your cryptography lesson. You’ll break a Caesar cipher, encrypt with AES, build RSA keys by hand and by machine, sign data, and act as a certificate authority.

This message is locked. Turn the key until it reads clearly.

Shift: 0

What you’ll demonstrate

These are the knowledge, skills, and abilities (KSAs) a cybersecurity professional needs in cryptography. Your summary at the end reports progress on each one.

Knowledge

  • K1 Classical substitution ciphers, keyspace, and frequency analysis
  • K2 Symmetric algorithms, modes of operation, and the key distribution problem
  • K3 Asymmetric cryptography: RSA mathematics, key pairs, and ECC
  • K4 Hashing, digital signatures, and the security goals they provide
  • K5 PKI: X.509 fields, chains of trust, and revocation

Skills

  • S1 Encrypt, decrypt, and cryptanalyze a classical cipher
  • S2 Apply AES-GCM and interpret keys, IVs, and authentication tags
  • S3 Generate RSA key pairs and use them for encryption and hybrid key exchange
  • S4 Sign and verify data; issue and validate digital certificates

Abilities

  • A1 Select the right cryptographic control for a real-world scenario
  • A2 Recognize when a cryptographic control has failed (tampering, expired, mismatched, or revoked certificates) and respond correctly

How this works

Work through the five stations in order. Each task shows its point value, and your progress bar fills as you go (100 points total). All encryption runs inside your browser with the Web Crypto API: no keys or messages leave this page. Your progress is saved in this browser, so you can come back later. When you finish, the Summary station gives you a report to print or save as a PDF.

Station 1

Classical ciphers

The Caesar cipher shifts every letter by a fixed amount. The shift is the key. Use the wheel to encrypt and decrypt, then attack ciphertext two ways: by trying every key, and by counting letters.

Cipher machine

Outer ring is plaintext; inner ring is ciphertext. The wheel’s shift is applied to whatever you type.

Output

Task 1.1: Encrypt a message

5 pts

Encrypt ATTACK AT DAWN with a shift of 3. Type the ciphertext.

Task 1.2: Brute-force an intercepted message

5 pts

You intercepted this ciphertext. Caesar has so few keys that you can simply try them all.

Task 1.3: Frequency analysis

5 pts

Substitution ciphers keep the language’s letter frequencies. Find the tallest bar, assume it stands for the most common English letter, and work out the key.

Hint

In English, E is usually the most frequent letter. Count how many positions forward from E the tallest letter sits. That distance is the encryption shift.

Takeaway: a cipher with 25 keys falls to brute force in seconds, and any monoalphabetic substitution leaks letter patterns. Modern ciphers defeat both attacks with enormous keyspaces and output that looks random.

Station 2

Symmetric encryption with AES

One shared secret key both encrypts and decrypts. You’ll use AES in Galois/Counter Mode (GCM), an authenticated mode that provides confidentiality and integrity together.

Task 2.1: Generate a key, encrypt, and decrypt

5 pts
Secret key (hex)

Initialization vector (96-bit, random each time)

Ciphertext + authentication tag (Base64)

Decrypted output

Try encrypting the same text twice. The ciphertext changes because the IV changes, which is why an IV must never be reused with the same key.

Task 2.2: Tamper with the ciphertext

4 pts

An attacker on the network flips a single bit. What does GCM do?

Task 2.3: Use the wrong key

3 pts

Someone without your key tries to decrypt. Generate a different key and attempt it.

Task 2.4: The key distribution problem

3 pts

A 12-person incident response team needs a private channel between every pair of members, using only symmetric keys. How many unique keys must be created and securely distributed?

Takeaway: symmetric ciphers are fast enough for bulk data, and authenticated modes like GCM detect tampering. The hard part is getting the same secret key to everyone safely. That’s the problem asymmetric cryptography solves.

Station 3

Asymmetric encryption with RSA

Each person has a key pair. The public key is shared with anyone; the private key never leaves its owner. First build a tiny RSA key by hand so the math is visible, then generate a real one.

Task 3.1: RSA by hand

12 pts across 5 steps

Step 1: Pick two primes and compute n

n = p × q

Step 2: Compute Euler’s totient φ(n)

φ(n) = (p − 1) × (q − 1)

Step 3: Choose the public exponent e

1 < e < φ(n), and gcd(e, φ(n)) = 1. Small primes like 3, 5, 7, 11, or 17 are good tries.

Step 4: Compute the private exponent d

(e × d) mod φ(n) = 1, the modular inverse of e

Step 5: Encrypt and decrypt a number

Public key (e, n)
Private key (d, n)

c = me mod n    then    m = cd mod n

Task 3.2: Generate a real RSA key pair

3 pts

Real RSA uses primes hundreds of digits long. Pick a modulus size and watch how long generation takes.

Public key (PEM, SubjectPublicKeyInfo)

        SHA-256 fingerprint of the public key
        

The private key was generated as non-exportable, so the browser will use it but won’t reveal it. That mirrors how a hardware security module or TPM protects keys.

Task 3.3: Encrypt with the public key, decrypt with the private key

3 pts

RSA-OAEP ciphertext (Base64)

        Decrypted output
        

Task 3.4: Hybrid encryption

2 pts

RSA is too slow and size-limited for bulk data, so real systems wrap a symmetric key with it. Wrap the AES key you generated in Station 2 using your RSA public key, then unwrap it with the private key.


        

Task 3.5: Revisit the key distribution problem

2 pts

The same 12-person team switches to asymmetric cryptography. How many key pairs does the team need so anyone can send a confidential message to anyone else?

Station 4

Digital signatures and certificates

A signature proves who sent data and that it hasn’t changed. A certificate is a signed statement from a certificate authority (CA) binding a public key to an identity. Sign data, read a certificate, build a chain of trust, make trust decisions, and finally become a CA yourself.

Task 4.1: Sign and verify a message

3 pts
SHA-256 digest (updates as you type)

Signature (RSA-PSS, Base64)

        

Task 4.2: Alter the signed message

2 pts

After signing, change the amount in the message above (try $25,000) and press Verify again. Watch the digest change and the verification fail.

Task 4.3: Read a certificate

3 pts

This is the TLS certificate presented by portal.example.edu.

Task 4.4: Build the chain of trust

4 pts

Select a certificate to place it in the next open slot. Select a placed certificate to send it back. Each certificate’s issuer must match the subject of the certificate above it.

Certificates received
Chain (top to bottom)

Task 4.5: Trust or reject?

6 pts

You’re the browser. Today is . Decide whether each connection should be trusted. Only your first answer on each scores.

Task 4.6: Become the certificate authority

6 pts

Walk through what a real CA does: receive a certificate signing request (CSR), confirm the requester holds the private key, sign the certificate, and let anyone verify it.

Station 5

Knowledge check

Twelve scenario questions, 2 points each. Your first answer locks in, and you’ll see why each answer is right or wrong.

Wrap-up

Cryptography review summary

0
of 100 points

Points by station

Knowledge, skills, and abilities

Evidence of work

To save a PDF, choose “Save as PDF” as the destination in the print dialog.

All cryptographic operations run locally through your browser’s Web Crypto API. The certificates, organizations, and domains in this activity are fictional.