Crypto: HW 8            Fall 2001            Michael Siff      

Read the handout given in class on Thursday (10/18) before class on Monday (10/22).
The problems below are due Thursday, October 25.

    Navajo Code Talkers

  1. Do you think that in this day and age, if the need arose, a successful cryptosystem could be developed based on a little-spoken language much like the system of the Navajo Code Talkers? In a clear and concise paragraph or two, explain why or why not.


    Algorithms and complexity

    For the following problems, you may assume that addition, subtraction, multiplication, division, and mod are all primitive operations. Write your algorithms using the notation used in class, in the notes, and on previous assignments.

  2. Write an algorithm to convert Fahrenheit to Celsius. That is, it should take in as input some number that represents a Fahrenheit temperature and, after doing some calculation, output a number that is an equivalent temperature expressed in Celsius.

  3. Write an algorithm that takes as input a positive number n and computes (and outputs) the factorial of n (that is the product of 1 * 2 * 3 ... * n). Is the time complexity of your algorithm sublinear, linear, or superlinear compared to the size (not the value) of n?

  4. Write an algorithm that takes as input two positive numbers a and b and computes (and outputs) a raised to the b power. Is the time complexity of your algorithm sublinear, linear, or superlinear compared to the size of a? Is the time complexity of your algorithm sublinear, linear, or superlinear compared to the size of b?

  5. Recall, a number is prime if there are no numbers other than one and itself that divide into it evenly (i.e., without remainder). For example, 2, 3, 5, 7, 11, 13, and 37 are all prime. 6, 15, 21, and 39 are not. Write an algorithm that takes as input a positive number n and computes whether or not n is prime. If n is prime it should output 1, otherwise it should output 0. Is the time complexity of your algorithm sublinear, linear, or superlinear compared to the size of n?

  6. The greatest common divisor (gcd) of two positive numbers a and b is the largest number that divides evenly into both a and b. For example, the gcd(21,15) is 3 since 21/3 has no remainder and 15/3 has no remainder, but there is no larger number than 3 that divides evenly into 21 and 15. Write an algorithm that takes as input two positive numbers a and b and computes (and outputs) the greatest common divisor of a and b. Is the time complexity of your algorithm sublinear, linear, or superlinear compared to the size of a?


    DES

  7. What are some pros and cons of having a cryptographic standard?

  8. Some people argue that 56-bit keys (for DES) are not all that secure because governmental agencies prefer it that way. Explain why this might be the case. Do you think this is good or bad?


    A Feistel cipher

    Consider a Feistel Cipher as described in class where the function F just takes the exclusive-or of the bits in the right half of the input (R) with the key that corresponds to that round. Remember the exclusive-or of two bits is the same as addition (or subtraction!) modulo 2. The exclusive-or of two equal-length binary numbers is simply the "bit-wise" exclusive-or of each of the bits as in:

          10111011
      xor 01110010
      ------------
          11001001
    

  9. Using 4 rounds, a block size of 4 bits, and the key 01000111, show the process and the result of encrypting the input 1011 using Feistel.


crypto home assignments labs notes tools contact instructor