Modern ciphers use the power of computing to provide message secrecy, message integrity (the message has not been changed) and sender
authentication (the sender is who he claims to be). This is all provided without the need to exchange secret keys or have specialized cipher
The basis for modern ciphers is the one-way mathematical function of factoring large prime numbers. The idea is that multiplying two large prime
numbers is simple with computers, but finding the prime factors of a very large number is not practical. There is no known algorithm for finding
such factors, so the only method now available is brute force. As an example, using a 128 bit key, there are 3.8 X 1036 prime numbers that
can be represented. If you could check one trillion of these numbers per second on a computer, and use 10 million computers in parallel, it
would take the current age of the universe to check that many prime numbers.
For those interested in how public key encryption works, the following will be a simplified example. Let's say Alice wants to send a message
to Bob. Bob has two large prime numbers multiplied together, but we will use small primes for illustration, p=5 and q=7. So the product,
N= 5 X 7 = 35. Bob also calculates a number e which is relatively prime to (p-1)(q-1) or e is relatively prime to 4 X 6 = 24. Let's pick
e=7. He also calculates d, where e X d = 1 (mod (p-1)(q-1)). In this case d=7, since 7 X 7 = 49 (mod 24) = 1.
Bob's public key is (N,e) or (35,7), his private key is (N,d).
Now the message Alice wants to send is also simple for illustration, it is the letter "M", which can be translated to the 13th letter of
the alphabet, or "13".
The cipher message Alice sends is C = Pe (mod N), the plaintext is calculated as P = Cd (mod N).
C = Pe (mod N)
using the public key of N=35 and e=7, Alice calculates:
C = 137 (mod 35) = 62,748,517 (mod 35) = 27
Alice sends Bob the message "27"
Now Bob must decipher the message from Alice.
P = Cd (mod N) = 277 (mod 35) = 10,460,353,203 (mod 35) = 13 = M
Of course, the real calculations would be with extremely large numbers and would be accomplished without Bob or Alice aware of the calculations
going on inside their computers.
As computer speeds increase, the key can also be increased. The only way to break this cipher is to find some way to mathematically factor a
large number or to have massively parallel computing, for example with quantum or DNA computers. So for now the coders have the advantage.
See the Entire Collection of Cipher Machines
See detailed pictures of the Modern Cipher equipment