CS 772

Assignment #2

Due Midnight, Thursday Oct. 16, 2008

Show all your results in HEX.

 

I.                 Show the result of  TWICE  applying the Initial Permutation (IP) of DES to the following input data block:

 

FFFF      FFFF      0000       0000.

 

II.     Suppose DES mangler function mapped every 32-bit value to 0,

        Show the  cipher corresponding to the following input block:

 

AAAA    AAAA    AAAA    AAAA.

 

 

III.         Show the result of the first round of:

 

1.   DES

2.   IDEA

3.   AES-128

 

 if both the key and the input data block are all 0s.

 

  VI.     Consider the following alternative method for encrypting a message:

    To encrypt a message use the algorithm for doing a  CBC  decrypt   (Figure 4.6).

    To decrypt a message, use the algorithm for doing a CBC  encrypt   (Figure 4.5).

 

1. Would this work?

2.   What are the security implications of this, if any, as compared with the “normal” CBC?

 

 

    V.     In DES, a key K is called a weak key if for any message m: K{m} = K[m]
            i.e., encrypting m with K is the same as decrypting m with K.
            For example in DES a weak key  is either:

·         all 1s 

·         all 0s 

·         half 0s and half 1s

·         half 1s and half 0s

Assume a weak key is used in the Output Feedback Mode (OFB), describe the relationship between the resulting cipher blocks if  the input data to be encrypted is all 1s.

 

VI.    Message Digest can be used for encryption as described in generating one time pad.

         Use your Unix login name (e.g., wahab)  to generate a one time pad of length 160 bytes based on md2.

         For example, the pad corresponding to user “wahab” is wahab_pad

 

              

 

 

 

Submit your answer as follows:

(it is the same steps as A1, but you will not submit your  <login>PublicKey since it is already available)

 

1.    Choose a password  and store it in a file called: symPasswd.txt,

encrypt the file  using  cs772 PublicKey,

encode the result to base-64 and store it in a file called  symPasswd.base64

 

2.    Let A2.zip be the  zip file containing the relevant files of your solution.

For example, if you like to submit files: f1.doc under  the current directory you may use the command:  

% zip   A2.zip  f1.doc

 

  1. Sign the message digest of  A2.zip  using  your private key that corresponds to your public key posted on: PublicKeys. encode the result  to base-64 and store it in a file called: A2ZipMdSignature.base64

  

4.    Encrypt A2.zip using the password stored in symPasswd.txt  and let A2Zip.base64 be the encrypted base64 encoded file.

 

5.    Create one file called   <login>A2Files.zip that contains:

 

 

1.    symPasswd.base64

2.    A2Zip.base64

3.    A2ZipMdSignature.base64

 

1.    Finally, submit  <login>A2Files.zip  to cs772 under the directory Assignment  #2.

 

Important Note:

Please use the names listed above since a shell script  is used to grade the assignment &  it is case and name sensitive.