Maths matters :: Scrambling and unscrambling a credit card  
         
     

When you visit a website, they have their own clock calculator with N hours on. They tell you to multiply your credit card number together E times (E for encoding) on their N-hour clock calculator. They get the scrambled number CE. How can they unscramble this number?

Fermat’s prime number magic is the key.

Suppose N is a prime number clock. (We shall see that this isn’t quite good enough for a secure code but it will help to see where we are going.) If we multiply the number CE together enough times then C will magically appear again. But how many times must we multiply CE together:

When is (CE)D=C on the clock with p hours?

Of course if ExD=p, this works but p is prime so there can’t be such a number D! But notice that if we keep going then the pattern repeats itself every (p-1)+1,2(p-1)+1,3(p-1)+1 times. So one needs to find a D such that E x D =1 (modulo (p-1)). The trouble is that because E and p are public numbers, it is easy for a hacker also to find the decoding number D.This isn’t safe yet. We must use a discovery made by Euler about clocks with p x q hours on, not just p hours on.

Click here to find out what Euler discovered
 
         

 

 
Home :: Prime importance :: $1,000,000 problem :: Maths matters :: The art of maths Copyright © 2003 Marcus du Sautoy