CS 513 - System Security
Lecture 9

Lecturer: Professor Fred B. Schneider
Notes by: Vicky Weissman
Lecture Date: 2/24/00


Today's Topic - Public Key Cryptography

Goal

To create a shared secret in an environment that does not already have shared secrets.

Examples of Public Key Cryptography Systems

  1. Alice wants to share a secret with Bob
    • Situation:
      • Alice has a box, a lock, and the only key to the lock
      • Bob has a lock and the only key to it
    • Strategy:
      • Alice puts her secret in the box, locks the box, and sends the box to Bob
      • Bob puts his lock on the box (in parallel to hers) and sends the box to Alice
      • Alice removes her lock and sends the box to Bob
      • Bob removes his lock and extracts the secret
    • A lock is a 1-way trapdoor function; it has 2 operations associated with it, lock and unlock. Anyone can perform a lock operation, but unlock is expensive unless you have the key.

  2. Alice and Bob want to share a paint color
    • Situation: Alice and Bob each have a 3-liter paint pot containing a liter of yellow paint
    • Strategy:
      • Alice and Bob pick secret colors, SA and SB respectively
      • Each adds 1 liter of his/her secret color to his/her paint pot
      • They swap pots
      • Each adds a liter of his/her secret color to the pot he/she currently has
    • After following the strategy, both Alice and Bob have a full pot that is 1/3 yellow, 1/3 SA, and 1/3 SB. Anyone who intercepted the pots during the swap has a color that is 1/2 yellow and 1/2 SA and a color that is 1/2 yellow and 1/2 SB. These 2 colors cannot be combined to get the color that Alice and Bob share without first separating the mixed colors (an expensive, if not impossible operation.)

  3. Diffie-Hellman Key Exchange (Bootstrap Protocol)
    • 2 principals want to agree on a key
    • Situation:
      • P is a large (at least 512 bits), publicly known prime number
      • g is a publicly known value that is less than P
        (g has other properties that are not important for this discussion.)
    • Strategy:
      • Alice and Bob pick values, SA and SB respectively
      • Alice calculates TA = (gSA mod P). Bob calculates TB = (gSB mod P).
      • Alice sends TA to Bob. Bob sends TB to Alice
      • Alice and Bob can now calculate the key = (TB)SA = (TA)SB = gSBSA mod p
    • A wiretapper knows TA and TB, but still needs to invert exponentiation in a finite field (hard operation) to discover the key.

    General Framework

    Public key cryptosystems use pairs of keys where 1 key in the pair is public and the other is private (known only to the principal). A message for a particular principal can be encrypted using that principal's public key and later decrypted with the principal's private key. Alternatively, a message could be decrypted with a private key and later encrypted with the corresponding public key to produce the original plaintext. Some public key cryptography schemes allow both operations, while others permit only one of them.

    Applications

    Consider 2 principals, A and B

    Secrecy Protocol: A sends B a message encrypted using B's public key.

    Authentication Protocol: A sends B a random number encrypted with B's public key. B returns the number.
    Since only B knows B's private key, this method of authentication has the property of non-repudiation (identity proof could convince a 3rd party.)

    A Cheaper Hybrid Approach

    Public key cryptography is usually much slower than secret key cryptography. To reduce the cost, public key cryptography is used to distribute a shared key (short message) and the shared key is used to encrypt the message.