Professional Documents
Culture Documents
Crypto Mod3@Azdocuments - in
Crypto Mod3@Azdocuments - in
com
MODULE 3
Basic Concepts of Number Theory and Finite Fields: Groups, Rings and
Fields, Finite fields of the form GF(p), Prime Numbers, Fermat’s and Euler’s
theorem, discrete logarithm.
(Text 1: Chapter 3 and Chapter 7: Section 1, 2, 5)
Text Books:
Explore Electronics 1
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
MODULE 3
Groups, Rings, and Fields
Groups
A group G, sometimes denoted by {G, ·} is a set of elements with a binary
operation, denoted by · , that associates to each ordered pair (a, b) of elements
in G an element (a · b) in G, such that the following axioms are obeyed:
Explore Electronics 2
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
Cyclic Group
Rings
A ring R, sometimes denoted by {R, +, x}, is a set of elements with two binary
operations, called addition and multiplication, such that for all a, b, c in R the
following axioms are obeyed:
(A1-A5) R is an abelian group with respect to addition; that is, R satisfies
axioms A1 through A5. For the case of an additive group, we denote the identity
element as 0 and the inverse of a as a.
(M1) Closure under multiplication: If a and b belong to R, then ab is also in R.
(M2) Associativity of multiplication: a(bc) = (ab)c for all a, b, c in R.
(M3) Distributive laws: a(b + c) = ab + ac for all a, b, c in R.
(a + b)c = ac + bc for all a, b, c in R.
A ring is said to be commutative if it satisfies the following additional
condition:
(M4) Commutativity of multiplication: ab = ba for all a, b in R.
We define an integral domain, which is a commutative ring that obeys the
following axioms:
(M5) Multiplicative identity: There is an element 1 in R such that a1 = 1a = a
for all a in R.
(M6) No zero divisors: If a, b in R and ab = 0, then either a = 0 or b = 0.
Explore Electronics 3
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
Fields
A field F, sometimes denoted by {F, +, x}, is a set of elements with two
binary operations, called addition and multiplication, such that for all a, b, c in F
the following axioms are obeyed:
(A1M6) F is an integral domain; that is, F satisfies axioms A1 through A5 and
M1 through M6.
(M7) Multiplicative inverse: For each a in F, except 0, there is an element a-1 in
F such that aa-1 = (a- 1)a = 1.
Figure 3.1. Group, Ring, and Field
Explore Electronics 4
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
4.
5. (T1, T2, T3) (A1 QB1, A2 QB2, A3 QB3)
6. (A1, A2, A3) (B1, B2, B3)
7. (B1, B2, B3) (T1, T2, T3)
8. go to 2
Throughout the computation, the following relationships hold:
mT1 + bT2 = T3 mA1 + bA2 = A3 mB1 + bB2 = B3
Prime Numbers
An integer p > 1 is a prime number if and only if its only divisors are ± 1
and ±p. Prime numbers play a critical role in number theory.
Explore Electronics 5
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
Where p1 < p2 < ... < pt are prime numbers and where each is a positive
integer. This is known as the fundamental theorem of arithmetic; a proof can be
found in any text on number theory.
It is useful for what follows to express this way. If P is the set of all prime
numbers, then any positive integer a can be written uniquely in the following
form:
Define k = ab We know that the integer k can be expressed as the product of powers of
primes:
Explore Electronics 6
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
The following relationship always holds: If k = gcd (a,b) then kp = min(ap, bp)
for all p
Fermat's and Euler's Theorems
Two theorems that play important roles in public-key cryptography are Fermat's
theorem and Euler's theorem.
Fermat's Theorem
Fermat's theorem states the following: If p is prime and a is a positive integer
not divisible by p, then
Proof:
Consider the set of positive integers less than p:{1,2,..., p 1} and multiply
each element by a,modulo p, to get the set X = {a mod p, 2a mod p, . . . (p 1)a
mod p}. None of the elements of X is equal to zero because p does not divide a.
Furthermore no two of the integers in X are equal. To see this, assume that ja
ka(mod p) where 1 j < k p 1. Because a is relatively prime to p,
we can eliminate a from both sides of the equation resulting in: j k(mode
p). This last equality is impossible because j and k are both positive integers less
than p. Therefore, we know that the (p 1) elements of X are all positive integers,
with no two elements equal. We can conclude the X consists of the set of
integers {1,2,..., p 1} in some order. Multiplying the numbers in both sets and
taking the result mod p yields
We can cancel the (p 1)! term because it is relatively prime to, this yields
Explore Electronics 7
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
Eg: a = 7, p = 19
72 = 49 ≡ 11(mod 19)
74 ≡ 121 7(mod 19)
78 ≡ 49≡ 7(mod 19)
716 ≡ 121≡ 7(mod 19)
ap1 = 718 = 716 x 72 ≡7 x 11≡ 1(mod 19)
An alternative form of Fermat's theorem is also useful: If p is prime and a
is a positive integer, then
Note that the first form of the theorem requires that a be relatively prime
to p, but this form does not.
Euler's Theorem
Euler's theorem states that for every a and n that is relatively prime:
Proof:
Above equation is true if n is prime, because in that case ф(n) = (n 1) and
Fermat's theorem holds. However, it also holds for any integer n. Recall that
ф (n) is the number of positive integers less than n that are relatively prime to n.
Consider the set of such integers, labelled as follows:
R {x1, x2,..., x ф (n)}
Explore Electronics 8
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
That is, each element xi of R is a unique positive integer less than n with gcd(xi,
n) = 1. Now multiply each element by a, modulo n: S = {(ax1 mod n), (ax2 mod
n),..., (a x ф (n) mod n)}
The set S is a permutation of R, by the following line of reasoning:
1. Because a is relatively prime to n and xi is relatively prime to n, axi must
also be relatively prime to n. Thus, all the members of S are integers that
are less than n and that are relatively prime to n.
Therefore,
Explore Electronics 9
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
If a and n are relatively prime, then there is at least one integer m that satisfies
above equation namely, m = ф(n). The least positive exponent m for which
above equation holds is referred to in several ways:
the order of a (mod n)
the exponent to which a belongs (mod n)
the length of the period generated by a
Logarithms for Modular Arithmetic
With ordinary positive real numbers, the logarithm function is the inverse
of exponentiation. An analogous function exists for modular arithmetic. Let us
briefly review the properties of ordinary logarithms. The logarithm of a number
is defined to be the power to which some positive base (except 1) must be raised
in order to equal the number. That is, for base x and for a value y:
logx(x) = 1
Explore Electronics 10
CRYPTOGRAPHY https://deepaharivinod.blogspot.com
Consider a primitive root a for some prime number p (the argument can be
developed for nonprimes as well). Then we know that the powers of a from 1
through (p 1) produce each integer from 1 through (p 1) exactly once. We also
know that any integer b satisfies
b ≡ r(mod p) for some r, where 0≤ r≤ (p 1)
by the definition of modular arithmetic. It follows that for any integer b and a
primitive root a of prime number p, we can find a unique exponent i such that
b ≡ ai(mod p) where 0 ≤i ≤ (p 1)
This exponent i is referred to as the discrete logarithm of the number b for the
base a (mod p). We denote this value as d loga.p(b).
Explore Electronics 11