1 / 13

Properties of Arithmetic

Properties of Arithmetic. Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996. 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.

sef
Download Presentation

Properties of Arithmetic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. 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. Ref: Pfleeger96, Ch.3

  4. 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. Ref: Pfleeger96, Ch.3

  5. 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. Ref: Pfleeger96, Ch.3

  6. 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. Ref: Pfleeger96, Ch.3

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

  8. 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 Ref: Pfleeger96, Ch.3

  9. 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 Ref: Pfleeger96, Ch.3

  10. 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 Ref: Pfleeger96, Ch.3

  11. 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 Ref: Pfleeger96, Ch.3

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

  13. 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) ap-1 mod p =1 (Fermat’s Theorem) ax mod p = ap-1 mod p x mod p = ap-2 mod p Ref: Pfleeger96, Ch.3

More Related