-Modular Arithmetic(Group, Rings, fields)
-Finite fields of the form GF(2n)
-Mathematical problems for public key cryptography)
PRESENTED BY : ASAN BAKER
MODULAR ARITHMETIC
DEFINITION :
Let a, b and n are integers and n > 0.
We write a ≡ b mod n if and only if n divides a − b.
n is called the modulus.
b is called the remainder.
For Example:
29 ≡ 15 mod 7 because 7|(29 − 15)
12 ≡ 3 mod 9 ; 3 is a valid remainder since 9 divides 12 − 3
12 ≡ 21 mod 9 ; 21 is a valid remainder since 9 divides 12 − 21
12 ≡ −6 mod 9 ; −6 is a valid remainder since 9 divides −6 − 3
Cryptography requires sets of integers and specific
operations that are defined for those sets. The
combination of the set and the operations that are
applied to the elements of the set is called an
algebraic structure.
Groups,
Rings
fields.
Groups
a set of elements or “numbers” with a binary
operator “ •”. obeys:
closure: a G, b G a• b G
associative law: (a.b).c = a.(b.c)
has identity e: e.a = a.e = a
has inverses a-1: a.a-1 = e
if commutative a.b = b.a
then forms an abelian group
Cyclic groups
Claim: let G be a group and a be an element of order n.
The set
{a}={1, a,…,an-1} is a sub-group of G.
a is called the generator of {a}.
If G is generated by a, then G is called cyclic, and a is
called a primitive element of G.
Rings
a set of “numbers”
with two operations (addition and multiplication) which form:
an abelian group with addition operation and multiplication:
has closure
is associative
distributive over addition: a(b+c) = ab + ac
if multiplication operation is commutative, it forms a
commutative ring
if multiplication operation has an identity and no zero
divisors, it forms an integral domain
Field
a set of numbers
with two operations which form:
abelian group for addition
abelian group for multiplication (ignoring 0)
Ring
A field is a commutative ring with identity where each non-
zero element has a multiplicative inverse
a0F, a-1F, a·a-1=1
have hierarchy with more axioms/laws
group -> ring -> field
Group, Ring, Field
Finite (Galois) Fields
finite fields play a key role in cryptography
can show number of elements in a finite field must
be a power of a prime pn known as Galois fields
denoted GF(pn)
in particular often use the fields:
GF(p)
GF(2n)
Modular Polynomial Arithmetic
can compute in field GF(2n)
polynomials with coefficients modulo 2
whose degree is less than n
hence must reduce modulo an irreducible poly of
degree n (for multiplication only)
form a finite field can always find an inverse
can extend Euclid’s Inverse algorithm to find
GF(2n)
Finite fields of order 2n are called binary fields or
characteristic-two finite fields. They are of special
interest because they are particularly efficient for
implementation in hardware, or on a binary
computer.
The elements of GF(2n) are binary polynomials, i.e.
polynomials whose coefficients are either 0 or 1.
There are 2n such polynomials in the field and the
degree of each polynomial is no more than n-1.
Therefore the elements can be represented as m-bit
strings.
Example GF(23)
Computational Considerations
since coefficients are 0 or 1, can represent any such
polynomial as a bit string
addition becomes XOR of these bit strings
multiplication is shift and XOR
modulo reduction done by repeatedly substituting
highest power with remainder of irreducible poly
(also shift and XOR)
eg. irreducible poly = x3 + x + 1 means x3 = x + 1 in
the polynomial field
Computational Example
in GF(23) have (x2+1) is 1012 & (x2+x+1) is 1112
so addition is
(x2+1) + (x2+x+1) = x
101 XOR 111 = 0102
and multiplication is
(x+1).(x2+1) = x.(x2+1) + 1.(x2+1)
= x3+x+x2+1 = x3+x2+x+1
011.101 = (101)<<1 XOR (101)<<0 = 1010 XOR 101 = 1111 2
in GF(23) have (x2+1) is 1012 & (x2+x+1) is 1112
polynomial modulo reduction (get q(x) & r(x)) is
(x3+x2+x+1 ) mod (x3+x+1) = 1.(x3+x+1) + (x2) = x2
1111 mod 1011 = 1111 XOR 1011 = 01002
RSA Key generation
RSA message encryption
RSA Message decrytion
Thanks