# Mathematics for Cryptography

Size: px
Start display at page:

Transcription

1 Mathematics for Cryptography Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, N2L 3G1, Canada March 15, Groups and Modular Arithmetic 1.1 Modular Arithmetic 1.1 Definition (congruences). Suppose a and b are integers, and m is a positive integer. Then we write a b (mod m) if m divides b a. The phrase a b (mod m) is called a congruence, and it is read as a is congruent to b modulo m. The integer m is called the modulus. 1.2 Definition (modular reduction). Suppose we divide a and b by m, obtaining integer quotients and remainders, where the remainders are between 0 and m 1. That is, a = q 1 m + r 1 and b = q 2 m + r 2, where 0 r 1 m 1 and 0 r 2 m 1. Then it is not difficult to see that a b (mod m) if and only if r 1 = r 2. We will use the notation a mod m (without parentheses) to denote the remainder when a is divided by m, i.e., the value r 1 above. Thus a b (mod m) if and only if a mod m = b mod m. If we replace a by a mod m, we say that a is reduced modulo m. 1.3 Example. To compute 101 mod 7, we write 101 = Since 0 3 6, it follows that 101 mod 7 = 3. As another example, suppose we want to compute ( 101) mod 7. In this case, we write 101 = 7 ( 15) + 4. Since 0 4 6, it follows that ( 101) mod 7 = Remark. Some computer programming languages define a mod m to be the remainder in the range m + 1,..., m 1 having the same sign as a. For example, ( 101) mod 7 would be 3, rather than 4 as we defined it above. But for our purposes, it is much more convenient to define a mod m always to be non-negative. 1.5 Definition (arithmetic modulo m). We now define arithmetic modulo m: Z m is the set {0,..., m 1}, equipped with two operations, + and. Addition and multiplication in Z m work exactly like real addition and multiplication, except that the results are reduced modulo m. 1.6 Example. Suppose we want to compute in Z 16. As integers, we have = 143. Then we reduce 143 modulo 16 as described above: 143 = , so 143 mod 16 = 15, and hence = 15 in Z 16. 1

2 1.2 Groups 1.7 Definition (group). A group is a pair G = (X, ), where X is a set and is a binary operation defined on X, that satisfies the following properties: The operation is associative, i.e., (a b) c = a (b c) for any a, b, c X. There is an element id X called the identity, such that a id = id a = a for any a X. For every a X, there exists an element b X called the inverse of a, such that a b = b a = id. 1.8 Definition. A group G = (X, ) is abelian if the the operation is commutative, i.e., a b = b a for any a, b X. 1.9 Definition. A group G = (X, ) is finite if X is a finite set Definition. The order of a finite group G = (X, ), denoted ord(g), is equal to X Remark. For notational convenience, most group operations are written as multiplication or addition. If the group operation is multiplication, then the identity is usually denoted by 1 and the inverse of a by a 1. If the group operation is addition, then the identity is usually denoted by 0 and the inverse of a by a Example (the additive group Z n ). Let n 2 be an integer. Then (Z n, +) is a finite abelian group of order n, where + denotes addition modulo n. The identity element is 0, and the inverse of a, usually denoted a, is ( a) mod n Example (the multiplicative group Z p ). Let p 2 be a prime. Define Z p = Z p \{0}. Then (Z p, ) is a finite abelian group of order p 1, where denotes multiplication modulo p. The identity element is 1, and the inverse of a, usually denoted a 1, is computed using the Extended Euclidean algorithm (see Theorem 1.52) Definition. For an integer n 2, φ(n) denotes the number of positive integers less than n that are relatively prime to n Theorem. φ(n) can be computed from the following formula: suppose that n has prime power factorization l e n = p i i (i.e., the p i s are distinct primes and e i 1 for 1 i l). Then φ(n) = i=1 l e p i 1 i (p i 1) = i=1 l ( e pi i e p i 1 ) i Example (the multiplicative group Z n ). This example generalizes Example Let n 2 be an integer. Define Z n = Z n \{d Z n : gcd(d, n) > 1}. Then (Z n, ) is a finite abelian group where denotes multiplication modulo n. The identity element is 1, and the inverse of a, usually denoted a 1, is computed using the Extended Euclidean algorithm (see Theorem 1.52). The order of (Z n, ) is equal to φ(n). 2 i=1

