Number theory app 1

Number theory giving you sleepless nights?

Nap1

Nap1 is a number theory application with a special focus on encryption. It uses the inner workings of the RSA Cryptosystem to introduce important number theory topics, trying to make the whole learning experience interesting without backing away from advanced concepts.

  • modulus
  • congruence
  • prime numbers
  • GCD
  • Euclidean algorithm
  • extended Euclidean algorithm
  • linear congruence theorem
  • modular multiplicative inverses
  • congruent powers
  • congruent roots
  • Chinese remainder theorem
  • Fermat’s little theorem
  • Euler’s φ
  • Garner’s formula

Encryption

Nap1 applies the number theory concepts to illustrate how the RSA Cryptosystem works. It allows for simple messages to be encrypted and decrypted and shows in detail how the cryptographic calculations are performed.

Users can select from a large number of predefined RSA keys or can enter their own keys.

Audience

Nap1 is the perfect companion to number theory students or to those who wish to understand the mathematics behind modern day encryption techniques.

Nap1 also includes a powerful arbitrary precision calculator and is a lot of fun to play with. Students will have lots of fun performing calculations such as

2^2^16

which has nearly 20,000 digits! Even small children love to play with Nap1 and find especially the encrypting and decrypting of messages entertaining.

History

Nap1 was born in a South African mathematics club. The following gives a brief overview of how that happened. It was written by Dr Danie Brink.

I am a South African number theory enthusiast who teaches some of the principles of number theory to high school students in South Africa. I do this at a math club in the afternoon in Pretoria, South Africa. The math club is an extramural activity for students who are talented at mathematics and who like to do math just for the fun of it.

At math club, we look at modular arithmetic and congruence, Fermat’s Little Theorem, Euler’s Formula, the Euler Phi-function, the Euclidean algorithm and consecutive squaring. The highlight of the course is where we combine these skills and use them to encrypt messages using the RSA algorithm.

The culmination of the course happens when I publish a secret message on the Internet at a specific time. Students have to access the Internet at this time, from the comforts of their own homes, and use their number theory skills and knowledge of the RSA method to decrypt the message. When they have successfully decrypted the secret message, they text this message to my phone. Students also have to take pictures of all their work and send that to me – we do this so that we can verify that no other tools, other than paper, pencil and a basic calculator has been used to do the math. I sit at home and verify the message and declare a winner. I am currently busy with the fifth course and students are loving it every time.

Last year, I invited adults to take part and this is where I met MG Ferreira, a very clever mathematician. MG quickly caught on to the course and was soon writing programs to do the encryption and decryption at the click of a button. We had breakfast together and decided to write a number theory app. That day was the start of the very difficult birth of the world’s best (and by all accounts, first) number theory app, called NAP1.