Safe Computing: Privacy, Passwords, Encryption and Phishing
Your phone, your browser and your apps collect a steady stream of data about you, and the same data that makes them convenient can be used to track you, trick you or steal from you.
Technology makes it easy for people, groups and institutions such as companies, schools and governments to collect information, use it, and sometimes exploit it. Knowing what is collected, and how attackers get in, is the first step to protecting yourself.
What is personally identifiable information?
Personally identifiable information (PII) is information about a person that identifies them, links to them, relates to them or describes them. Examples include:
Some PII points to you alone, like a Social Security number. Other pieces, like your age or your ZIP code, look harmless on their own but can identify you once they are combined.
Who collects data about you, and how?
Data collection happens all the time, mostly in the background:
How can separate pieces of data reveal who you are?
Separate pieces of personal data, such as your location history, cookies and browsing history, can be combined to build a detailed picture of one person. A shopping site knows your ZIP code, a fitness app knows your running route, and a social network knows your school and your birthday. Each piece looks harmless. Together they can show where you live, when you are home and who you spend time with. Combining what you post on social media with other sources can reveal private facts you never posted.
In 2000, computer scientist Latanya Sweeney showed that about 87% of Americans can be identified uniquely from three facts: their five-digit ZIP code, their gender and their full date of birth. Earlier, using public voter records, she had picked out the governor of Massachusetts's medical records from a dataset that was supposed to be anonymous. The demo does the same with invented data.
Ava Chen has asthma
Leo Park broke an arm
No unique match for ('60657', '2009-03-14', 'F')What are the benefits and risks of sharing personal data?
PII and other information you put online can make your experience better. A music app that knows what you play suggests songs you will like, and a map that knows your home address gives one-tap directions. Saved payment details and addresses turn an online purchase into a few taps.
The risks are real, though:
Check your understanding
Which two are examples of personally identifiable information? Select two answers.
Select 2 answers.
Kai never posts his address. His public posts do include a photo of his house with the street sign visible, a check-in at the same gym every weekday at 6 a.m., and his school team's jersey. Which risk does this show best?
How do passwords and multifactor authentication protect you?
Authentication checks that you are who you claim to be before it lets you into a device or account. Two common measures are strong passwords and multifactor authentication.
A strong password is easy for you to remember but hard for anyone else to guess, even someone who knows you. Your dog's name plus your birth year fails that test, because a classmate could guess it. A passphrase of several unrelated words, like violet-tractor-pancake-river-sofa-maple, is easy to picture and very hard to guess.
Password-guessing programs try billions of passwords a second. How long a password holds out depends on how many possibilities there are: the number of characters it could use, raised to the power of its length. The demo counts them, assuming an attacker who can try 10 billion passwords a second.
6 lowercase letters 3.1e+08 possibilities, 0.03 seconds to try them all 8 letters and digits 2.2e+14 possibilities, 6 hours to try them all 12 keyboard characters 5.4e+23 possibilities, 1,713,471 years to try them all 6 random common words 2.2e+23 possibilities, 701,021 years to try them all
These counts assume every character or word is chosen at random. Real attackers try common passwords, dictionary words and personal details first, so Fluffy2009 falls quickly even though it is 10 characters long.
Multifactor authentication (MFA) grants access only after you present several separate pieces of evidence, typically from at least two of these categories:
MFA takes at least two steps to unlock an account, and each step is a separate layer of security that an attacker must break. A stolen password alone no longer opens the account. Factors from different categories are what make it strong: a password and a security question are both things you know, so a scammer who tricks you into revealing one can trick you into revealing the other. In 2021 a ransomware gang shut down the Colonial Pipeline, which carries fuel to much of the US East Coast, after logging in with a single leaked password for an old account that did not use MFA.
How does encryption keep data secret?
Encryption is encoding data so that people without permission cannot read it. Decryption is decoding it back. Both use a key, a secret value that controls how the encoding works. There are two common approaches:
One of the oldest symmetric ciphers is the Caesar cipher: shift every letter a fixed number of places along the alphabet. The shift is the key, and the same key decrypts by shifting back.
Encrypted: PHHW PH DW WKH OLEUDUB Decrypted: MEET ME AT THE LIBRARY
The Caesar cipher has a fatal weakness: there are only 25 useful keys. An attacker who intercepts a message can try every one of them in a fraction of a second and look for the one that produces real words.
key 1: VJG SWKB KU QP HTKFCA key 2: UIF RVJA JT PO GSJEBZ key 3: THE QUIZ IS ON FRIDAY <-- real words! key 4: SGD PTHY HR NM EQHCZX key 5: RFC OSGX GQ ML DPGBYW key 6: QEB NRFW FP LK COFAXV key 7: PDA MQEV EO KJ BNEZWU key 8: OCZ LPDU DN JI AMDYVT key 9: NBY KOCT CM IH ZLCXUS key 10: MAX JNBS BL HG YKBWTR key 11: LZW IMAR AK GF XJAVSQ key 12: KYV HLZQ ZJ FE WIZURP key 13: JXU GKYP YI ED VHYTQO key 14: IWT FJXO XH DC UGXSPN key 15: HVS EIWN WG CB TFWROM key 16: GUR DHVM VF BA SEVQNL key 17: FTQ CGUL UE AZ RDUPMK key 18: ESP BFTK TD ZY QCTOLJ key 19: DRO AESJ SC YX PBSNKI key 20: CQN ZDRI RB XW OARMJH key 21: BPM YCQH QA WV NZQLIG key 22: AOL XBPG PZ VU MYPKHF key 23: ZNK WAOF OY UT LXOJGE key 24: YMJ VZNE NX TS KWNIFD key 25: XLI UYMD MW SR JVMHEC
Real encryption survives this attack because its number of possible keys is unimaginably large. Modern symmetric ciphers commonly use 128-bit or 256-bit keys, meaning 2 to the 128th or 2 to the 256th power possible keys. An older 56-bit standard was broken in 1998 by a machine built for the job, which is why keys grew. Even at a trillion guesses a second:
Caesar cipher 2.5e+01 keys: 2.5e-11 seconds to try them all 56-bit key 7.2e+16 keys: 20 hours to try them all 128-bit key 3.4e+38 keys: 1.1e+19 years to try them all 256-bit key 1.2e+77 keys: 3.7e+57 years to try them all The universe is about 1.4e+10 years old.
How does your browser know a public key really belongs to your bank and not to an impostor? Certificate authorities are trusted organizations that issue digital certificates, which confirm who owns the encryption keys used for secure communication. Your browser and phone come with a list of certificate authorities they trust. When a site presents its certificate, the browser checks that a trusted authority issued it before treating the https:// connection as secure. The system is a trust model: you trust the website because your browser trusts the authority that vouched for it.
Check your understanding
Which login process is an example of multifactor authentication?
Ana sends Ben a message using public key encryption. Which statement is accurate?
What is the role of a certificate authority?
A message is stored as a list of numbers from 0 to 25, one per letter. The code segment below encrypts it with a shift of 3. What is displayed?
message ← [7, 24, 2]key ← 3FOR EACH n IN message{DISPLAY((n + key) MOD 26)}
Write caesar_encrypt(text, key) that shifts every letter of text by key places. Unlike the demo, it must handle both cases:
key can be negative (to decrypt) or larger than 26.caesar_encrypt("Meet at 9!", 1) -> "Nffu bu 9!"Write count_possible_passwords(password) that estimates how many passwords of the same length an attacker would have to try, based on the kinds of characters it uses:
Return the total number of possible characters raised to the power of the password's length.
count_possible_passwords("Ab1") -> 238328 (62 ** 3)How do attackers get in?
CoffeeShop_Free_WiFi, so that everything you send passes through their device.Most attacks arrive through something you click or install:
Before clicking a link, find where it really goes. The website is the name between // and the next /, and the part that matters is at the right end of that name.
Shows: Sign in to your bank Really goes to: www.mybank.com Shows: https://www.mybank.com/login Really goes to: mybank.com.account-check.xyz Shows: Reset your school password Really goes to: login.myschool.edu
The second link starts with your bank's name, but the site it opens ends in account-check.xyz, a stranger's site built to collect passwords.
Ways to protect yourself and your devices:
Write has_pii(text) that returns True if a message contains an email address or a phone number, and False otherwise. Check each word (split on spaces) after stripping the characters .,!? from its ends:
@, at least one character before it, and a . somewhere after it.555-867-5309.has_pii("Call me at 555-867-5309 tonight") -> True
has_pii("Meet at 5pm in room 204") -> FalseCheck your understanding
A program secretly installed on a library computer records everything typed on the keyboard, including the passwords people enter. What is this called?
Which two actions best protect a phone from attacks? Select two answers.
Select 2 answers.
Exam topics: 5.6 Safe Computing (IOC-2.A, IOC-2.B, IOC-2.C)