SlideShare a Scribd company logo
1 of 18
Generating Primes for
Digital Signature
Algorithm
Shwetang Acharya 6-June-2020
Overview of Groups and Subgroup 1
• Any nonempty Set G together with a binary operation on G
which is..
• (i) associative: a(bc)=(ab)c for all a, b, c 𝜖 G
• (ii) identity element e 𝜖 G , so that ae=ea=a for a 𝜖 G
• (iii) for every a 𝜖 G, there is an element b 𝜖 G such that ab=e, b
is called the inverse of a.
• (iv) if ac=ca, for all a, c 𝜖 G, then group is called Abelian or
Commutative Group
Overview of Groups and Subgroup 2
• Subgroup is a subset of Group G with all properties of Group.
• We denote H is a proper subgroup of G with H < G.
• |G| = Number of Elements in G = order of G
• |H| = Number of Elements in H = order of H
• Order of H always divides order of G
Finite Cyclic Groups
• Any Group G together is called cyclic if there is an element a in
G such that G= {a n | n 𝜖 Z)
• if G’ is a cyclic group generated by c then we can write G’=‹c›.
• |‹c›| = order of a group generated by group element c
• We know that In a cyclic group, the order of element divides the
order of the group.
• If d is a positive divisor of n (order of G), the number of
elements of order d is a cyclic group of order n is Ø (d)
Every Group of prime order is cyclic
• A group of prime order n is a non-trivial group has below
equivalent condition..
[1] It has exactly two distinct subgroups: the trivial subgroup and
the whole group.
[2] It is a simple abelian group.
Here it is important to note that if group has prime order then
only possible orders of groups elements are 1 and |G|, hence it is
set of all elements of group, which is useful in DLP or DSA and
many other cryptographic application.
Digital Signature Algorithm … 1
• Alice hash the message with hash function which provides 160
bits o/p.
• Alice chooses a safe prime p where q=(p-1)/2 also is prime.
• Here is the reason why we have p=2q+1.
• Generally we’ve p=jq+1 (subgroup of order q which is also very large to
thwart brute force attack of DH.
• We also want to ensure that our generator g which generates subgroup
doesn’t have order equal to j or one of its divisor. So our algorithm
doesn’t select small set whose order is less than q.
Digital Signature Algorithm …. 2
• Say g = hj >1 => gq =(h(p-1)/q)q=1. since q is prime so, order of g
can’t be less than q. Let us take one example..
• Take q=47 , Try j=2
• p=2 * 47 +1 = 95 which is not prime, then try different j.
• Try j=6
• P= 6*47 +1 =283 which is prime , (282=47*6)
• now select random h , {h | 1< h < p-1} , take h=5
g= 56 mod 283 = 60 ≠1.
Digital Signature Algorithm …. 3
• As 282 = 47 x 6 so, if there is a subgroup exist, then order of
subgroup is either 47 or 6. there are elements of ɸ(47)=46,
ɸ(6)=2.
• Now let us see how do we find elements which as order 47, we know
that first generator is 6 another elements are 6j where gcd(j,47)=1
• There are the elements under Z/282Z which has order 47
• 6j ≡0 (mod 282) = {± 6, ± 12,.., ± 282}
• ((Z/283)x, x) ≅ (Z/282Z, +) , this is means multiplicative group of
Z283
* is isomorphic to additive group modulo Z282
Digital Signature Algorithm …. 4
• Let’s check this by Z31
* ≅ Z30
+ with mapping φ(k)= [ak]31 -> [k]30, we
want to know which are the elements are of order 5. Element 3 is a
generator of Z31
* , take a=3.
• 30/5= 6, so Z/6Z={± 6, ± 12, ± 18, ± 24, ± 0 } ,we only have to
search through 36 (mod31), 312 (mod31) … and they are {16,8,4,2}.
Now in our case we have 46(excluding 1) elements of order 47 are
• [1, 4, 15, 16, 29, 38, 42, 51, 54, 60, 61, 64, 66, 71, 78, 86, 106, 111,
116, 127, 134, 141, 151, 152, 155, 158, 161, 163, 168, 175, 181,
199, 204, 207, 216, 225, 230, 240, 244, 250, 251, 253, 256, 262,
264, 275, 281]
• we selected g=60 in …1, in fact , we can use any value from above
set which will generate order of 47. for ex. 25147 ≡ 1 (mod 283)
Digital Signature Algorithm … 5
• Now we’ve p, q, g.
• Calculate α ≡ g(p-1)/q (mod p)
• We’ll select secret a such that 1≤ a < q-1
• Calculate β ≡ αa (mod p),
• Publish (p, q, 𝛼, β) and keep a secret
Digital Signature Algorithm … 6
• One can signs the message m by following procedure..
• Select random k such that 0 < k < q-1
• Compute r = (𝛼k (mod p)) (mod q)
• Compute s ≡ k-1 (m+ ar) (mod q)
• Signature for message m is (r,s), this can be sent to other party
along with m.
Digital Signature Algorithm … 7
• Verifying signature…
Download (p, q, 𝛼, 𝛽)
Compute u1 ≡ s-1m (mod q), and u2 ≡ s-1 r (mod q)
Compute v= (𝛼 𝑢1 𝛽 𝑢2 (
𝑚𝑜𝑑 𝑝)) (𝑚𝑜𝑑 𝑞)
Accept the signature iff v = r
Digital Signature Algorithm … 8
• How it works?
• We know that m ≡ (ks –ar) (mod q)
• Then s-1m ≡ k – ar s-1
k ≡ s-1m +ars-1 (mod q) ≡ u1 + au2
αk = 𝛼
( 𝑢1 + 𝑎𝑢2) =
𝛼 𝑢1 𝛽 𝑢2 𝑚𝑜𝑑 𝑝 𝑚𝑜𝑑 𝑞
Thus r = v.
Attacks on Zp
* and subgroup of order q
• Size of p in Zp
* is determined by the attack Index calculus. The
standard method for breaking discrete logarithms over a field as
Zp
* is known as the index calculus. It depends on the group in
which the discrete logarithm of interest is set.
• In our example we’ve selected p=283 and q=47 , (p-1)/q=6 but
6 is not there in the subgroup generated by q. so picking such a
subgroup which doesn’t have small element of main group
formed by p, which gives robust cryptographic security.
• In absence of small elements, we can’t use sub-exponential
time index calculus method to recover discrete logarithm.
Index Calculus
• Let p a prime number and g is a primitive root modulo, such that
for that every natural number B coprime to p, there exist some
integer e, so that B ≡ g e (mod p)
• A primitive root modulo n exist iff n is 1,2,4,pk,2pk for an odd
prime p and k 𝜖 N.
• We take indg(B) = e if e is the smallest natural number
• If g e ≡ B (mod p) , if p is prime then
• Indg(A · B) = indg(A) + indg(B) (mod p-1)
Index Calculus ….Example
• 5x ≡ 9451 (mod 10007), now choose B={2,3,5,7}
We’ll have to find exponents
• 5 4063 mod 10007 = 42 = 2 * 3 * 7
• 5 5136 mod 10007 = 54 = 2 * 33
• 5 9865 mod 10007 = 189 = 33 * 7
we have linear congruences..
• log52 + log53 + log57 = 4063 mod 10006
• log52 + 3 log53 = 5136 mod 10006
• 3 log53 + log57 = 9865 mod 10006
Index Calculus …Example
Solving this gives log52=6578, log53=6190, and log57=1301
Choose random exponent s = 7736 and try to calculate
A x gs = 9451 x 57736 mod 10007 = 8400 = 24 x 3 x 52 x 7
log59451 = (4 log52 + log53 + 2 log55 + log57 – s) mod 10006
= (4*6578 + 6190 + 2*1 +1301 – 7736) mod 10006
= 6057 mod 10006
Pollard rho Attack
Pollard rho attack is efficient when we’ve p-1 is B-smooth. This
means when (p-1)/q has many small prime factors.
Thus the complexity of Pollard rho method is determined by the
size of the base group G on which random walk is performed and
the running time of the iterating function. Reducing either one of
these two factors will result in speedup of the Pollard rho method.
Hence, we select the prime q as minimum 160 bit long.

More Related Content

What's hot

MODULE 4- Quadratic Expression and Equations
MODULE 4- Quadratic Expression and EquationsMODULE 4- Quadratic Expression and Equations
MODULE 4- Quadratic Expression and Equationsguestcc333c
 
Algebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsAlgebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsFrillaMarita
 
Algebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsAlgebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsTyoCakti
 
Algebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsAlgebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsChiquitaEvitaFatimah
 
Solving Equations by Factoring
Solving Equations by FactoringSolving Equations by Factoring
Solving Equations by FactoringJosephine Neff
 
Definite Integrals 8/ Integration by Parts
Definite Integrals 8/ Integration by PartsDefinite Integrals 8/ Integration by Parts
Definite Integrals 8/ Integration by PartsLakshmikanta Satapathy
 
1.4 Rewriting Equations and Formulas
1.4 Rewriting Equations and Formulas1.4 Rewriting Equations and Formulas
1.4 Rewriting Equations and FormulasSarah Stillwell
 
Mbledhja dhe zbritja e
Mbledhja dhe zbritja eMbledhja dhe zbritja e
Mbledhja dhe zbritja eTefik Rika
 
Addition and subtraction in polynomials
Addition and subtraction in polynomialsAddition and subtraction in polynomials
Addition and subtraction in polynomialssaidyein
 
Algebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsAlgebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsPashaMandala
 
Solutions on log examples
Solutions on log examplesSolutions on log examples
Solutions on log examplesKristino Ikaw
 
Ecuaciones noveno
Ecuaciones novenoEcuaciones noveno
Ecuaciones novenoJorge Ortiz
 
9-8 Graphing Equations
9-8 Graphing Equations9-8 Graphing Equations
9-8 Graphing EquationsRudy Alfonso
 

What's hot (19)

MODULE 4- Quadratic Expression and Equations
MODULE 4- Quadratic Expression and EquationsMODULE 4- Quadratic Expression and Equations
MODULE 4- Quadratic Expression and Equations
 
Chap 4 complex numbers focus exam ace
Chap 4 complex numbers focus exam aceChap 4 complex numbers focus exam ace
Chap 4 complex numbers focus exam ace
 
Chapter 2 sequencess and series
Chapter 2 sequencess and seriesChapter 2 sequencess and series
Chapter 2 sequencess and series
 
Assignments 04
Assignments 04Assignments 04
Assignments 04
 
Algebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsAlgebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and Polynomials
 
Algebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsAlgebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomials
 
Algebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsAlgebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomials
 
Solving Equations by Factoring
Solving Equations by FactoringSolving Equations by Factoring
Solving Equations by Factoring
 
Definite Integrals 8/ Integration by Parts
Definite Integrals 8/ Integration by PartsDefinite Integrals 8/ Integration by Parts
Definite Integrals 8/ Integration by Parts
 
0409 ch 4 day 9
0409 ch 4 day 90409 ch 4 day 9
0409 ch 4 day 9
 
The log rules
The log rulesThe log rules
The log rules
 
1.4 Rewriting Equations and Formulas
1.4 Rewriting Equations and Formulas1.4 Rewriting Equations and Formulas
1.4 Rewriting Equations and Formulas
 
Mbledhja dhe zbritja e
Mbledhja dhe zbritja eMbledhja dhe zbritja e
Mbledhja dhe zbritja e
 
Addition and subtraction in polynomials
Addition and subtraction in polynomialsAddition and subtraction in polynomials
Addition and subtraction in polynomials
 
Algebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsAlgebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and Polynomials
 
Solutions on log examples
Solutions on log examplesSolutions on log examples
Solutions on log examples
 
Ecuaciones noveno
Ecuaciones novenoEcuaciones noveno
Ecuaciones noveno
 
9-8 Graphing Equations
9-8 Graphing Equations9-8 Graphing Equations
9-8 Graphing Equations
 
Math1000 section1.2
Math1000 section1.2Math1000 section1.2
Math1000 section1.2
 

Similar to Digital signature

Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesSreedhar Chowdam
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMMANISH KUMAR
 
815.07 machine learning using python.pdf
815.07 machine learning using python.pdf815.07 machine learning using python.pdf
815.07 machine learning using python.pdfSairaAtta5
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithmspppepito86
 
Practical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentPractical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentRaphael Reitzig
 
Cryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.pptCryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.pptthe9amit
 
555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.pptSnehSinha6
 
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliCRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliharshmacduacin
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmeticJanani S
 
Crypto cs36 39
Crypto cs36 39Crypto cs36 39
Crypto cs36 39sravanbabu
 
Chapter 2 divide &amp; conquer
Chapter 2 divide &amp; conquerChapter 2 divide &amp; conquer
Chapter 2 divide &amp; conquerkolhpur
 
NumberTheory explanations in the easiest way.ppt
NumberTheory explanations in the easiest way.pptNumberTheory explanations in the easiest way.ppt
NumberTheory explanations in the easiest way.pptIshwariKhanal
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality TestPranshu Bhatnagar
 

Similar to Digital signature (20)

2.ppt
2.ppt2.ppt
2.ppt
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEM
 
815.07 machine learning using python.pdf
815.07 machine learning using python.pdf815.07 machine learning using python.pdf
815.07 machine learning using python.pdf
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
Practical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentPractical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient Apportionment
 
Information Security Seminar #2
Information Security Seminar #2Information Security Seminar #2
Information Security Seminar #2
 
Cryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.pptCryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.ppt
 
555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.ppt
 
MFCS-17.ppt
MFCS-17.pptMFCS-17.ppt
MFCS-17.ppt
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliCRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmetic
 
Crypto cs36 39
Crypto cs36 39Crypto cs36 39
Crypto cs36 39
 
Nbvtalkatbzaonencryptionpuzzles
NbvtalkatbzaonencryptionpuzzlesNbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
 
Nbvtalkatbzaonencryptionpuzzles
NbvtalkatbzaonencryptionpuzzlesNbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
 
CH04.ppt
CH04.pptCH04.ppt
CH04.ppt
 
Chapter 2 divide &amp; conquer
Chapter 2 divide &amp; conquerChapter 2 divide &amp; conquer
Chapter 2 divide &amp; conquer
 
NumberTheory explanations in the easiest way.ppt
NumberTheory explanations in the easiest way.pptNumberTheory explanations in the easiest way.ppt
NumberTheory explanations in the easiest way.ppt
 
Introduction to the AKS Primality Test
Introduction to the AKS Primality TestIntroduction to the AKS Primality Test
Introduction to the AKS Primality Test
 

Recently uploaded

Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligencemahaffeycheryld
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksIJECEIAES
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxCHAIRMAN M
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniR. Sosa
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Stationsiddharthteach18
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxMANASINANDKISHORDEOR
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUankushspencer015
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 

Recently uploaded (20)

Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney Uni
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 

Digital signature

  • 1. Generating Primes for Digital Signature Algorithm Shwetang Acharya 6-June-2020
  • 2. Overview of Groups and Subgroup 1 • Any nonempty Set G together with a binary operation on G which is.. • (i) associative: a(bc)=(ab)c for all a, b, c 𝜖 G • (ii) identity element e 𝜖 G , so that ae=ea=a for a 𝜖 G • (iii) for every a 𝜖 G, there is an element b 𝜖 G such that ab=e, b is called the inverse of a. • (iv) if ac=ca, for all a, c 𝜖 G, then group is called Abelian or Commutative Group
  • 3. Overview of Groups and Subgroup 2 • Subgroup is a subset of Group G with all properties of Group. • We denote H is a proper subgroup of G with H < G. • |G| = Number of Elements in G = order of G • |H| = Number of Elements in H = order of H • Order of H always divides order of G
  • 4. Finite Cyclic Groups • Any Group G together is called cyclic if there is an element a in G such that G= {a n | n 𝜖 Z) • if G’ is a cyclic group generated by c then we can write G’=‹c›. • |‹c›| = order of a group generated by group element c • We know that In a cyclic group, the order of element divides the order of the group. • If d is a positive divisor of n (order of G), the number of elements of order d is a cyclic group of order n is Ø (d)
  • 5. Every Group of prime order is cyclic • A group of prime order n is a non-trivial group has below equivalent condition.. [1] It has exactly two distinct subgroups: the trivial subgroup and the whole group. [2] It is a simple abelian group. Here it is important to note that if group has prime order then only possible orders of groups elements are 1 and |G|, hence it is set of all elements of group, which is useful in DLP or DSA and many other cryptographic application.
  • 6. Digital Signature Algorithm … 1 • Alice hash the message with hash function which provides 160 bits o/p. • Alice chooses a safe prime p where q=(p-1)/2 also is prime. • Here is the reason why we have p=2q+1. • Generally we’ve p=jq+1 (subgroup of order q which is also very large to thwart brute force attack of DH. • We also want to ensure that our generator g which generates subgroup doesn’t have order equal to j or one of its divisor. So our algorithm doesn’t select small set whose order is less than q.
  • 7. Digital Signature Algorithm …. 2 • Say g = hj >1 => gq =(h(p-1)/q)q=1. since q is prime so, order of g can’t be less than q. Let us take one example.. • Take q=47 , Try j=2 • p=2 * 47 +1 = 95 which is not prime, then try different j. • Try j=6 • P= 6*47 +1 =283 which is prime , (282=47*6) • now select random h , {h | 1< h < p-1} , take h=5 g= 56 mod 283 = 60 ≠1.
  • 8. Digital Signature Algorithm …. 3 • As 282 = 47 x 6 so, if there is a subgroup exist, then order of subgroup is either 47 or 6. there are elements of ɸ(47)=46, ɸ(6)=2. • Now let us see how do we find elements which as order 47, we know that first generator is 6 another elements are 6j where gcd(j,47)=1 • There are the elements under Z/282Z which has order 47 • 6j ≡0 (mod 282) = {± 6, ± 12,.., ± 282} • ((Z/283)x, x) ≅ (Z/282Z, +) , this is means multiplicative group of Z283 * is isomorphic to additive group modulo Z282
  • 9. Digital Signature Algorithm …. 4 • Let’s check this by Z31 * ≅ Z30 + with mapping φ(k)= [ak]31 -> [k]30, we want to know which are the elements are of order 5. Element 3 is a generator of Z31 * , take a=3. • 30/5= 6, so Z/6Z={± 6, ± 12, ± 18, ± 24, ± 0 } ,we only have to search through 36 (mod31), 312 (mod31) … and they are {16,8,4,2}. Now in our case we have 46(excluding 1) elements of order 47 are • [1, 4, 15, 16, 29, 38, 42, 51, 54, 60, 61, 64, 66, 71, 78, 86, 106, 111, 116, 127, 134, 141, 151, 152, 155, 158, 161, 163, 168, 175, 181, 199, 204, 207, 216, 225, 230, 240, 244, 250, 251, 253, 256, 262, 264, 275, 281] • we selected g=60 in …1, in fact , we can use any value from above set which will generate order of 47. for ex. 25147 ≡ 1 (mod 283)
  • 10. Digital Signature Algorithm … 5 • Now we’ve p, q, g. • Calculate α ≡ g(p-1)/q (mod p) • We’ll select secret a such that 1≤ a < q-1 • Calculate β ≡ αa (mod p), • Publish (p, q, 𝛼, β) and keep a secret
  • 11. Digital Signature Algorithm … 6 • One can signs the message m by following procedure.. • Select random k such that 0 < k < q-1 • Compute r = (𝛼k (mod p)) (mod q) • Compute s ≡ k-1 (m+ ar) (mod q) • Signature for message m is (r,s), this can be sent to other party along with m.
  • 12. Digital Signature Algorithm … 7 • Verifying signature… Download (p, q, 𝛼, 𝛽) Compute u1 ≡ s-1m (mod q), and u2 ≡ s-1 r (mod q) Compute v= (𝛼 𝑢1 𝛽 𝑢2 ( 𝑚𝑜𝑑 𝑝)) (𝑚𝑜𝑑 𝑞) Accept the signature iff v = r
  • 13. Digital Signature Algorithm … 8 • How it works? • We know that m ≡ (ks –ar) (mod q) • Then s-1m ≡ k – ar s-1 k ≡ s-1m +ars-1 (mod q) ≡ u1 + au2 αk = 𝛼 ( 𝑢1 + 𝑎𝑢2) = 𝛼 𝑢1 𝛽 𝑢2 𝑚𝑜𝑑 𝑝 𝑚𝑜𝑑 𝑞 Thus r = v.
  • 14. Attacks on Zp * and subgroup of order q • Size of p in Zp * is determined by the attack Index calculus. The standard method for breaking discrete logarithms over a field as Zp * is known as the index calculus. It depends on the group in which the discrete logarithm of interest is set. • In our example we’ve selected p=283 and q=47 , (p-1)/q=6 but 6 is not there in the subgroup generated by q. so picking such a subgroup which doesn’t have small element of main group formed by p, which gives robust cryptographic security. • In absence of small elements, we can’t use sub-exponential time index calculus method to recover discrete logarithm.
  • 15. Index Calculus • Let p a prime number and g is a primitive root modulo, such that for that every natural number B coprime to p, there exist some integer e, so that B ≡ g e (mod p) • A primitive root modulo n exist iff n is 1,2,4,pk,2pk for an odd prime p and k 𝜖 N. • We take indg(B) = e if e is the smallest natural number • If g e ≡ B (mod p) , if p is prime then • Indg(A · B) = indg(A) + indg(B) (mod p-1)
  • 16. Index Calculus ….Example • 5x ≡ 9451 (mod 10007), now choose B={2,3,5,7} We’ll have to find exponents • 5 4063 mod 10007 = 42 = 2 * 3 * 7 • 5 5136 mod 10007 = 54 = 2 * 33 • 5 9865 mod 10007 = 189 = 33 * 7 we have linear congruences.. • log52 + log53 + log57 = 4063 mod 10006 • log52 + 3 log53 = 5136 mod 10006 • 3 log53 + log57 = 9865 mod 10006
  • 17. Index Calculus …Example Solving this gives log52=6578, log53=6190, and log57=1301 Choose random exponent s = 7736 and try to calculate A x gs = 9451 x 57736 mod 10007 = 8400 = 24 x 3 x 52 x 7 log59451 = (4 log52 + log53 + 2 log55 + log57 – s) mod 10006 = (4*6578 + 6190 + 2*1 +1301 – 7736) mod 10006 = 6057 mod 10006
  • 18. Pollard rho Attack Pollard rho attack is efficient when we’ve p-1 is B-smooth. This means when (p-1)/q has many small prime factors. Thus the complexity of Pollard rho method is determined by the size of the base group G on which random walk is performed and the running time of the iterating function. Reducing either one of these two factors will result in speedup of the Pollard rho method. Hence, we select the prime q as minimum 160 bit long.