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. /This is a toy model with tiny numbers. The exam does not ask for this calculation…
MediumComputer ScienceHigh School (9–10)Computer Science › Encryption and Cyber SecurityNumericalIGCSE

This is a toy model with tiny numbers. The exam does not ask for this calculation…

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.

This is a toy model with tiny numbers. The exam does not ask for this calculation. A public key is (3,33)(3, 33)(3,33): it locks a number mmm as c=m3 mod 33c = m^3 \bmod 33c=m3mod33. The matching private key is (7,33)(7, 33)(7,33): it unlocks ccc as c7 mod 33c^7 \bmod 33c7mod33.

  1. Lock the message number 444 with the public key.
  1. Unlock your answer with the private key.

Check your answer

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

Need a reminder? The key ideaShowHide

Asymmetric encryption uses a matched key pair: a public key, which anyone may have and which encrypts, and a private key, which only the owner has and which decrypts. To send to someone, use their public key. No secret key has to travel.

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. Lock. 43=644^3 = 6443=64, and 64−33=3164 - 33 = 3164−33=31. So c=31c = 31c=31.

Step 2. Unlock. 317=27 512 614 11131^7 = 27\,512\,614\,111317=27512614111. Dividing by 333333 leaves 444. So the private key gives back 444.

Check. Locking 313131 again with the public key gives 313 mod 33=2531^3 \bmod 33 = 25313mod33=25, not 444. The public key cannot undo its own lock. Only the private key can.

Answer: (a) 313131. (b) 444.

Log in to save this for later
← All Problems
← A company has 12 staff, and each has an asymmetric key pair…A teacher wants each of her 30 students to be able to send her a private message that no other… →
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. A company has 12 staff, and each has an asymmetric key pair…Easy
  3. A class of 20 students wants every student to be able to send a private message to every other…Hard
  4. Five members of a project team each want to send private messages to every other member, using…Medium
  5. A thief tries to break a message encrypted with a 40-bit symmetric key…Medium
All problems on this topic →