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 thief tries to break a message encrypted with a 40-bit symmetric key…
MediumComputer ScienceHigh School (9–10)Computer Science › Encryption and Cyber SecurityNumericalConceptualIGCSE

A thief tries to break a message encrypted with a 40-bit symmetric key…

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 thief tries to break a message encrypted with a 404040-bit symmetric key. His computer tries 111 million keys every second.

  1. How many keys are there? Give your answer to 333 significant figures, as a number of millions of millions.
  1. How many days does he need to try every key? Give your answer to 111 decimal place.
  1. Why do real systems use keys of a hundred bits or more?

Check your answer

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

Need a reminder? The key ideaShowHide

Symmetric encryption uses the same key to encrypt and to decrypt, so the key must be shared, and an intercepted key lets anyone decrypt. A key of nnn bits has 2n2^n2n possible values. If each pair of NNN people needs its own key, there are N(N−1)2\dfrac{N(N - 1)}{2}2N(N−1)​ keys.

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 keys. 240=1 099 511 627 7762^{40} = 1\,099\,511\,627\,776240=1099511627776, about 1.101.101.10 million million.

Step 2. The seconds. 1 099 511 627 776÷1 000 000≈1 099 5121\,099\,511\,627\,776 \div 1\,000\,000 \approx 1\,099\,5121099511627776÷1000000≈1099512 seconds.

Step 3. The days. A day has 24×3600=86 40024 \times 3600 = 86\,40024×3600=86400 seconds, so 1 099 512÷86 400≈12.71\,099\,512 \div 86\,400 \approx 12.71099512÷86400≈12.7 days.

Step 4. Longer keys. Each extra bit doubles the time. With 808080 more bits the time is multiplied by 2802^{80}280, which is far longer than the age of the Universe. The exam does not ask for key lengths, but this is why keys are long.

Answer: (a) 1.101.101.10 million million. (b) 12.712.712.7 days. (c) Every extra bit doubles the work of a brute-force attack.

Log in to save this for later
← All Problems
← A symmetric encryption system uses keys made of bits…Five members of a project team each want to send private messages to every other member, using… →
More onComputer Science › Encryption and Cyber Security

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A teacher wants each of her 30 students to be able to send her a private message that no other…Hard
  2. This is a toy model with tiny numbers. The exam does not ask for this calculation…Medium
  3. A company has 12 staff, and each has an asymmetric key pair…Easy
  4. A class of 20 students wants every student to be able to send a private message to every other…Hard
  5. Five members of a project team each want to send private messages to every other member, using…Medium
All problems on this topic →