CMU 15-827 Security and Cryptography Fall 1999

 

Symmetric and Public Key Cryptography


Wing Homework 1 Due: 27 September 1999

 

  1. RSA and DES In Practice

 

  1. Generate RSA moduli of 512 bits and 1024 bits; generate public-private key pairs for both moduli.
  2. Program or copy routines for RSA and DES encryption for the most interesting hardware platforms to which you have access.
  3. Carefully obtain benchmark figures to answer the following questions:

- What is the throughput of the routines?

For RSA, find these benchmarks figures for both sizes of moduli.

 

  1. What can you do to speed up the performance of your routines on your chosen hardware platforms? Describe improvements, and when feasible, implement them and remeasure.

 

  1. n-DES key space

 

We have discussed the use of triple-DES to increase the key search size (under a known plaintext attack) to 2112. What is the minimum key search space that you can discover (using meet-in-the-middle attacks) if you use quadruple-DES? k-independent invocations of DES?

 

3. Breaking DES

 

Triple-DES is normally preferred to double-DES since the latter is vulnerable to a meet-in-the-middle attack. The EFF’s "Deep Crack" custom key-search machine found a 56-bit single-DES key from a single plaintext/ciphertext pair in under 56 hours. What challenges would the makers of "Deep Crack" face if they wanted to modify it to do the meet-in-the-middle attack?

 

  1. Message Authentication Codes

 

Alice and Bob share a secret key k. Bob wants an assurance that the messages he receives are really coming from Alice. In order to obtain this assurance Alice sends the message m and a MAC along with it MACk(m). We say that a MAC is secure against chosen message attack if attacker Eve, after requesting the MAC MACk(mi) of n messages of her choice m1, …., mn will not be able to produce a new message m =/= mi and a valid MACk(m).

 

Let CBC-MAC be a way of implementing MACs using symmetric encryption. Let

 

fk : {0, 1}l -> {0,1}l

 

be an encryption function with key k (e.g., with l = 64, f could be DES). Let m be a message of length bl bits.

 

m = m1 o … o mb

 

where o denotes concatenation and mi is a block of length l bits. The MAC of m is computed using the cipher f in CBC mode:

 

MACk(m) = fk ( fk(… fk( fk (m1) XOR m2) XOR … mb-1) XOR mb)

 

  1. Show that the CBC-MAC does not support variable length input. That is, show that if messages have variable length it is possible to devise a chosen message attack.
  2. Suppose the length of the messages is always smaller than 2l. An attempt to get around the above problem would be to append the length of the message at the end as an extra block, before computing the MAC. Show that it is still possible to mount an effective chosen message attack.

 

 

  1. Protocol Failure Involving RSA
  2.  

    Remember that an RSA public-key is a pair (n, e) where n is the product of two primes.

     

    RSA(n, e)(m) = me mod n

     

    Assume that three users in a network, Alice, Bob,and Carol use RSA public-keys (nA, 3), (nB, 3), and (nC, 3), respectively. Suppose David wants to send the same message m to the three of them. So David computes

    yA = m3 mod nA, yB = m3 mod nB, yC = m3 mod nC

     

    and sends the ciphertexts to the respective users. Show how an eavesdropper Eve can now compute the message m even without knowing any of the secret keys of Alice, Bob, and Carol.

     

     

  3. Perfect Forward Secrecy
  4.  

    Suppose two parties Alice and Bob want to communicate privately. They both hold public keys in the traditional Diffie-Hellman model. An eavesdropper Eve stores all the encrypted messages between them and one day she manages to break into Alice’s and Bob’s computers and find their secret keys, corresponding to their public keys.

     

    Show using only public-key cryptography that we can achieve perfect forward secrecy, i.e., Eve will not be able to gain any knowledge about the messages Alice and Bob exchanged before the disclosure of the secret keys.

     

  5. Secret Sharing

 

Consider a generic Secret Sharing scheme. A dealer D wants to share a secret s between n trustees so that no t of them have any information about s, but t+1 can reconstruct the secret. Let si be the share of trustee si. Let v denote the number of possible values that s might have, and let w denote the number of different possible share values that a given trustee might receive, as s is varied. (Let’s assume that w is the same for each trustee.)

 

  1. Argue that w > v for any Secret Sharing Scheme. (It then follows that the number of bits needed to represent a share cannot be smaller than the number of bits needed to represent the secret itself.)
  2. Dishonest trustees can prevent the reconstruction of the secret by contributing bad shares si =/= si. Using the cryptographic tools you have seen in class, show how to prevent this denial of service attack. There are many possible solutions to this question. State your assumptions clearly and state how strong (computionally secure vs. unconditional secure) your solution is.

 

 

8. Calculating A Secret

 

Suppose we have a group of employees and we want to calculate their average salary without any one employee having to reveal his or her salary to the group. Explain how to use Shamir’s secret sharing scheme to solve this problem. Describe a simpler method that does not use secret sharing.

 

 

 

 

 

  1. Elliptic curves and ElGamal
  2.  

    Show how to use elliptic curves to implement ElGamal’s encryption/decryption scheme.

     

  3. Blum Integers and Coin Flipping

 

Use Blum integers to solve the remote coin flipping problem.