Professional Documents
Culture Documents
Lec 06
Lec 06
Lec 06
Proof idea:
The previous construction shows that if we know the factorization of N,
we can extract square roots modulo each prime factor and then
recombine using the Chinese Remainder Theorem.
Proof idea:
The previous construction shows that if we know the factorization of N,
we can extract square roots modulo each prime factor and then
recombine using the Chinese Remainder Theorem.
Proof idea:
The previous construction shows that if we know the factorization of N,
we can extract square roots modulo each prime factor and then
recombine using the Chinese Remainder Theorem.
a = 477,
EXAMPLE
N = 37*43 = 1591,
a = 477,
a2 mod 1591 = 16
EXAMPLE
N = 37*43 = 1591,
a = 477,
a2 mod 1591 = 16
√(a2) mod 1591 = 4
EXAMPLE
N = 37*43 = 1591,
a = 477,
a2 mod 1591 = 16
√(a2) mod 1591 = 4
477 ≢ ±4 (mod 1591)
EXAMPLE
N = 37*43 = 1591,
a = 477,
a2 mod 1591 = 16
√(a2) mod 1591 = 4
477 ≢ ±4 (mod 1591)
EXAMPLE
N = 37*43 = 1591,
a = 477,
a2 mod 1591 = 16
√(a2) mod 1591 = 4
477 ≢ ±4 (mod 1591)
u = gcd(477+4, 1591) = 37
EXAMPLE
N = 37*43 = 1591,
a = 477,
a2 mod 1591 = 16
√(a2) mod 1591 = 4
477 ≢ ±4 (mod 1591)
u = gcd(477+4, 1591) = 37
v = gcd(477-4, 1591) = 43
Prime numbers
Theorem
π(N)log N
lim =1
N→∞ N
Theorem
π(N)log N
lim =1
N→∞ N
Theorem
π(N)log N
lim =1
N→∞ N
p′ ← {0,1}n−2
p := 1 ∥ p′ ∥ 1
Multiples of 3 (base 2)
𝟘
𝟘
q1
𝟙
𝟙
𝟙
q0
q2
𝟘
9.34
p′ ← {0,1}n−2
p := 1 ∥ p′ ∥ 1
Primality à la Fermat
9.35
Primality à la Miller-Rabin
9.44
(x + a)N ≡ x N + a (mod N) .
• associativity
• commutativity
• distributivity
Examples
𝔽2 = ({0,1}, ⊕ , ∧ ) .
+ 0 1 2 3 4 × 0 1 2 3 4
0 0 1 2 3 4 0 0 0 0 0 0
1 1 2 3 4 0 1 0 1 2 3 4
2 2 3 4 0 1 2 0 2 4 1 3
3 3 4 0 1 2 3 0 3 1 4 2
4 4 0 1 2 3 4 0 4 3 2 1
Other kind of finite fields for numbers q = p e, e > 1. We will not study
them this term. In general we refer to 𝔽q for a finite field, but you may
think of the special case 𝔽p if you do not wish to find out about the
general field construction. Galois proved that if N is not a prime power,
no field of N elements can be constructed.
Examples
𝔽2 = ({0,1}, ⊕ , ∧ ) .
+ 0 1 2 3 4 × 0 1 2 3 4
0 0 1 2 3 4 0 0 0 0 0 0
1 1 2 3 4 0 1 0 1 2 3 4
2 2 3 4 0 1 2 0 2 4 1 3
3 3 4 0 1 2 3 0 3 1 4 2
4 4 0 1 2 3 4 0 4 3 2 1
Other kind of finite fields for numbers q = p e, e > 1. We will not study
them this term. In general we refer to 𝔽q for a finite field, but you may
think of the special case 𝔽p if you do not wish to find out about the
general field construction. Galois proved that if N is not a prime power,
no field of N elements can be constructed.
Example
𝔽4 = ({0,1,2,3}, + , × ) defined by
+ 0 1 2 3 × 0 1 2 3
0 0 1 2 3 0 0 0 0 0
1 1 0 3 2 1 0 1 2 3
2 2 3 0 1 2 0 2 3 1
3 3 2 1 0 3 0 3 1 2
Theorem
Let l1, l2, . . . , lk be the prime factors of q − 1 = l1 ⋅ l2⋯lk and
q−1 q−1 q−1
m1 = , m2 = , . . . , mk = .
l1 l2 lk
An element g is primitive over 𝔽q if and only if
• g q−1 = 1
• g mi ≠ 1 for 1 ≤ i ≤ k.
Primitive Elements
q−1 q−1
Let m1 = , . . . , mk = .
l1 lk
repeat
g ← 𝔽 ⋆q
until ∀i,1 ≤ i ≤ k, g mi ≠ 1
return g ∈ 𝔽 ⋆
q
Primitive Elements
Theorem
#{g : g is a primitive element of 𝔽q} = ϕ(q − 1).
Theorem
ϕ(N)log log N
lim inf = e −γ ≈ 0.5614594836
N→∞ N
Example: