Saturday, September 09, 2006

Sharing a secret

When you can't trust the messenger how do you share a secret with someone? This is a key problem in modern cryptography. You are faced with the same problem as thin king and fat king. For the kings there exist an elegant solution.
  • Thin king first applies his padlock to the chest.
  • When fat king receives the chest he can't open it because he don't have the key to the padlock. So he applies a padlock of his own to the chest and sends it back with the messenger.
  • When thin king receives the chest he removes his own padlock and sends the chest back to fat king.
  • Now fat king only has to remove his own padlock from the chest.

In modern cryptography you have to solve the same problem but in the binary world of the Internet. Luckily there exist a mathematical counterpart to the chest and padlock concept. It is called the discrete logarithm problem. If you want to send a secret number to someone on the Internet you can apply a 'padlock' to that number that only you can remove. You apply this padlock by taking the secret number and calculating the discrete exponentiation using your secret key number as the exponent. If you choose large enough numbers no one but yourself can undo this operation and find the secret number because there are just too many solutions to the discrete logarithm.

No comments: