AP Computer Science Principles · Impact of computing
Safe computing
1Threats
- Malware: software intended to damage or take control of a computer. Includes viruses (attach to other programs and spread when they run), worms, ransomware (encrypts files and demands payment) and spyware.
- Phishing: tricking people into giving personal information (passwords, card numbers) by pretending to be a trusted organisation, often by email or text with a fake link.
- Keylogging: secretly recording keystrokes to capture passwords.
- Rogue access points: fake Wi-Fi networks set up to intercept data sent through them.
Many attacks rely on human error rather than technical weaknesses.
Check yourself
An email pretending to be from a bank, asking you to "confirm your password" via a link, is:
Show the answer
Phishing
Impersonation to steal data.
2Authentication
Authentication checks that a user is who they claim to be.
- Strong passwords: long, unique for each account, hard to guess.
- Multifactor authentication (MFA): requires two or more of: something you know (password), something you have (phone, security key) and something you are (fingerprint, face). An attacker who steals the password still cannot log in without the second factor.
Check yourself
Why does multifactor authentication improve security?
Show the answer
An attacker needs more than just the password to log in
Several factors.
3Encryption
Encryption scrambles data so only someone with the correct key can read it. Decryption reverses it.
- Symmetric encryption: the same key encrypts and decrypts. Fast, but the key must be shared securely.
- Public key (asymmetric) encryption: each person has a public key (shared openly, used to encrypt messages to them) and a private key (kept secret, used to decrypt). Anyone can send a secure message without first sharing a secret.
Certificate authorities issue digital certificates confirming that a public key really belongs to a website, which HTTPS relies on.
Bea wants to send Ali a secret message.
- Bea encrypts it with Ali's public key.
- Only Ali's private key can decrypt it, so eavesdroppers learn nothing.
Anyone can encrypt with Ali's public key; only Ali's private key decrypts
Check yourself
In public key encryption, a message to Ali is encrypted with:
Show the answer
Ali's public key
Only Ali's private key decrypts it.
4Protecting yourself and your data
- Keep software and operating systems updated to fix security vulnerabilities.
- Use antivirus software and firewalls (which block unauthorised network traffic).
- Do not open unexpected attachments or click unverified links.
- Check for HTTPS before entering personal information.
- Think about what you share: personal data online can be used to guess passwords or answers to security questions.
Check yourself
Why should software be updated regularly?
Show the answer
Updates fix known security vulnerabilities
Patches.
5Going deeper: authentication, encryption and recognizing attacks
Personally identifiable information (PII) is information that identifies, links to or describes an individual: name, date of birth, address, government ID number, biometric data (fingerprint, face), medical and financial records, and also location history and browsing habits.
- Search engines, websites and devices record activity and can use it to suggest content and target advertising.
- Separate pieces of information can be combined to identify someone and build a profile, without their knowledge.
- Information placed online is difficult to delete.
- Stolen PII enables identity theft, fraud and stalking.
Authentication: proving you are who you claim to be.
Strong passwords: easy for you to remember, hard for others to guess: long, not based on personal information, and different for every account (so that one breach does not open the others).
Worked example (why length and variety matter)
- Eight lower-case letters: 26⁸ ≈ 2 × 10¹¹ possibilities.
- Eight characters from upper case, lower case and digits (62 symbols): 62⁸ ≈ 2 × 10¹⁴: about a thousand times more.
- Twelve lower-case letters: 26¹² ≈ 10¹⁷: more still. Length helps most.
Multi-factor authentication (MFA) requires at least two different kinds of evidence:
- Knowledge: something you know (password, PIN).
- Possession: something you have (phone receiving a code, security key, bank card).
- Inherence: something you are (fingerprint, face).
A stolen password alone is then not enough. Two passwords are not two factors: they are the same kind.
Encryption: encoding data so that only authorized parties can read them. Decryption reverses it.
Symmetric key encryption: one key both encrypts and decrypts. Fast, but both parties must somehow share the key in secret first.
Public key (asymmetric) encryption: each party has a pair of keys.
- The public key is shared openly and is used to encrypt.
- The private key is kept secret and is the only key that can decrypt.
- Anyone can send you a secret message using your public key; only you can read it.
- No secret needs to be exchanged in advance.
Ana wants to send Ben a confidential message.
- Ana obtains Ben's public key.
- She encrypts the message with it.
- Only Ben's private key can decrypt it.
- An eavesdropper who copies the message and knows the public key still cannot read it.
Certificate authorities issue digital certificates that confirm a website's public key really belongs to it. This is the trust model behind HTTPS; the padlock in the browser shows that the connection is encrypted and the certificate valid.
Malware (malicious software) is intended to damage a system or take partial control of it.
- Virus: a malicious program that attaches itself to legitimate files and copies itself when they are run.
- Worm: spreads by itself across networks, with no host file and no action by the user.
- Trojan: disguised as useful software.
- Ransomware: encrypts the victim's files and demands payment.
- Spyware: secretly gathers information.
- Keylogger: records every keystroke, to capture passwords. Such programs have legitimate uses but are often used fraudulently.
Attacks on people and networks
- Phishing: a message that tricks the user into giving personal information, typically by imitating a bank, employer or delivery firm and linking to a fake login page.
- Rogue access point: a wireless access point that gives unauthorized access to a secure network, or imitates a trusted hotspot so that data passing through it can be intercepted, analyzed and modified.
- Unsolicited attachments and links can install malware; so can untrusted downloads.
- Denial-of-service attacks flood a server with traffic so that real users cannot reach it.
Recognizing phishing: a sense of urgency or threat; a sender's address that does not quite match; generic greetings; requests for passwords or payment; links whose real destination differs from the text. When in doubt, go to the site directly; do not click the link.
Good habits
- Keep software updated: updates patch security flaws.
- Use antivirus software and a firewall.
- Use a password manager and MFA.
- Back up important files (the best defense against ransomware).
- Be careful on public Wi-Fi; prefer HTTPS.
- Review the permissions apps request and the privacy settings of accounts.
- Think before posting.
Common mistakes
- Saying the private key encrypts and the public key decrypts a confidential message.
- Calling a password and a security question two-factor authentication.
- Confusing a virus (needs a host file) with a worm (spreads on its own).
- Describing phishing as a kind of malware; it is deception.
- Saying symmetric encryption uses two keys.
Check yourself
In public key encryption, which key is used to decrypt a message sent to you?
Show the answer
Your private key
Messages encrypted with your public key can be read only with your private key.
6For top marks
- Name the threat precisely and explain how it works and what it targets.
- For public key encryption, state which key is used for which step.
- Explain MFA using the categories know / have / are.
- Match each protection to the threat it addresses (MFA vs stolen passwords; encryption vs eavesdropping; updates vs malware exploiting vulnerabilities).
"Even if a phishing email captures my password, MFA stops the attacker because they do not have my phone to receive the code."
Check yourself
Which protection most directly defends against someone reading data intercepted on public Wi-Fi?
Show the answer
Encryption (e.g. HTTPS)
Unreadable without a key.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera