🔐 Security Teaching Toolkit

Lecture 7 · Topic: Security Mechanisms (Encryption + Firewalls) · MSIT 643 · Joshua Cervantes. Click a tab, project it, let them play.

How to Use This Toolkit

No coding needed. Everything happens by clicking, typing, or picking from a dropdown menu. Nothing here can break, so feel free to click around.
1
Getting started
  1. Look at the row of buttons at the top of the page: How to Use This, Encryption Playground, Firewall Rule Lab, Quick Reference. Those are the four sections of this toolkit.
  2. Click a button to open that section. The button you're on turns teal (bright green-blue) so you always know where you are.
  3. Everything reacts to clicking, typing, or picking from a dropdown. There's no save button and no way to mess it up, so try things and see what happens.
2
Encryption Playground, step by step
  1. Open the Encryption Playground tab.
  2. Find the box labeled Message and type any short sentence.
  3. Find the box labeled Shared key and type any single word, like a password.
  4. Look below at Ciphertext, it updates automatically into a string of letters and numbers. That's your message locked.
  5. Find Try decrypting with this key and type the exact same word you used as the shared key. The Decrypted result box will show your original message again.
  6. Now change that key to a different word instead. Watch the decrypted result turn into unreadable symbols. That's what happens when you don't have the right key.
  7. Scroll down to the mailbox demo. Type a message, click Lock with Josh's PUBLIC key, then click Unlock with Josh's PRIVATE key to see it open. Click the red button instead to see it get rejected.
  8. Scroll down further to the paint-mixing demo. Pick a public paint and two secret paints, Alice and Bob's towers paint themselves immediately, that's their own paint, no reason to hide it from themselves. Click Step 1 and watch two little blobs travel across the wire, Alice's mixture heading to Bob, Bob's heading to Alice, both crossing paths where Eve is tapping the line in the middle. When they land, Alice and Bob each reveal what they received from the other, and Eve reveals what she intercepted. Click Step 2 to watch Alice and Bob each stir their own secret into what they received, landing on the exact same final color, even though Eve never saw it. Change any color and the demo resets, so you can try it again.
Try this example Type Good morning class as the message and bulacan as the key. Copy bulacan into the "try decrypting" box, it decrypts correctly. Now change it to manila instead, and watch it turn into garbage.
3
Firewall Rule Lab, step by step
  1. Open the Firewall Rule Lab tab.
  2. At the top is a table. Each row is one rule, read left to right: Source, Destination, Port, Protocol, Action.
  3. Click the green ALLOW or red DENY word in any row to flip it.
  4. Use the up and down arrows (▲▼) on the right of each row to move it higher or lower. Order matters, the first rule that matches a packet wins.
  5. Click + Add rule to create a new row, then use the dropdowns to fill it in.
  6. Click ▶ Send sample traffic (5 packets) to send 5 example connections through your rules automatically. Watch the log on the right mark each one ALLOW or BLOCK, in real time.
  7. Want to test something specific? Use the Or test one custom packet boxes, pick your options, and click Test this packet.
  8. Curious what a bad setup looks like? Click ⚠️ Load broken example, then send traffic again. Everything gets blocked, because the "block everything" rule is now sitting first in line.
  9. Click ↺ Reset to working rule set any time to start over from the safe default.
Try this example Change row 1's Port from 443 to 8080, then click Send sample traffic again. Notice the first packet (the HTTPS visitor) now gets BLOCKED instead of ALLOWED, because it no longer matches that rule. Click Reset to working rule set to undo it.
4
Quick Reference

This tab is a plain list of definitions, nothing to click. Use it if you or a classmate forgets what a term means during questions.

Presenter tip: project this page on the screen and let a volunteer come up and try the Firewall Rule Lab themselves, live, in front of the class.

Encryption Playground

DLO 1, Describe encryption mechanisms. Two families: one shared key, or a public/private pair.
🔑 Symmetric encryption, one key, both directions

Type a message and a shared key. The same operation that locks it is the one that unlocks it, only if the key matches exactly.

(nothing typed yet)
(nothing typed yet)

Change the "try decrypting" key to anything else. Same ciphertext, wrong key, pure garbage. That's the whole point of a key.

📬 Asymmetric encryption, the mailbox slot

Anyone can lock a message with Josh's public key, like dropping a letter in a mail slot. Only Josh's private key opens it.

✉️
1. Lock a message
(nothing locked yet)
🔐
2. Try to unlock it

Notice: the key that locks is not the key that unlocks. That's the entire difference from symmetric encryption above.

