4
4
4
(CSPC-306)
Mathematics of Cryptography
Algebraic Structures
Dr Samayveer Singh
Assistant Professor
Department of Computer Science & Engineering
National Institute Technology Jalandhar, Punjab, India
[email protected]
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4-1 ALGEBRAIC STRUCTURES
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Groups
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Groups
A commutative group, also called an abelian group, is a group in which the operator satisfies
the four properties for groups plus an extra property, commutativity.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
A group involves a single operation, the properties
imposed on the operation allow the use of a pair of
operations as long as they are inverses of each other.
Example 4.1
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.2
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.4
A very interesting group is the permutation group. The set is
the set of all permutations, and the operation is composition:
applying one permutation after another.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.5
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Finite Group
A group is called a finite group if the set has a finite number of
elements; otherwise, it is an infinite group.
Order of a Group
The order of a group, |G|, is the number of elements in the
group. If the group is not finite, its order is infinite; if the group
is finite, the order is finite.
Subgroups
A subset H of a group G is a subgroup of G if H itself is a group
with respect to the operation on G.
In other words, if G = <S, •> is a group, H = <T, • > is a group
under the same operation, and T is a nonempty subset of S,
then H is a subgroup of G.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.6
Solution
The answer is no. Although H is a subset of G, the
operations defined for these two groups are different. The
operation in H is addition modulo 10; the operation in G
is addition modulo 12.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Cyclic Subgroups
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.7
Four cyclic subgroups can be made from the group G = <Z6,
+>. They are H1 = <{0}, +>, H2 = <{0, 2, 4}, +>, H3 = <{0, 3},
+>, and H4 = G.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.8
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Cyclic Groups
A cyclic group is a group that is its own cyclic
subgroup.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.9
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Lagrange’s Theorem
Order of an Element
The order of an element a in a group, ord(a), is the
smallest integer n such that an = e. The order of an
element is the order of the cyclic group it generates.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.1 Continued
Example 4.10
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.2 Ring
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.2 Continued
Example 4.11
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.3 Field
A field, denoted by F = <{…}, •, > is a
commutative ring in which the second operation
satisfies all five properties defined for the first
operation except that the identity of the first
operation has no inverse.
Finite Fields
Galois showed that for a field to be finite, the
number of elements should be pn, where p is a
prime and n is a positive integer.
Note
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.3 Continued
GF(p) Fields
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.2 Continued
Example 4.12
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.2 Continued
Example 4.13
We can define GF(5) on the set Z5 (5 is a prime) with
addition and multiplication operators as shown in Figure
4.7.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.1.3 Continued
Summary
Table 4.3
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4-2 GF(2n) FIELDS
4.2.1 Polynomials
4.2.2 Using A Generator
4.2.3 Summary
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2 Continued
Example 4.14
Let us define a GF(22) field in which the set has four 2-bit
words: {00, 01, 10, 11}. We can redefine addition and
multiplication for this field in such a way that all properties
of these operations are satisfied, as shown in Figure 4.8.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Polynomials
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.15
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.16
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
GF(2n) Fields
Note
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Modulus
For the sets of polynomials in GF(2n), a group of
polynomials of degree n is defined as the modulus.
Such polynomials are referred to as irreducible
polynomials.
Table 4.9 List of irreducible polynomials
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Addition
Note
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.17
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.18
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Multliplication
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.19
Find the result of (x5 + x2 + x) ⊗ (x7 + x4 + x3 + x2 + x) in
GF(28) with irreducible polynomial (x8 + x4 + x3 + x + 1).
Note that we use the symbol ⊗ to show the multiplication of
two polynomials.
Solution
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.20
In GF (24), find the inverse of (x2 + 1) modulo (x4 + x + 1).
Solution
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.21
Solution
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.22
Find the result of multiplying P1 = (x5 + x2 + x) by P2 = (x7 +
x4 + x3 + x2 + x) in GF(28) with irreducible polynomial (x8 +
x4 + x3 + x + 1) using the algorithm described above.
Solution
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.23
Repeat Example 4.22 using bit patterns of size 8.
Solution
We have P1 = 000100110, P2 = 10011110, modulus =
100011010 (nine bits). We show the exclusive or operation
by .
Table 4.8 An efficient algorithm for multiplication using n-bit words
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.24
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.24 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.24 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.2 Using a Generator
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.25
Generate the elements of the field GF(24) using the irreducible
polynomial ƒ(x) = x4 + x + 1.
Solution
The elements 0, g0, g1, g2, and g3 can be easily generated, because
they are the 4-bit representations of 0, 1, x2, and x3. Elements g4
through g14, which represent x4 though x14 need to be divided by
the irreducible polynomial. To avoid the polynomial division, the
relation ƒ(g) = g4 + g + 1 = 0 can be used (See next slide).
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.26
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.1 Continued
Example 4.27
The following show the result of multiplication and division
operations:.
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.
4.2.3 Summary
Copyright © 2015 by McGraw Hill Education (India) Private Limited. All rights reserved.