Specialty Digest

Global English editionLearners’ Study Dashboard — in development
The Knowledge Library for All

Online Courses / University Track / Computing Foundations

Module 8 · Lesson 2 · Core

Security basics: goals, passwords and ciphers

State three security goals, count possible passwords and use a simple cipher while seeing why it is weak.

  • 50 minutes
  • Serves O8
  • Assumes M8.L1 and Module 2

Phase 1: Prepare

Step 1 Warm-up recall

From M8.L1: why do packets carry a number?

Private: nothing you type here is sent or stored.

Step 2 Learning goal

By the end of this lesson you can:

  • state three security goals (Foundation);
  • calculate possible passwords (Core);
  • apply and criticise a Caesar cipher (Core).

Phase 2: Teach

Step 3 A familiar example

A lock has to stop the wrong people, let the right people in and still work. Security in computing has three goals in the same spirit.

Step 4 Clear explanation

Security aims at three goals.

Security goalMeaningExample of failure
ConfidentialityOnly the right people can read the dataA stranger reads your messages
IntegrityThe data has not been changed wronglyA bank balance is altered
AvailabilityThe data and service can be used when neededA site is knocked offline

One defence is a strong password. The number of possible passwords of a given pattern is the number of choices per place, multiplied together for every place. With 26 lowercase letters, a password of 4 letters has 26 × 26 × 26 × 26 = 456,976 possibilities.

Password patternNumber of possible passwords
4 digits10,000
4 lowercase letters456,976
6 lowercase letters308,915,776
8 lowercase letters208,827,064,576

Each extra letter multiplies the count by 26, which is the same exponential growth met in Module 5. Longer passwords therefore help far more than small tricks. Real systems add other protections, such as limiting attempts, and the table counts possibilities only.

Another defence is encryption: scrambling data so only someone with the right key can read it. A Caesar cipher shifts each letter along the alphabet by a fixed number.

H→K0E→H1L→O2L→O3O→R4HELLO becomes KHOOR
A Caesar cipher with shift 3 moves every letter three places along the alphabet. It is a classroom example only and is easily broken.

It shows the idea, but it is not secure: there are only 25 possible shifts, so anyone can try them all in moments. Real encryption uses methods with astronomically many possible keys. Trying every key is the same “check everything” approach that exponential growth makes impractical.

Step 5 Worked example (4 marks)

Encrypt CAT with a Caesar shift of 1.

  1. C moves one place to D. (1 mark)
  2. A moves one place to B. (1 mark)
  3. T moves one place to U. (1 mark)
  4. Answer: DBU. (1 mark)

Phase 3: Practise

Step 6 Learner practice (instant-marked)

1. Confidentiality means:

2. The number of 4-digit passwords is:

3. Adding one lowercase letter to a password multiplies the count by:

4. A Caesar cipher is weak because:

Phase 4: Close

Step 7 Recap

  • Confidentiality, integrity and availability are the three goals.
  • Possible passwords multiply by the number of choices per place.
  • A Caesar cipher is easily broken.

Step 8 Exit ticket (ungraded)

Encrypt ZOO with a Caesar shift of 1.

Private: nothing you type here is sent or stored.

Step 9 Go further (Extension)

Count the possible 5-letter lowercase passwords by multiplying out 26 five times.

Common mistakes

MistakeWhy it fails
Adding, not multiplying, the choices per placeMultiply the choices for each place.
Treating a Caesar cipher as real securityIt is a classroom example.
Forgetting availability as a goalA service that is down has failed.

Limits. Counts show only how many possibilities exist; real attackers use other methods, so a long password is necessary but not sufficient.