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

Encryption (10/08/02)

ECB mode (electronic code book)

        p_i   (plaintext chunk i)
        
         |
         |
         v
         
      [ E_k ]  (encryption with key k)
      
         |
        c_i    (ciphertext chunk i)

ith block of plaintext goes to ith block of ciphertext

This is bad for various reasons (see prev. lecture)

CBC mode (Cipher block chaining)

Used in practice

                 p_i
        
                  |
                  v   
     c_(i-1) -> [XOR]    |-----> ...
                  |      |
(prev ciphertext) |      |
                  v      |
               [ E_k ]   |
                         |
                  |      |
                  |------- 
                  |
                  v
                  
                  c_i  (ciphertext i)

Method

Types of encryption

"Secret-key" or "symmetric key"

"Asymmetric key" or "public key"

Public key ciphers/encryption

Invented 1976, Diffie and Hellman. Showed it would be useful.

RSA (Rivest Shamir Adelman) Algorithm

To generate keys

Encryption/decryption of x

"It works" theorem: For all x, E( D(x) ) = D ( E(x) ) = x

     x^(de) mod N = x^(ed)mod N 
                  = x^(k * (p-1)(q-1) + 1) mod N 
                  = x * x^(k * (p-1)(q-1) ) mod N 

                    [ Note that e*d mod (p-1)(q-1) = 1                ]
                    [ So, e*d = 1 + k * (p-1)(q-1) for some k         ]
                    [ x^(k*(p-1)(q-1) ) drops out (=1, not sure why), ]
                      so left with                                    ] 
                      
                   = x mod N 

Note: x (the data we are encrypting, as an integer) can't be > N

Why secure (probably)

Really slow

Common mode of use

Public-key Applications

"Your eyes only" message

Verifiable message/digital signature

Both of above (private and verifiable message)

Diagram:

                     [msg]
           |-- Alice's digital sig--|
       |-------- Bob's public key encryption ----|

Digital Signatures

Ideas

RSA Signatures

First approach

Beware "gotchas"

Hybrid encryption ("cryptographic envelope")

Method for encrypting long msg in a public-key fashion

Example

           [ k_r ]                  [ message ]
      protected by public key     protected by k_r