3 1.17 Example. The RSA Cryptosystem is constructed using the group Z n, where n = pq and p and q are distinct odd primes. For such an integer n, the order of (Z n, ) is equal to (p 1)(q 1) Example (matrices with non-zero determinant). Let n 2. The set of n n matrices with entries from Z p (where p is prime) having non-zero determinant is a multiplicative group. The identity is the n n matrix with 1s on the diagonal and 0s elsewhere. This is a non-abelian group, since matrix multiplication is not commutative Example (elliptic curves). Let p > 3 be prime. An elliptic curve is the set of solutions (x, y) Z p Z p to the congruence y 2 x 3 + ax + b (mod p), where a, b Z p are constants such that 4a 3 +27b 2 0 (mod p), together with a special point O called the point at infinity. Suppose we denote the set of points on the elliptic curve by E. It is possible to define an addition operation on E so that (E, +) is an abelian group. Addition is defined as follows (where all arithmetic operations are performed in Z p ): Suppose P = (x 1, y 1 ) and Q = (x 2, y 2 ) are points on E. If x 2 = x 1 and y 2 = y 1, then P + Q = O; otherwise P + Q = (x 3, y 3 ), where and x 3 = λ 2 x 1 x 2 and y 3 = λ(x 1 x 3 ) y 1, λ = Finally, define P + O = O + P = P for all P E. { (y 2 y 1 )(x 2 x 1 ) 1, if P Q (3x a)(2y 1 ) 1, if P = Q. 1.3 Orders of Group Elements 1.20 Definition (orders of group elements). For a finite group (X, ), define the order of an element a X (denoted ord(a)) to be the smallest positive integer m such that a} a {{ a} = id. m If the group operation is written multiplicatively, then a a a }{{} m is written as an exponentiation, a m. If the group operation is written additively, then the same expression is written as a multiplication, ma. The identity element is defined to have order Theorem. For a finite group (X, ), the order of any a X divides the order of the group, i.e., ord(a) ord(g) Theorem. For a finite group (X, ) and for any a X, the order of b = a i is ord(b) = ord(a) gcd(ord(a), i). (Here, for concreteness, we assume that the group operation is written multiplicatively.) 1.23 Example. If ord(a) = 100 and b = a 35, then ord(b) = 100 gcd(100, 35) = = Theorem. If ord(a) = i, then a 1 = a i 1. More generally, a i = a j if and only if i j (mod ord(a)). 3

4 1.4 Cyclic Groups and Primitive Elements 1.25 Definition (cyclic group). A finite abelian group (X, ) is a cyclic group if there exists an element a X having order equal to X. Such an element is called a generator of the group Example. Let n 2 be an integer. Then (Z n, +) is a cyclic group, and 1 is a generator. Further, an element a Z n is a generator of (Z n, +) if and only if gcd(a, n) = 1. The number of generators of (Z n, +) is φ(n) Example. Let p 2 be a prime. Then (Z p, ) is cyclic group, and a generator of this group is called a primitive element Theorem. (Z n, ) is cyclic group if and only if n = 2, 4, p k or 2p k, where p is an odd prime and k is a positive integer Theorem. α Z p is a primitive element if and only if for all primes q such that q (p 1). α (p 1)/q 1 (mod p) 1.30 Remark. Using Theorem 1.29, it is simple to test whether a given element α Z p is a primitive element (where p is an odd prime) provided that the factorization of p 1 is known Example. Suppose p = 13 and α = 2. The factorization of 12 into prime powers is 12 = Therefore, to verify that 2 is a primitive element modulo 13, it is sufficient to check that (mod 13) and (mod 13). This is much faster than checking all 12 powers of α Theorem. The number of generators of (Z p, ) is φ(p 1) = φ(φ(p)). 1.5 Subgroups and Cosets 1.33 Definition (subgroup). Suppose G = (X, ) is a finite group and Y X. We say that H = (Y, ) is a subgroup of G if H is also a (finite) group Theorem. Suppose G = (X, ) is a finite group and Y X. Then H = (Y, ) is a subgroup of G if and only if it is closed Definition (coset). Suppose H = (Y, ) is a subgroup of the group G = (X, ). For any a X, define the right coset Y a as follows: Also, define the left coset ay as follows: Y a = {y a : y Y }. ay = {a y : y Y } Theorem. Suppose H = (Y, ) is a subgroup of G = (X, ). Then, Y a = Y for all a. Furthermore, two right cosets Y a and Y a (or two left cosets ay and a Y ) are either identical or disjoint Corollary. A group X can be partitioned into right (or left) cosets of any subgroup Y. 4

5 1.38 Theorem (Lagrange s Theorem). Suppose H = (Y, ) is a subgroup of the finite group G = (X, ). Then ord(h) divides ord(g) Definition. Suppose that G = (X, ) is a finite group and y X. Define a = {a i : i 0} Remark. It is easy to see that ( a, ) is a cyclic subgroup of (X, ) and ord( a ) = ord(a). We say that ( a, ) is the subgroup generated by a. Lagrange s Theorem therefore shows that ord(a) ord(g), as stated previously in Theorem Group Isomorphisms and Homomorphisms 1.41 Definition. Two groups G = (X, ) and H = (Y, ) are isomorphic if there exists a bijection ϕ : X Y such that ϕ(a a ) = ϕ(a) ϕ(a ) for all a, a X Theorem. Any two cyclic groups of the same order n are isomorphic Corollary. If G = (X, ) is any finite group, and a X, then ( a, ) is isomorphic to (Z ord(a), +) Definition. A homomorphism from a group G = (X, ) to a group H = (Y, ) is a mapping ϕ : X Y such that ϕ(a a ) = ϕ(a) ϕ(a ) for all a, a X Remark. A homomorphism ϕ from a group G = (X, ) to a group H = (Y, ) is an isomorphism if and only if it is a bijection from X to Y. 1.7 Quadratic Residues 1.46 Definition (quadratic residue). Suppose p is an odd prime and a is an integer. a is defined to be a quadratic residue modulo p if a 0 (mod p) and the congruence y 2 a (mod p) has a solution y Z p. a is defined to be a quadratic non-residue modulo p if a 0 (mod p) and a is not a quadratic residue modulo p Definition (Legendre symbol). Suppose p is an odd prime. For any integer a, define the Legendre symbol ( a p) as follows: ( ) a = p 0 if a 0 (mod p) 1 if a is a quadratic residue modulo p 1 if a is a quadratic non-residue modulo p Theorem. Suppose p is an odd prime. Then ( ) a = a (p 1)/2 mod p. p 1.49 Remark. Suppose p is an odd prime. Then the mapping a ( a p) is a homomorphism from (Z p, ) to ({1, 1}, ) Theorem. Suppose p 3 (mod 4) is prime and suppose y is a quadratic residue modulo p. Then the two square roots of y modulo p are ±y (p+1)/4. 5

6 1.8 Euclidean Algorithm 1.51 Algorithm (Euclidean algorithm). The Euclidean algorithm computes the greatest common divisor of two positive integers, say a and b. The algorithm sets r 0 to be a and r 1 to be b, and performs the following sequence of divisions: r 0 = q 1 r 1 + r 2, 0 < r 2 < r 1 r 1 = q 2 r 2 + r 3, 0 < r 3 < r r m 2 = q m 1 r m 1 + r m, 0 < r m < r m 1 r m 1 = q m r m. The algorithm terminates when a division yields a remainder of 0. The last nonzero remainder, r m, is the greatest common divisor of a and b Algorithm (Extended Euclidean algorithm). Given two integers a and b, the Extended Euclidean algorithm computes integers s and t such that as + bt = gcd(a, b) Theorem (multiplicative inverses in Z n ). Let n 2. A multiplicative inverse a 1 mod n exists if and only if gcd(a, n) = 1. In this case, given inputs a and n, the Extended Euclidean algorithm will compute integers s and t such that as + nt = 1. Then a 1 s (mod n) Theorem (linear congruences mod n). Suppose gcd(a, n) = 1. Then the linear congruence ax c (mod n) has a unique solution modulo n, given by the formula x a 1 c (mod n) Theorem (linear congruences mod n). Suppose gcd(a, n) = d > 1. If c 0 (mod d), then the linear congruence ax c (mod n) has no solutions. If c 0 (mod d), then the linear congruence ax c (mod n) is equivalent to linear congruence a x c (mod n ), where a = a/d, c = c/d and n = n/d. This congruence has a unique solution modulo n by Theorem 1.54, say x = x 0 mod n. The original congruence has d solutions modulo n, namely, x = x 0 + in mod n, for 0 i d Definition. A finite continued fraction is an m-tuple of non-negative integers, say which is shorthand for the following expression: q 1 + [q 1,..., q m ], 1 1. q 2 + q qm 1.57 Remark. Continued fractions can be obtained from the sequence of quotients in the Euclidean algorithm Example. We compute the continued fraction expansion of 34/99. The Euclidean algorithm proceeds as follows: 34 = = = = = 3 1. The continued fraction expansion of 34/99 is [0, 2, 1, 10, 3], 6

7 1.59 Definition. The convergents of a finite continued fraction [q 1,..., q m ] are the values defined by the continued fractions [q 1,..., q i ], for 1 i m Example. The convergents of the continued fraction [0, 2, 1, 10, 3] are as follows: [0] = 0 [0, 2] = 1/2 [0, 2, 1] = 1/3 [0, 2, 1, 10] = 11/32, and [0, 2, 1, 10, 3] = 34/ Direct Products 1.61 Definition (direct product). Suppose that G = (X, ) and G = (X, ) are groups. The direct product G G is the group defined as follows: G G = (X X, ), where for all a, b X and all a, b X. (a, a ) (b, b ) = (a b, a b ) 1.62 Remark. Suppose (a, a ) G G. If the order of a is equal to d and the order of a is equal to d, then the order of (a, a ) is equal to the least common multiple of d and d Remark. Definition 1.61 can be extended in the obvious way to define a direct product of more than two groups Theorem (Fundamental Theorem of Abelian Groups). Every finite abelian group is isomorphic to a direct product of cyclic groups of prime power order Example. The factorization of 36 into prime powers is 36 = There are precisely four nonisomoprhic groups of order 36, namely, Z 4 Z 9, Z 2 Z 2 Z 9, Z 4 Z 3 Z 3 and Z 2 Z 2 Z 3 Z 3. 2 Rings and Fields 2.1 Rings 2.1 Definition (ring). A ring is a triple R = (X,, +), where X is a finite set and and + are a binary operations defined on X, that satisfies the following properties: (X, +) is an abelian group with identity 0. Multiplication is associative, i.e., for any a, b, c X, (ab)c = a(bc). The distributive property is satisfied, i.e., for any a, b, c X, (a + b)c = (ac) + (bc) and a(b + c) = (ab) + (ac). 2.2 Definition. A ring R = (X,, +) is a finite ring if X is a finite set. 2.3 Definition. A ring R = (X,, +) is a ring with identity if X contains a multiplicative identity, denoted by 1. 7

8 2.4 Definition. A ring R = (X,, +) is a commutative ring if multiplication is commutative. 2.5 Example. Some familiar examples of commutative rings include the integers, Z; the real numbers, R; and the complex numbers, C. These are all infinite rings. 2.6 Example. (Z m,, +) is a finite ring for any m Example (matrices). Let n 2. The set of n n matrices with entries from Z p is a ring, but not a commutative ring. 2.2 Fields 2.8 Definition (field). A ring R = (X,, +) is a field if it is a commutative ring with identity such that every non-zero element has a multiplicative inverse (i.e., (R\{0}, ) is an abelian group). 2.9 Example. (Z p,, +) is a finite field if p is prime Example (ring of polynomials). Suppose (A,, +) is a field and x is an indeterminate. Let A[x] denote the set of all polynomials with coefficients from A. Then (A[x],, +) is an infinite ring. 2.3 Direct Products and the Chinese Remainder Theorem 2.11 Definition (direct product). Suppose that R = (X,, +) and S = (Y,, +) are rings. The direct product R R is the ring defined as follows: R R = (X X,, +), where and for all a, b X and all a, b X. (a, a ) (b, b ) = (a b, a b ) (a, a ) + (b, b ) = (a + b, a + b ) 2.12 Remark. Definition 2.11 can be extended in the obvious way to define a direct product of more than two rings Remark. The direct product of two fields is not a field Definition. Two rings (or fields) R = (X,, +) and S = (Y,, +) are isomorphic if there exists a bijection ϕ : X Y such that ϕ(a a ) = ϕ(a) ϕ(a ) for all a, a X and ϕ(a+a ) = ϕ(a)+ϕ(a ) for all a, a X Theorem. Suppose M = m 1 m 2 m r, where gcd(m i, m j ) = 1 for all i j. Then the ring (Z M,, +) is isomorphic to the ring (Z m1 Z mr,, +) Remark. Define χ : Z M Z m1 Z mr, as follows: χ(a) = (a mod m 1,..., a mod m r ). Then χ can be shown to be an isomorphism of the two rings (Z M,, +) and (Z m1 Z mr,, +). 8

9 2.17 Remark. For 1 i r, define M i = M/m i and y i = M i 1 mod m i. Then the inverse function χ 1 : Z m1 Z mr Z M is χ 1 (a 1,..., a r ) = r a i M i y i mod M. i= Example. Suppose r = 3, m 1 = 7, m 2 = 11 and m 3 = 13. Then M = We compute M 1 = 143, M 2 = 91 and M 3 = 77, and then y 1 = 5, y 2 = 4 and y 3 = 12. Then the function χ 1 : Z 7 Z 11 Z 13 Z 1001 is the following: χ 1 (a 1, a 2, a 3 ) = (715a a a 3 ) mod Remark. The fact that the function χ 1 constitutes an isomorphism is an important result that is commonly known as the Chinese Remainder Theorem Theorem (Chinese remainder theorem). Suppose m 1,..., m r are pairwise relatively prime positive integers, and suppose a 1,..., a r are integers. Then the system of r congruences x a i (mod m i ) (1 i r) has a unique solution modulo M = m 1 m r, which is given by x = χ 1 (a 1,..., a m ). 2.4 Ideals and Quotient Rings 2.21 Definition (ideal). Suppose R = (X,, +) is a commutative ring. An ideal is a subset I X that satisfies the following properties: (I, +) is an abelian group, and ab I whenever a X and b I Definition (principal ideal). Suppose R = (X,, +) is a commutative ring and let c X. The principal ideal generated by c, which is denoted by (c), is the subset defined as follows: (c) = {ac : a X}. It is easy to see that a principal ideal is always an ideal Definition (quotient ring). Suppose R = (X,, +) is a commutative ring and I = (c) is a principal ideal. The quotient ring R/I is constructed as follows. R/I = (Y,, +), where Y consists of the (additive) cosets of I in (X, +). The sum of two cosets I + a and I + b is defined to be I + (a + b), for any a, b X, and the product of the two cosets I + a and I + b is defined to be I + ab Definition (principal ring). Suppose R = (X,, +) is a commutative ring. We say that R is a principal ring if every ideal is a principal ideal Example. Examples of principal rings include (Z,, +) as well as any polynomial ring (A[x],, +), where A is a field Example. Since (Z,, +) is a principal ring, it follows that any ideal I in this ring consists of all the multiples (positive and negative) of a positive integer c. The quotient ring Z/I is simply Z c. 9

10 2.5 Irreducible Polynomials and Finite Fields 2.27 Definition (irreducible polynomial). Then (A[x],, +) is a polynomial ring, where A is a field. A polynomial f(x) A[x] is irreducible if f(x) cannot be written as a product of two polynomials f 1 (x)f 2 (x), where f 1 (x) an f 2 (x) both have positive degree Example. In the ring Z 2 [x], we have that x = (x + 1)(x + 1), so x is reducible. Since x 2 + x = x(x + 1), this polynomial is also reducible. However, x 2 + x + 1 is irreducible Example. Suppose that A is any finite field and suppose n is a positive integer. Then there is at least one irreducible polynomial of degree n in (A[x],, +) Theorem. There exists a finite field of order n if and only if n = p k where p is prime and k 1 is an integer Definition. A finite field of order n = p k (where p is prime) is said to have characteristic p Theorem. Suppose p is prime and k 2. A finite field of order p k can be constructed as follows. Let f(x) Z p [x] be an irreducible polynomial of degree k. Then the quotient ring Z p [x]/(f(x)) is a finite field of order p k Remark. Multiplicative inverses in a finite field Z p [x]/(f(x)) can be computed using the Extended Euclidean Algorithm for polynomials Remark. For any polynomial f(x) Z p [x], the additive group (Z p [x]/(f(x)), +) is isomorphic to (Z p ) k Theorem. All finite fields of a given order n are isomorphic Remark. We denote the unique (up to isomorphism) finite field of order n by F n Example. The field F 8 can be constructed as either Z 2 [x]/(x 3 + x + 1) or Z 2 [x]/(x 3 + x 2 + 1), since both x 3 + x + 1 and x 3 + x are irreducible polynomials in Z 2 [x]. The two constructions yield isomorphic fields Theorem. The multiplicative group (F n \{0}, 0) is cyclic Definition. A generator of (F n \{0}, 0) is called a primitive element in F n. 10

### Public-key Cryptography: Theory and Practice

Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 2: Mathematical Concepts Divisibility Congruence Quadratic Residues

### LECTURE NOTES IN CRYPTOGRAPHY

1 LECTURE NOTES IN CRYPTOGRAPHY Thomas Johansson 2005/2006 c Thomas Johansson 2006 2 Chapter 1 Abstract algebra and Number theory Before we start the treatment of cryptography we need to review some basic

### Chapter 5. Modular arithmetic. 5.1 The modular ring

Chapter 5 Modular arithmetic 5.1 The modular ring Definition 5.1. Suppose n N and x, y Z. Then we say that x, y are equivalent modulo n, and we write x y mod n if n x y. It is evident that equivalence

### Introduction to Information Security

Introduction to Information Security Lecture 5: Number Theory 007. 6. Prof. Byoungcheon Lee sultan (at) joongbu. ac. kr Information and Communications University Contents 1. Number Theory Divisibility

### Basic elements of number theory

Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

### Basic elements of number theory

Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

### Finite Fields. Mike Reiter

1 Finite Fields Mike Reiter reiter@cs.unc.edu Based on Chapter 4 of: W. Stallings. Cryptography and Network Security, Principles and Practices. 3 rd Edition, 2003. Groups 2 A group G, is a set G of elements

### Number Theory and Group Theoryfor Public-Key Cryptography

Number Theory and Group Theory for Public-Key Cryptography TDA352, DIT250 Wissam Aoudi Chalmers University of Technology November 21, 2017 Wissam Aoudi Number Theory and Group Theoryfor Public-Key Cryptography

### Chapter 4 Finite Fields

Chapter 4 Finite Fields Introduction will now introduce finite fields of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public Key concern operations on numbers what constitutes a number

### Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

### Math 2070BC Term 2 Weeks 1 13 Lecture Notes

Math 2070BC 2017 18 Term 2 Weeks 1 13 Lecture Notes Keywords: group operation multiplication associative identity element inverse commutative abelian group Special Linear Group order infinite order cyclic

### Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2006 Contents 9 Introduction to Number Theory and Cryptography 1 9.1 Subgroups

### Foundations of Cryptography

Foundations of Cryptography Ville Junnila viljun@utu.fi Department of Mathematics and Statistics University of Turku 2015 Ville Junnila viljun@utu.fi Lecture 7 1 of 18 Cosets Definition 2.12 Let G be a

### Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

Background on Groups, Rings, and Finite Fields Andreas Klappenecker September 12, 2002 A thorough understanding of the Agrawal, Kayal, and Saxena primality test requires some tools from algebra and elementary

### A. Algebra and Number Theory

A. Algebra and Number Theory Public-key cryptosystems are based on modular arithmetic. In this section, we summarize the concepts and results from algebra and number theory which are necessary for an understanding

### Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) 1 Euclid s Algorithm Euclid s Algorithm for computing the greatest common divisor belongs to the oldest known computing procedures

### ECEN 5022 Cryptography

Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

### 4 Powers of an Element; Cyclic Groups

4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)

