HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A door lock opens with a 4-digit PIN. Each digit can be 0 to 9…
EasyComputer ScienceHigh School (9–10)Computer Science › Encryption and Cyber SecurityNumericalIGCSE

A door lock opens with a 4-digit PIN. Each digit can be 0 to 9…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A door lock opens with a 444-digit PIN. Each digit can be 000 to 999. A thief's machine can try one PIN every 333 seconds.

  1. How many different PINs are there?
  1. How many hours would the machine need to try every PIN? Give one decimal place.
  1. On average, a brute-force attack finds the PIN after trying about half of them. About how many hours is that?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Brute-force attack: a program tries every possible password until one works, to get into an account. With ccc characters to choose from and a length of LLL, there are

N=cL\displaystyle N = c^{L}N=cL

passwords. Data interception: data is captured while it is transmitted, to steal it. DDoS: many computers flood a web server with requests so real users cannot reach it. Hacking: gaining unauthorised access to a system, to steal, change or delete data or cause damage.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. The PINs. N=104=10 000N = 10^4 = 10\,000N=104=10000.

Step 2. Every PIN. 10 000×3=30 00010\,000 \times 3 = 30\,00010000×3=30000 seconds. In hours: 30 000÷3600=8.330\,000 \div 3600 = 8.330000÷3600=8.3 hours.

Step 3. On average. About half: 8.33÷2=4.28.33 \div 2 = 4.28.33÷2=4.2 hours.

Answer: (a) 10 00010\,00010000. (b) 8.38.38.3 hours. (c) about 4.24.24.2 hours.

What if? Many locks freeze for a while after three wrong tries. Then a brute-force attack would take months. That is one of the defences in the third lesson.

Log in to save this for later
← All Problems
← Part of a blockchain holds these payments, oldest first…A password uses small letters, capital letters and digits: 62 characters in all… →
More onComputer Science › Encryption and Cyber Security

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A small office has 6 staff. They share files on a server, use email, and log in to an online bank…Hard
  2. A school connects its network to the internet through a firewall…Medium
  3. A bank uses two-step verification. After the password, it sends a 6-digit code to the customer's…Medium
  4. At a small company, a caller rings the reception desk…Hard
  5. Two things happen to two customers of the same bank…Medium
All problems on this topic →