Network Security (Spring 2007) Homework 3

This homework is due at the beginning of class on 3/6, 2007. There are ten paper-and-pencil problems and one programming problem.

  1. 5.3. (8 pts.)
  2. 5.4. (8 pts.)
  3. 5.6. (8 pts.)
  4. 5.14. (8 pts.)
  5. 6.1. (8 pts.)
  6. 6.3. (8 pts.)
  7. 6.4. (8 pts.)
  8. 6.7. (8 pts.)
  9. 6.8. (8 pts.)
  10. 6.11. (8 pts.)

  11. Implement a C(++) or Java program that computes exponents efficiently, using the mechanism described in the textbook. Your program should be able to deal with exponents of up to 32 bits and modulo value of up to 32 bits. Make use of the long long 64-bit arithmetic found on most modern machines. Your program should take base, exponent and modulus as arguments, such as
      exp 45678 123 6789
    
    Hints: use strtoll() for conversion from text to binary and printf("%llu",...) for printing. (20 pts.)

Submission guidelines: