SlideShare a Scribd company logo
1 of 7
Crypto Basics
(Primitive Roots)
Sk Md Mizanur Rahman, Ph.D.
Professor, Cybersecurity
Centennial College, Toronto, Canada
To test that a is a primitive root of p you need to do the following.
First, let s=ϕ(p) where ϕ() is the Euler's totient function.
If p is prime, then s=p−1. Then you need to determine all the
prime factors of s: p1,…,pk.
Finally, calculate as/pi mod p for all i=1…k, and if you find 1
among residuals then it is NOT a primitive root, otherwise it is.
So, basically you need to calculate and check k numbers
where k is the number of different prime factors in ϕ(p).
How you test
Let us find the lowest primitive root of 761:
s=ϕ(761)=760=23×5×19
the powers to test are: 760/2=380, 760/5=152 and 760/19=40
(just 3 instead of testing all of them)
Test 2:
2380 ≡ 1 mod 761 oops
test 3:
3380 ≡ −1 mod 761 OK
3152≡1 mod 761 oops
test 5 (skip 4 because it is 22):
5380≡1 mod 761 oops
test 6:
6380 ≡ −1 mod 761 OK
6152 ≡ 67 mod 761 OK
640 ≡ −263 mod 761 hooray!
So, the least primitive root of 761 is 6.
Example
Once you have found one primitive root, you can
easily find all the others. Indeed, if a is a primitive
root mod p, and p is prime (for simplicity),
then a can generate all other remainders 1…(p−1)
as powers: a1 ≡ a,a2,…, ap−1 ≡ 1.
And am mod p is another primitive root if and only if
m and p−1 are coprime (if gcd (m,p−1)=1).
By the way, this is exactly why you have
ϕ(p−1) primitive roots when p is prime.
How you find all the other primitive roots
16
1
17
)
17
( 



Prime number = 17
}
16
,
15
,
14
,
13
,
12
,
11
,
10
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
{
]
16
,
1
[
*
17 


31
mod
17
32
mod
17
33
mod
17
34
mod
17
35
mod
17
36
mod
17
37
mod
17
38
mod
17
39
mod
17
310
mod
17
311
mod
17
312
mod
17
313
mod
17
314
mod
17
315
mod
17
316
mod
17
3 9 10 13 5 15 11 16 14 8 7 4 12 2 6 1
How you find all the other primitive roots(cont…)
Considering “3” as a candidate:
Example:
8
8
16
2
2
)
2
(
)
16
(
)
1
17
(
))
17
(
( 3
4
4








 




GCD(16,2) = 2; GCD(16,3) = 1; so 33 mod 17 = 10 is a primitive root of mod 17
GCD(16,4) = 4; GCD(16,5) = 1; so 35 mod 17 = 5 is a primitive root of mod 17
GCD(16,6) = 2; GCD(16,7) = 1; so 37 mod 17 = 11 is a primitive root of mod 17
GCD(16,8) = 8; GCD(16,9) = 1; so 39 mod 17 = 14 is a primitive root of mod 17
GCD(16,10) = 2; GCD(16,11) = 1; so 311 mod 17 = 7 is a primitive root of mod 17
GCD(16,12) = 4; GCD(16,13) = 1; so 313 mod 17 = 12 is a primitive root of mod 17
GCD(16,14) = 2; GCD(16,15) = 1; so 315 mod 17 = 6 is a primitive root of mod 17
How you find all the other primitive roots (cont…)
101
mod
17
102
mod
17
103
mod
17
104
mod
17
105
mod
17
106
mod
17
107
mod
17
108
mod
17
109
mod
17
1010
mod
17
1011
mod
17
1012
mod
17
1013
mod
17
1014
mod
17
1015
mod
17
1016
mod
17
10 1
How you find all the other primitive roots (cont…)
Considering “10” as a candidate:

More Related Content

What's hot

Optimal binary search tree
Optimal binary search treeOptimal binary search tree
Optimal binary search treeKavya P
 
Category Theory for Programmers
Category Theory for ProgrammersCategory Theory for Programmers
Category Theory for ProgrammersSantosh Rajan
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common SubsequenceKrishma Parekh
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysisDr. Rajdeep Chatterjee
 
Unit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VEC
Unit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VECUnit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VEC
Unit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VECsundarKanagaraj1
 
Minimum spanning tree (mst)
Minimum spanning tree (mst)Minimum spanning tree (mst)
Minimum spanning tree (mst)Pradeep Behera
 
Single source stortest path bellman ford and dijkstra
Single source stortest path bellman ford and dijkstraSingle source stortest path bellman ford and dijkstra
Single source stortest path bellman ford and dijkstraRoshan Tailor
 
Prims and kruskal algorithms
Prims and kruskal algorithmsPrims and kruskal algorithms
Prims and kruskal algorithmsSaga Valsalan
 
Coin Change Problem
Coin Change ProblemCoin Change Problem
Coin Change ProblemDEVTYPE
 
Cs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersCs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersappasami
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical inductionrey castro
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relationsIIUM
 

What's hot (20)

dijkstra algo.ppt
dijkstra algo.pptdijkstra algo.ppt
dijkstra algo.ppt
 
Minimum spanning tree
Minimum spanning treeMinimum spanning tree
Minimum spanning tree
 
Optimal binary search tree
Optimal binary search treeOptimal binary search tree
Optimal binary search tree
 
Category Theory for Programmers
Category Theory for ProgrammersCategory Theory for Programmers
Category Theory for Programmers
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Chap4
Chap4Chap4
Chap4
 
Vertex cover Problem
Vertex cover ProblemVertex cover Problem
Vertex cover Problem
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
 
Kruskal's algorithm
Kruskal's algorithmKruskal's algorithm
Kruskal's algorithm
 
Unit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VEC
Unit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VECUnit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VEC
Unit IV UNCERTAINITY AND STATISTICAL REASONING in AI K.Sundar,AP/CSE,VEC
 
Minimum spanning tree (mst)
Minimum spanning tree (mst)Minimum spanning tree (mst)
Minimum spanning tree (mst)
 
Single source stortest path bellman ford and dijkstra
Single source stortest path bellman ford and dijkstraSingle source stortest path bellman ford and dijkstra
Single source stortest path bellman ford and dijkstra
 
Prims and kruskal algorithms
Prims and kruskal algorithmsPrims and kruskal algorithms
Prims and kruskal algorithms
 
Coin Change Problem
Coin Change ProblemCoin Change Problem
Coin Change Problem
 
Permutations and combinations
Permutations and combinationsPermutations and combinations
Permutations and combinations
 
Cs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersCs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answers
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Number theory
Number theoryNumber theory
Number theory
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relations
 

Similar to Primitive-Roots.pptx

Heuristics for counterexamples to the Agrawal Conjecture
Heuristics for counterexamples to the Agrawal ConjectureHeuristics for counterexamples to the Agrawal Conjecture
Heuristics for counterexamples to the Agrawal ConjectureAmshuman Hegde
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiouvafopoulos
 
1. Let D be the random variable with value equal to the number showi.pdf
1. Let D be the random variable with value equal to the number showi.pdf1. Let D be the random variable with value equal to the number showi.pdf
1. Let D be the random variable with value equal to the number showi.pdfakramali786
 
FermatThm.pptx
FermatThm.pptxFermatThm.pptx
FermatThm.pptxSnehSinha6
 
String kmp
String kmpString kmp
String kmpthinkphp
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficientSanjay Singh
 

Similar to Primitive-Roots.pptx (20)

Datacompression1
Datacompression1Datacompression1
Datacompression1
 
Heuristics for counterexamples to the Agrawal Conjecture
Heuristics for counterexamples to the Agrawal ConjectureHeuristics for counterexamples to the Agrawal Conjecture
Heuristics for counterexamples to the Agrawal Conjecture
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
 
Ch08
Ch08Ch08
Ch08
 
Ch08
Ch08Ch08
Ch08
 
1. Let D be the random variable with value equal to the number showi.pdf
1. Let D be the random variable with value equal to the number showi.pdf1. Let D be the random variable with value equal to the number showi.pdf
1. Let D be the random variable with value equal to the number showi.pdf
 
Raices primitivas
Raices primitivasRaices primitivas
Raices primitivas
 
LL Parsing
LL ParsingLL Parsing
LL Parsing
 
Nbvtalkatbzaonencryptionpuzzles
NbvtalkatbzaonencryptionpuzzlesNbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
 
Nbvtalkatbzaonencryptionpuzzles
NbvtalkatbzaonencryptionpuzzlesNbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
 
Probability
ProbabilityProbability
Probability
 
Eulers totient
Eulers totientEulers totient
Eulers totient
 
Polinômios 2
Polinômios 2Polinômios 2
Polinômios 2
 
FermatThm.pptx
FermatThm.pptxFermatThm.pptx
FermatThm.pptx
 
String kmp
String kmpString kmp
String kmp
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficient
 
Chap09alg
Chap09algChap09alg
Chap09alg
 
Chap09alg
Chap09algChap09alg
Chap09alg
 
Rsa documentation
Rsa documentationRsa documentation
Rsa documentation
 
Ch2 (1).ppt
Ch2 (1).pptCh2 (1).ppt
Ch2 (1).ppt
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

Primitive-Roots.pptx

  • 1. Crypto Basics (Primitive Roots) Sk Md Mizanur Rahman, Ph.D. Professor, Cybersecurity Centennial College, Toronto, Canada
  • 2. To test that a is a primitive root of p you need to do the following. First, let s=ϕ(p) where ϕ() is the Euler's totient function. If p is prime, then s=p−1. Then you need to determine all the prime factors of s: p1,…,pk. Finally, calculate as/pi mod p for all i=1…k, and if you find 1 among residuals then it is NOT a primitive root, otherwise it is. So, basically you need to calculate and check k numbers where k is the number of different prime factors in ϕ(p). How you test
  • 3. Let us find the lowest primitive root of 761: s=ϕ(761)=760=23×5×19 the powers to test are: 760/2=380, 760/5=152 and 760/19=40 (just 3 instead of testing all of them) Test 2: 2380 ≡ 1 mod 761 oops test 3: 3380 ≡ −1 mod 761 OK 3152≡1 mod 761 oops test 5 (skip 4 because it is 22): 5380≡1 mod 761 oops test 6: 6380 ≡ −1 mod 761 OK 6152 ≡ 67 mod 761 OK 640 ≡ −263 mod 761 hooray! So, the least primitive root of 761 is 6. Example
  • 4. Once you have found one primitive root, you can easily find all the others. Indeed, if a is a primitive root mod p, and p is prime (for simplicity), then a can generate all other remainders 1…(p−1) as powers: a1 ≡ a,a2,…, ap−1 ≡ 1. And am mod p is another primitive root if and only if m and p−1 are coprime (if gcd (m,p−1)=1). By the way, this is exactly why you have ϕ(p−1) primitive roots when p is prime. How you find all the other primitive roots
  • 5. 16 1 17 ) 17 (     Prime number = 17 } 16 , 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 { ] 16 , 1 [ * 17    31 mod 17 32 mod 17 33 mod 17 34 mod 17 35 mod 17 36 mod 17 37 mod 17 38 mod 17 39 mod 17 310 mod 17 311 mod 17 312 mod 17 313 mod 17 314 mod 17 315 mod 17 316 mod 17 3 9 10 13 5 15 11 16 14 8 7 4 12 2 6 1 How you find all the other primitive roots(cont…) Considering “3” as a candidate: Example:
  • 6. 8 8 16 2 2 ) 2 ( ) 16 ( ) 1 17 ( )) 17 ( ( 3 4 4               GCD(16,2) = 2; GCD(16,3) = 1; so 33 mod 17 = 10 is a primitive root of mod 17 GCD(16,4) = 4; GCD(16,5) = 1; so 35 mod 17 = 5 is a primitive root of mod 17 GCD(16,6) = 2; GCD(16,7) = 1; so 37 mod 17 = 11 is a primitive root of mod 17 GCD(16,8) = 8; GCD(16,9) = 1; so 39 mod 17 = 14 is a primitive root of mod 17 GCD(16,10) = 2; GCD(16,11) = 1; so 311 mod 17 = 7 is a primitive root of mod 17 GCD(16,12) = 4; GCD(16,13) = 1; so 313 mod 17 = 12 is a primitive root of mod 17 GCD(16,14) = 2; GCD(16,15) = 1; so 315 mod 17 = 6 is a primitive root of mod 17 How you find all the other primitive roots (cont…)