Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.

Similar presentations


Presentation on theme: "Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996."— Presentation transcript:

1 Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.

2 Ref: Pfleeger96, Ch.32 Identity and Inverses Let “  ” denote an operation on numbers. A number i is called an identity for operation “  ” if x  i = x and i  x = x for every number x. The number b is called the inverse of a under “  ” if a  b=i.

3 Ref: Pfleeger96, Ch.33 Primes A prime number is any positive number that is divisible (with remainder 0) only by itself and 1. A number that is not a prime is a composite.

4 Ref: Pfleeger96, Ch.34 Greatest Common Divisor The greatest common divisor of two integers, a and b, is the largest integer that evenly divides both a and b. Examples –gcd(10,15) = 5 –If p and q are primes, then gcd(p,q) = 1.

5 Ref: Pfleeger96, Ch.35 Euclidean Algorithm Algorithm for finding the greatest common divisor, x of integers a and b. Suppose a>b. Then a = m*b +r, where m=a/b with remainder r. If x=gcd(a,b) then x divides into a, m*b, and r.

6 Ref: Pfleeger96, Ch.36 Euclidean Algorithm (p.2) But gcd(a,b) = gcd(b,r). Then b = m’*r +r’, where m’ = b/r with remainder r’. This process continues, until the remainder is 0.

7 Ref: Pfleeger96, Ch.37 Euclidean Algorithm (p.3) Example: Find gcd(105,45). –105 = 2*45 + 15 –45 = 3*15 + 0 –gcd(105,45) = 15

8 Ref: Pfleeger96, Ch.38 Modular Arithmetic Modular arithmetic on nonnegative integers forms a commutative ring with operations addition and multiplication. If every number other than 0 has an inverse under multiplication, the group is a Galois field. The integers mod n are a Galois Field

9 Ref: Pfleeger96, Ch.39 Properties of Modular Arithmetic Associativity –a +(b+c) mod n =(a+b)+c mod n –a *(b*c) mod n =(a*b)*c mod n Commutativity –a+b mod n = b+a mod n –a*b mod n = b*a mod n

10 Ref: Pfleeger96, Ch.310 Properties of Modular Arithmetic (p.2) Distributivity –a*(b+c) mod n = ((a*b) + (a*c)) mod n Existence of Identities –a+0 mod n = 0+a mod n = a –a*1 mod n = 1*a mod n = a

11 Ref: Pfleeger96, Ch.311 Properties of Modular Arithmetic (p.3) Existence of Inverses –a + (-a) mod n =0 –a*(a -1 ) mod n = 1 if a  0 Reducibility –(a+b) mod n = ((a mod n) + (b mod n)) mod n –(a*b) mod n = ((a mod n) * (b mod n)) mod n

12 Ref: Pfleeger96, Ch.312 Fermat’s Theorem Let p be a prime and let a be an element such that a<p. Then a p mod p = a or a p-1 mod p = 1.

13 Ref: Pfleeger96, Ch.313 Computing Inverses Let p be a prime and a < p. Let x be the inverse of a. Then ax mod p =1 (definition of inverse) a p-1 mod p =1 (Fermat’s Theorem) ax mod p = a p-1 mod p x mod p = a p-2 mod p


Download ppt "Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996."

Similar presentations


Ads by Google