CS 4953 -- Cryptography, Spring 2003
Homework 1
Due: Monday, 10 February 2002

 

 


The homework set, like the lectures, is based on the online lecture notes at the course web page: CS 4363, Spring 2003.

  1. Exclusive-Or:

    Problems 1 through 5 at the end of Chapter 1. (For Problem 2, just do one of the two ways.)

  2. Logarithms:

    1. Problems 6 and 7 at the end of Chapter 1.

    2. RSA laboratories recommends RSA keys with 1024 bits for corporate use, and with 2048 bits for the most valuable keys. Approximately how many decimal digits would a 2048-bit number be if converted to base 10?

  3. The integers mod n, Zn as a group:

    1. Consider n = 10, the integers mod 10. Use ordinary addition, followed by remainder on division by 10. Give an array rev of length 10 so that rev[i] is the inverse of i, that is, rev[i] + i is the identity of the group.

  4. Entropy:

      Suppose messages X = {X1, X2, X3, X4} have probabilities p(X1) = 3/5, p(X2) = 1/5, p(X3) = 1/10, and p(X1) = 1/10.

    1. Find the entropy in this case.
    2. Use the Huffman algorithm to find an optimal code and calculate the average code length.
    3. Compare the two answers.

  5. Error correcting codes:

    1. Consider the following 2 source words and corresponding code words:

      Source
      word
      Code
      word
      0000000
      1111111

      1. Which of the simple codes that we discussed is this?
      2. How do you encode the message: "010010"?
      3. What is the expansion factor?
      4. What is the Hamming distance between the code words?
      5. How many simultaneous bit errors in a code word can be corrected with this code?

    2. The following code is essentially the same, just handling 2 source bits at a time:

      Source
      word
      Code
      word
      00000000 000000
      01000000 111111
      10111111 000000
      11111111 111111

      1. How do you encode the message: "010010"?
      2. What is the expansion factor?

    3. Here is another example with 4 source words and corresponding code words:

      Source
      word
      Code
      word
      00000 000 000 000
      01011 011 011 011
      10101 101 101 101
      11110 110 110 110

      1. How do you encode the message: "010010"?
      2. What is the expansion factor?
      3. What is the Hamming distance between the code words?
      4. How many simultaneous bit errors in a code word can be corrected with this code?

  6. ISBN Decimal Error Detection:

      Look up this topic in Chapter 7.

    1. Grab any random book. (Try not to have duplicates in the class, please.) Use the ISBN check and verify that the check digit is correctly calculated. (That is, just verify that the check equation is true.)

  7. Verhoeff's Decimal Error Detection:

    1. Use the Dihedral group as described in Chapter 8 about Verhoeff's scheme. Verify that associativity holds for the three numbers 6, 3, and 8 that is, verify that (6 # 3) # 8 = 6 # (3 # 8).

    2. Verify that the group is not commutative by finding two numbers that give different results when combined in opposite order.

    3. Give the inverse of each element. (The inverse of x is an element y such that x # y = 0.) Where is this inverse given in the code for Verhoeff's scheme in Section 8.3?

    4. Work out by hand what the values of row number 2 of the array F are, that is, determine by hand the values F[2][j], for j = 0 to 9 (inclusive). (Show your work!)


Revision date: 2002-01-29. (Please use ISO 8601, the International Standard.)