Discrete Mathematics

Page 226

CHAPTER 10

Cryptography

211

Next let us try to calculate 1/4 mod 26. This is doomed to fail, because 4 and 26 have the prime factor 2 in common. We seek an integer k such that 1 = 4 · k mod 26 or in other words 1 − 4k

is a multiple of 26

But of course 4k will always be even so 1 − 4k will always be odd—it cannot be a multiple of the even number 26. This division problem cannot be solved. We conclude this brief discussion with the example 2/9 mod 26. We invite the reader to discover that the answer is 6 mod 26. There is in fact a mathematical device for performing division in modular arithmetic. It is the classical Euclidean algorithm. This simple idea is one of the most powerful in all of number theory. It says this: if n and d are integers then d divides into n some whole number q times with some remainder r , and 0 ≤ r < d. In other words, n = d ·q +r You have been using this idea all your life when you calculate a long division problem (not using a calculator, of course). We shall see in the next example that the Euclidean algorithm is a device for organizing information so that we can directly perform long division in modular arithmetic. EXAMPLE 10.3 Let us calculate 1/20 in arithmetic mod 57. We apply the Euclidean algorithm to 57 and 20. Thus we begin with 57 = 2 · 20 + 17 We continue by repeatedly applying the Euclidean algorithm to divide the divisor by the remainder: 20 = 1 · 17 + 3 17 = 5 · 3 + 2 3=1·2+1


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