Key Terms, Review Questions, and Problems

Một phần của tài liệu Cryptography and network security 4th edition 2005 william stalling (Trang 171 - 177)

Key Terms

abelian group associative coefficient set commutative commutative ring cyclic group divisor

Euclidean algorithm field

finite group finite ring finite field generator

greatest common divisor group

identity element infinite group infinite ring infinite field integral domain inverse element irreducible polynomial modular arithmetic

modular polynomial arithmetic modulo operator

modulus

monic polynomial order

polynomial

polynomial arithmetic polynomial ring prime number prime polynomial relatively prime residue

ring

[Page 131]

Review Questions

4.1. Briefly define a group.

4.2. Briefly define a ring.

4.3. Briefly define a field.

4.4. What does it mean to say that b is a divisor of a?

4.5. What is the difference between modular arithmetic and ordinary arithmetic?

4.6. List three classes of polynomial arithmetic.

Problems

4.1 For the group Sn of all permutations of n distinct symbols, a. What is the number of elements in Sn?

b. Show that Sn is not abelian for n > 2.

4.2 Does the set of residue classes modulo 3 form a group a. with respect to addition?

b. with respect to multiplication?

4.3 Consider the set S = {a, b} with addition and multiplication defined by the tables:

Is S a ring? Justify your answer.

4.4 Reformulate Equation (4.1), removing the restriction that a is a nonnegative integer. That is, let a be any integer.

4.5 Draw a figure similar to Figure 4.2 for a < 0.

4.6 Find integers x such that a. 5x 4 (mod 3) b. 7x 6 (mod 5) c. 9x 8 (mod 7)

4.7 In this text we assume that the modulus is a positive integer. But the definition of the expression a mod n also makes perfect sense if n is negative. Determine the following:

a. 5 mod 3 b. 5 mod 3 c. 5 mod 3 d. 5 mod 3

4.8 A modulus of 0 does not fit the definition, but is defined by convention as follows: a mod 0 = a. With this definition in mind, what does the following expression mean: a b (mod 0)?

4.9 In Section 4.2, we define the congruence relationship as follows: Two integers a and b are said to be congruent modulo n, if (a mod n) = (b mod n). We then proved that a b (mod n) if n|(a b). Some texts on number theory use this latter relationship as the definition of congruence: Two integers a and b are said to be congruent modulo n, if n|(a b). Using this latter definition as the starting point, prove that if (a mod n) = (b mod n), then n divides (a b).

4.10 What is the smallest positive integer that has exactly k divisors, for 1 k 6?

4.11 Prove the following:

a. a b (mod n) implies b a (mod n)

b. a b (mod n) and b c (mod n) imply a c (mod n)

4.12 Prove the following:

a. [(a mod n) (b mod n)] mod n = (a b) mod n b. [(a mod n) x (b mod n)] mod n = (a x b) mod n

[Page 132]

4.13 Find the multiplicative inverse of each nonzero element in Z5.

4.14 Show that an integer N is congruent modulo 9 to the sum of its decimal digits.

For example, 475 4 + 7 + 5 16 1 + 6 7 (mod 9). This is the basis for the familiar procedure of "casting out 9's" when checking computations in arithmetic.

4.15 a. Determine gcd(24140, 16762).

b. Determine gcd(4655, 12075).

4.16 The purpose of this problem is to set an upper bound on the number of iterations of the Euclidean algorithm.

a. Suppose that m = qn + r with q > 0 and 0 r < n. Show that m/2 > r.

b. Let At be the value of A in the Euclidean algorithm after the ith iteration.

Show that

c. Show that if m, n, and N are integers with 1 m, n, 2N, then the Euclidean algorithm takes at most 2N steps to find gcd(m, n).

4.17 The Euclidean algorithm has been known for over 2000 years and has always been a favorite among number theorists. After these many years, there is now a potential competitor, invented by J. Stein in 1961. Stein's algorithms is as follows. Determine gcd(A, B) with A, B 1.

STEP 1 Set A1 = A, B1 = B, C1 = 1

STEP n 1. If An = Bn stop. gcd(A, B) = AnCn

2. If An and Bn are both even, set An+1 = An/2, Bn+1 = Bn/2, Cn+1

= 2Cn

3. If An is even and Bn is odd, set An+1 = An/2, Bn+1 = Bn, Cn+1 = C

n

4. If An is odd and Bn is even, set An+1 = An, Bn+1 = Bn/2, Cn+1 = C

n

STEP 1 Set A1 = A, B1 = B, C1 = 1

5. If An and Bn are both odd, set An+1 = |An Bn|, Bn + 1 = min(Bn, A

n), Cn+1 = Cn

Continue to step n + 1.

a. To get a feel for the two algorithms, compute gcd(2152, 764) using both the Euclidean and Stein's algorithm.

b. What is the apparent advantage of Stein's algorithm over the Euclidean algorithm?

4.18 a. Show that if Stein's algorithm does not stop before the nth step, then Cn+1 x gcd(An+1, Bn+1) = Cn x gcd(An, Bn)

b. Show that if the algorithm does not stop before step (n 1), then

c. Show that if 1 A, B 2N, then Stein's algorithm takes at most 4N steps to find gcd(m, n). Thus, Stein's algorithm works in roughly the same number of steps as the Euclidean algorithm.

d. Demonstrate that Stein's algorithm does indeed return gcd(A, B).

4.19 Using the extended Euclidean algorithm, find the multiplicative inverse of a. 1234 mod 4321

b. 24140 mod 40902 c. 550 mod 1769

4.20 Develop a set of tables similar to Table 4.3 for GF(5).

4.21 Demonstrate that the set of polynomials whose coefficients form a field is a ring.

4.22 Demonstrate whether each of these statements is true or false for polynomials over a field:

a. The product of monic polynomials is monic.

b. The product of polynomials of degrees m and n has degree m + n c. The sum of polynomials of degrees m and n has degree max[m, n].

[Page 133]

4.23 For polynomial arithmetic with coefficients in Z10, perform the following calculations:

a. (7x + 2) (x2 + 5)

b. (6x2 + x + 3) x (5x2 + 2)

4.24 Determine which of the following are reducible over GF(2):

a. x3 + 1 b. x3 + x2 + 1

c. x4 + 1 (be careful)

4.25 Determine the gcd of the following pairs of polynomials:

a. x3 + x + 1 and x2 + x + 1 over GF(2) b. x3 x + 1 and x2 + 1 over GF(3)

c. x5 + x4 + x3 x2 x + 1 and x3 + x2 + x + 1 over GF(3)

d. x5 + 88x4 + 73x3 + 83x2 + 51x + 67 and x3 + 97x2 + 40x + 38 over GF(101)

4.26 Develop a set of tables similar to Table 4.6 for GF(4) with m(x) = x4 + x + 1.

4.27 Determine the multiplicative inverse of x3 + x + 1 in GF(24), with m(x) = x4 + x + 1.

4.28 Develop a table similar to Table 4.8 for GF(24) with m(x) = x4 + x + 1.

Programming Problems

4.29 Write a simple four-function calculator in GF(24). You may use table lookups for the multiplicative inverses.

4.30 Write a simple four-function calculator in GF(28). You should compute the multiplicative inverses on the fly.

[Page 134]

Một phần của tài liệu Cryptography and network security 4th edition 2005 william stalling (Trang 171 - 177)

Tải bản đầy đủ (PDF)

(837 trang)