Modular Arithmetic
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 “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
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