Big Idea 5: Safe Computing
Protecting Personally Identifiable Information (PII) and staying secure online
What is PII?
PII (Personally Identifiable Information) refers to data that can be used to identify an individual online.
- Social Security Number
- Email Address
- Full Name
- Driver’s License
Cookies 🍪
Cookies store user data, including preferences and PII, often to track behavior and improve experience.
- Session Cookies: Deleted when the browser closes
- Persistent Cookies: Remain for a set time, even after browser closes
- First-Party Cookies: Set by the website itself
- Third-Party Cookies: Set by advertisers or external sites
⚠️ Risk: Cookies can collect private info, preferences, and track you across the web
Popcorn Hack 1: Cookie Hunt
Open Developer Tools (F12 → Application → Cookies)
- Find: Name, Value, Expiration Date
- Determine if it’s session, persistent, first- or third-party
Password Security 🔐
Passwords should be:
- At least 10 characters
- Include uppercase + lowercase
- Contain numbers
- Contain symbols
Encryption 🔒
Encryption transforms data into unreadable form for unauthorized users.
Symmetric
- Same key for encrypt/decrypt
- Example: AES
Asymmetric
- Public key to encrypt, private to decrypt
- Used in HTTPS & secure messaging
Hashing
- One-way: irreversible
- Used in password storage, blockchains (SHA-256)
Where it's Used
- HTTPS (SSL/TLS)
- End-to-End Messaging Apps
Phishing 🎣
Tricking users into giving personal info by pretending to be a trusted source.
Email Phishing
- Fake emails asking for info
- Don't click unknown links
- Check domain: suspicious-looking emails
Website Spoofing
- Fake websites mimicking real ones
- Manually type URLs
- Look for
https://and padlock icon
Smishing (SMS Phishing)
- Texts pretending to be banks, gov’t, etc.
- Don't click unknown text links
- Enable spam filters
Verification ✅
Multi-Factor Authentication (MFA)
Combines passwords with secondary methods like SMS, email codes, or apps (Google Authenticator).
Digital Signatures
Verify that documents or software weren’t tampered with using hashes + encryption.
CAPTCHA 🤖
Verifies you’re human using simple puzzles or image selection.
Popcorn Hack 2: Try CAPTCHA
Visit a website with CAPTCHA and try to break it 😎
Homework Hacks 🧠
Hack 1: MCQ Review
Go over questions on safe computing (PII, phishing, encryption).
Hack 2: Caesar Cipher Code
import random
def caesar_cipher(text, shift, mode):
result = ""
for char in text:
if char.isalpha():
shift_amount = shift if mode == "encrypt" else -shift
new_char = chr(((ord(char.lower()) - 97 + shift_amount) % 26) + 97)
result += new_char.upper() if char.isupper() else new_char
else:
result += char
return result
mode = input("Encrypt or decrypt? ").strip().lower()
message = input("Enter your message: ")
# If user chooses "random" for shift
shift_input = input("Enter shift (or type 'random'): ").strip().lower()
shift = random.randint(1, 25) if shift_input == "random" else int(shift_input)
output = caesar_cipher(message, shift, mode)
print(f"Result: {output}")
✨ Run in a Jupyter Notebook and try different messages!