### Elementary Number Theory Review. Franz Luef

Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then

### Number Theory and Algebra: A Brief Introduction

Number Theory and Algebra: A Brief Introduction Indian Statistical Institute Kolkata May 15, 2017 Elementary Number Theory: Modular Arithmetic Definition Let n be a positive integer and a and b two integers.

### Part II. Number Theory. Year

Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

### 5 Group theory. 5.1 Binary operations

5 Group theory This section is an introduction to abstract algebra. This is a very useful and important subject for those of you who will continue to study pure mathematics. 5.1 Binary operations 5.1.1

### Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L06, Steve/Courses/2011/S2/CSS322/Lectures/number.tex,

### MATH 420 FINAL EXAM J. Beachy, 5/7/97

MATH 420 FINAL EXAM J. Beachy, 5/7/97 1. (a) For positive integers a and b, define gcd(a, b). (b) Compute gcd(1776, 1492). (c) Show that if a, b, c are positive integers, then gcd(a, bc) = 1 if and only

### Name: Solutions Final Exam

Instructions. Answer each of the questions on your own paper. Be sure to show your work so that partial credit can be adequately assessed. Put your name on each page of your paper. 1. [10 Points] All of

### Summary Slides for MATH 342 June 25, 2018

Summary Slides for MATH 342 June 25, 2018 Summary slides based on Elementary Number Theory and its applications by Kenneth Rosen and The Theory of Numbers by Ivan Niven, Herbert Zuckerman, and Hugh Montgomery.

### MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM

MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM Basic Questions 1. Compute the factor group Z 3 Z 9 / (1, 6). The subgroup generated by (1, 6) is

### YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467a: Cryptography and Computer Security Notes 13 (rev. 2) Professor M. J. Fischer October 22, 2008 53 Chinese Remainder Theorem Lecture Notes 13 We

### Congruences and Residue Class Rings

Congruences and Residue Class Rings (Chapter 2 of J. A. Buchmann, Introduction to Cryptography, 2nd Ed., 2004) Shoichi Hirose Faculty of Engineering, University of Fukui S. Hirose (U. Fukui) Congruences

### K. Ireland, M. Rosen A Classical Introduction to Modern Number Theory, Springer.

Chapter 1 Number Theory and Algebra 1.1 Introduction Most of the concepts of discrete mathematics belong to the areas of combinatorics, number theory and algebra. In Chapter?? we studied the first area.

### Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet

### Mathematical Foundations of Cryptography

Mathematical Foundations of Cryptography Cryptography is based on mathematics In this chapter we study finite fields, the basis of the Advanced Encryption Standard (AES) and elliptical curve cryptography

### Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

### 4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

PREFACE These notes have been prepared by Dr Mike Canfell (with minor changes and extensions by Dr Gerd Schmalz) for use by the external students in the unit PMTH 338 Number Theory. This booklet covers

### Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Page 1 Definitions Tuesday, May 8, 2018 12:23 AM Notations " " means "equals, by definition" the set of all real numbers the set of integers Denote a function from a set to a set by Denote the image of

### Number Theory. Modular Arithmetic

Number Theory The branch of mathematics that is important in IT security especially in cryptography. Deals only in integer numbers and the process can be done in a very fast manner. Modular Arithmetic

### Elementary Number Theory MARUCO. Summer, 2018

Elementary Number Theory MARUCO Summer, 2018 Problem Set #0 axiom, theorem, proof, Z, N. Axioms Make a list of axioms for the integers. Does your list adequately describe them? Can you make this list as

### A Generalization of Wilson s Theorem

A Generalization of Wilson s Theorem R. Andrew Ohana June 3, 2009 Contents 1 Introduction 2 2 Background Algebra 2 2.1 Groups................................. 2 2.2 Rings.................................

### 2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

CHAPTER 2 INTRODUCTION TO NUMBER THEORY ANSWERS TO QUESTIONS 2.1 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers. That is, b is a divisor of a if there is no remainder

### 3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

### Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

Chapter 3 Rings Rings are additive abelian groups with a second operation called multiplication. The connection between the two operations is provided by the distributive law. Assuming the results of Chapter

### INTRODUCTION TO THE GROUP THEORY

