home | articles | links | fun | about
Up to: CS432 Information Security

Key Management (10/10/02)

Review until now

Key management: hard part of crypto

Assume key's vulnerability increases ...

Other principles

What if don't use MAC, just encrypt msg and Hash(msg)?

        [ msg   H(msg) ]      (encrypted)
        
        [ msg XOR R1    H(msg) XOR R2 ]
        
        [ msg' XOR R1   H(msg') XOR R2 ]

XOR-based crypto

Key exchange/agreement

How to agree on shared secret key? Can use one key to generate more.

Diffie-Hellman alg. for key agreement

Method

      Alice                               Bob
       <----- agree publicly on p, g ----->
      
     choose random a                    choose random b
     
     compute g^a mod p,                 computer g^b mod p
       send to Bob ------->         <----  send to Alice
    compute (g^b mod p)^a             compute (g^a mod p)^b
      = g^ba mod p                      = g^ab mod p
      
      <==== two sides equal! shared secret g^ab mod p =====>

Adversary would have to solve DLP to get a or b.

D-H subject to man-in-the-middle attack

Example: play chess vs. 2 grandmasters... they carry on conversations, you do their moves. Play black on one side, white on the other

Setup:

      GM Bob: black    Me: black
        [ ]              [ ]   
       
       Me: white       GM Alice: white

I play 2 games, use moves of GM Bob against Alice, and vice versa. I can play like a grandmaster!

In terms of crypto...

     Alice                       Zeke                       Bob
      sends a --->                                     <---- sends b
                      <----- intercept a, send z1
                                      
                             intercept b, send z2 --->
      
     <== shared secret g^az1 ====>         <== shared secret g^az2 ==>  

Zeke can read/change messages.

Offline D-H

Can bob figure out a? No! Divide g^ab mod p by g^b mod p, just gives you g^a mod p, which was sent.

Public Key Infrastructure (PKI)

Mechanism for verifying public keys

Two types of PKI

Centralized

Web of trust (decentralized)

PKI always "just around the corner"

Revocation