A-Level Computer Science — Data Security, Privacy and Integrity: threats, seven layers of defence, validation and verification (lesson-prep guide for tutors)
- 2026-11-27
Students treat strong security as proof that the data is fine, so they cannot explain how one system can score full marks on security and zero on privacy. This chapter separates the three words with an encrypted system that sells its records, then turns defence into arithmetic with 218,340,105,584,896 password combinations and 44 bits of block parity.
01 Prerequisites (3-minute check)
If any of these fails, fix it before the lesson starts.
| Skill | Quick check | Pass mark |
|---|---|---|
| Binary and hexadecimal | What is 202 in 8-bit binary | 11001010 |
| Even parity | What must even parity make the count of ones | An even number, such as 0, 2 or 4 |
| Modulo arithmetic | What is the remainder of 70 divided by 11 | 4 |
| Decimal prefixes | Are one million and 10 to the power 6 the same number | Yes, the same number |
| Data and system | Does encrypting a disk and encrypting a network link protect the same thing | No: one protects data at rest, the other data in transit |
02 Lesson flow (60 minutes)
| Time | Stage | Tutor does | Student does |
|---|---|---|---|
| 0-10 min | Security, privacy, integrity | Use an encrypted system that sells its records to show the three words failing independently | State what each of the three words protects |
| 10-22 min | Four kinds of threat | Virus needs a host, spyware logs keys, hackers gain access, phishing steals credentials, pharming rewrites addresses | Sort five scenarios into the right threat |
| 22-36 min | Seven layers and access rights | Cover which threat each layer blocks, then the password arithmetic: 218,340,105,584,896 combinations, 60.65 hours, a factor of 1,045.55 | Work out how long a 6-digit numeric password survives |
| 36-46 min | Seven validation checks | Take a student record form and assign one check per field, with a reason | Choose a check for five fields and justify each |
| 46-56 min | Verification and parity arithmetic | Four bytes 202, 108, 182, 57: byte parity catches one flip, block parity catches two in one row, a checksum of 219 misses a plus one minus one pair | Compute the block parity byte and the total of five bytes |
| 56-60 min | Check digit and exit check | Weights 7 to 2 with mod 11 give check digit 4; swapping the first two digits moves the remainder from 4 to 1 | Explain why a plain sum misses a transposition |
03 Teaching script (read it out)
Scene 1: Three words — security blocks access, privacy governs collection, integrity keeps it right
Three definitions worth dictating: security prevents unauthorised access, change and destruction and answers who may enter and what they may do inside; privacy decides whether personal data is collected, what for, who may see it and for how long, and it belongs to the data subject; integrity keeps data correct, complete and unaltered through entry and transfer. The syllabus asks for both the security of the system and the security of the data: system security stops intrusion, data security stops reading, and one without the other is worth little.
Then four threats, described by method rather than by headline. Malware: a virus needs a host, attaching to an executable or a macro and spreading when a person opens it; spyware logs keystrokes and screenshots and sends them out, destroying nothing, which is why it hides longest. Hackers gain unauthorised access through weak passwords, unpatched holes or social engineering. Phishing sends a fake email or message and persuades you to type credentials into a fake login page, so the victim hands over the key. Pharming is worse: it rewrites DNS or the local hosts file, so a correctly typed address reaches a fake site, and the advice to check the address does not help at all.
Student task: for five scenarios, an email demanding a password reset, a bank page whose certificate does not match, a USB stick that runs something on insertion, a browser extension recording keys and a public Wi-Fi that redirects you, name the threat and the first action to take.
Say this: security decides who comes in, privacy decides whether the data should come in, integrity decides whether what came in is still right.
Scene 2: Seven layers, and a password space you can compute
Stress that the layers complement each other. A firewall cannot stop a virus arriving as an email attachment, anti-virus cannot stop someone with a valid account copying data, and encryption cannot stop an authorised person from copying what they may lawfully read. So when a question asks what else is needed, the answer is always another layer.
The password section earns its place only if it is computed. Eight characters drawn from 26 lower case, 26 upper case and 10 digits gives 62 raised to 8, which is 218,340,105,584,896 combinations; at a billion guesses a second that is 218,340 seconds, 60.65 hours or 2.53 days. Lower case only gives 208,827,064,576 combinations and falls in 209 seconds, a factor of 1,045.55. One more character makes it 156.7 days. Those three numbers teach the real lesson: length beats apparent complexity, and because the space only matters while guessing is unlimited, a lockout after a few failures and a second factor matter as much as the space itself.
Student task: how long does a 6-digit numeric password, digits repeatable, survive at a billion guesses a second? How long if the account allows only five attempts a minute? Write both calculations and a conclusion.
Say this: every layer blocks one kind of threat, so always ask which layer is still missing.
Scene 3: Validation rejects unreasonable values, verification confirms nothing was copied wrong
Bind each of the seven validation checks to a field: presence for a name that cannot be blank; range for an age between 11 and 19, bounded at both ends; limit for a score that must not exceed 100, bounded at one end; format for a class code of one digit then one letter such as 5A; length for a student number of exactly 7 characters; existence for a class code that must appear in the class table; check digit for the last digit computed from the first six. Say plainly that range is bounded twice and limit once, and match the wording of the question.
Verification has two settings. At entry: a visual check against the source document, or double entry with two operators keying the same batch and the system comparing every field. With 2,500 records at 3 per cent mistyped, that is 75 errors, and double entry lets one through only when the same field is mistyped twice, 3 per cent of 3 per cent, about 2.25, so roughly 73 of the 75 are caught. At transfer: parity, block parity and checksum.
Parity must be shown on real bytes. Four bytes 202, 108, 182, 57 hold 4, 4, 5 and 4 ones, so even parity appends 0, 0, 1, 0. Flip the lowest bit of 182 (10110110) to give 183 (10110111), the count becomes 6, the receiver expects a 0 and receives a 1, so the error is caught. Clear the lowest two ones instead to give 176 (10110000), the count becomes 3, still odd, the receiver expects a 1 and receives a 1, so byte parity misses it, which is the single-bit limitation stated properly. Block parity fixes this: one row parity bit per byte plus a column parity byte, the exclusive or of the four rows giving 41 (00101001), so 32 data bits travel in 44 bits for 37.5 per cent overhead. Two flips in one row still fool the row bit, but they land in two different columns, so the column parity fails and the error is caught; a single flip is not only caught but located.
A checksum has a blind spot worth teaching exactly. The four bytes sum to 549, which is 37 modulo 256, so a check byte of 219 makes the five-byte total 768, three times 256. A receiver adds the five bytes, divides by 256 and accepts a remainder of 0. If one byte gains one and another loses one, 182 becoming 183 and 108 becoming 107, the total is unchanged and the checksum misses it completely, while parity and block parity catch it. So the three are not ranked by sophistication; each covers the blind spot of another.
Finally the check digit: six digits 5, 2, 0, 3, 1, 4 with weights 7, 6, 5, 4, 3, 2 give a weighted sum of 70, remainder 4 modulo 11, so the seventh digit is 4 and the full code is 5203144. Swap the first two digits to 2, 5, 0, 3, 1, 4 and the weighted sum becomes 67, remainder 1, so it is caught, while a plain sum is 15 either way and catches nothing. That is what the weights are for.
Student task: change the four bytes to 202, 108, 183, 57, recompute both the checksum and the block parity byte, and state what a receiver decides in each case.
Say this: validation asks whether the value is reasonable, verification asks whether it is identical to the source.
04 Question types and worked steps
| Type | Example | Steps | Answer |
|---|---|---|---|
| Separate the three words | An encrypted system that sells its records | Ask who may enter, then whether the data should be collected and who may see it, then whether it is still unaltered | Security scored separately from privacy and from integrity |
| Choose controls for a scenario | Handling client data on public Wi-Fi | Classify the threat first, then match a layer to each: encrypted link, certificate check, no sensitive work on a shared network | Encryption in transit plus authentication plus avoiding the shared network |
| Choose a validation check | Age, class code, student number, score, name | Look at the bounds, one or two ended; the structure, format and length; membership of a table; derivation from other digits | Range, format with length and check digit, limit, presence |
| Parity and block parity | 202, 108, 182, 57 | Count ones per byte and pad to even, exclusive or the four rows for the column byte, and recompute both at the receiver | Row parity (0, 0, 1, 0), column byte 41, 44 bits in total |
| Check digit and transposition | 5, 2, 0, 3, 1, 4 with weights 7 to 2 | Multiply digit by weight, add, take the remainder modulo 11, then repeat for the swapped digits and compare remainders | Sum 70 gives 4; swapped 67 gives 1, so it is caught |
05 Independent practice (3 questions)
| Question | Answer | What to watch |
|---|---|---|
| A system requires 8 characters drawn from 26 lower case, 26 upper case and 10 digits. How many combinations are there? At 1,000,000,000 guesses a second, how long would a search take? If only lower case were allowed, how long? | 218,340,105,584,896 combinations; 218,340 seconds, about 60.65 hours or 2.53 days; lower case alone gives 208,827,064,576 combinations and falls in 209 seconds, 1,045.55 times faster | Raise the size of the character set to the length, then divide by the guess rate; the size of the set matters, not how odd the password looks |
| Four bytes 202, 108, 182, 57 are sent with even parity and a column parity byte. State the row parity bits, the column byte and the total number of bits. If the lowest bit of 182 flips, which layer catches it? If the lowest two bits flip, which layer catches it? | Row parity (0, 0, 1, 0), column byte 41 or 00101001, 44 bits in total for 37.5 per cent overhead; one flip is caught and located by both layers; two flips defeat the row bit but land in two columns, so the column byte catches them | Ask every time whether the parity of the count of ones has changed, because only a change is detectable |
| Six digits 5, 2, 0, 3, 1, 4 carry a mod-11 check digit with weights 7, 6, 5, 4, 3, 2. Find the check digit. If the first two digits are swapped, does the check digit test pass? Does a plain sum test pass? | Weighted sum 70, remainder 4, so the check digit is 4; after the swap the sum is 67 with remainder 1, which differs and is caught; a plain sum is 15 both times and catches nothing | Test a transposition as a case in its own right: only unequal weights make a swap change the total |
06 Common mistakes and what to say
| Mistake | Student writes | Say this |
|---|---|---|
| Mixing the three words | Answering that encryption guarantees privacy | Encryption protects security and data in transit; privacy asks whether the data should be collected and who may see it. Answer the word the question used. |
| Expecting a firewall to stop viruses | Saying that a firewall means no malware | A firewall filters connections and never inspects file contents; a virus arriving as an attachment needs anti-virus. Each layer blocks one threat, so ask which layer is missing. |
| Claiming parity catches every error | Saying parity guarantees the data is correct | Parity catches a single bit: flipping one bit of 182 is caught, flipping two gives 176 and is not, because the count of ones stays odd. Catching two needs the column byte. |
| Treating validation as verification | Saying a format check means the data is correct | Validation only judges reasonableness, so a correctly formatted but invented number passes; double entry confirms nothing was copied wrong and parity, block parity or a checksum confirm nothing was transmitted wrong. |
07 Homework (paper, section and question numbers)
- A-Level Computer Science chapter index — Every chapter in this subject
- All lesson-prep guides — Other subjects in the same series
- Redo this chapter — Practice questions 1 to 3: password space, block parity, and the mod-11 check digit
08 Exit check (last 5 minutes)
| Question | Answer | Decision |
|---|---|---|
| One distinction | Security blocks access, privacy governs collection, integrity keeps data correct | No answer means scene 1 needs redoing |
| One figure | 8 characters from 62 symbols give 218,340,105,584,896 combinations, 60.65 hours at a billion a second | Missing the order of magnitude means scene 2 needs redoing |
| One limitation | Parity misses two flips in one byte, as 176 shows | Saying parity is infallible means scene 3 needs redoing |
09 Tutor FAQ
Are security and privacy the same thing?
No. Security is the set of technical and organisational measures that prevent unauthorised access, change and destruction; privacy is the data subject right to decide whether personal data is collected, what for, who may see it and how long it is kept. A system can encrypt everything and grade permissions while selling the data, which is good security and poor privacy. If a question mentions consent, purpose or retention, answer privacy; if it mentions firewalls, encryption or permissions, answer security.
Why not always use the strongest method?
Because each has a cost. Block parity spends 37.5 per cent extra bits, encryption and decryption cost processing time and double entry doubles the keying effort. Choose by consequence against cost: a bank transfer justifies block parity plus encryption, an answer box in an online quiz justifies a range check.
Which comes first, validation or verification?
Validation runs at the moment of entry and rejects impossible values; verification runs on the copy or the transmission and confirms a match with the source. Validation comes first in sequence, but both are needed: with validation alone a reasonable but mistyped street number is stored silently, and with verification alone two operators can key the same unreasonable value and the system accepts it.
Find a tutor — freeTutor Registration →
A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.