Lecture Notes on Structure of Algebra INTRODUCTION TO THE GROUP THEORY By : Drs. Antonius Cahya Prihandoko, M.App.Sc e-mail: antoniuscp.fkip@unej.ac.id Mathematics Education Study Program Faculty of Teacher

### CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 9 September 30, 2015 CPSC 467, Lecture 9 1/47 Fast Exponentiation Algorithms Number Theory Needed for RSA Elementary Number Theory

### RINGS: SUMMARY OF MATERIAL

RINGS: SUMMARY OF MATERIAL BRIAN OSSERMAN This is a summary of terms used and main results proved in the subject of rings, from Chapters 11-13 of Artin. Definitions not included here may be considered

### M381 Number Theory 2004 Page 1

M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

### Algebraic structures I

MTH5100 Assignment 1-10 Algebraic structures I For handing in on various dates January March 2011 1 FUNCTIONS. Say which of the following rules successfully define functions, giving reasons. For each one

### The Chinese Remainder Theorem

Chapter 5 The Chinese Remainder Theorem 5.1 Coprime moduli Theorem 5.1. Suppose m, n N, and gcd(m, n) = 1. Given any remainders r mod m and s mod n we can find N such that N r mod m and N s mod n. Moreover,

### CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 8 February 1, 2012 CPSC 467b, Lecture 8 1/42 Number Theory Needed for RSA Z n : The integers mod n Modular arithmetic GCD Relatively

### Computations/Applications

