cis 428/628 - introduction to cryptography - spring 2009

background for quiz 2


i. terminology

Be able to define and give an example of the following terms. Each term is in the index of either Lewand or Trappe and Washington.
  1. asymmetric cryptosystem
  2. birthday attack
  3. bit commitment
  4. cipher block chaining
  5. cipher block feed back
  6. Chinese Remainder Theorem
  7. chosen plaintext attack
  8. collision-free
  9. congruence class
  10. discrete log
  11. double encryption
  12. electronic codebook
  13. Euler's Theorem
  14. Euler's phi function
  15. extended g.c.d.
  16. existential forgery
  17. Fermat's Little Lemma
  18. finite field
  19. hash function
  20. index of coincidence
  21. message digest
  22. one-time pad
  23. one-way function
  24. prime number theorem
  25. primitive root
  26. pseudoprime
  27. RSA signature

ii. number theory

The themes of this part of the quiz will be: Euler's Theorem, Fermat's Little Lemma, and RSA.

Here are some sample problems.

  1. Suppose p is a prime and a and b are numbers such that a * b == 0 (mod p). Show that a == 0 (mod p) or b == 0 (mod p).

  2. Suppose p is an odd prime. Show that the only solutions to x2 == 1 (mod p) are 1 and p-1. (Hint: consider (x+1)(x-1) == 0 (mod p) and use the previous problem.)

  3. Let p be a prime. Show that ap == a (mod p) for all a.

  4. Andrews exercise 5 on page 64.

  5. Andrews exercise 6 on page 64.

  6. Andrews exercise 8 on page 64.

  7. Suppose Alice's public RSA key is (n,e). Also suppose that instead of choosing n=p*q (where p and q are prime), Alice goofs and chooses n = p (where p is some prime). Show that Eve can easily decrypt Alice's messages.

questions from a previous year's quiz 2


Problem 1 (9 points)

Define and give an example of each of the following. (A one or two sentence definition is enough and a small example suffices.)

a. birthday attack

b. discrete log

c. message digest

[show answer]


Problem 2 (3 points)

Evaluate 21415926202003 (mod 11).

[show answer]


Problem 3 (8 points)

Do two of the following three problems. If you work all three, indicate the ones you want graded.
  1. (4 points) Show that ap-2 = a-1 (mod p), where p is an odd prime.
  2. (4 points) Show that n5 and n have the same ending decimal digit, where n>0.
  3. (4 points) Suppose (n,p,q,e,d) is Alice's RSA key, so
    encryptA(m) = me (mod n)
    is Alice's public encryption function. Show that
    encryptA( (m1 * m2) mod n )   ≡   (encryptA(m1)*encryptA(m2))   (mod n).
    for every m1 and m2 in Zn*.

[show answer]


number theory and crypto facts given on the quiz


The binomial theorem. For n>0 and x,y in Z:

(x+y)n = xn + C(n,1) * xn-1y1 + C(n,2) * xn-2y2 + … + C(n,n-1) * x1yn-1 + yn,

where C(n,k) = n!/(k!*(n-k)!).

Theorem. For each a,b>0 we have that gcd(a,b) = min {xa+yb | x,y in Z & xa+yb>0 }.

Fermat's little lemma. Suppose p is a prime. Then for each integer a,   ap-1 ≅ 1 (mod p).

Euler's theorem. Suppose n>1. Then for each a in Zn*,   aphi(n) ≅ 1 (mod n).

Euler's corollary. Suppose n=p * q, where p and q are distinct primes. Then, for each integer a,   aphi(n)+1 ≅ a (mod n).

The multiplication table for Z11*.

  *    1    2    3    4    5    6    7    8    9   10
  1    1    2    3    4    5    6    7    8    9   10
  2    2    4    6    8   10    1    3    5    7    9
  3    3    6    9    1    4    7   10    2    5    8
  4    4    8    1    5    9    2    6   10    3    7
  5    5   10    4    9    3    8    2    7    1    6
  6    6    1    7    2    8    3    9    4   10    5
  7    7    3   10    6    2    9    5    1    8    4
  8    8    5    2   10    7    4    1    9    6    3
  9    9    7    5    3    1   10    8    6    4    2
 10   10    9    8    7    6    5    4    3    2    1

Some values of phi(n)

  n       1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16 
  phi(n)  1  1  2  2  4  2  6  4  6   4  10   4  12   6   8   8

The RSA algorithm: Each user does the following.

A user with key (n,p,q,e,d) has the following encryption and decryption functions:
encrypt(m) = me (mod n) [public]
decrypt(c) = cd (mod n) [private]
where c,m in Zn*.
back to the course home page
Jim Royer /