Skip over navigation
Cambridge University Faculty of Mathematics NRich logo
menu search
  • Teachers expand_more
    • Early years
    • Primary
    • Secondary
    • Post-16
    • Events
    • Professional development
  • Students expand_more
    • Primary
    • Secondary
    • Post-16
  • Parents expand_more
    • Early Years
    • Primary
    • Secondary
    • Post-16
  • Problem-Solving Schools
  • About NRICH expand_more
    • About us
    • Impact stories
    • Support us
    • Our funders
    • Contact us
  • search

Or search by topic

Number and algebra

  • The Number System and Place Value
  • Calculations and Numerical Methods
  • Fractions, Decimals, Percentages, Ratio and Proportion
  • Properties of Numbers
  • Patterns, Sequences and Structure
  • Algebraic expressions, equations and formulae
  • Coordinates, Functions and Graphs

Geometry and measure

  • Angles, Polygons, and Geometrical Proof
  • 3D Geometry, Shape and Space
  • Measuring and calculating with units
  • Transformations and constructions
  • Pythagoras and Trigonometry
  • Vectors and Matrices

Probability and statistics

  • Handling, Processing and Representing Data
  • Probability

Working mathematically

  • Thinking mathematically
  • Developing positive attitudes
  • Cross-curricular contexts

Advanced mathematics

  • Decision Mathematics and Combinatorics
  • Advanced Probability and Statistics
  • Mechanics
  • Calculus

For younger learners

  • Early Years Foundation Stage

Public Key Cryptography Interactivity

Age 16 to 18
  • Interactive environment
  • Getting Started

This interactivity can be used to try out the ideas explained in the article Public Key Cryptography.  We suggest that you take a look at the article before experimenting with the interactivity.  There are some videos explaining how to use the interactivity in the Getting Started section.

By clicking on the purple cog you can enter the settings menu where you can change the settings as follows:

  1. Choose to play as either:
    * Alice.  Alice is trying to send a message to Bob
    * Bob. Bob sends Alice his public key so that she can encode her message.  Bob will use his private key to decode the message.
    * Eve. Eve is eavesdropping on Alice and Bob, and can hear/see Bob's public key and Alice's encoded message.  Eve wants to crack the secret message and find out what Alice has told Bob.
     
  2. You can either:
    * Choose a role and have the computer play the other roles (by choosing the Simulated setting), or
    * Play with other people (by choosing the Group setting) and make sure you each open the interactivity on different computers. You will need to decide who will be Alice and Bob and you will need to be able to communicate with each other (which could be verbally if you are in the same room, or by emailing/group messaging if you are in different locations). If there are three of you, the third person can be Eve, who will need to be able to hear/see Bob's public key and Alice's encoded message.

When you have changed the settings remember to click on one of the two buttons at the bottom of the settings menu to update the interactivity.

The code that has been used to convert characters into numbers can be found here.

We are very grateful to the Heilbronn Institute for Mathematical Research for their generous support for the development of this resource.

This problem featured in an NRICH Secondary webinar in April 2021.

  • Tech help
  • Accessibility Statement
  • Sign up to our newsletter
  • Twitter X logo

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.

NRICH is part of the family of activities in the Millennium Mathematics Project.

University of Cambridge logo NRICH logo