Computations/Applications 1. Find the inverse of x + 1 in the ring F 5 [x]/(x 3 1). Solution: We use the Euclidean Algorithm: x 3 1 (x + 1)(x + 4x + 1) + 3 (x + 1) 3(x + ) + 0. Thus 3 (x 3 1) + (x + 1)(4x

### Finite Fields. Sophie Huczynska. Semester 2, Academic Year

Finite Fields Sophie Huczynska Semester 2, Academic Year 2005-06 2 Chapter 1. Introduction Finite fields is a branch of mathematics which has come to the fore in the last 50 years due to its numerous applications,

### Numbers. Çetin Kaya Koç Winter / 18

Çetin Kaya Koç http://koclab.cs.ucsb.edu Winter 2016 1 / 18 Number Systems and Sets We represent the set of integers as Z = {..., 3, 2, 1,0,1,2,3,...} We denote the set of positive integers modulo n as

### The number of ways to choose r elements (without replacement) from an n-element set is. = r r!(n r)!.

The first exam will be on Friday, September 23, 2011. The syllabus will be sections 0.1 through 0.4 and 0.6 in Nagpaul and Jain, and the corresponding parts of the number theory handout found on the class

### 0 Sets and Induction. Sets

0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set

### = 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose

### Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm April 11, 2010 1 Algebra We start by discussing algebraic structures and their properties. This is presented in more depth than what we

### Definition List Modern Algebra, Fall 2011 Anders O.F. Hendrickson

Definition List Modern Algebra, Fall 2011 Anders O.F. Hendrickson On almost every Friday of the semester, we will have a brief quiz to make sure you have memorized the definitions encountered in our studies.

### CHAPTER I. Rings. Definition A ring R is a set with two binary operations, addition + and

CHAPTER I Rings 1.1 Definitions and Examples Definition 1.1.1. A ring R is a set with two binary operations, addition + and multiplication satisfying the following conditions for all a, b, c in R : (i)

### Math 547, Exam 1 Information.

Math 547, Exam 1 Information. 2/10/10, LC 303B, 10:10-11:00. Exam 1 will be based on: Sections 5.1, 5.2, 5.3, 9.1; The corresponding assigned homework problems (see http://www.math.sc.edu/ boylan/sccourses/547sp10/547.html)

### TC10 / 3. Finite fields S. Xambó

TC10 / 3. Finite fields S. Xambó The ring Construction of finite fields The Frobenius automorphism Splitting field of a polynomial Structure of the multiplicative group of a finite field Structure of the

### Introduction to finite fields

Chapter 7 Introduction to finite fields This chapter provides an introduction to several kinds of abstract algebraic structures, particularly groups, fields, and polynomials. Our primary interest is in

### A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

Byte multiplication 1 Field arithmetic A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: F is an abelian group under addition, meaning - F is closed under

### Dirichlet Characters. Chapter 4

Chapter 4 Dirichlet Characters In this chapter we develop a systematic theory for computing with Dirichlet characters, which are extremely important to computations with modular forms for (at least) two

### Finite Fields. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

1 / 25 Finite Fields Saravanan Vijayakumaran sarva@ee.iitb.ac.in Department of Electrical Engineering Indian Institute of Technology Bombay September 25, 2014 2 / 25 Fields Definition A set F together

### NOTES ON FINITE FIELDS

NOTES ON FINITE FIELDS AARON LANDESMAN CONTENTS 1. Introduction to finite fields 2 2. Definition and constructions of fields 3 2.1. The definition of a field 3 2.2. Constructing field extensions by adjoining

### CSIR - Algebra Problems

CSIR - Algebra Problems N. Annamalai DST - INSPIRE Fellow (SRF) Department of Mathematics Bharathidasan University Tiruchirappalli -620024 E-mail: algebra.annamalai@gmail.com Website: https://annamalaimaths.wordpress.com

### ABSTRACT ALGEBRA MODULUS SPRING 2006 by Jutta Hausen, University of Houston

ABSTRACT ALGEBRA MODULUS SPRING 2006 by Jutta Hausen, University of Houston Undergraduate abstract algebra is usually focused on three topics: Group Theory, Ring Theory, and Field Theory. Of the myriad

### Finite Fields. Sophie Huczynska (with changes by Max Neunhöffer) Semester 2, Academic Year 2012/13

Finite Fields Sophie Huczynska (with changes by Max Neunhöffer) Semester 2, Academic Year 2012/13 Contents 1 Introduction 3 1 Group theory: a brief summary............................ 3 2 Rings and fields....................................

### Groups in Cryptography. Çetin Kaya Koç Winter / 13

http://koclab.org Çetin Kaya Koç Winter 2017 1 / 13 A set S and a binary operation A group G = (S, ) if S and satisfy: Closure: If a, b S then a b S Associativity: For a, b, c S, (a b) c = a (b c) A neutral

### MATH 361: NUMBER THEORY FOURTH LECTURE

MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the

### 4 Number Theory and Cryptography

4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

### φ(xy) = (xy) n = x n y n = φ(x)φ(y)

Groups 1. (Algebra Comp S03) Let A, B and C be normal subgroups of a group G with A B. If A C = B C and AC = BC then prove that A = B. Let b B. Since b = b1 BC = AC, there are a A and c C such that b =

### NUMBER THEORY. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

NUMBER THEORY Anwitaman DATTA SCSE, NTU Singapore Acknowledgement: The following lecture slides are based on, and uses material from the text book Cryptography and Network Security (various eds) by William

### Course 2316 Sample Paper 1

Course 2316 Sample Paper 1 Timothy Murphy April 19, 2015 Attempt 5 questions. All carry the same mark. 1. State and prove the Fundamental Theorem of Arithmetic (for N). Prove that there are an infinity

### Part IA Numbers and Sets

Part IA Numbers and Sets Definitions Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

### Factorization in Polynomial Rings

Factorization in Polynomial Rings Throughout these notes, F denotes a field. 1 Long division with remainder We begin with some basic definitions. Definition 1.1. Let f, g F [x]. We say that f divides g,

### NOTES ON SIMPLE NUMBER THEORY

NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,

### ϕ : Z F : ϕ(t) = t 1 =

1. Finite Fields The first examples of finite fields are quotient fields of the ring of integers Z: let t > 1 and define Z /t = Z/(tZ) to be the ring of congruence classes of integers modulo t: in practical

### SUMMARY OF GROUPS AND RINGS GROUPS AND RINGS III Week 1 Lecture 1 Tuesday 3 March.

SUMMARY OF GROUPS AND RINGS GROUPS AND RINGS III 2009 Week 1 Lecture 1 Tuesday 3 March. 1. Introduction (Background from Algebra II) 1.1. Groups and Subgroups. Definition 1.1. A binary operation on a set

### ALGEBRA I (LECTURE NOTES 2017/2018) LECTURE 9 - CYCLIC GROUPS AND EULER S FUNCTION

ALGEBRA I (LECTURE NOTES 2017/2018) LECTURE 9 - CYCLIC GROUPS AND EULER S FUNCTION PAVEL RŮŽIČKA 9.1. Congruence modulo n. Let us have a closer look at a particular example of a congruence relation on

### ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

10. Linear congruences In general we are going to be interested in the problem of solving polynomial equations modulo an integer m. Following Gauss, we can work in the ring Z m and find all solutions to

### A Few Primality Testing Algorithms

A Few Primality Testing Algorithms Donald Brower April 2, 2006 0.1 Introduction These notes will cover a few primality testing algorithms. There are many such, some prove that a number is prime, others

### A Guide to Arithmetic

A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

### Lecture 14: Hardness Assumptions

CSE 594 : Modern Cryptography 03/23/2017 Lecture 14: Hardness Assumptions Instructor: Omkant Pandey Scribe: Hyungjoon Koo, Parkavi Sundaresan 1 Modular Arithmetic Let N and R be set of natural and real

### 2 ALGEBRA II. Contents

ALGEBRA II 1 2 ALGEBRA II Contents 1. Results from elementary number theory 3 2. Groups 4 2.1. Denition, Subgroup, Order of an element 4 2.2. Equivalence relation, Lagrange's theorem, Cyclic group 9 2.3.

### Reducibility of Polynomials over Finite Fields

Master Thesis Reducibility of Polynomials over Finite Fields Author: Muhammad Imran Date: 1976-06-02 Subject: Mathematics Level: Advance Course code: 5MA12E Abstract Reducibility of certain class of polynomials

### Background Material in Algebra and Number Theory. Groups

PRELIMINARY READING FOR ALGEBRAIC NUMBER THEORY. HT 2016/17. Section 0. Background Material in Algebra and Number Theory The following gives a summary of the main ideas you need to know as prerequisites

### 2. THE EUCLIDEAN ALGORITHM More ring essentials

2. THE EUCLIDEAN ALGORITHM More ring essentials In this chapter: rings R commutative with 1. An element b R divides a R, or b is a divisor of a, or a is divisible by b, or a is a multiple of b, if there

### MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. Congruences Let n be a postive integer. The integers a and b are called congruent modulo n if they have the same

### Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives

### Introduction to Number Theory

INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

### PROBLEMS ON CONGRUENCES AND DIVISIBILITY

PROBLEMS ON CONGRUENCES AND DIVISIBILITY 1. Do there exist 1,000,000 consecutive integers each of which contains a repeated prime factor? 2. A positive integer n is powerful if for every prime p dividing

### Elementary Number Theory. Franz Luef

Elementary Number Theory Congruences Modular Arithmetic Congruence The notion of congruence allows one to treat remainders in a systematic manner. For each positive integer greater than 1 there is an arithmetic

### Chapter 4. Characters and Gauss sums. 4.1 Characters on finite abelian groups

Chapter 4 Characters and Gauss sums 4.1 Characters on finite abelian groups In what follows, abelian groups are multiplicatively written, and the unit element of an abelian group A is denoted by 1 or 1

### Chapter 4 Mathematics of Cryptography

Chapter 4 Mathematics of Cryptography Part II: Algebraic Structures Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4.1 Chapter 4 Objectives To review the concept

### May 6, Be sure to write your name on your bluebook. Use a separate page (or pages) for each problem. Show all of your work.

Math 236H May 6, 2008 Be sure to write your name on your bluebook. Use a separate page (or pages) for each problem. Show all of your work. 1. (15 points) Prove that the symmetric group S 4 is generated

### Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition Todd Cochrane Department of Mathematics Kansas State University Contents Notation v Chapter 0. Axioms for the set of Integers Z. 1 Chapter 1.

### COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is

### MATH 3330 ABSTRACT ALGEBRA SPRING Definition. A statement is a declarative sentence that is either true or false.

MATH 3330 ABSTRACT ALGEBRA SPRING 2014 TANYA CHEN Dr. Gordon Heier Tuesday January 14, 2014 The Basics of Logic (Appendix) Definition. A statement is a declarative sentence that is either true or false.