Ch 2 · 6 Security, Privacy and Data Integrity · AS & A Level Computer Science 9618
Topic 2 of 3 in System Software, Security and Ethics — AS & A Level Computer Science 9618 — 59 lessons.
Introduction
Data must be kept away from people who should not see it, protected from attack, and kept accurate. These are three different goals: security, privacy and integrity. (Syllabus topic 6: sections 6.1–6.2.)
Key ideas — 6.1 (a) Security, privacy and integrity
Both the data and the computer system must be secured: if the system is compromised (e.g. by malware or unauthorised access), the data on it is at risk, and the system's availability and reliability are lost.
🧑🏫 Teacher's explanation
Imagine you own a high-end jewelry store.
📖 Definitions
🔍 Worked example — Easy
A bank uses a system to ensure that a transfer of £500.00 from Account A to Account B is recorded correctly. If the system crashes mid-transfer and Account A is debited but Account B is not credited, which concept has been violated?
🔍 Worked example — Standard
A user attempts to access a medical database. They provide a valid username and password, but they are denied access to the 'Patient Surgery History' section because their account only has 'Read-Only' permissions for 'Patient Contact Details'. Which security concept is being applied?
🔍 Worked example — Exam-style
A system administrator is implementing a backup routine. They need to ensure that if a hard drive fails, the data can be restored without loss. This protects against which specific aspect of data security?
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Define the term 'Data Integrity'. [2] (b) Explain the difference between 'Data Security' and 'Data Privacy' in the context of this hospital. [4] [6 marks]
Key ideas — 6.1 (b) Security measures
🧑🏫 Teacher's explanation
Imagine you are protecting a high-security vault. Security is the thick steel door and the alarm system (the measures that stop intruders). Privacy is ensuring that only specific people are allowed to see what is inside the vault (the rules about who sees what). Data integrity is ensuring that the gold inside the vault hasn't been swapped for fake coins or damaged during transport (the accuracy and completeness of the data).
📖 Definitions
🔍 Worked example — Easy
A user wants to secure their account. List three characteristics of a 'strong' password that would make it resistant to brute-force attacks.
🔍 Worked example — Standard
Explain the process of verifying a digital signature using a sender's public key and a hash function.
🔍 Worked example — Exam-style
A network administrator implements a firewall. Describe how a firewall differs from anti-virus software in terms of its primary function.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
Key ideas — 6.1 (c) Threats and restricting them
Protecting the data itself: encryption (stored and transmitted data) and access rights (users or groups are given read, write, delete or no access to particular files and records, so each can only see and change what they need).
🧑🏫 Teacher's explanation
Imagine your computer is a high-security bank. Data security is the vault itself (the physical protection), privacy is the secrecy of who owns the money inside (the confidentiality), and integrity is ensuring no one sneaks in to change the numbers on the account balances (the accuracy).
📖 Definitions
🔍 Worked example — Easy
A user receives an email that appears to be from their bank, asking them to click a link to 'verify' their account details due to a security breach. Identify the threat and suggest one method to restrict this risk.
🔍 Worked example — Standard
Compare 'Phishing' and 'Pharming' in terms of how the user is redirected to a malicious site.
🔍 Worked example — Exam-style
A system administrator wants to ensure that a junior clerk can view customer records but cannot change them or delete them. Identify the security measure and the specific type of access right required.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Describe how encryption can be used to protect this data. [2] (b) The company is concerned about 'spyware'. Define what spyware is and state one method to restrict its risk. [2] [4 marks]
Key ideas — 6.2 (a) Data integrity: validation
Validation is an automatic check by the computer that data entered is reasonable and sensible (it meets set rules). It cannot ensure the data is correct.
🧑🏫 Teacher's explanation
Imagine you are filling out a passport application. If you leave the 'Date of Birth' field blank, the clerk might catch it immediately—that is a presence check. If you try to enter 'January 45th', the clerk knows that is impossible—that is a format check. However, even if you enter 'January 1st, 2000', the clerk doesn't know if that is actually your birthday or if you just typed it wrong. This is the crucial distinction: validation checks if data is 'sensible', but it cannot check if it is 'correct'.
📖 Definitions
🔍 Worked example — Easy
A system requires a 'User Age' field. The rules are: the field must not be empty, it must be a number, and it must be between 0 and 120 inclusive. Identify which validation check is being used for each scenario:
🔍 Worked example — Standard
A student enters a 10-digit student ID. The system must ensure the ID is not empty, is exactly 10 characters long, and that the first two characters are letters. Identify the validation checks used.
🔍 Worked example — Exam-style
A warehouse system uses a check digit for product barcodes. The check digit is calculated by taking the sum of the first 9 digits, dividing by 10, and using the remainder. If the first 9 digits are 5, 2, 0, 1, 1, 1, 1, 1, 1, calculate the check digit.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
Identify the validation checks that should be applied to the temperature data. [3] [3 marks]
Key ideas — 6.2 (b) Data integrity: verification
Verification checks that data has been accurately entered or transferred: it matches the original.
🧑🏫 Teacher's explanation
Imagine you are copying a long phone number from a handwritten note onto your smartphone. Even if you follow the rules of grammar and spelling (validation), you might still accidentally type '555-0123' instead of '555-0124'. The data is 'valid' because it looks like a phone number, but it is not 'accurate' because it doesn't match the original. This is the essence of verification.
📖 Definitions
🔍 Worked example — Easy
A user is entering a 10-digit bank account number. Explain how a 'double entry' verification method would work in this context.
🔍 Worked example — Standard
During data transfer, a byte is sent: 10110011. If an 'even parity' check is used, determine the parity bit and identify if an error is detected if the bit is flipped to 0.
🔍 Worked example — Exam-style
A block of data is sent with a checksum of 42. The receiver receives the data and calculates a new checksum of 42. State whether the data is verified and explain why.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Describe how a checksum is used to detect an error during data transfer. [2] (b) Explain why a checksum is a form of verification rather than validation. [2] [4 marks]
Worked example
A block of three bytes was sent with even parity (bit b0 of each byte is its parity bit) and a parity byte. Find and correct the error in the received block.
🔍 Worked example — Easy
A single byte is sent using even parity. The received byte is 10110011. Determine if an error occurred and, if so, what the parity bit (b_0) should be.
🔍 Worked example — Standard
A block of two bytes is sent with even parity (bit b_0 is the parity bit) and a parity byte. Byte 1: 11001010 Byte 2: 01110011 Parity Byte: 10001100 Identify the error.
🔍 Worked example — Exam-style
A block of three bytes was sent with even parity (bit b_0 is the parity bit) and a parity byte. Byte 1: 10110010 Byte 2: 01111100 Byte 3: 11001010 Parity Byte: 00010100 Find and correct the error.
⚠️ Common errors
Common mistakes
Practice
Answers: (1) Security: protecting data from loss or unauthorised access; privacy: keeping personal data confidential and controlled by its owner; integrity: data being accurate, complete and consistent. (2) The sender encrypts a hash of the message with their private key; the receiver decrypts with the sender's public key and compares it with their own hash of the message; a match proves who sent it and that it was not changed. (3) Malicious code or a corrupted DNS redirects the user to a fake website; reduce it with anti-malware and by checking for HTTPS and a valid certificate. (4) (a) existence check; (b) limit check. (5) Each byte has a parity bit and a parity byte checks each column; a single wrong bit makes one row and one column fail; the bit where they cross is flipped to correct it.