Security, Privacy and Data Integrity
Keeping data and computer systems safe from loss, damage and people who should not see them, and keeping data accurate.
Security, privacy and integrity
Security keeps data safe, privacy keeps personal data with the right people, and integrity keeps data correct.
| Word | Meaning | Example |
|---|---|---|
| Data security | protecting data from being lost, damaged, or accessed by people who are not authorised | backups and passwords on the school's student records |
| Data privacy | personal data is seen and used only by the people allowed to, for the purposes allowed | your marks are seen by your teacher, not by other students |
| Data integrity | the data is accurate, complete and up to date: not corrupted and not entered wrongly | your date of birth is stored correctly |
Privacy is about the rights of the people the data describes. Laws protect it.
Remember:Both the data AND the computer system need protecting. An attack can steal or change data. It can also damage the system itself, so that nobody can use it.
Malware and hackers, and anti-virus and anti-spyware
Malware and hackers attack data; anti-virus and anti-spyware software find and remove the malware.
Malware is software written to do harm.
| Threat | What it does |
|---|---|
| Virus | copies itself into other files; spreads when they are run or shared; can delete or corrupt data |
| Spyware | secretly records what the user does, such as the keys they press, and sends it to someone else |
| Hacker | a person who gets into a system without permission, to steal, change or delete data |
Anti-virus software compares files with a database of known virus signatures. It quarantines or deletes what it finds. Some anti-virus also watches for suspicious behaviour.
Watch out:Anti-virus needs regular updates. A new virus has a signature the database does not hold yet.
Anti-spyware removes spyware in a similar way.
Phishing and pharming
Phishing tricks you into clicking a link to a fake website; pharming sends you there even when you type the right address.
| Phishing | Pharming | |
|---|---|---|
| How it starts | an email or message that pretends to come from a trusted organisation | malicious code on the user's computer, or a tampered DNS server |
| How you reach the fake site | you follow its link | you are sent there even when you type the correct address yourself |
In both, the fake website looks real. The user is tricked into typing their password or card details. These go to the criminal.
How to protect against both:
- Do not follow links in unexpected messages. Type the address yourself.
- Check the address bar and the site's certificate.
- Use anti-malware to remove pharming code.
User accounts, passwords and authentication
Accounts and authentication make sure each person is who they say and can do only what they should.
Each user has their own account and password. So the system:
- knows who is logged in
- gives them only their own rights
- logs what they do
Authentication checks that users are who they claim to be. There are three kinds:
| Kind | Example |
|---|---|
| something they know | a password or PIN |
| something they have | a phone or card |
| something they are | biometrics, such as a fingerprint or face |
Two-factor authentication uses two different kinds. So a stolen password alone is not enough.
Biometrics cannot be forgotten or shared. But they need special equipment, and they can reject the real user.
Remember:A strong password is long and mixes character types. It is not a word or a personal detail, and it is not reused.
characters to choose from
8-character passwords
a-z 26
26^8 = 208 827 064 576
a-z, A-Z, 0-9 62
62^8 = 218 340 105 584 896
all four sets 94
94^8 = 6 095 689 385 410 816
worst case =
combinations ÷ guesses a secondDigital signatures
A digital signature proves who sent a message and that nobody changed it, but it does not hide the message.
A digital signature authenticates a message or document. It proves who sent it, and that it has not been changed.
The sender:
- Makes a hash (a short digest) of the message.
- Encrypts the hash with their own PRIVATE key. This encrypted hash is the signature. They send both.
The receiver:
- Decrypts the signature with the sender's PUBLIC key. Call the result A.
- Makes their own hash of the message received. Call it B.
- Compares A with B.
| Result | It means |
|---|---|
| A = B | the message really came from the sender and was not altered |
| A ≠ B | it was changed, or it is not from the sender |
Watch out:A signature does not keep the message secret. How the keys work is A Level.
Firewalls
A firewall checks every packet going in or out against rules, and blocks the ones that break them.
A firewall stands between a computer or network and the internet. Think of a guard at the school gate with a list of rules.
It checks every packet going in or out against a set of rules. The rules say which of these are allowed:
- IP addresses
- port numbers (services)
- protocols
What it does:
- blocks the packets that break the rules
- can block certain websites
- keeps a log
It can be software on one computer, or a hardware device protecting a whole network. The rules are checked in order, and the first rule that matches decides.
Watch out:A firewall cannot stop malware that arrives by an allowed route, such as an email attachment. So it is used together with anti-virus software.
Encryption and access rights
Encryption makes stolen data useless to the thief; access rights stop people seeing data their job does not need.
Encryption scrambles data with an algorithm and a key. Someone who intercepts or steals the data cannot understand it without the key.
Watch out:Encryption does not stop data being intercepted or deleted. It makes the data useless to the thief.
It protects:
- data sent over networks (https)
- data on laptops or USB drives that could be lost
Access rights decide what each user or group may do with each file or folder:
| Right | The user can |
|---|---|
| no access | not open it |
| read only | see it, not change it |
| read and write | see it and change it |
People can then see and change only the data their job needs. The network manager sets the rights, and they are tied to each user account.
Validation or verification?
Validation asks "is this data sensible?"; verification asks "was it copied correctly?".
Both protect the integrity of data, but they ask different questions.
| Validation | Verification | |
|---|---|---|
| Asks | is the data reasonable, and does it follow the rules? | was the data entered or copied accurately, so it matches the original? |
| Done by | the computer | a person, or the computer comparing two copies |
| Example | an age is between 11 and 19 | see the two checks below |
During data entry, verification is one of two checks:
- Visual check: the user compares what they typed with the source document.
- Double entry: the data is typed twice, and the computer compares the two.
Watch out:Validation cannot tell when a sensible value is the wrong one. An age of 15 passes, even if the student is really 14.
Validation checks
Each validation check tests one rule, and you should know a value that fails each one.
The syllabus names seven validation checks:
| Check | Rule | Fails |
|---|---|---|
| presence | StudentID is not empty | (nothing) |
| length | StudentID is 6 characters | MN482 |
| format | 2 capitals, then 4 digits | mn4821 |
| range | Age from 11 to 19 | 23 |
| limit | Height under 250 cm | 265 |
| existence | Class is 11A, 11B, 12A or 12B | 11C |
| check digit | the ISBN's last digit is what it should be | 9780306406158 |
- A range check tests two boundaries: a lower one and an upper one. A limit check tests only one.
- An existence check looks the value up in a list or file of real values. It is not the same as a format check: 11C has the right format, but it is not a real class.
- A check digit is validation too. The next note shows how it works.
Exam:Name the check, and give an example of data that would fail it.
Check digits
A check digit is an extra digit worked out from the others, so a typing mistake shows up.
A check digit is an extra digit at the end of a code, such as an ISBN, a barcode or an ID number. It is calculated from the other digits by a fixed algorithm.
How it is used:
- The code is entered.
- The computer calculates the check digit again.
- If it does not match, the code was typed wrongly.
It catches a single mistyped digit, and most transpositions (two digits swapped).
Example:ISBN-13 multiplies the first 12 digits by 1, 3, 1, 3 and so on. It adds the products. The check digit is (10 − total MOD 10) MOD 10.
Exam:When a question gives you an algorithm, follow it exactly.
ISBN-13: the check digit for 978030640615
digit 9 7 8 0 3 0 6 4 0 6 1 5
weight 1 3 1 3 1 3 1 3 1 3 1 3
product 9 21 8 0 3 0 6 12 0 18 1 15
total = 93
93 MOD 10 = 3, (10 − 3) MOD 10 = 7
the ISBN is 978-0-306-40615-7
modulo-11 (ISBN-10):
the check digit for 030640615
weights 10 down to 2: total = 130
130 MOD 11 = 9, (11 − 9) MOD 11 = 2
(a result of 10 is written X)Parity checks: byte and block
A parity bit makes the number of 1s even or odd, so the receiver can spot a flipped bit.
During transmission, interference can flip bits. A parity check adds a parity bit to each byte. It makes the number of 1s:
- even (even parity), or
- odd (odd parity),
as the sender and receiver agreed.
The receiver counts the 1s. If the count is wrong, the byte is corrupted, and it asks for it again.
| Byte parity | Block parity | |
|---|---|---|
| Adds | a parity bit to each byte | also a parity byte that checks every column |
| Finds the wrong bit? | no; it also misses an even number of flipped bits | yes: one flipped bit makes one row and one column fail; the wrong bit is where they cross, so it can be corrected |
'C' = 100 0011: three 1s
even parity: parity bit 1, so 1100 0011
P data bits
C 1 100 0011
A 0 100 0001
T 1 101 0100
S 0 101 0011
byte 0 000 0101 (every column even)Checksums
A checksum is a value worked out from a whole block of data, sent with it, and worked out again on arrival.
A checksum is calculated from a whole block of data before it is sent. For example, add up all its bytes.
- The sender sends the checksum with the block.
- The receiver does the same calculation on what arrives.
- It compares its answer with the checksum that was sent.
- If they differ, the data was corrupted, and it is sent again.
Watch out:A simple sum cannot notice bytes that arrive in the wrong order. Adding in a different order gives the same total.
The methods used in practice are designed to catch far more errors.
C A T S
67 + 65 + 84 + 83 = 299
299 MOD 256 = 43, the checksum sentMatch each measure to what it actually achieves.
PICK ONE, THEN PICK ITS GROUP
- empty
- empty
- empty
- empty
- empty
KEY TERMS
CHECK YOURSELF
1.Keeping data ACCURATE and uncorrupted is which of these?
2.A user types their email address twice to make sure it is right. That is:
3.Which check would catch a date of birth of 30/02/2010?
4.Bat types www.steppebank.example himself, but a tampered DNS server sends him to a fake copy of the site. This is:
5.Saraa signs a message digitally. Which key does she use to make the signature?
6.Rule 1 of a firewall denies 203.0.113.66. Rule 2 allows port 443. A packet from 203.0.113.66 to port 443 arrives. What happens?
7.A height must be less than 250 cm. Which check is this?
8.The bytes 67, 65, 84, 83 are sent with a checksum: their sum MOD 256. They arrive as 83, 65, 84, 67. What happens?