Class 9 Computer Science — How strong a password is
Work out how many different passwords a rule allows, and use that count to say which of two rules is harder to guess your way through.
Name: ________________________
1.A rule allows 3 characters taken from a set of 20, and a guessing machine gets through 1000 passwords a second. How many seconds does the machine need before it has tried the lot?
2.A rule allows passwords of 4 characters with 20 characters allowed in each position. It can be made stronger in one of two ways: one more character can be added to the length, or twenty more characters can be allowed in each position. Which change allows more passwords?
- a) Neither change makes any difference to the count
- b) Adding one more character to the length
- c) The two changes allow exactly the same number
- d) Allowing twenty more characters in each position
3.A badge code is exactly 2 characters long, and each character is one of the 5 shapes printed on the badge. How many different badge codes does that rule allow?
4.A password on one website is 3 characters long, and each character may be any of 20 letters. How many passwords does the website's rule allow?
5.A door keypad takes a code of exactly 4 characters, and each character is one of its 5 buttons. How many different codes are there for somebody to get through?
6.A guessing machine gets through 200 passwords every second, and the rule it is working against allows 8400 different passwords. How many seconds does it need to try every one of them?
7.A rule allows passwords of exactly 2 characters taken from a set of 30. It is changed to allow 4 characters, taken from that same set of 30. How many times more passwords does the new rule allow than the old one?
8.Each of these rules allows some number of different passwords. Match each rule to that number.
- 2 characters from 15
- 3 characters from 5
- 2 characters from 21
- 4 characters from 4
- 3 characters from 12
- 225
- 441
- 125
- 1728
- 256
Answer key — Class 9 Computer Science — How strong a password is
- 1. 8
- 2. b) Adding one more character to the length
- 3. 25
- 4. 8000
- 5. 625
- 6. 42
- 7. 900
- 8. 2 characters from 15 → 225; 3 characters from 5 → 125; 2 characters from 21 → 441; 4 characters from 4 → 256; 3 characters from 12 → 1728