Professional Documents
Culture Documents
Public-key Cryptography
2.1 Introduction
In this chapter, we introduce the basic mathematical concepts that one should know
in order to understand the public-key cryptographic protocols and the corresponding
cryptanalytic algorithms described in the later chapters. If the reader is already familiar
with these concepts, she may quickly browse through the chapter in order to know about
our notations and conventions.
This chapter is meant for cryptology students and as such does not describe the
mathematical topics in their full generality. It is our intention only to state (and, if
possible, prove) the relevant results that would be useful for the rest of the book. For
further study, we urge the reader to consult the books suggested at the end of this
chapter.
17
Mathematical Concepts
C
C
2.2.2 Relations
A relation on a set A is a subset of A A. For (a, b) , we usually say a b
implying that a is related by to b. Common examples are the standard relations =, 6=,
6, <, >, > on Z (or Q or R).
A relation on a set A is called reflexive, if a a for all a A. For example, =, 6
and > are reflexive relations on Z, but the relations 6=, <, > are not.
A relation on A is called symmetric, if a b implies b a. On the other hand, is
called anti-symmetric if a b and b a imply a = b. For example, = is symmetric and
anti-symmetric, <, 6, > and > are anti-symmetric but not symmetric, 6= is symmetric
but not anti-symmetric.
A relation on A is called transitive if a b and b c imply a c, For example, =,
<, 6, >, > are all transitive, but 6= is not transitive.
An equivalence relation is one which is reflexive, symmetric and transitive. For
example, = is an equivalence relation on Z, but neither of the other relations mentioned
above (6=, <, > and so on) is an equivalence relation on Z.
18
Public-key Cryptography
A partition U
of a set A is a collection of pairwise disjoint subsets Ai , i I, of A,
such that A = iI Ai , that is, A is the union of Ai , i I, and for i, j I, i 6= j,
Ai Aj = . The following theorem establishes an important connection between
equivalence relations and partitions.
Theorem 2.1
Proof
2.2.3 Functions
Let A and B two sets (not necessarily distinct). A function or a map f from A to B,
denoted f : A B, assigns to each a A some element b B. In this case, we write
b = f (a) or f maps a 7 b and say that b is the image of a (under f ). For example,
if A = B = R,
then the assignment a 7 a2 is a function. On the other hand, the
assignment a 7 a (the non-negative square root) is not a function, because it is not
defined
for negative values of a. However, if A = R and B = C, then the assignment
a 7 a (with non-negative real and imaginary parts) is a function.
The function f : A A assigning a 7 a for all a A is called the identity
map on A and is usually denoted by idA . On the other hand, if f : A B maps all
the elements of A to a fixed element of B, then f is said to be a constant function. A
function which is not constant is called a non-constant function.
A function f : A B that maps different elements of A to different elements
of B is called injective or one-one. In other words, we call f to be injective if and
only if f (a) = f (a ) implies a = a . The function f : R R given by a 7 a2
is not injective, since f (a) = f (a) for all a R. On the other hand, the function
f : R R given by a 7 2a is injective. An injective map f : A B is sometimes
denoted by the special symbol f : A B.
Mathematical Concepts
19
Zermalos well-ordering principle Every set A can be well ordered, that is, there is
a relation which well orders A.
The set N is well-ordered under the natural relation 6. The set Z can be well ordered
by the relation defined as 0 1 1 2 2 . A well ordering of R is not
known.
20
Public-key Cryptography
Axiom 2.2
Zorns lemma Let A be a partially ordered set. If every chain of A has an upper
bound (in A), then A has at least one maximal element.
To illustrate Zorns lemma, consider any non-empty set A and define P(A) to be
the set of all subsets of A. P(A) is called the power set of A and is partially ordered
under containment . A chain of P(A) is a set {Ai | i I} of subsets
of A such that
S
for all i, j I either Ai Aj or Aj Ai . Clearly, the union iI Ai is an upper
bound of the chain. Then Zorns lemma guarantees that P(A) has at least one maximal
element. In this case, the maximal element, namely A, is unique. If A is finite, then
for the set P(A) \ {A} of all proper subsets of A, a maximal element (under the partial
order ) exists by Zorns lemma, but is not unique, if #A > 1.
Axiom 2.3
Finally, let A be a set and P (A) := P(A) \ {}, that is, P (A) is the set of all
non-empty subsets of A. A choice function of A is a function f : P (A) A such that
for every 6= B A we have f (B) B.
Axiom 2.4
Axiom of choice
E X E R C I S E S E T 2.2
2.1 (a) Let G = (V, E) be an undirected graph. Define a relation on the vertex set V
of G by: u v if and only if there is a path from u to v. Show that is an equivalence
relation on V . What are the equivalence classes for this relation?
(b) Let G = (V, E) be a directed acyclic graph. Define the relation on V as in (a).
Show that is a partial order on V . When is a total order?
2.2 Let f : A B and g : B A be functions. Show that if f g = idB , then g is
injective and f is surjective. In particular, f (and also g) is bijective, if f g = idB and
g f = idA . In this case, we call g to be the inverse of f and denote this as g = f 1 .
Show by examples that both the conditions f g = idB and g f = idA are necessary
for f to be bijective.
2.3 Let f : A B a map from a finite set A to a finite set B. Prove that
(a) #A 6 #B, if f is injective,
(b) #A > #B, if f is surjective, and
(c) #A = #B, if f is bijective.
2.4 Let A be a finite set and let f : A A be a map. Show that the following conditions
are equivalent.
(1) f is injective.
(2) f is surjective.
(3) f is bijective.
Show by examples that this equivalence need not hold, if A is an infinite set.
2.5 Let A and B be two arbitrary sets, f : A B a map, A A and B B. We define
f (A ) := {y B | y = f (x) for some x A } and f 1 (B ) := {x A | f (x)
B }. Show that:
21
Mathematical Concepts
(a)
(b)
(c)
(d)
(e)
(f)
If A A A, then f (A ) f (A ).
If B B B, then f 1 (B ) f 1 (B ).
f 1 (f (A )) A .
f (f 1 (B )) B .
f (f 1 (f (A ))) = f (A ).
f 1 (f (f 1 (B ))) = f 1 (B ).
2.3 Groups
So far we have studied sets as unordered collections. However things start getting
interesting if we define one or more binary operations on sets. Such operations define
structures on sets and we compare different sets in light of their respective structures.
Groups are the first (and simplest) examples of sets with binary operations.
Definition 2.1
A group1 (G, ) is a set G together with a binary operation on G, that satisfy the
following three conditions:
(1) Associativity
(a b) c = a (b c) for all a, b, c G.
22
Public-key Cryptography
(3) Inverse For each a G, there exists a (unique) element b G such that
a b = b a = e. The element b is called the inverse of a.
If, in addition, we assume that
(4) Commutativity
a b = b a for all a, b G,
(1) The set Z is an Abelian group under addition. The identity is 0 and the inverse
of a is a. Note, however, that Z is not a group under multiplication, because
though it contains the multiplicative identity 1, multiplicative inverse is not defined for all elements in Z except 1.
(2) The set Q of non-zero rational numbers is a group under multiplication. The
identity is 1 = 1/1 and the inverse of a/b is b/a.
(3) For a set A, the set of all bijective functions A A is a group under composition
of functions. The identity element is idA and the inverse of f is denoted by f 1 .
(See also Exercise 2.2.) This group is not Abelian in general.
(4) The set Mm,n (R) of all m n matrices with entries from R is a group under
matrix addition. On the other hand, the set GLn (R) of all n n invertible
matrices over R is a group under matrix multiplication and is called the general
linear group. Note that GLn (R) is another example of a group that is not Abelian
(for n > 1).
(5) A group G is called finite, if G as a set consists of (only) finitely many elements.
Finite groups play an extremely important role in cryptography. Here is our first
example of finite groups: Let n be an integer > 2. The set
Zn := {0, . . . , n 1}
is a group under addition modulo n (that is, add (and subtract) two elements in
Zn as integers and if the result is not in Zn , take the remainder of division by n).
For this group, the identity element is 0 and a = n a for a 6= 0 and 0 = 0.
(See Example 2.3 for a formal definition of Zn .)
23
Mathematical Concepts
Proof
We prove only the left cancellation law. The proof of the other law is similar. Let e
denote the identity of G and d the inverse of a. Then b = e b = (d a) b =
d (a b) = d (a c) = (d a) c = e c = c.
Example 2.2
(1) For any group G with identity element e, the subsets {e} and G are subgroups of
G. They are called the trivial subgroups of G.
(2) For an integer n > 2, the set of all integral multiples of n is an additive subgroup
of Z and is denoted by nZ.
(3) The set SLn (R) consisting of all n n real matrices of determinant 1 is a
subgroup of GLn (R) and is commonly referred to as the special linear group.
(4) Note that though Zn in Example 2.1 is a subset of Z, it is not a subgroup of Z,
since it is not closed under the addition of Z. It is a group under addition modulo
n which is not the same as integer addition.
Let (G, ) be a group. For subsets A and B of G, we denote by A B the set
{a b | a A and b B}. In particular, if A = {a} (resp. B = {b}), then A B is
denoted by a B (resp. A b). Note that the sets A B and B A are not necessarily
equal. If G is Abelian, then A B = B A.
Definition 2.4
Let (G, ) be a group, H a subgroup of G and a G. The set a H is called the left
coset of a with respect to H and the set H a is called the right coset of a with respect
to H. If G is Abelian, then a left coset is naturally a right coset and vice versa. In that
case, we call a H (or H a) simply a coset.
From now onward, we consider left cosets only and call them cosets. If the underlying group is Abelian, then they are the same thing. The theory of right cosets can be
24
Public-key Cryptography
parallelly developed, but we choose to omit that here. For simplicity, we also assume
that the group G is a multiplicative group, so that the operation would be replaced by
(or by mere juxtaposition).
Proposition 2.2
Proof
Theorem 2.2
Proof
From Proposition 2.2, the cosets form a partition of G and there is a bijective map
from one coset to another. Hence by Exercise 2.3 all cosets have the same cardinality.
Finally, note that H is the coset of the identity element.
Definition 2.5
Definition 2.6
Example 2.3
(1) Let n be an integer > 2. The subgroup nZ of (Z, +) (Example 2.2) is normal,
since Z is Abelian. The coset of i Z is the set i + nZ = {i + jn | j Z}. The
quotient group Z/nZ is denoted as Zn and is essentially the same as the group
{0, 1, . . . , n 1} with the operation of addition modulo n (Example 2.1).
(2) For any group G with identity e, the trivial subgroups G and {e} are normal.
G/G is a group with a single element, whereas G/{e} is essentially the same as
the group G.
25
Mathematical Concepts
2.3.3 Homomorphisms
Definition 2.7
Example 2.4
Proposition 2.3
Let f be a group homomorphism from (G, ) to (G , ). Let e and e denote the identity
elements of G and G respectively. Then f (e) = e . If a, b G and c, d G satisfy
a b = e, c d = e and f (a) = c, then f (b) = d.
Proof
Definition 2.8
With the notations of the last proposition we define the kernel of f to be the following
subset of G:
Ker f := {a G | f (a) = e }.
We also define the image of f to be the subset
Im f := {b G | a G with b = f (a)}
of G . Then we have the following important theorem.
26
Public-key Cryptography
Theorem 2.3
Proof
Isomorphism theorem
and G/ Ker f
= Im f .
In order to simplify notations, let us assume that G and G are multiplicatively written
groups. For u, v Ker f , we have f (uv 1 ) = f (u)(f (v))1 = e , that is, uv 1
Ker f . By Exercise 2.8, Ker f is a subgroup of H. We now show that it is normal.
Note that for a G and u Ker f we have f (aua1 ) = f (a)f (u)f (a1 ) = e , that
is, aua1 Ker f , since f (u) = e and f (a1 ) = f (a)1 . By Exercise 2.10, Ker f
is a normal subgroup of G. Now let a = f (a) and b = f (b) be arbitrary elements of
Im f . Then, f (ab1 ) = a (b )1 , that is, a (b )1 Im f . Thus, by Exercise 2.8 Im f
is a subgroup of G .
Now define a map : G/ Ker f Im f that takes a Ker f 7 f (a). Let a Ker f =
b Ker f . Then by Proposition 2.2, a1 b Ker f , that is, b = au for some u Ker f .
But then f (b) = f (au) = f (a)f (u) = f (a)e = f (a). This shows that the map is
well-defined. It is easy to check that is a group homomorphism. Now (a Ker f ) =
(b Ker f ) implies f (a) = f (b), that is, f (a1 b) = e , that is, a1 b Ker f , that is,
a Ker f = b Ker f . Thus is injective. It is clearly surjective. Thus is bijective and
hence an isomorphism from G/ Ker f to Im f .
Example 2.5
(1) The additive groups Z and Zn are generated by 1 and hence are cyclic. The
multiplicative group Zn (n > 2) is cyclic if and only if n is 2, 4, pr or 2pr , where
p is an odd prime and r N (See Exercise 2.50). A generator of Zn for such an
n is often called a primitive root modulo n.
(2) The group (Q , ) is generated by the primes p/1, p P, and 1.
(3) Let G be a multiplicative group (not necessarily Abelian) with identity e and let
a G. Then the subgroup H generated by a is the set of elements of the form
ar , r Z, and is always Abelian. If H is finite, then the elements ar , r Z,
cannot be all distinct, that is, as = at for some s, t Z, s > t. Then ast = e,
where s t > 0. Now a1 = ast1 and, more generally, ak = ak(st1) .
27
Mathematical Concepts
Let G be a finite group with identity e. The order of G is defined to be the cardinality of
the set G and is denoted by ord G. The order of an element a G is the cardinality of
the subgroup of G generated by a and is denoted by ordG a or simply by ord a, when
G is understood from the context.
With these notations we prove the following important proposition.
Proposition 2.4
The order m := ordG a of a G is the smallest of the positive integers r for which
ar = e. If n = ord G, then n is an integral multiple of m. In particular, an = e.
Proof
Lemma 2.1 Let G be a finite cyclic group. Then any subgroup of G is also cyclic.
Proof
Proposition 2.5
Let G be a finite cyclic multiplicative group with identity e and let H be a subgroup of
order m. Then an element a G is an element of H if and only if am = e.
Proof
28
Public-key Cryptography
the existence of subgroups of order m . Sylows theorem considers the case that m is
a power of a prime.
Definition 2.11
Theorem 2.4
Cauchys theorem Let G be a finite group and p a prime dividing ord G. Then G has
a subgroup of order p.
Proof
Theorem 2.5
Proof
Let n := ord G. Note that if we can find an element a G such that ord a =
p, then the subgroup generated by a is the desired subgroup. To do that consider
the set S consisting of all p-tuples (a1 , . . . , ap ) with ai G such that a1 ap =
e. S consists of np1 elements, since we can choose a1 , . . . , ap1 arbitrarily and
independently from G and for each such choice of a1 , . . . , ap1 the value of ap =
(a1 ap1 )1 gets fixed. Since p divides n, it follows that p divides #S too. Now
we define a relation on S by (a1 , . . . , ap ) (b1 , . . . , bp ) if and only if (b1 , . . . , bp ) =
(ai , . . . , ap , a1 , . . . , ai1 ) for some i {1, . . . , p} (that is, (b1 , . . . , bp ) is a cyclic
shift of (a1 , . . . , ap )). It is easy to see that is an equivalence relation on S. The
equivalence class of (a1 , . . . , ap ) contains 1 or p elements depending on whether a1 =
= ap or not. Let r and s be the the number of equivalence classes containing 1
and p elements of S respectively. Then #S = r + sp, so that p divides r. Since the
equivalence class of (e, . . . , e) contains only one element, we must have r > 1, that is,
r > p. This, in turn, proves the existence of a G, a 6= e, such that (a, . . . , a) S.
But then ap = e.
Now we are in a position to prove the general theorem.
Sylows theorem Let G be a finite group of order n and let p be a prime dividing n.
Then there exists a p-Sylow subgroup of G.
We proceed by induction on n. If n = p, then G itself is a p-Sylow subgroup of G.
So we assume n > p and write n = pr m, where p does not divide m. If r = 1,
then the theorem follows from Cauchys theorem (Theorem 2.4). SoPwe assume r > 1
and consider the class equation of G, namely, #G = #Z(G) + [G : C(a)] (See
Exercise 2.16). If p does not divide [G : C(a)] for some a 6 Z(G), then #C(a) =
#G/[G : C(a)] = pr m < #G for some m < m. By induction, C(a) has a pSylow subgroup which is also a p-Sylow subgroup of G. On the other hand, if p divides
[G : C(a)] for all a 6 Z(G), then p divides #Z(G), as can be easily seen from the
class equation. We apply Cauchys theorem on Z(G) to obtain a subgroup H of Z(G)
with #H = p. By Exercise 2.16(b), H is a normal subgroup of G and we consider
the canonical surjection : G G/H. Since #(G/H) = pr1 m < n and r > 1,
by induction G/H has a p-Sylow subgroup, say K. But then 1 (K) is a p-Sylow
subgroup of G.
Note that if H is a p-Sylow subgroup of G and g G, then gHg 1 is also a pSylow subgroup of G. The converse is also true, that is, if H and H are two p-Sylow
Mathematical Concepts
29
subgroups of G, then there exists a g G such that H = gHg 1 . We do not prove this
assertion here, but mention the following important consequence of it. If G is Abelian,
then H = gHg 1 = gg 1 H = H, that is, there is only one p-Sylow subgroup of
t
1
G. If G is Abelian and #G = p
1 pt with pairwise distinct primes pi and with
i N, then G is the internal direct product of its pi -Sylow subgroups, i = 1, . . . , t
(Exercises 2.17 and 2.19).
E X E R C I S E S E T 2.3
2.8 Let G be a multiplicatively written group (not necessarily Abelian). Prove the following
assertions.
(a) For all elements a, b G, we have (ab)1 = b1 a1 and (a1 )1 = a.
(b) A subset H of G is a subgroup of G if and only if ab1 H for all a, b H.
2.9 Let G be a multiplicatively written group and let H and K be subgroups of G. Show
that:
(a) H K is a subgroup of G.
(b) H K is a subgroup of G if and only if H K or K H.
(c) HK is a subgroup of G if and only if HK = KH. In particular, if K is normal in
G, then HK is a subgroup of G.
(d) G G is a group and H K is a subgroup of G G.
(e) If g G, then gHg 1 is a subgroup of G.
2.10 (a) Let G be a multiplicatively written group and H a subgroup of G. Show that the
following conditions are equivalent:
(1) H is a normal subgroup of G.
(2) ghg 1 H for all g G and h H.
(3) gHg 1 = H for all g G.
(4) gH = Hg for all g G.
(b) Show that if [G : H] = 2, then H is normal.
2.11 Let G be a (multiplicative) group.
(a) Second isomorphism theorem Let H and K be subgroups of G and let K be
normal in G. Show that H/(H K)
= (HK)/K. [H]
(b) Third isomorphism theorem Let H and K be normal subgroups of G with
H K. Show that G/K
= (G/H)/(K/H) (where K/H = {aH | a K}). [H]
2.12 (a) Show that the only automorphisms of the group (Z, +) are the identity map and
the map that sends a 7 a.
(b) Show that the group of automorphisms of (Zn , +) is isomorphic to (Zn , ).
2.13 Let H be a subgroup of G generated by ai , i I. Show that H is the smallest subgroup
of G, that contains all of ai , i I.
2.14 Let : G G be a homomorphism of (multiplicative) groups. Show that:
(a) If H is a subgroup of G, then H := (H) is a subgroup of G . If is surjective
and H is normal, then H is also normal.
30
Public-key Cryptography
2.18 Let G be a finite (multiplicative) Abelian group with identity e. Assume that for every
n N there are at most n elements x of G satisfying xn = e. Show that G is cyclic.
[H]
2.19 Let G be a (multiplicative) group and let H1 , . . . , Hr be normal subgroups of G. If
G = H1 Hr and every element g G can be written uniquely as g = h1 hr with
hi Hi , then G is called the internal direct product of H1 , . . . , Hr . (For example, if G
is finite and Abelian, then by Exercise 2.17 it is the internal direct product of its Sylow
subgroups.) Show that:
(a) If G is finite, it is the internal direct product of normal subgroups H1 , . . . , Hr if
and only if G = H1 Hr and Hi Hj = {e} for all i, j, i 6= j.
(b) If G is the internal direct product of the normal subgroups H1 , . . . , Hr , then G is
isomorphic to the (external) direct product H1 Hr . [H]
2.20 Let Hi , i = 1, . . . , r, be finite Abelian groups of orders mi and let H := H1 Hr
be their direct product. Show that H is cyclic if and only if each Hi is cyclic and
m1 , . . . , mr are pairwise coprime.
31
Mathematical Concepts
2.4 Rings
So far we have studied algebraic structures with only one operation. Now we study
rings which are sets with two (compatible) binary operations. Unlike groups, these
two operations are usually denoted by + and . One can, of course, go for general
notations for these operations. However, that generalization doesnt seem to pay much,
but complicates matters. We stick to the conventions.
A ring (R, +, ) (or R in short) is a set R together with two binary operations + and
on R such that the following conditions are satisfied. As in the case of multiplicative
groups we write ab for a b.
(1) Additive group The set R is an Abelian group under +. The additive identity
is denoted by 0.
(2) is associative
(3) is commutative
32
Public-key Cryptography
Example 2.6
(1) The sets Z, Q, R and C are all rings under usual addition and multiplication.
Each of Q, R and C contains the multiplicative inverse of every non-zero element,
whereas the only elements in Z, that have multiplicative inverses, are 1.
(2) Let Zn denote the set {0, 1, . . . , n 1} for an integer n > 2. Then Zn is a
ring under addition and multiplication modulo n. The additive identity is 0 and
the multiplicative identity is 1. Later we see a more formal definition of this
ring. Recall from Example 2.1 how we have defined the groups Zn and Zn under
addition and multiplication modulo n. These groups have a connection with the
ring Zn as we will shortly see.
(3) Let R be a ring and S a set. The set of all functions S R is a ring under
pointwise addition and multiplication of functions (that is, if f and g are two such
functions, then we define (f + g)(a) := f (a) + g(a) and (f g)(a) := f (a)g(a)
for every a S). The additive (resp. multiplicative) identity in this ring is the
constant function 0 (resp. 1).
(4) Let R be a ring. The set R[X] of all polynomials in one indeterminate X and
with coefficients from R is a ring. The identity elements in R[X] are the constant
polynomials 0 and 1. The addition and multiplication operations in R[X] are the
standard ones on polynomials. For a non-zero polynomial f R[X], the largest
non-negative integer d for which the coefficient of X d is non-zero is called the
degree of the polynomial f and is denoted by deg f . The coefficient of X deg f in
f is called the leading coefficient of f and is denoted by lc(f ). The degree of the
zero polynomial is conventionally taken to be . A non-zero polynomial with
leading coefficient 1 is called a monic polynomial.
More generally, for n N one can define the ring R[X1 , . . . , Xn ] of multivariate
polynomials over R. Polynomial rings are of paramount importance in algebra
and number theory. We devote Section 2.6 to a study of these rings.
We also define the ring R(X) of rational functions over R, which consists of
elements of the form f /g with f, g R[X], g 6= 0. More generally, the
set of elements f /g with f, g R[X1 , . . . , Xn ], g 6= 0, is a ring denoted
R(X1 , . . . , Xn ).
Q
(5) Let Ri , i I, be a family of rings, and R := iI Ri the product of the sets
Ri , i I, that is, the set of all ordered tuples indexed by I. For tuples (ai )iI
and (bi )iI , define the sum (ai )iI + (bi )iI := (ai + bi )iI and the product
(ai )iI (bi )iI := (ai bi )iI . It is easy to see that R is a ring with identity
elements (0)iI and (1)iI . It is called the direct product of Q
the rings Ri , i I.
If I is of finite cardinality n and if Ri = A for all i I, then iI Ri is denoted
in short by An .
Proposition 2.6
Mathematical Concepts
Proof
33
Definition 2.13
Let R be a ring.
(1) R is called an integral domain (or simply a domain), if R 6= 0 and if R contains
no non-zero zero-divisors. Examples of integral domains: Z, Q, R, C, Z17 . On
the other hand, 3 5 = 0 in Z15 , so Z15 is not an integral domain.
(2) R is called a field, if R 6= 0 and if R = R \ {0}, that is, if every non-zero
element of R is a unit. This means that in a field one can divide any element by
any non-zero element. The most common fields are Q, R and C. Note that Z is
not a field, since, for example, 2 does not have a multiplicative inverse in Z.
(3) A field R with #R finite is called a finite field. The simplest examples of finite
fields are the fields Zp for prime integers p. In fact, it is easy to see that Zn is
a field if and only if n is a prime. Finite fields are widely applied for building
various cryptographic protocols. See Section 2.9 for a detailed study of finite
fields.
Corollary 2.1
Proof
34
Public-key Cryptography
Definition 2.15
Proposition 2.7
Proof
If p is composite, then we can write p = mn with 1 < m < p and 1 < n < p. But then
p = mn = 0 (in R). Since R is an integral domain, we must have m = 0 or n = 0 (in
R). This contradicts the minimality of p.
Definition 2.17
35
Mathematical Concepts
In this book, we will use Gothic letters (usually lower case) like a, b, c, p, q to
denote ideals.5
The condition for being an ideal is in one sense more stringent than that for being
a subring, that is, an ideal has to be closed under multiplication by any element of the
entire ring. On the other hand, we do not demand an ideal to necessarily contain the
identity element 1. In fact, 2Z is an ideal of Z. Conversely, Z is a subring of Q but not
an ideal. Subrings and ideals are different things.
Example 2.7
(1) Let R be any ring. The subset {0} is an ideal of R, called the zero ideal and
denoted also by 0. Similarly, the entire ring R is an ideal of R and is called the
unit ideal. Note that if an ideal a contains a unit u of R, then 1 = u1 u is also in
a and so a = a 1 a for every a R. It follows that an ideal a of R is the unit
ideal if and only if a contains a unita justification for the name.
(2) The integral multiples of an integer n form an ideal of Z denoted by nZ. More
generally, for any ring R and for any a R, the set {ra | r R} is an ideal of
R and is denoted by Ra or aR or hai. Such an ideal is called a principal ideal.
(See also Definition 2.18.)
Proposition 2.8
Proof
Definition 2.18
Theorem 2.6
(3) Let
R. The intersection
T R be a ring and let ai , i I, be a family of idealsPof
n
a
is
an
ideal
of
R.
The
set
of
finite
sums
the
form
i
iI
j=1 aij (where n N0
and aij aP
is
called
the
sum
of
the
ideals ai , i I, and is
ij ) is an ideal of R. It
S
denoted P
by iI ai . The union iI ai is, in general, not an
Sideal of R. In fact,
the sum iI ai is the smallest ideal that contains (the set) iI ai .
The only ideals of a field are the zero ideal and the unit ideal.
By definition, every non-zero element of a field is a unit.
36
Public-key Cryptography
Proof
Theorem 2.7
The zero ideal is generated by 0. Let a be a non-zero ideal of Z and let a be the smallest
positive integer contained in a. We claim that a = hai. Clearly, hai a. For the
converse, take b a. We can write b = aq + r, where q and r are the quotient and the
remainder of (Euclidean) division of b by a. Now r = b aq a and since 0 6 r < a,
by the choice of a we must have r = 0, so that b hai.
A very similar argument proves the following theorem. The details are left to the
reader. Also see Exercise 2.31.
If K is a field, then K[X] is a principal ideal domain.
Proof
Definition 2.19
Definition 2.20
Let R be a ring and a an ideal of R. Then a is a subgroup of the group (R, +). Since
(R, +) is Abelian, a is a normal subgroup (Definition 2.6). Thus the cosets a + a,
a R, form an additive Abelian group. We define multiplication on these cosets as
(a + a)(b + a) := ab + a. It is easy to check that this multiplication is well-defined.
37
Mathematical Concepts
Furthermore, the set of these cosets, denoted R/a, becomes a ring under this addition
and multiplication. The ring R/a is called the quotient ring of R with respect to a.
We say that two elements a, b R are congruent modulo an ideal a (of R) and
write a b (mod a), if a b a. Thus a b (mod a) if and only if a and b lie in the
same coset of a, that is, a + a = b + a.
Example 2.8
(1) For any ring R, the quotient ring R/0 is essentially the same as R and the quotient
ring R/R is the zero ring.
(2) The ring Zn of Example 2.6 is formally defined to be the quotient ring Z/nZ.
Convince yourself that both these definitions are equivalent.
Proposition 2.9
Proof
Corollary 2.2
Corollary 2.3
Proof
2.4.3 Homomorphisms
Recall how we have defined homomorphisms of groups. In a similar manner, we define
homomorphisms of rings. A ring homomorphism is a map from one ring to another,
which respects addition, multiplication and the identity element. More precisely:
Definition 2.21
38
Public-key Cryptography
Definition 2.22
Theorem 2.9
Isomorphism theorem With the notations of the last definition, Ker f is an ideal of
R, Im f is a subring of S and R/ Ker f
= Im f .
Proof
Definition 2.23
Two ideals a and b of a ring R are called relatively prime or coprime if a + b = R, that
is, if there exist a a and b b with a + b = 1.
Mathematical Concepts
39
Theorem 2.10
Proof
The assertion is obvious for n = 1. So assume that n > 2 and define the map :
R/(a1 an ) R/a1 R/an by a + (a1 an ) 7 (a + a1 , . . . , a + an )
for all a R. Since a1 an ai for all i, the map is well-defined. It is
easy to see that is a ring homomorphism. In order to show that is injective, we
let (a + (a1 an )) = 0. This means that a + ai = 0, that is, a ai for
all i. Then a a1 an , that is, a + (a1 an ) = 0. The trickier part
is to prove that is surjective. Let a1 , . . . , an R. Let us consider the ideal bi :=
a1 ai1 ai+1 an for each i. For a given i, there exist for each j 6= i
elements j ai and j aj with j +j = 1. Multiplying these equations shows that
we have a i ai such that i + i = 1, where i := 1 i1 i+1
P n bi . (This
shows that ai + bi = R for all i.) Now consider the element a := ni=1 i ai . It follows
that a ai (mod ai ) for all i, that is, (a + (a1 an )) = (a1 + a1 , . . . , an + an ).
In Section 2.5, we will see an interesting application of this theorem. Notice that
the injectivity of in the last proof does not require the coprimality of a1 , . . . , an ; the
surjectivity of requires this condition.
40
Public-key Cryptography
Note that for Z the concepts of prime and irreducible elements are the same. This
is indeed true for any PID (Proposition 2.12). Thus our conventional definition of a
prime integer p > 0 as one which has only 1 and p as (positive) divisors tallies with
the definition of irreducible elements above. For the ring K[X], on the other hand, it
is more customary to talk about irreducible polynomials instead of prime polynomials;
they are the same thing anyway.
Proposition 2.11 Let R be an integral domain and p R a prime. Then p is irreducible.
Proof
Let p = ab. Then p|(ab), so that by hypothesis p|a or p|b. If p|a, then a = up for some
u R. Hence p = ab = upb, that is, (1 ub)p = 0. Since R is an integral domain and
p 6= 0, we have 1 ub = 0, that is, ub = 1, that is, b is a unit. Similarly, p|b implies a
is a unit.
[if] Let p be irreducible, but not prime. Then there are a, b R such that a 6 hpi and
b 6 hpi, but ab hpi. Consider the ideal a = hi = hpi + hai. Since p hi, we have
p = c for some c R. By hypothesis, p is irreducible, so that either c or is a unit. If
c is a unit, hpi = hi = hpi + hai, that is, a hpi, a contradiction. So is a unit. Then
hpi + hai = R which implies that there are elements u, v R such that up + va = 1.
Similarly, there are elements u , v R such that u p + v b = 1. Multiplying these two
equations gives (uu p + uv b + u va)p + (vv )ab = 1. Now ab hpi, so that ab = wp
for some w R. But then (uu p + uv b + u va + vv w)p = 1, which shows that p is a
unit, a contradiction.
[only if] Immediate from Proposition 2.11.
Definition 2.25
The only if part is immediate from Proposition 2.11. For proving the if part, let p =
up1 pr (u R and pi primes in R) be irreducible. If r = 0, p is a unit, a contradiction. If r > 1, then p can be written as the product of two non-units up1 pr1 and
pr , again a contradiction. So r = 1.
Mathematical Concepts
41
A PID is a UFD
Proof
Let R be a PID and a R \ {0}. We show that a has a factorization of the form
a = up1 . . . pr , where u is a unit and p1 , . . . , pr are prime elements of R. If a is a unit,
we are done. So assume that a =: a0 is a non-unit and let a0 = ha0 i. Since a0 6= h1i,
there is a maximal ideal m1 = hp1 i containing a0 (Exercise 2.23). Then p1 is a prime
that divides a0 . Let a0 = a1 p1 . We have a0 a1 := ha1 i. If a1 is the unit ideal, we are
done. Otherwise we choose as before a prime p2 dividing a1 and with a1 = a2 p2 get
the ideal a2 := ha2 i properly containing a1 . Repeating this process we can generate a
strictly ascending chain a0 $ a1 $ a2 $ of ideals of R. Since R is a PID and hence
Noetherian, this process must stop after finitely many steps (Exercise 2.33).
The converse of the above theorem is not necessarily true. For example, the polynomial ring K[X1 , . . . , Xn ] over a field K is a UFD for every n N, but not a PID for
n > 2.
Divisibility in a UFD can be rephrased in terms of prime factorizations. Let R
be a UFD and let the non-zero elements a, b R have the prime factorizations a =
r
1
r
1
up
1 . . . pr and b = u p1 . . . pr with units u, u , pairwise non-associate primes
p1 , . . . , pr and with i > 0 and i > 0. Then a|b if and only if i 6 i for all
i = 1, . . . , r. This notion leads to the following definitions.
Definition 2.26
Let R be a UFD and let a, b R\{0} have prime factorizations as in the last paragraph.
Any associate of p11 . . . pr r , i := min(i , i ), is called a greatest common divisor of
a and b and is denoted by gcd(a, b). Clearly, gcd(a, b) is unique up to multiplication by
units of R. Similarly, any associate of p11 . . . prr , i := max(i , i ), is called a least
common multiple of a and b and is denoted by lcm(a, b). lcm(a, b) is again unique up
to multiplication by units of R. The gcd of a 6= 0 and 0 is taken to be an associate of a,
whereas gcd(0, 0) is undefined. On the other hand, lcm(a, 0) is defined to be 0 for any
a R.
It is clear that these definitions of gcd and lcm can be readily generalized for any
arbitrary finite number of elements.
Corollary 2.4
Let R be a UFD and a, b R not both zero. Then gcd(a, b) lcm(a, b) is an associate
of ab.
Proof
Corollary 2.5
Proof
Proposition 2.14 Let R be a PID and a, b be non-zero elements of R. Let d be a gcd of a and b. Then
hdi = hai + hbi. If f is an lcm of a and b, then hf i = hai hbi.
Proof
Let hai + hbi = hci. We show that c and d are associates. There exist u, v R such
that ua + vb = c. Since d|a and d|b, we have d|c. On the other hand, a hci, so that
42
Public-key Cryptography
c|a. Similarly c|b. Considering the prime factorizations of a and b one can then readily
verify that c|d. The proof for the second part is similar and is left to the reader.
A direct corollary to the last proposition is the following.
Corollary 2.6
Let R be a PID, a, b R (not both zero) and d a gcd of a and b. Then there are elements
u, v R such that ua + vb = d. In particular, the ideals hai and hbi are relatively prime
if and only if gcd(a, b) is a unit. In that case, we also say that the elements a and b are
relatively prime or coprime.
This completes our short survey of factorization in rings. Note that Z and K[X]
(for a field K) are PID and hence UFD. Thus all the results we have proved in this
section apply equally well to both these rings. It is because of this (and not of a mere
coincidence) that these two rings enjoy many common properties. Thus our abstract
treatment saves us from the duplicate effort of proving the same results once for integers
(Section 2.5) and once more for polynomials (Section 2.6).
E X E R C I S E S E T 2.4
2.21 For a non-zero ring R, prove the following assertions:
(a) A unit of R is not a zero-divisor.
(b) The product of two units of R is again a unit.
(c) The product of two non-units of R is again a non-unit.
(d) The element 0 is not a unit in R.
(e) The element 1 is always a unit in R.
(f) If a is a unit and ab = ac, then b = c.
Let K be a field. What are the units in the polynomial ring K[X]? In K[X1 , . . . , Xn ]?
In the ring K(X) of rational functions? In K(X1 , . . . , Xn )?
Let R be a ring, a, b R and n N. Show that
n nr r
(a + b)n =
a
b ,
r
r=0
n
X
where
n
r
n!
n(n 1) (n r + 1)
=
r!(n r)!
r!
Mathematical Concepts
43
(c) Show that the nilradical of R is the intersection of the prime ideals of R. [H]
2.25 Show that a finite integral domain R is a field. [H]
2.26 Let R be a ring of characteristic 0. Show that:
(a) R contains infinitely many elements.
(b) If R is an integral domain, then R contains as subring an isomorphic copy of Z.
(c) If R is a field, then R contains as subfield an isomorphic copy of Q.
2.27 Let f : R S be a ring-homomorphism and let a and b be ideals in R and S
respectively. Find examples to corroborate the following statements.
(a) Let a R be such that f (a) is a unit in S. Then a need not be a unit in R.
(b) The set f (a) = {b S | b = f (a) for some a R} need not be an ideal of S.
(c) If a = f 1 (b) and if b is maximal, then a need not be maximal.
2.28 Let K be a field.
(a) Show that a homomorphism from K to any non-zero ring is injective.
(b) Let L be another field and let f : K L and g : L K be homomorphisms
such that g f = idK . Show that f and g are isomorphisms.
2.29 (a) Show that a ring R is an integral domain if and only if 0 is a prime ideal of R.
(b) Give an example of a reduced ring that is not an integral domain. (Note that an
integral domain is always reduced.)
2.30 Let R be a ring and let a and b be ideals of R with a b. Show that b/a := {b + a | b
b} is an ideal of R/a and that (R/a)/(b/a)
= R/b. [H]
2.31 An integral domain R is called a Euclidean domain (ED) if there is a map : R\{0}
N0 satisfying the following two conditions:
(1) (a) 6 (ab) for all a, b R \ {0}.
(2) For every a, b R with b 6= 0, there exist (not necessarily unique) q, r R such
that a = qb + r with r = 0 or (r) < (b).
Show that:
(a) Z is a Euclidean domain with (a) = |a| for a 6= 0.
(b) The polynomial ring K[X] over a field K is a Euclidean domain with (a) = deg a
for a 6= 0.
(c) For d = 2, 1, 2, 3, the ring
Z[ d] := {a + b d | a, b Z}
44
Public-key Cryptography
(a) ap a.
(b)
a = a.
(c) If a b, then a b.
(d)
If a is a prime ideal, then a = a.
(e)
a = R if q
and only if a = R.
(f)
a+b=
a + b.
(g) a b = a b.
(h) The nilradical nR = 0.
2.33 Let R be a ring. An ascending chain of ideals a1 , a2 , . . . of R is a sequence a1
a2 . The ascending chain is called stationary, if there is some n0 N such that
an+1 = an for all n > n0 . Show that the following conditions are equivalent. [H]
(1) R is Noetherian (that is, every ideal of R is finitely generated).
(2) Every ascending chain of ideals in R is stationary.
(3) Every non-empty set of ideals of R has a maximal element.
2.34 (a) Let R be an integral domain. Define the set S := {(a, b) | a R, b R \ {0}}.
Define a relation on S as (a, b) (c, d) if and only if ad = bc. Show that is an
equivalence relation on S. Let us denote the equivalence class of (a, b) S by a/b and
the set of all equivalence classes of S under by K.
(b) Now define (a/b)+(c/d) := (ad+bc)/(bd) and (a/b)(c/d) := (ac)/(bd). Show
that these definitions make K a field. This field is called the quotient field of R and is
denoted as Q(R). This process resembles the formation of rational numbers from the
integers. Indeed, Q = Q(Z).
2.5 Integers
The set Z = {. . . , 2, 1, 0, 1, 2, . . .} of integers is the main object of study in this
section. We use many results from previous sections to derive properties of integers.
Recall that Z is a PID and hence a UFD.
2.5.1 Divisibility
The notions of divisibility, prime and relatively prime integers, gcd and lcm of integers
are essentially the same as discussed in connection with a PID or a UFD. We avoid
repeating the definitions here, but concentrate on other useful properties of integers, not
covered so far. We only mention that whenever we talk about a prime integer, or the
gcd or lcm of two or more integers, we will usually refer to a non-negative integer. This
convention makes primes, gcds and lcms unique.
Theorem 2.12
45
Mathematical Concepts
Proof
Theorem 2.13
For an integer a and an integer b 6= 0, there exist unique integers q and r such that
a = qb + r with 0 6 r < |b|.
Proof
Proposition 2.15 For integers a, b with b 6= 0, let r be the remainder of Euclidean division of a by b.
Then gcd(a, b) = gcd(b, r).
Proof
Proposition 2.16 Let a and b be two integers, not both zero, and let d be the (positive) gcd of a and b.
Then there are integers u and v such that d = ua + vb. (Such an equality is called a
Bezout relation.) Furthermore, if a and b are both non-zero and (|a|, |b|) 6= (1, 1), then
u and v can be so chosen that |u| < |b| and |v| < |a|.
Proof
The existence of u and v follows immediately from Proposition 2.14. If a = qb, then
u = 0 and v = 1 is a suitable choice. So assume that a 6 | b and b 6 | a, in which
case d < |a| and d < |b|. We may assume, without loss of generality, that a and b are
positive. First note that if (u, v) satisfies the Bezout relation, then for any k Z the pair
(u + kb, v ka) also satisfies the same relation. So we may replace v by its remainder
of Euclidean division by a and may assume |v| < a. But then |ua| b < |ua| d 6
|ua d| = |vb| 6 (a 1)b, which implies |u| < b.
The notions of the gcd and of the Bezout relation can be generalized to any finite
number of integers a1 , . . . , an as
gcd(a1 , . . . , an ) = gcd( (gcd(gcd(a1 , a2 ), a3 ) ), an ) = u1 a1 + + un an
for some integers u1 , . . . , un (provided that all the gcds mentioned are defined).
2.5.2 Congruences
Since Z is a PID, congruence modulo a non-zero ideal of Z can be rephrased in terms
of congruence modulo a positive integer as follows.
46
Public-key Cryptography
Definition 2.27
(1) and (2) follow from the consideration of the quotient ring Z/nZ. (3) follows from
repeated applications of (1) and (2). For the proof of (4), consider a b = kn and n =
k n for k, k Z. For proving (5), take a b = kn = lm. Then m/ gcd(n, m) divides
k(n/ gcd(n, m)). Since m/ gcd(n, m) and n/ gcd(n, m) are coprime, by Corollary 2.5
l := k/(m/ gcd(n, m)) is an integer and we have a/m b/m = l = kn/m =
l (n/ gcd(n, m)).
Let n1 , . . . , nr N with gcd(ni , nj ) = 1 for i 6= j. Then lcm(n1 , . . . , nr ) =
n1 nr , and by the Chinese remainder theorem (Theorem 2.10), we have
Zn1 Znr
= Zn1 nr .
This implies that, given integers a1 , . . . , ar , there exists an integer x unique modulo
n1 nr such that x satisfies the following congruences simultaneously:
x
x
..
.
x
a1 (mod n1 )
a2 (mod n2 )
ar (mod nr )
[if] By Proposition 2.16, there exist integers u and v such that ua + vn = 1. But then
ua 1 (mod n).
47
Mathematical Concepts
[only if] For some integers u and v, we have ua + vn = 1, which implies that the gcd
of a and n divides 1 and hence is equal to 1.
Definition 2.28
Theorem 2.14
Eulers theorem
Wilsons theorem
The result holds for p = 2. So assume that p is an odd prime. Since Zp is a field,
Fermats little theorem gives the factorization
X p1 1 (X 1)(X 2) (X (p 1)) (mod p) .
(2.1)
The structure of the group Zp , p P, can be easily deduced from Fermats little
theorem. This gives us the following important result.
Proposition 2.19 For a prime p, the group Zp is cyclic.
Proof
For every divisor d of p1, we have X p1 1 = (X d 1)f (X) for some f (X) Z[X]
with deg f = p 1 d. By Congruence 2.1, X p1 1 has p 1 roots modulo p. Since
Zp is a field, f (X) (mod p) cannot have more than p 1 d roots (Proposition 2.25)
and it follows that X d 1 has exactly d roots modulo p. In particular, if d = q e for some
q P and e N, then there exist exactly q e elements of Zp of orders dividing q e and
exactly q e1 elements of Zp of orders dividing q e1 , that is, there are q e q e1 > 0
elements of Zp of order q e . If p 1 = q1e1 qrer is the canonical prime factorization
of p 1 (with each ei > 1), by the above argument there exists an element ai Zp of
order pei i for each i = 1, . . . , r. It is now easy to check that a1 ar Zp has order
q1e1 qrer = p 1.
Eulers totient function plays an extremely important role in number theory (and
cryptology). We now describe a method for computing it.
Lemma 2.2 If n and n are relatively prime positive integers, then (nn ) = (n)(n ).
Proof
If a is invertible modulo nn , then clearly it is invertible modulo both n and n . Conversely, if ua 1 (mod n) and u a 1 (mod n ), then by the Chinese remainder
theorem there are integers x and , unique modulo nn , satisfying x u (mod n),
48
Public-key Cryptography
Integers between 0 and pe 1, which are relatively prime to pe are precisely those that
are not multiples of p.
Proposition 2.20 Let n = pe11 perr be the prime factorization of a positive integer n with r N0 , with
pairwise distinct primes p1 , . . . , pr and with ei > 0. Then
(n)
Proof
Theorem 2.17
Let d := gcd(a, n). Then the congruence ax b (mod n) is solvable for x if and only
if d|b. A solution of the congruence, if existent, is unique modulo n/d.
Proof
[if] By Proposition 2.17, (a/d)x b/d (mod n/d). Since gcd(a/d, n/d) = 1, the
congruence (a/d)x 1 (mod n/d) is solvable for x . Then a solution for x is
x (b/d)x (mod n/d).
[only if] There exists an integer k such that ax + kn = b. This shows that d|b.
To prove the uniqueness let x and x be two integers satisfying the given congruence. But then a(x x ) 0 (mod n), that is, (a/d)(x x ) 0 (mod n/d), that is,
x x 0 (mod n/d), since gcd(a/d, n/d) = 1.
The last theorem implies that if d|b, then the congruence ax b (mod n) has d
solutions modulo n. These solutions are given by + r(n/d), r = 0, . . . , d 1, where
is the solution modulo n/d of the congruence (a/d) b/d (mod n/d).
Mathematical Concepts
Definition 2.29
Definition 2.30
49
Let p be an odd prime and a an integer with gcd(a, p) = 1. We say that a is a quadratic
residue modulo p, if the congruence x2 a (mod p) has a solution (for x). Otherwise
we say that a is a quadratic non-residue modulo p.
If a is a quadratic residue modulo an odd prime p, then the equation x2 a (mod p)
has exactly two solutions. If is one solution, the other solution is p . It is, therefore,
evident that there are exactly (p 1)/2 quadratic residues and exactly (p 1)/2
quadratic non-residues modulo p. For example, the quadratic residues modulo p = 11
are 1 = 12 = 102 , 3 = 52 = 62 , 4 = 22 = 92 , 5 = 42 = 72 and 9 = 32 = 82 . The
quadratic non-residues modulo 11 are, therefore, 2, 6, 7, 8 and 10. We treat 0 neither as
a quadratic residue nor as a quadratic non-residue.
Let p be an odd prime and a an integer with gcd(a, p) = 1. The Legendre symbol ap
is defined as:
a
1
if a is a quadratic residue modulo p,
:=
1 if a is a quadratic non-residue modulo p.
p
50
Public-key Cryptography
Lemma 2.4 Gauss Let p be an odd prime and a an integer with gcd(a, p) = 1. Let us denote
t := (p 1)/2. For an integer i, let ri be the unique integer with ri ia (mod p)
andt 6 ri 6 t. Let n be the number of i, 1 6 i 6 t, for which ri is negative. Then
a
n
p = (1) .
Proof
Definition 2.31
Let x R. The largest integer smaller than or equal to x is called the floor of x and
is denoted by x. Similarly, the smallest integer larger than or equal to x is called the
ceiling of x and is denoted by x.
j
k
Pt
With the notations of Lemma 2.4 we have n j=1 2ja
(mod 2). If a is odd, then
p
Pt j ja k
p2 1
2
n j=1 p (mod 2). In particular, p = (1) 8 , that is, 2 is a quadratic
Corollary 2.7
Proof
Theorem 2.18
Proof
p
q
q
p
= (1)m+n , where m =
Ps
j=1
jp
q
,n=
Pt
j=1
jq
p
51
Mathematical Concepts
To demonstrate how we can use the results deduced so far, let us compute
Since 360 = 23 32 5, we have
5
360
2
= 997
(by Proposition 2.21)
997
997
9972 1
5
5
= (1) 8
= 997
(by Corollary 2.7)
997
51 9971
997
997
2
2
= (1)
= 5
(by Theorem 2.18)
5
= 25
(by Proposition 2.21)
= (1)
Definition 2.32
52 1
8
= 1
360
997
.
Thus 360 is a quadratic residue modulo 997. The apparent attractiveness of this method
is beset by the fact that it demands the factorization of several integers and as such does
not lead to a practical algorithm. We indeed need further machinery in order to have an
efficient algorithm. First, we define a generalization of the Legendre symbol.
Let a, b be integers with b > 0 and odd. We define the Jacobi symbol ab as
if gcd(a, b) 6= 1,
0
a
1
if b = 1,
:= Q
t
b
a
if gcd(a, b) = 1 and b = p . . . p ,
i=1
pi
where, in the last case, p1 , . . . , pt are all the prime factors of b (not necessarily all
distinct).
Note that if ab 6= 1, then a is not a quadratic residue mod b. However, the converse
is not always true, that is, ab = 1 does not necessarily imply that a is a quadratic
residue modulo b (Example: a = 2 and b = 9). Ofcourse, if b is an odd prime and if
gcd(a, b) = 1, the Legendre and Jacobi symbols ab correspond to the same value and
meaning.
The Jacobi symbol enjoys many properties similar to the Legendre symbol.
Proposition 2.22 For integers a, a and positive odd integers b, b , we have:
a
(1) aab = ab
b ,
(2) bba = ab ba , and
(3) if a a (mod b), then ab = ab . In particular, if r is the remainder of
Euclidean division of a by b, then ab = rb .
Proof
Theorem 2.19
52
Public-key Cryptography
Proof
b1
2
x1
2
y1
2
xy1
2
a similar manner and note that for odd integers x and y one has
2 2
x y 1
8
x2 1
8
y 2 1
8
(mod 2).
pi
pj
!
pj
pi
= (1)m ,
X
X
s
t
s X
t
X
pj 1
pi 1
pi 1 pj 1
=
2
2
2
2
i=1
j=1
i=1 j=1
b1a1
(mod 2).
2
2
360
53
Mathematical Concepts
Prime Number Theorem Let (x) denote the number of primes less than or equal
to a real number x > 0. As x we have (x) x/ln x (that is, the ratio
(x)/(x/ln x) 1). In particular, for n N the density (n)/n of primes among the
natural numbers 6 n asymptotically approaches 1/ ln n as n . It also follows that
the n-th prime is approximately equal to n ln n.
Though the prime number theorem provides an asymptotic estimate (that is, one for
x ), for finite values of x (for example, for the values of x in the cryptographic
range) it does give good approximations for (x). Table 2.1 lists (x) against the
rounded values of x/ ln x for x equal to small powers of 10.
x
103
104
105
106
107
108
Given the prime number theorem it follows that (x) approaches x/(ln x ) for any
real . It turns out that = 1 is the best choice. Gauss Li function is also an asymptotic
estimate for (x), where for real x > 0 one defines:
Z x
d
Li(x) := The principal value of the integral
=0 ln
Gauss conjectured that Li(x) asymptotically equals (x). The prime number theorem
is, in fact, equivalent to this conjecture. Furthermore, de la Vallee Poussin proved that
54
Public-key Cryptography
Li(x) is a better approximation to (x) than x/(ln x ) for any real . Table 2.1 also
lists x/(ln x 1) and Li(x) against the actual values of (x).
(x)
The asymptotic formula limx x/
ln x = 1 does not rule out the possibility that
the error (x)(x/ ln x) tends to zero as x . It has been shown by Dusart [83] that
(x/ ln x) 0.992(x/ ln2 x) 6 (x) 6 (x/ ln x) + 1.2762(x/ ln2 x) for all x > 598.
Density of smooth integers
Integers having only small prime divisors play an interesting role in cryptography and
in number theory in general.
Definition 2.33
Theorem 2.21
Let x, y N with x > y and let u := ln x/ ln y. For u and y > ln2 x we have
the asymptotic formula:
(x, y) uu+o(u) = e[(1+o(1))u ln u] .
In Theorem 2.21, the notation g(u) = o(f (u)) implies that the ratio g(u)/f (u) tends
to 0 as u approaches . See Definition 3.1 for more details. An interesting special
case of the formula for (x, y) will be used quite often in this book and is given as
Corollary 4.1 in Chapter 4.
Like the prime number theorem, Theorem 2.21 gives only asymptotic estimates, but
is indeed a good approximation for finite values of x, y and u (that is, for the values of
practical interest). The most important implication of this theorem is that the density
of y-smooth integers in the set {1, . . . , x} is a very sensitive function of u = ln x/ ln y
and decreases very rapidly as x increases. For example, if y = 15,485,863, the
millionth prime, then a random integer 6 2250 is y-smooth with probability approximately 2.12 1011 , whereas a random integer 6 2500 is y-smooth with probability
approximately 2.23 1028 . (These figures are computed neglecting the o(u) term in
the expression of (x, y).) In other words, smaller integers have higher probability of
being smooth (that is, y-smooth for a given y).
The Euler zeta function (s) is defined for a complex variable s with Re s > 1 as
(s) :=
X 1
Y
1
1
1
1
+
+
+
=
=
.
1s
2s
3s
ns
1 ps
nN
pP
55
Mathematical Concepts
The reader may already be familiar with the results: (1) = , (2) = 2 /6 and
(4) = 4 /90. Riemann (analytically) extended the Euler Zeta function for all complex
values of s (except at s = 1, where the function has a simple pole). This extended function, called the Riemann zeta function, is known to have zeros at s = 2, 4, 6, . . . .
These are called the trivial zeros of (s). It can be proved that all non-trivial zeros of
(s) must lie in the so-called critical strip: 0 6 Re s 6 1, and are symmetric about the
critical line: Re s = 1/2.
Conjecture 2.1
In 1900, Hilbert asserted that proving or disproving the RH is one of the most important
problems confronting 20th century mathematicians. The problem continues to remain
so even to the 21st century mathematicians.
In 1901, von Koch proved that the RH is equivalent to the formula:
Conjecture 2.2
Here the order notation f (x) = O(g(x)) means that |f (x)/g(x)| is less than a constant
for all sufficiently large x (See Definition 3.1).
Hadamard and de la Vallee Poussin proved that
ln x
for some positive constant . While this estimate was sufficient to prove the prime
number theorem, the tighter bound of Conjecture 2.2 continues to remain unproved.
Theorem 2.22
Definition 2.35
Let a, b N with gcd(a, b) = 1. By a,b (x), we denote the number of primes in the
set {a + bd | d N0 }, that are 6 x.
The prime number theorem gives the estimate:
a,b (x)
(1 + o(1)) x
(b) ln x
as x ,
1
Li(x) + O(x1/2 ln x) .
(b)
Some authors use the expression Generalized Riemann hypothesis (GRH) in place
of ERH. Taking b = 1 demonstrates that the ERH implies the RH. The ERH also
implies the following:
Conjecture 2.4
56
Public-key Cryptography
E X E R C I S E S E T 2.5
2.35 (a) Show that any integer n > 3 satisfies n2 = a2 b2 for some a, b N.
(b) Show that for any integer n > 2 the integer n4 + 4n is composite.
2.36 Let n N and S a subset of {1, 2, ..., 2n} of cardinality n + 1. Show that: [H]
(a) There exist x, y S such that x y = 1.
(b) There exist x, y S such that x y = n.
(c) There exist distinct x, y S such that x is a multiple of y.
(d) There exist distinct x, y S such that x is relatively prime to y.
2.37 Show that for any n N, n > 1, the rational number
Pn
1
i=1 i
2.38 (a) Show that the Mersenne number Mn := 2n 1 is prime only if n is prime.
(b) Show that the Fermat number 2n + 1 is prime only if n = 2t for some t N.
2.39 Let n > 2 be a natural number. A complete residue system modulo n is a set of n
integers a1 , . . . , an such that ai 6 aj (mod n) for i 6= j. Similarly, a reduced residue
system modulo n is a set of (n) integers b1 , . . . , b(n) such that gcd(bi , n) = 1 for all
i = 1, . . . , (n) and bi 6 bj (mod n) for i 6= j. Show that:
(a) If {a1 , . . . , an } is a complete residue system modulo n, the equivalence classes
of a1 , . . . , an (modulo the ideal nZ) constitute the set Zn . In other words, given any
integer a, there exists a unique i, 1 6 i 6 n, for which a ai (mod n).
(b) If {b1 , . . . , b(n) } is a reduced residue system modulo n, then the equivalence
classes of b1 , . . . , b(n) constitute the set Zn . In other words, given any integer b
coprime to n, there exists a unique i, 1 6 i 6 (n), for which b bi (mod n).
(c) If {a1 , . . . , an } is a complete residue system modulo n, then for any integer a
coprime to n, the integers aa1 , . . . , aan constitute a complete residue system modulo
n. For example, if n is odd, then {2, 4, 6, . . . , 2n} is a complete residue system modulo
n.
(d) If {b1 , . . . , b(n) } is a reduced residue system modulo n, then for any integer b
coprime to n, the integers bb1 , . . . , bb(n) constitute a reduced residue system modulo
n.
(e) For n > 2, the integers 12 , 22 , . . . , n2 do not constitute a complete residue system
modulo n. [H]
(f) If p is an odd prime and if {a1 , . . . , ap } and {a1 , . . . , ap } are two complete residue
systems modulo p, then {a1 a1 , . . . , ap ap } is not a complete residue system modulo p.
[H]
2.40 Prove that the decimal expansion of any rational number a/b is recurring, that is,
(eventually) periodic. (A terminating expansion may be viewed as one with recurring
0.) [H]
2.41 Let p be an odd prime. Show that the congruence x2 1 (mod p) is solvable if and
only if p 1 (mod 4). [H]
2.42 Let n N.
Mathematical Concepts
57
2.44 Let n > 2 and gcd(a, n) = 1. Let h be the multiplicative order of a modulo n (that is,
in the group Zn ). Show that:
(a) ai aj (mod n) if and only if i j (mod h).
(b) The multiplicative order of al modulo n is h/ gcd(h, l).
(c) If a is a primitive element of Zn (that is, if h = (n)), then 1, a, a2 , . . . , ah1 is a
reduced residue system modulo n.
(d) If gcd(b, n) = 1 and b has multiplicative order k modulo n and if gcd(h, k) = 1,
then the multiplicative order of ab modulo n is hk.
2.45 Device a criterion for the solvability of ax2 + bx + c 0 (mod p), where p is an odd
prime and gcd(a, p) = 1. [H]
2.46 Let p be a prime and r N. An integer a with gcd(a, p) = 1 is called an r-th power
residue modulo p, if the congruence xr a (mod p) has a solution. Show that a is an
r-th power residue modulo p if and only if a(p1)/ gcd(r,p1) 1 (mod p). This is a
generalization of Eulers criterion for quadratic residues.
2.47 Let G be a finite cyclic group of cardinality n. Show that G
= (Zn , +) and that there
are exactly (n) generators (that is, primitive elements) of G.
2.48 Let m, n N with m|n. Show that the canonical (surjective) ring homomorphism
Zn Zm induces a surjective group homomorphism Zn Zm of the respective
groups of units. (Note that every ring homomorphism : A B induces a group
homomorphism : A B , where A and B are the groups of units of A and B
respectively. Even when is surjective, need not be surjective, in general. As an
example consider the canonical surjection Z Zp = Z/hpi for a prime p > 3.)
2.49 In this exercise, we investigate which of the groups Zpe is cyclic for a prime p and
e N.
(a) Show that Z2 and Z4 are cyclic, but Z8 is not cyclic. Conclude that Z2e is not
cyclic for e > 3. [H] More specifically, show that for e > 3 the multiplicative group
Z2e is the direct product of two cyclic subgroups generated by 1 and 5 respectively.
(b) Show that if p is an odd prime and e N, then Zpe is cyclic. [H]
2.50 Show that the multiplicative group Zn , n > 2, is cyclic if and only if n = 2, 4, pe , 2pe ,
where p is an odd prime and e N. [H]
2.6 Polynomials
Unless otherwise stated, in this section we denote by K an arbitrary field and by K[X]
the ring of polynomials in one indeterminate X and with coefficients from K. Since
58
Public-key Cryptography
K[X] is a PID, it enjoys many properties similar to those of Z. To start with, we take
a look at these properties. Then we introduce the concept of algebraic elements and
discuss how irreducible polynomials can be used to construct (algebraic) extensions of
fields. When no confusions are likely, we denote a polynomial f (X) K[X] by f
only.
Mathematical Concepts
59
f (X), denoted g(X) h(X) (mod f (X)), if f (X)|(g(X) h(X)), that is, if there
exists u(X) K[X] with g(X) h(X) = u(X)f (X), or equivalently, if g(X) rem
f (X) = h(X) rem f (X).
The principal ideals hf (X)i of K[X] play an important role (as do the ideals hni
of Z). Let us investigate the structure of the quotient ring R := K[X]/hf (X)i for a
non-constant polynomial f (X) K[X]. If r(X) denotes the remainder of division
of g(X) K[X] by f (X), then it is clear that the residue classes of g(X) and r(X)
are the same in R. On the other hand, two polynomials g(X), h(X) K[X] with
deg g(X) < deg f (X) and deg h(X) < deg f (X) represent the same residue class
in R if and only if g(X) = h(X). Thus elements of R are uniquely representable as
polynomials of degrees < deg f (X). In other words, we may represent the ring R as the
set {g(X) K[X] | deg g(X) < deg f (X)} together with addition and multiplication
modulo the polynomial f (X). The ring R contains all the constant polynomials a K,
that is, the field K is canonically embedded in R. In general, R is not a field. The next
theorem gives the criterion for R to be a field.
Theorem 2.23
For a non-constant polynomial f (X) K[X], the ring K[X]/hf (X)i is a field if and
only if f (X) is irreducible in K[X].
Proof
If f (X) is reducible over K, then we can write f (X) = g(X)h(X) for some polynomials g(X), h(X) K[X] with 1 6 deg g < deg f and 1 6 deg h < deg f . Then
both g and h represent non-zero elements in K[X]/hf (X)i, whose product is 0, that is,
K[X]/hf (X)i has non-zero zero divisors.
Conversely, if f (X) is irreducible over K and if g(X) is a non-zero polynomial of
degree < deg f (X), then gcd(f (X), g(X)) = 1, so that by Proposition 2.23 there exist
polynomials u(X), v(X) K[X] with u(X)f (X) + v(X)g(X) = 1 and deg v(X) <
deg f (X). Thus we see that v(X)g(X) 1 (mod f (X)), that is, g(X) has a
multiplicative inverse modulo f (X).
Let L := K[X]/hf (X)i with f (X) irreducible over K. Then K L is a field
extension. If deg f (X) = 1, then L is isomorphic to K. If deg f (X) > 2, then L is
a proper extension of K. This gives us a useful and important way of representing the
extension field L, given a representation for K. (For example, see Section 2.9.)
Proposition 2.24 Let f (X) K[X] and a K. Then f (X) = (X a)q(X) + f (a) for some q(X)
K[X]. In particular, a is a root of f (X) if and only if X a divides f (X).
Proof
Proposition 2.25 A non-zero polynomial f K[X] with d := deg f can have at most d roots in K.
60
Public-key Cryptography
Proof
Proposition 2.26 For any non-constant polynomial f K[X], there exists a field extension K of K
such that f has a root in K .
Proof
Proposition 2.27 A non-constant polynomial f in K[X] with deg f = d has d roots (not necessarily all
distinct) in some field extension L of K.
If a polynomial f K[X] of degree d > 1 has all its roots 1 , . . . , d in L, then
f (X) = a(X 1 ) (X d ) for some a L (actually a K). In this case, we
say that f splits (completely or into linear factors) over L.
Definition 2.37
Mathematical Concepts
61
Let f be a non-constant polynomial in K[X] and let be a root of f (in some extension
of K). The largest natural number n for which (X )n |f (X) is called the multiplicity
of the root (in f ). If n = 1 (resp. n > 1), then is called a simple (resp. multiple)
root of f . If all the roots of f are simple, then we call f a square-free polynomial. It is
easy to see that f is square-free, only if f is not divisible by the square of a non-constant
polynomial in K[X]. The reverse implication also holds, if char K = 0 or if K is a
finite field (or, more generally, if K is a perfect fieldsee Exercise 2.76).
The notion of multiplicity can be extended to a non-root of f by setting the
multiplicity of to zero.
Example 2.10
3
(2) The element := 2 + 3 R is algebraic over Q, since is a root of the
polynomial (X 3 2)2 3 = X 6 4X 3 + 1 Q[X].
(3) The well-known real numbers e and are transcendental over Q. (We are not
going to prove this.) Of course, the concept of algebraic and transcendental
elements is heavily dependent on the field K. For example, e and , being
elements of R, are algebraic over R.
Definition 2.40
62
Public-key Cryptography
Proof
Example 2.11
[(a)(b)] Consider a non-constant irreducible polynomial f (X) K[X] and the field
extension L = K[X]/hf i of K. We have seen that L contains a root of f . We will
prove in Section 2.8 that such an extension is algebraic (Corollary 2.11). Hence (a)
implies that L = K, that is, K contains a root of f .
[(b)(c)] Let f K[X] be a non-constant polynomial. By (b), f has a root, say, 1
K. Thus f (X) = (X 1 )f1 (X) for some f1 K[X] with deg f1 = (deg f ) 1.
If f1 is a constant polynomial, we are done. Otherwise, we find as above 2 K and
f2 K[X] with f1 (X) = (X 2 )f2 (X) and with deg f2 = (deg f ) 2. Proceeding
in this way proves (c).
[(c)(d)] Obvious.
[(d)(a)] Let L be algebraic over K and let f (X) := minpoly,K (X) K[X].
Since f is irreducible, by (d) deg f = 1, that is, f (X) = X , that is, K.
Definition 2.41
63
Mathematical Concepts
the theorem in this book, because every known proof of it uses some kind of complex
analysis which this book does not deal with.
Theorem 2.24
E X E R C I S E S E T 2.6
2.51 Let R be a ring and f, g R[X]. Show that:
(a) deg(f + g) 6 max(deg f, deg g) with equality holding, if deg f 6= deg g.
(b) deg(f g) 6 deg f + deg g with equality holding, if R is an integral domain.
(c) If R is an integral domain, then R[X] is an integral domain too. More generally, if
R is an integral domain, then R[X1 , . . . , Xn ] is also an integral domain for all n N.
2.52 Let f, g R[X], where R is an integral domain. Show that if f (ai ) = g(ai ) for
i = 1, . . . , n, where n > max(deg f, deg g) and where a1 , . . . , an are distinct elements
of R, then f = g. In particular, if f (a) = g(a) for an infinite number of a R, then
f = g.
2.53 Lagranges interpolation formula Let K be a field and let a0 , . . . , an be distinct
elements of K. Show that for b0 , . . . , bn K (not necessarily all distinct), there exists
a unique polynomial f (X) K[X] of degree 6 n such that f (ai ) = bi for all i =
0, . . . , n. [H]
2.54 Polynomials over a UFD Let R be a UFD. For a non-zero polynomial f (X)
R[X], a gcd of the coefficients of f is called a content of f and is denoted by cont f .
One can then write f = (cont f )f1 , where f1 R[X] with cont f1 R . f1 is called
a primitive part of f and is often denoted as pp f . It is clear that cont f and pp f are
unique up to multiplication by units of R. If for a non-zero polynomial f R[X] the
content cont f R (or, equivalently, if f and pp f are associates), then f is called
a primitive polynomial. Show that for two non-zero polynomials f, g R[X] the
elements cont(f g) and (cont f )(cont g) are associates in R. In particular, the product
of two primitive polynomials is again primitive.
2.55 Let R be a UFD. Show that a non-constant polynomial f R[X] is irreducible over R
if and only if f is irreducible over Q(R), where Q(R) denotes the quotient field of R
(see Exercise 2.34).
2.56 (a) Eisensteins criterion Let R be a UFD and f (X) = an X n + + a0 R[X]
with an 6= 0. Suppose that there is a prime p R such that p does not divide an , p
divides ai for all i, 0 6 i 6 n 1, and p2 does not divide a0 . Show that f is irreducible
over R.
(b) As an application of Eisensteins criterion show that for a prime p P the polynomial X p1 + + X + 1 is irreducible in Z[X]. [H]
64
Public-key Cryptography
65
Mathematical Concepts
A vector space V over a field K (or a K-vector space, in short) is an (additively written)
Abelian group V together with a multiplication map : K V V called the scalar
multiplication map, such that the following properties are satisfied by every a, b K
and x, y V .
(1)
(2)
(3)
(4)
a (x + y) = a x + a y,
(a + b) x = a x + b x,
1 x = x,
a (b x) = (ab) x,
where ab denotes the product of a and b in the field K. When no confusions are likely,
we omit the scalar multiplication sign and write a x simply as ax.
Example 2.12
(1) Any field K is trivially a K-vector space with the scalar multiplication being the
same as the field multiplication. More generally, if K L is a field extension,
then L is a K-vector space.
(2) For n N, the product K n = K K (n factors) is a K-vector space under
the scalar multiplication map a(x1 , . . . , xn ) := (ax1 , . . . , axn ). For arbitrary Kvector spaces V1 , . . . , Vn , we can analogously define the product V1 Vn .
(3) The polynomial ring K[X] (or K[X1 , . . . , Xn ]) is a K-vector space (with the
natural scalar multiplication).
Corollary 2.8
Proof
Easy verification.
Definition 2.43
Let V be a vector space over K and S a subset of V . We say that S is a generating set
or a set of generators of V (over K), or that S generates V (over K), if every element
x V can be written as a finite linear combination x = a1 x1 + + an xn for some
n N0 (depending on x) and with ai K and xi S for 1 6 i 6 n. A generating
set S of V is called minimal, if no proper subset of S generates V . If V has a finite
generating set, then V is called finitely generated or finite-dimensional.
Example 2.13
66
Public-key Cryptography
Theorem 2.25
Proof
Definition 2.45
Mathematical Concepts
67
A K-vector space V may have many K-bases. For example, the elements 1, aX +
b, (aX + b)2 , . . . form a K-basis of K[X] for any a, b K, a 6= 0. However, what
is unique in any basis of a given K-vector space V is the cardinality8 of the basis, as
shown in Theorem 2.26.
For the sake of simplicity, we sometimes assume that V is a finitely generated Kvector space. This assumption simplifies certain proofs greatly. But it is important
to highlight here that, unless otherwise stated, all the results continue to remain valid
without the assumption. For example, it is a fact that every vector space has a basis. For
finitely generated vector spaces, this is a trivial statement to prove, whereas without our
assumption we need to use arguments that are not so simple. (A possible proof follows
from Exercise 2.63 with U = {0}.)
Theorem 2.26
Let V be a K-vector space. Then any K-basis of V has the same cardinality.
Proof
Definition 2.46
Let V be a K-vector space. The cardinality of any K-basis of V is called the dimension
of V over K and is denoted by dimK V (or by dim V , if K is understood from the
context). We call V finite-dimensional (resp. infinite-dimensional), if dimK V is finite
(resp. infinite).
Pn
n
For example, dimK K = n, dimK (V1 Vn ) =
i=1 dimK Vi , and
dimK K[X] = .
Definition 2.47
Example 2.14
68
Public-key Cryptography
(2) Let S be
subset of V (not necessarily linearly independent). Then the set
Pany
n
U := { i=1 ai xi | n N0 , ai K, xi S} is a vector subspace of V . We say
that U is spanned or generated by S, or that SPgenerates or spans U , or that U is
the span of S. This is often denoted by U = xS Kx or by U = Span S. If S
is linearly independent, then S is a basis of U .
Definition 2.48
Theorem 2.27
Let V and W be K-vector spaces. Then V and W are isomorphic if and only if
dimK V = dimK W .
Proof
If dimK V = dimK W and S and T are bases of V and W respectively, then there
exists
Pn a bijection fP:nS T . One can extend f to a linear map f : V W as
Corollary 2.9
(2.2)
For f HomK (V, W ), the set {x V | f (x) = 0} is called the kernel Ker f of
f , and the set {y W | y = f (x) for some x V } is called the image Im f of f . We
have the isomorphism theorem for vector spaces:
Theorem 2.28
Proof
Isomorphism theorem
V / Ker f
= Im f .
in Footnote 2, we continue to be lucky here: The inverse of a bijective linear transformation is again
a linear transformation.
Mathematical Concepts
69
Definition 2.49
For f HomK (V, W ), the dimension of Im f is called the rank of f and is denoted
by Rank f , whereas the dimension of Ker f is called the nullity of f and is denoted by
Null f . An immediate consequence of the isomorphism theorem and of Equation (2.2)
is the following important result.
Theorem 2.29
* 2.7.2 Modules
If we remove the restriction that K is a field and assume that K is any ring, then a
vector space over K is called a K-module. More specifically, we have:
Definition 2.50
Example 2.15
(1) Vector spaces are special cases of modules, when the underlying ring is a field.
(2) Ideals of R are modules over R with the ring multiplication map taken as the
scalar multiplication.
(3) Every Abelian group G is a Z-module under the scalar multiplication
if n = 0 ,
0
n x := x + + x (n times) if n > 0 ,
((n)x)
if n < 0 .
(4) The polynomial rings R[X] and R[X1 , . . . , Xn ] are modules over R.
Q
(5) Let Mi , i I, be a family of R-modules. The direct product
L iI Mi of Mi is
defined as the set of all tuples
Q indexed by I. The direct sum iI Mi is the subset
of the Cartesian product iI Mi consisting only of the tuples (ai )iI for which
ai = 0 except for a finite number of i I. Both the direct product and the direct
sum are R-modules under component-wise addition and scalar multiplication.
When I is finite, they are naturally the same.
Modules are a powerful generalization of vector spaces. Any result we prove for
modules is equally valid for vector spaces, ideals and Abelian groups. On the other
hand, since we do not demand that the ring R be necessarily a field, certain results for
vector spaces are not applicable for all modules.
It is easy to see that Corollary 2.8 continues to hold for modules. An R-submodule
of an R-module M is a subgroup of M , that is closed under the scalar multiplication of
M . For a subset S M , the set of all finite linear combinations of the form a1 x1 +
P
+ an xn , n N0 , ai R, xi S, is an R-submodule N of M , denoted by RS or
xS Rx. We say that N is generated by S (or by the elements of S). If S is finite,
70
Public-key Cryptography
Definition 2.51
Theorem 2.31
Proof
Isomorphism theorem
and M/ Ker f
= Im f .
For an R-module
M and an ideal a of R, the set aM consisting of all finite linear
Pn
combinations i=1 ai xi with n N0 , ai a and xi M is a submodule of M . On
the other hand, for a submodule N of M the set (M : N ) := {a R | aM N }
is an ideal of R. In particular, the ideal (M : 0) is called the annihilator of M and is
denoted as AnnR M (or as Ann M ). For any ideal a Ann M , one can view M as an
R/a-module under the map (a + a)x := ax. One can easily check that this map is welldefined, that is, the product (a + a)x is independent of the choice of the representative
a of the equivalence class a + a.
L
A free module M over a ring R is defined to be a direct sum iI Mi of R-modules Mi
with each Mi
= R as an R-module. If I is of finite cardinality n, then M is isomorphic
to Rn .
Any vector space is a free module (Theorem 2.27 and Corollary 2.9). The Abelian
groups (Z-modules) Zn , n N, are not free.
Structure theorem for finitely generated modules M is a finitely generated Rmodule if and only if M is a quotient of a free module Rn for some n N0 .
[if] The free module Rn has a canonical generating set ei , i I, where
ei = (0, . . . , 0, 1, 0, . . . , 0) (1 in the i-th position).