Grounding: Lecture 7 Slide 19 mentions public and private keys for TLS, IPsec, and SSH, that's the anchor. The symmetric/asymmetric terms, the analogies, and this whole playground are supplemental, not in the lecture itself.

🎨 Diffie-Hellman key exchange, the paint-mixing analogy

Alice and Bob each hold two paints: their own secret, and a shared public paint everyone can see. Each mixes their two paints and sends the mixture to the other, over a line Eve is tapping. Alice and Bob both receive a mixture, Eve only ever watches one pass by.

EVE
knows public, it's public
public
private
ALICE
received from Bob
+
received + her secret
public
private
BOB
received from Alice
+
received + his secret

Both towers have the same public paint on top, and each person's own private paint below it. Click Step 1 to mix and send.

Alice's final shared secret
?

Bob's mixture, stirred with her own secret.

Bob's final shared secret
?

Alice's mixture, stirred with his own secret.

Notice: both sides land on the exact same final color, but neither the public paint, Alice's sent mixture, nor Bob's sent mixture was ever the shared secret itself. Nobody watching the wire, not even Eve, can "unmix" a mixture back into its two ingredient paints, that one-way difficulty is standing in for how hard it is to reverse the modular exponentiation real Diffie-Hellman actually uses.

Further study: 📺 Diffie-Hellman Key Exchange, Computerphile (~8 min), the classic version of this same paint-mixing analogy (Alice / Eve / Bob and all). Good second analogy to have ready in class beyond the mailbox-slot one above.

📡 Where is data actually exposed? Click each card.
🌐
Data in transit
💾
Data at rest

Grounding: solid. Lecture 7 Slide 19 says encryption "may be used to secure data both in transit and when stored," almost word for word.

Firewall Rule Lab

DLO 2, Configure a simulated firewall rule set allowing secure traffic flow. Rules run top to bottom, first match wins.
🧱 Your rule set

Click ALLOW/DENY to flip an action. Use ▲▼ to reorder. Order changes the outcome. 🗑 deletes a rule.

Grounding: Lecture 7 only mentions firewalls in passing, as a hardening control (Slides 12, 16, 25, 30, 37). The rule table, the fields, the ordering logic, and this whole simulator are supplemental, built specifically to satisfy this topic's hands-on DLO.

🚦 Send traffic through it
Allowed: 0
Blocked: 0

Quick Reference

Cheat sheet for Q&A, everything from Lecture 7's Encryption Technology and firewall mentions, in one place. The small pill on each card shows whether it's straight from Lecture 7 or supplemental knowledge added to meet the DLO.

TLS / HTTPS Lecture 7

Encrypts traffic between a browser and a website. The padlock icon in your address bar. Uses asymmetric encryption to agree on a key, then symmetric encryption for the session.

SSH Lecture 7

Encrypts a remote login or admin session, so credentials and commands never travel in plain text across the network.

IPsec (VPN) Lecture 7

Encrypts an entire tunnel between two networks, or a laptop and an office network. Everything inside the tunnel is protected, not just one app.

BitLocker / EFS Lecture 7

Windows' encryption for data at rest, full-disk (BitLocker) or file-level (EFS). Protects data if a device is lost or stolen.

Host-based firewall Lecture 7

Runs on a single machine and only protects that machine. Examples: Windows Defender Firewall, a Linux host firewall.

Network firewall Lecture 7

Sits at the edge of a network and protects everything behind it, one checkpoint guarding many machines at once.

Firewall rule anatomy Supplemental

Source → Destination → Port → Protocol → Action. Every rule is really just those five fields. Lecture 7 never explains rule syntax, this is standard networking knowledge added for the DLO.

Rule order Supplemental

Rules are evaluated top to bottom. The first matching rule wins. Everything below a matching rule is never checked. Not covered in Lecture 7.

Symmetric encryption Supplemental

One shared key locks and unlocks. Fast, used for the actual bulk data (e.g., AES). Lecture 7 only hints at this via "keys must be generated," the terminology itself is standard cryptography.

Asymmetric encryption Supplemental

A public key locks, a private key unlocks. Slower, used to safely exchange a shared key in the first place (e.g., RSA). Same note as symmetric, above.

Sources: Lecture 7, Security Measures in Operating Systems (Dela Fuente, MSIT 643), specifically the Encryption Technology slide and the firewall mentions scattered across the OS-hardening, Linux/Unix, Windows, and hypervisor sections. Supplemented with standard, correctly-attributed encryption and firewall concepts not covered in the lecture material, needed to meet this topic's DLOs in full.