Blog

Difficulty: Fun

Online security codes are often based on two very large prime numbers multiplied together, which is one reason why finding huge primes is a big deal!

We’ve written a code using two different prime numbers less than 10. We then multiplied these two primes and used the resulting “code number” to shift the alphabet forward to new letters.

For example, if the two prime numbers were 2 and 3, then the code would be made by shifting the alphabet forward 6 spaces. A would become G, B would become H, and so on.

Can you use the clues above to decode this message: DRO QYVN SC LEBSON SX DRO QKBNOX.

Need a hint?

Prime numbers are counting numbers that can only be divided by 1 and themselves. The first prime number is 2. Next up, 3 is also a prime number but 4 is not because 4 can be divided by 1, 4 and 2. Can you find all the primes that are less than 10?

Code-breaking takes a bit of trial and error! We recommend working through the smallest pairs of primes first.

Here’s an important hint: to decode the message, you will need to work backwards (so if your code number is 6, G in the garbled message becomes A in your decoded message). You might like to make a Caeser cipher decoder.

Brainteaser answer

The two primes are 2 and 5, making the code number 10. The message says: THE GOLD IS BURIED IN THE GARDEN.

Let’s start with a quick refresher on primes. Primes are counting numbers that can only be divided by 1 and themselves. The first prime number is 2. Next, 3 is also a prime number but 4 is not because 4 can be divided by 1, 4 and 2.

Now we can list the primes smaller than 10, they are: 2, 3, 5 and 7.

To begin our code-breaking, let’s test out 2 and 3 as our pair of primes. The numbers 2 and 3 multiplied together make a code number equal to 6. Now focus on the first letter in the garbled message, D, and work backwards 6.

It will help to write out the letters of the alphabet in order:
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Starting at D and counting back 3 letters brings us to A and then we wrap around to the end of the alphabet and go back an additional 3, bringing us to X. That’s an unlikely letter to start our message but just to be sure, we’ll check the next letter, R: counting back 6 letters gets us to L. X and L don’t make a word so we need to try another pair of primes.

Next, try 2 and 5, which multiplied together make 10. Going back 10 converts the garbled DRO to THE, a very promising start! Keep going with the rest of the message!

This kind of code is called a Caeser cipher, and you can make your own decoder here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By submitting this form, you give CSIRO permission to publish your comments on our websites. Please make sure the comments are your own. For more information please see our terms and conditions.

Why choose the Double Helix magazine for your students?

Perfect for ages 8 – 14

Developed by experienced editors

Engaging and motivating

*84% of readers are more interested in science

Engaging students voice