Number Theory and Algebra

Prev: Online Algorithms

Problems

14.1

Prove Theorem 14.2 by giving a detailed description of the extended Euclidean algorithm and its analysis. To prove a polynomial time bound for this algorithm, you will need to argue that the lengths of the operands in the intermediate computations are suitably bounded.


14.2

Show how to compute multiplicative inverses modulo a prime via a single exponentiation. Does this work modulo composite ?


14.3

Show that given any number and , the prime factorization of can be computed by a randomized polynomial time algorithm.


14.4

Devise a randomized polynomial time algorithm for factoring a number that is the product of two primes, given that some multiple of is also provided as a part of the input. Can you generalize this to arbitrary ?


14.5

Show that for any odd prime , the set is exactly the set of all quadratic residues modulo .


14.6

Let be a quadratic residue modulo . Show that

  • for , has one square root modulo ;
  • for , has two square roots modulo ;
  • for , has four square roots modulo .

14.7

Generalize Theorem 14.19 to allow the possibility of even numbers. (Hint: Use Problem 14.6.)


14.8

(a) Show that for any odd with distinct prime factors, the number of quadratic residues in is .

(b) Using Problem 14.7, generalize this to the case of even .

(c) Can these observations be used to devise a randomized algorithm for finding a quadratic non-residue modulo ?


14.9

Due to M.O. Rabin [346].

Consider the Rabin cryptosystem with such that and .

(a) Prove that for all the Jacobi symbols satisfy .

(b) Using this observation and Exercise 14.12, show that we can choose the messages to lie in a subset of such that there is a canonical way to determine the message from among the four square roots of its square modulo .


14.10

Let have the prime factorization , where each is an odd prime.

(a) Show that is a Carmichael number if and only if

for .

(b) Conclude that the Carmichael numbers can be characterized as products of distinct primes

such that for each , .


14.11

(a) Prove all the properties of the Jacobi symbol provided in Theorem 14.29.

(b) Using these properties, devise a polynomial time algorithm for computing without knowing the prime factorization of or .


14.12

We have seen how to test if a number is prime. In several applications, it is necessary to pick large prime numbers at random. For example, in the RSA scheme Alice must have two large primes and , but she would like to choose them randomly since they are to be kept secret. Suggest a randomized algorithm for generating a random bit length prime. Analyze the expected time to generate such a prime. (Hint: Refer to the Prime Number Theorem described in Section 7.4.)


14.13

Suppose you are given an algorithm for computing square roots modulo a prime number. Using this algorithm as a blackbox, design an efficient randomized (RP) algorithm for compositeness. (Hint: The idea is to choose a random element , and run algorithm on . If fails to find a square root, then is not a prime. On the other hand, if finds a square root other than , then again is not a prime.)


14.14

Due to M.O. Rabin [341,342].

Show that when the input is a Carmichael number, Algorithm Primality3 will return PRIME with probability at most . (Hint: Use the characterization of Carmichael numbers described in Problem 14.10.)