A Novel Solution Of Linear Congruences (by Jeffrey F. Gold and Don H. Tucker)

Page 1

Chapter 6

A Novel Solution Of Linear Congruences Proceedings|NCUR IX. (1995), Vol. II, pp. 708{712

Je rey F. Gold Department of Mathematics, Department of Physics University of Utah Salt Lake City, Utah 84112

Don H. Tucker Department of Mathematics University of Utah Salt Lake City, Utah 84112

Introduction

Although the solutions of linear congruences have been of interest for a very long time, they still remain somewhat pedagogically di cult. Because of the importance of linear congruences in elds such as public-key cryptosystems, new and innovative approaches are needed both to attract interest and to make them more accessible. While the potential for new ideas used in future research is di cult to assess, some use may be found here. In this paper, the authors make use of the remodulization method developed in [1] as a vehicle to characterize the conditions under which solutions exist and then determine the solution space. The method is more e cient than those cited in the standard references. This novel approach relates the solution space of mod to the Euler totient function for rather than that cx

a

b

c

1


CHAPTER 6.

2

A NOVEL SOLUTION OF LINEAR CONGRUENCES

of , which allows one to develop an alternative and somewhat more e cient approach to the problem of creating enciphering and deciphering keys in publickey cryptosystems. b

Remodulization De nition 1 If a and b are integers, then a

mod = f b

6

a; a

b; a

62

b; : : :

g

:

The notation , means that is an element of the set . The common terminology is to say that is congruent to modulo . These sets are also frequently called residue classes since they consist of those integers which, upon division by , leave a remainder (residue) of . It is customary to write as the least non-negative residue. x

a mod b

x

a mod b

x

a

b

b

a

a

De nition 2 If a1 ,a2 ,: : : ,an ,b 2 Z, then

[

1 2

a ; a ; : : : ; an

] mod = f 1 mod g[f 2 mod g[1 1 1[f n mod g = b

a

b

a

b

a

b

[f n

i=1

ai

Theorem 1 Suppose a, b, and c 2 Z and c > 0, then a

mod = [ b

Write mod = f

a; a

+

b; : : : ; a

+ ( 0 1)] mod b c

cb :

Proof. a

b

:::

a

0

cb;

a;

a a

0 ( 0 1) c

b;

+ + ( + 1) b;

:::

a

:::

a

:::

a

0

b;

+ ( 0 1) + (2 0 1) c

b;

+ and upon rewriting the columns, mod = f 0 + 0 + ( 0 1) 0 + + ( 0 1) + + + + ( 0 1) + and forming unions on the extended columns, the result follows. a

a

b

:::

a

cb;

cb;

a;

a

cb;

a

c

a

b

a

b;

a

b

b;

cb;

cb;

c

:::

a

c

b

:::

a

c

b;

:::

a

c

b

This process is called remodulization by the factor c.

b;

:::

g

cb;

cb;

:::

g

mod g b

:


CHAPTER 6.

Linear Congruences

cx a mod b, where , where a0 2 f a+cbk gck0=01 .

Theorem 2 A linear congruence unique solution Proof.

3

A NOVEL SOLUTION OF LINEAR CONGRUENCES

x

a

0

( ) = 1,

gcd c; b

has as

mod b

Suppose one has the linear congruence, cx

mod a

b ;

where ( ) = 1 and 0 . (If does not satisfy this requirement, then may be reduced or augmented by some multiple of so that it satis es the condition 0 .) gcd c; b

< c < b

c

c

b

< c < b

Remodulizing

a mod b

cx

by the factor gives

[

c

a; a

+

b; : : : ; a

+ ( 0 1)] mod b c

cb :

Because the set f + + ( 0 1)g forms a complete residue system , there exists an element in this set, call it , which is divisible by . Since [ + + ( 0 1)] mod it is seen that the only solvable linear congruence is a; a

b; : : : ; a

b c

modulo c

d

cx

a; a

b; : : : ; d; : : : ; a

mod

cx

d

b c

c

cb ;

cb :

The remaining linear congruences, cx

[

a; a

+

b; : : : ; d

0

+

b; d

b; : : : ; a

+ ( 0 1)] mod b

c

cb

are not solvable, since in each case the factor c is pairwise relatively prime with the residues f + 0 + + ( 0 1)g, and thus does not divide them. a; a

b; : : : ; d

For the solution

cx

b; d

b c

mod , however, dividing through by the factor , d

cb

cx

or,

b; : : : ; a

c

x

c

mod d

cb

c

c

mod d c

b :

Note that the Euclidean algorithm has not been invoked; all that was necessary to solve this problem was the fact that ( ) = 1. The theorem is illustrated by the following example. gcd c; b


CHAPTER 6.

A NOVEL SOLUTION OF LINEAR CONGRUENCES

Example 1 Suppose 12x 3

7; this reduces to 5 3 3 is divisible by (5 7) = 1.

mod

linear congruence is solvable since 3 mod 7 by the factor 5 gives

x

gcd

;

4

7. This Remodulizing

mod

5 [3 10 17 24 31] mod 5 1 7 x

;

so that

;

;

;

5 10 mod 35 x

is the only possible solution and, upon dividing all three terms by 5, x

2 mod 7

:

Note that the remaining linear congruences 5x [3; 17; 24; 31] mod 35 do not admit any solutions, since in this example gcd(5; 35) = 5 does not divide any element in the set f3; 17; 24; 31g.

Theorem 3 If gcd(c; b) = d and dja, then the linear congruence cx a mod b,

has

d

distinct (incongruent) solutions

modulo b

.

Proof. In the event ( ) = , then must be divisible by , otherwise, the linear congruence will not admit integer solutions. With that in mind, write = 0 , = 0 , and = 0 . If all three terms of the original linear congruence are divided by , 0 0 mod 0 Since ( 0 0 ) = 1, the resulting linear congruence has a solution 0 0. However, the modulus of the original congruence is = 0 ; therefore, by remodulizing the solution 0 0 by the factor one obtains gcd c; b

c

c d a

a d

b

d

a

d

b d

d

c x

a

b

:

gcd c ; b

x

b

x

x

[

mod b

x

mod b

b d

d

0 0 + b0 ; : : : ; x0 + b0 (d 0 1)] mod b0 d :

x ;x

Hence there are distinct (incongruent) solutions to the linear congruence if ( ) = and j . The theorem's utility is demonstrated by the following: d

cx

a mod b

modulo b

gcd c; b

d

d a

Example 2 Suppose 6x 9 mod 15. Dividing through by the common factor 3, 2x 3 mod 5. This new linear congruence is solvable because 3 is divisible by gcd(2; 5) = 1. Using the remodulization method, 2 x [3; 8] mod 10 , where the solution, by inspection, is x 4 mod 5. Then, remodulizing 4 mod 5 by the factor 3, the solutions of the original linear congruence 6x 9 mod 15 are x [4; 9; 14] mod 15.

It is easily seen that the remodulization method is a trial-and-error method; however, after the solution is found, it is unnecessary to carry on any further computations. Another trial-and-error method consists of trying all residues of


CHAPTER 6.

5

A NOVEL SOLUTION OF LINEAR CONGRUENCES

the complete residue system [1 2 ] mod in the linear congruence mod until the solution is found. In the case , there are at most computations using the remodulization method, compared to possible computations of the alternate method. ;

a

;::: ;b

b

cx

b

c

b

c

b

Example 3 Consider the linear congruence 3x 5 mod 37. The remoduliza-

tion method requires at most 3 steps, compared to 37 possible steps trying solutions of the complete residue system modulo 37. Remodulizing by the factor 3, 3x [5; 42; : : : ] mod 111. By inspection, and requiring only 2 steps, the solution is x 14 mod 37. Performing the other calculation would have required 14 steps. Of course, simply guessing the solution may sometimes be just as fruitful. Picking an easy example is also helpful.

A standard method of solving linear congruences involves Euler's phi function [2,3], or totient, denoted by 8. The totient 8( ) enumerates the positive integers less than which are relatively prime to . Euler's extension of Fermat's theorem states that 8(b) 1 mod if ( ) = 1. Therefore, multiplying the linear congruence mod through by the factor (8(b)01) gives b

b

b

c

b ;

gcd c; b

cx

a

b

c

c

8(b) x a 1 c(8(b)01)

or x

1 a

mod

b ;

(8(b)01) mod b :

c

Thus, nding the solution of the linear congruence ing 8( ), or equivalently, the factorization of . b

cx

mod requires knowa

b

b

The remodulization method predicts nding solutions of linear congruences based on the factor , speci cally 8( ), rather than the modulus . In cases dealing with very large integers, and where is much less than , or those cases in which the factorization of is known, it may be more convenient to calculate the totient of , rather than that of . c

c

b

c

b

c

c

b

Theorem 4 The linear congruence cx a mod b, where gcd(c; b) = 1, has as solution

x

(1 0 a

b

8(c) )

c

mod

b :

Proof. Note that the linear congruence mod , where and are relatively prime and 0 , implies the existence of integers and such that 0 = . Solving this equation instead for , which is equivalent to cx

a

b

< c < b

cx

by

a

c

b

x

y

y


CHAPTER 6.

6

A NOVEL SOLUTION OF LINEAR CONGRUENCES

the linear congruence 0 mod , shows that the solution, using Euler's theorem, is 0 1 (8(c)01) . Substituting this result into 0 = , = + = + [ 0 1 (8(c)01) ]. Solving for , by

y

cx

a

by

a

a

b

x

a

b

a

c

mod c

b

a

cx

mod c

+ [0 1 b

a

b

by

a

x

(8(c)01) mod c ] c

mod

b ;

where 0 1 (8(c)01) is augmented by the proper multiple of to obtain the least non-negative residue . a b

c

modulo c

In the remodulization method, the elements f + + ( 0 1)g are generated by + , for 2 f0 1 2 0 1g. The + 1st residue in the remodulized form [ + + ( 0 1)] mod is the solution, upon division by . a; a

a

by

y

a; a

;

b; : : : ; a

;

;::: ;c

b c

b; : : : ; a

b c

y

bc

c

If one is not interested in nding the least non-negative residue, the solution reduces to 8(c) ) (1 0 mod a

x

b

b :

c

Theorem 3 gives the obvious corollary to Theorem 4 in case

( )= .

gcd c; b

d

Corollary 1 If gcd(c; b) = d and dja, then the linear congruence cx a mod b has d distinct solutions x [x0 ; x0 + b0 ; : : : ; x0 + b0 (d 0 1)] mod b, where a = a0 d, b = b0 d, c = c0 d, and " 8(c0 ) ) # a0 (1 0 b0 mod b0 : x0 c0 Remark 1 If one solves the diophantine equation cx + by = a; i.e., cx = a 0

formally, then the answer is x = ac 0 bc y , but the integer character and information is lost and not easily recovered. In the modular arithmetic format, however, the formula of Theorem 4 (or its corollary by Theorem 3) characterizes the countably in nitely many solutions. by

= mod a

b

Applications

In public-key cryptosystems [2,4,5], an enciphering modulus is created by multiplying two very large primes and , say = ; then one chooses an enciphering exponent and a deciphering exponent that satisfy the congruence relation 1 1 mod 8( ) m

p

q

m

e

d

e

d

m

;

pq


CHAPTER 6.

A NOVEL SOLUTION OF LINEAR CONGRUENCES

7

where ( 8( )) = ( 8( )) = 1, and 8( ) = ( 0 1)( 0 1). By large, it is meant that the primes and should have 100 or more digits each. If one chooses the enciphering exponent to be a prime such that ( 8( )) = 1, then it is unnecessary to calculate 8(8( )) for the usual or standard solution (8(8(m))01) mod 8( ) Instead, one only needs to calculate the solution 8(e) mod 8( ) 1 0 8( ) gcd e;

m

gcd d;

m

p

m

p

q

q

e

gcd e;

m

m

d

e

m

m

d

:

m

e

;

where 8( ) = 0 1. It is much easier (and more computationally e cient) to satisfy the condition ( 8( )) = 1 than it is to calculate the prime decomposition of 8( ) and its totient 8(8( )), even in those cases in which is not prime but its factorization is known. e

e

gcd e;

m

m

m

e

Example 4 Suppose m = 7 1 11 = 77, then 8(77) = 60. The problem is to nd an enciphering exponent

e

and a deciphering exponent e

1 1 mod 60 d

which satisfy

d

:

= 13, then is found by 8(13) 12 1 0 60 1 0 60 mod 60 mod 60 37 mod 60 13 13 whereas 8(8(77)) = 8(60) = 8(22 1 3 1 5) = 16. Additionally, for = 7, = 43; = 11 gives = 11; = 17 gives = 53; and so on. This method may not supplant the Euclidean algorithm method. In order to extract a solution from the linear congruence 1 mod , the Euclidean algorithm requires at most log2( ) iterations, or in the case , only 1+log2 ( ) iterations. According to Bressoud [6], the method described here requires approximately the same number of iterations (perhaps one or two fewer), but since one is dealing with very large integers, i.e., 10100 and 10200 , the di erence is negligible. Therefore, those who have incorporated the Euclidean algorithm in their computer programs will not likely change to this method. Those just starting may well nd this method preferable. If one chooses

e

d

d

;

e

e

d

e

nx

m

m

n

n

References

d

d

m

n

m

[1] Je rey F. Gold and Don H. Tucker, Remodulization of Congruences, Proceedings | National Conference on Undergraduate Research, University of North


CHAPTER 6.

A NOVEL SOLUTION OF LINEAR CONGRUENCES

8

Carolina Press, Asheville, North Carolina, 1992, Vol. II, 1036{41. [2] David M. Burton, Elementary Number Theory, Second Edition, Wm. C. Brown Publishers, Iowa, 1989, 156{160, 175{179. [3] Oystein Ore, Number Theory and Its History, Dover Publications, Inc., New York, 1988, 109{115. [4] David M. Bressoud, Factorization and New York, Inc., New York, 1989, 43{46.

Primality Testing,

Springer-Verlag

[5] Kenneth H. Rosen, Elementary Number Theory and Its Applications, Third Edition, Addison-Wesley Publishing Company, Massachusetts, 1993, 253{264. [6] David M. Bressoud. Personal communication.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.