Today: Secret sharing and block ciphers

Shamir's secret sharing

Problem: Don't want to put trust in a single person.

If you haveN = 3, then t = 2 parties are sufficient to sign a document, spend money, etc.

Notion: Threshold capability

Say Alice has a secret S and a number of friends she wants to distribute shares of the secret S to t friends, 1 <= t <= n

For t=1 the problem is trivial: s_i = S, \forall i.

For t=n the problem is trivial: s_i = ith chunk of S + would not be that secure, because n-1 people can guess the last chunk more easily (not negligible probability. + S = s_1 \xor s_2 \xor ... \xor s_{n-1} \xor s_{n} - result is random if you don't have all s_i's - need all people to generate S

For other t's, use polynomials.

To share a secret S (0 <= s < p)

Now, let's see how t out of the n friends can reconstruct S.

TODO: Why does this work?

Why having fewer than t shares doesn't allow you to reconstruct the secret?

Block ciphers

            c = Enc(K, M)
    Alice -------------*---------------------------> Bob
                        \
                         \-> Eve

Problem: Message could be arbitrarily long. How do you build an encryption method to handle arbitrarily large messages?

Fixed length P, C, K:

DES (Data Encryption Standard)

Call put out for commercially usable data ciphers. DES came from IBM.

m = L_0|R_0

               L_0                  R_0
        -----------------     ------------------
        |               |     |                |
        -----------------     ------------------
               |                      |
               |                      |
 round 1       +----------|f|----------
               |            \----------------- k_i round key 48 bits
                \                    /       
                 \                  /
                  \                /
                    swap for next 
                       round
                         \   /
                          \ /
                          / \ 
                         /   \
                        /     \
                       /       \ 
                      /         \
 round 16
               L_15                  R_15
        -----------------     ------------------
        |               |     |                |
        -----------------     ------------------

f can be anything, and won't affect the invertibility of the cipher if you have the key.

How do you design a good f box that doesn't leak K and P?

Differential attacks: 2^47 attack

You can try tweaking the input plaintext and see what tweaks are caused on the output ciphertext.

M' = M \xor \delta, ask oracle to encrypt M -> C and M' -> C' = C + \gamma.

At a high level: The differences between delta and gamma give you some information about the last round key.

This requires about 2^47 chosen pairs

Biham's PhD thesis, advised by Adi Shamir

2^43 attack (Matsui)

                        p
                        |
                       \ /
                        *
                    -----------
         Key K ---> |   Enc   |
                    -----------
                        |
                       \ /
                        .
                        C

Could be that DES has attacks like: M_3 \xor M_15 \xor C_2 \xor C_11 \xor K_7 \xor K_19 = 0. This relates two bits of the key because you know the message and ciphertext bits.

In practice, these kind of equations are not always true. Maybe they're true like half the time: p = 1/2 + \epsilon

Need 1/\epsilon^2 data points to solve equations like these.

AES (Advanced Encryption Standard), 1997-1999

Open public contest to design a cipher. Submit designs, attack them. Let the best win. International too, anyone in the world could submit.

Specs:

Basic structure is a 4 by 4 array/matrix of bytes, where each entry is 1 bytes => 16 bytes => 128 bits

AES description

  1. Derive 11 round keys of 128 bits from 128 bit key (k_i's)
  2. Given M to encrypt represent it as 4x4x8 matrix
  3. Collection of rounds: for each round r = 1, 2, ..., 10
  4. Final round replaces mixed column operation by another round key operation

Note: side channel attacks on S-box

                   L_0                   R_0
            -----------------     ------------------
            |               |     |                |
            -----------------     ------------------
                   |                      |
                   |                      |
     round 1       +----------|f|----------
                   |            \----------------- k_i round key 48 bits
                    \                    /       
                     \                  /
                      \                /
                        swap for next 
                           round
                             \   /
                              \ /
                              / \ 
                             /   \
                            /     \
                           /       \ 
                          /         \
     round 16
                   L_15                  R_15
            -----------------     ------------------
            |               |     |                |
            -----------------     ------------------