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

We suggest that you take a look at the article Public Key Cryptography before experimenting with the interactivity.

If you are simulating being Eve, you may like to know that we have chosen values for p and q which are smaller than 100.

The following might be useful:
\begin{align}
p, q \, &\text{are both prime}\\
n&=pq\\
\phi(n)&=(p-1)(q-1)\\
e \, &\text{is chosen to be co-prime to }\phi(n)\\
d \, & \text{is the value that satisfies } ed \equiv 1 \text{ mod }\phi(n)
\end{align}

Here is a spreadsheet to help you find $d$.  

Below is a video of Charlie and Claire demonstrating how to use the interactivity when playing Bob in Simulated mode.

This next video shows Charlie and Claire using the interactivity to play Eve in Simulated mode.

  • 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