SlideShare a Scribd company logo
Basics of Cryptography
Problem statement
Let’s pretend that Bobby has a certain number of
pencils in his bag. If Bobby were to pull out pencils in
groups of 7, he would have 5 pencil in his bag.
Similarly, if Bobby were to pull out pencils in groups of
11, he would end up with 7 pencils left in his bag.
Finally, we know that if Bobby pulls out pencils in
groups of 13, he would end up with up 3 pencils left.
How many pencils does Bobby have in his bag?
HOW DO WE SOLVE THIS???????
Chinese Remainder Theorem
 Developed in the 3rd century by Chinese Mathematician Sun
Tzu.
 The Theorem
Suppose n1, n2, …, nk are positive integers which
are pairwise co prime. Then, for any given set of
integers a1,a2, …, ak, there exists an integer x solving
the system of simultaneous congruence.
(where x=x0 (mod n1*n2*n3..nk) )
unique solution is given as
x0 =(m2m3)b1.a1 +
(m1m3)b2.a2 + (m1m2)b3.a3
Eucledian algorithm
 Given two integers a & b, there exist a
common divisor d of a & b of the form
d= ax+by.
How do we apply this?
X == 5 (mod 7)
X == 7 (mod 11)
X == 3 (mod 13)
Significance in Cryptography
 In cryptography, the CRT is used in secret sharing through error-
correcting code.
 Let m1,m2,⋯mi be t pairwise relatively prime integers. Suppose
we have have a secret which is an integer s with 0≤s<m. The secret
s can be shared among t parties as follows. Let P1,P2,⋯Pt denote
the t parties that will share the secret. We give Pi the residue
si=s(modmi) the information known only to Pi. By the CRT the t
pieces of information si are sufficient to determine the original
secret s, but with anything less than t number of residue si cannot
determine the original s.
 Used in secret sharing algorithm like RSA.
Quadratic Residues
 For all x such that (x,n) =1 , x is called a quadratic
residue modulo n if there exists y such that y2x mod n
 Note: if p is prime there are exactly
(p-1)/2 quadratic residues in Zp*.
For eg:
X^2 = a mod 11
Then a can be –
1^2=1 , 2^2= 4…….
a={1,4,9,5,3}.
These are quadratic residue and {2,6,7,8,10} are quadratic
non residue.
Legendre’s symbol
 p – odd prime
 Definition:
 0, if p divides a
 1,if a is quadratic residue.
 -1, if a is quadratic non residue.
Significance in Cryptography
 The fact that finding a square root of a number
modulo a large composite n has been used for
constructing cryptographic schemes such as
the Rabin cryptosystem.
 The discrete logarithm is a similar problem that is
also used in cryptography.
 Graph theory
 Primality testing
Discrete log
 Fix a prime p. Let a, b be nonzero integers (mod p). The
problem of finding x such that ax ≡ b (mod p) is called the
discrete logarithm problem
Cyclic multiplicative group
 Some groups have a property, that all the elements in
the group can be obtained by repeatedly applying the
group operation to a particular group element. If a
group has such a property, it is called a cyclic group and
the particular group element is called a generator.
 21 ≡ 2 mod 5
22 ≡ 4 mod 5
23 ≡ 8 ≡ 3 mod 5
24 ≡ 16 ≡ 1 mod 5
 Applications : as this is a one way function it is used in
deffie hellman and other key exchange algorithms.
Primality Testing
 Introduction :
 The primality test provides the probability of
whether or not a large number is prime.
 Several theorems including Fermat’s theorem
provide idea of primality test.
 Cryptography schemes such as RSA algorithm
heavily based on primality test.
Definitions
 A Prime number is an integer that has no
integer factors other than 1 and itself. On the
other hand, it is called composite number.
 A primality testing is a test to determine
whether or not a given number is prime, as
opposed to actually decomposing the number
into its constituent prime factors.
Algorithms
 A Naïve Algorithm
◦ Pick any integer P that is greater than 2.
◦ Try to divide P by all odd integers starting from 3 to
square root of P.
◦ If P is divisible by any one of these odd integers, we
can conclude that P is composite.
◦ The worst case is that we have to go through all odd
number testing cases.
◦ Time complexity is O(square root of N)
Fermat’s Theorem
◦ Given that P is an integer that we would like to test
that it is either a PRIME or not.
◦ And A is another integer that is greater than zero and
less than P.
◦ From Fermat’s Theorem, if P is a PRIME, it will satisfy
this two equalities:
 A^(p-1) = 1(mod P) or A^(p-1)mod P = 1
 A^P = A(mod P) or A^P mod P = A
◦ For instances, if P = 341, will P be PRIME?
-> from previous equalities, we would be able to
obtain that:
2^(341-1)mod 341 = 1, if A = 2
◦ It seems that 341 is a prime number under Fermat’s
Theorem. However, if A is now equal to 3:
◦ 3^(341-1)mod 341 = 56 !!!
◦ That means Fermat’s Theorem is not true in this case!
Rabin-Miller’s Probabilistic Primality
Algorithm
◦ The Rabin-Miller’s Probabilistic Primality test was
by Rabin, based on Miller’s idea. This algorithm
provides a fast method of determining of primality
of a number with a controllably small probability of
error.
◦ Given (b, n), where n is the number to be tested for
primality, and b is randomly chosen in [1, n-1]. Let
n-1 = (2^q)*m, where m is an odd integer.
• b^m = 1(mod n)
• b^m = -1(mod n)
◦ If the testing number satisfies either cases, it will be said as
“inconclusive”. That means it could be a prime number.
◦ From Fermat’s Theorem, it concludes 341 is a prime but it is 11 *
31!
◦ Now try to use Rabin-Miller’s Algorithm.
 n = 401
n -1 = 400 = 24*25
k = 4, m = 25
a = 3
b0 = 325 = 268 (mod 401)
b1 = 325*2 = 45 (mod 401)
b2 = 325*22
= 20 (mod 401)
b3 = 325*23
= 400 (mod 401)
= -1 (mod 401
• Also, Let n be 341, b be 2. then assume:
◦ q = 2 and m = 85 (since, n -1 = 2^q*m)
◦ 2^85 mod 341 = 32
◦ Since it is not equal to 1, 341 is composite!
Thanks !!

More Related Content

What's hot

POST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEMPOST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEM
Rajendran
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
NagendraK18
 
String Matching Finite Automata & KMP Algorithm.
String Matching Finite Automata & KMP Algorithm.String Matching Finite Automata & KMP Algorithm.
String Matching Finite Automata & KMP Algorithm.
Malek Sumaiya
 
Boyer moore algorithm
Boyer moore algorithmBoyer moore algorithm
Boyer moore algorithm
AYESHA JAVED
 
Euler phi
Euler phiEuler phi
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Ratnakar Mikkili
 
String matching algorithms-pattern matching.
String matching algorithms-pattern matching.String matching algorithms-pattern matching.
String matching algorithms-pattern matching.
Swapan Shakhari
 
Boyer more algorithm
Boyer more algorithmBoyer more algorithm
Boyer more algorithm
Kritika Purohit
 
Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘 Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘
Jungkyu Lee
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
Dr Shashikant Athawale
 
String kmp
String kmpString kmp
String kmp
thinkphp
 
Limit and continuity (2)
Limit and continuity (2)Limit and continuity (2)
Limit and continuity (2)
Digvijaysinh Gohil
 
Lec17
Lec17Lec17
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
CSR2011
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
CSR2011
 
Radix Sorting With No Extra Space
Radix Sorting With No Extra SpaceRadix Sorting With No Extra Space
Radix Sorting With No Extra Space
gueste5dc45
 
06. string matching
06. string matching06. string matching
06. string matching
Onkar Nath Sharma
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
mans_1201
 
NP completeness
NP completenessNP completeness
NP completeness
Amrinder Arora
 
finite automata
 finite automata finite automata
finite automata
sabiya sabiya
 

What's hot (20)

POST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEMPOST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEM
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
String Matching Finite Automata & KMP Algorithm.
String Matching Finite Automata & KMP Algorithm.String Matching Finite Automata & KMP Algorithm.
String Matching Finite Automata & KMP Algorithm.
 
Boyer moore algorithm
Boyer moore algorithmBoyer moore algorithm
Boyer moore algorithm
 
Euler phi
Euler phiEuler phi
Euler phi
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
String matching algorithms-pattern matching.
String matching algorithms-pattern matching.String matching algorithms-pattern matching.
String matching algorithms-pattern matching.
 
Boyer more algorithm
Boyer more algorithmBoyer more algorithm
Boyer more algorithm
 
Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘 Jensen's inequality, EM 알고리즘
Jensen's inequality, EM 알고리즘
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 
String kmp
String kmpString kmp
String kmp
 
Limit and continuity (2)
Limit and continuity (2)Limit and continuity (2)
Limit and continuity (2)
 
Lec17
Lec17Lec17
Lec17
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
 
Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
 
Radix Sorting With No Extra Space
Radix Sorting With No Extra SpaceRadix Sorting With No Extra Space
Radix Sorting With No Extra Space
 
06. string matching
06. string matching06. string matching
06. string matching
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
NP completeness
NP completenessNP completeness
NP completeness
 
finite automata
 finite automata finite automata
finite automata
 

Viewers also liked

Universidad panamericana actividad 2 ambientes virtuales
Universidad panamericana actividad 2 ambientes virtualesUniversidad panamericana actividad 2 ambientes virtuales
Universidad panamericana actividad 2 ambientes virtuales
Cole Católico
 
Ensayo 1
Ensayo 1Ensayo 1
Ensayo 1
marcepb
 
Practico individual joel uriona
Practico individual joel urionaPractico individual joel uriona
Practico individual joel uriona
joel uriona carrasco
 
լույսը և գույնը բնության մեջ
լույսը և գույնը բնության մեջլույսը և գույնը բնության մեջ
լույսը և գույնը բնության մեջ
Manul06
 
Importancia de mi Comunidad
Importancia de mi ComunidadImportancia de mi Comunidad
Importancia de mi Comunidad
mosqueramarlon_UEBI2A
 
Nueva Presentación
Nueva PresentaciónNueva Presentación
Nueva Presentación
Aldana Rasjido
 
Presentación1
Presentación1Presentación1
Presentación1
Aldana Rasjido
 
Residential interiors2
Residential interiors2Residential interiors2
Residential interiors2
Kamila Sztaba
 
Curriculum vitae of sibusisolimane
Curriculum vitae of sibusisolimaneCurriculum vitae of sibusisolimane
Curriculum vitae of sibusisolimane
Sibusiso limane
 
Informe rendicion-de-cuentas-2014
Informe rendicion-de-cuentas-2014Informe rendicion-de-cuentas-2014
Informe rendicion-de-cuentas-2014
BRITANIC SANTILLAN INTRIAGO
 
PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746
PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746
PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746
Aldana Rasjido
 
Zigbee
ZigbeeZigbee
Zigbee
Neha Gupta
 
Soft hard handover
Soft hard handoverSoft hard handover
իմ ամանորը
իմ ամանորըիմ ամանորը
իմ ամանորը
Manul06
 
Investigación operativa
Investigación operativaInvestigación operativa
Investigación operativa
BRITANIC SANTILLAN INTRIAGO
 
Artistas famosos
Artistas famososArtistas famosos
Artistas famosos
nahiiialvarez
 

Viewers also liked (17)

Universidad panamericana actividad 2 ambientes virtuales
Universidad panamericana actividad 2 ambientes virtualesUniversidad panamericana actividad 2 ambientes virtuales
Universidad panamericana actividad 2 ambientes virtuales
 
Ensayo 1
Ensayo 1Ensayo 1
Ensayo 1
 
Practico individual joel uriona
Practico individual joel urionaPractico individual joel uriona
Practico individual joel uriona
 
լույսը և գույնը բնության մեջ
լույսը և գույնը բնության մեջլույսը և գույնը բնության մեջ
լույսը և գույնը բնության մեջ
 
Le Meridien all work
Le Meridien all workLe Meridien all work
Le Meridien all work
 
Importancia de mi Comunidad
Importancia de mi ComunidadImportancia de mi Comunidad
Importancia de mi Comunidad
 
Nueva Presentación
Nueva PresentaciónNueva Presentación
Nueva Presentación
 
Presentación1
Presentación1Presentación1
Presentación1
 
Residential interiors2
Residential interiors2Residential interiors2
Residential interiors2
 
Curriculum vitae of sibusisolimane
Curriculum vitae of sibusisolimaneCurriculum vitae of sibusisolimane
Curriculum vitae of sibusisolimane
 
Informe rendicion-de-cuentas-2014
Informe rendicion-de-cuentas-2014Informe rendicion-de-cuentas-2014
Informe rendicion-de-cuentas-2014
 
PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746
PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746
PROYECTO ANUAL- EDUCACION FISICA "BELLAS ARTES" N° 746
 
Zigbee
ZigbeeZigbee
Zigbee
 
Soft hard handover
Soft hard handoverSoft hard handover
Soft hard handover
 
իմ ամանորը
իմ ամանորըիմ ամանորը
իմ ամանորը
 
Investigación operativa
Investigación operativaInvestigación operativa
Investigación operativa
 
Artistas famosos
Artistas famososArtistas famosos
Artistas famosos
 

Similar to Basics of Mathematical Cryptography

Primality
PrimalityPrimality
Ch08
Ch08Ch08
Ch08
Ch08Ch08
The Complexity Of Primality Testing
The Complexity Of Primality TestingThe Complexity Of Primality Testing
The Complexity Of Primality Testing
Mohammad Elsheikh
 
RSA
RSARSA
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
UmeshReddy49
 
Cyber Security Part-3.pptx
Cyber Security Part-3.pptxCyber Security Part-3.pptx
Cyber Security Part-3.pptx
RavikumarVadana
 
RSA final notation change2
RSA final notation change2RSA final notation change2
RSA final notation change2
Coleman Gorham
 
11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf
VipinNegi38
 
ch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.pptch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.ppt
tahirnaquash2
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
smruti sarangi
 
Real numbers
Real numbersReal numbers
Real numbers
Ramki M
 
Number theory
Number theoryNumber theory
Number theory
cherrymer molina
 
Prime and Composite Numbers
Prime and Composite NumbersPrime and Composite Numbers
Prime and Composite Numbers
Sonny Soriano
 
Algorithms Exam Help
Algorithms Exam HelpAlgorithms Exam Help
Algorithms Exam Help
Programming Exam Help
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
IT Engineering Department
 
Infinite Sequences of Primes of Form 4n-1 and 4n+1
Infinite Sequences of Primes of Form 4n-1 and 4n+1Infinite Sequences of Primes of Form 4n-1 and 4n+1
Infinite Sequences of Primes of Form 4n-1 and 4n+1
inventionjournals
 
Real number Class 10th
Real number Class 10thReal number Class 10th
Real number Class 10th
Abhishek Mishra
 
Eulers totient
Eulers totientEulers totient
Eulers totient
SampadaZalte
 
P, NP and NP-Complete, Theory of NP-Completeness V2
P, NP and NP-Complete, Theory of NP-Completeness V2P, NP and NP-Complete, Theory of NP-Completeness V2
P, NP and NP-Complete, Theory of NP-Completeness V2
S.Shayan Daneshvar
 

Similar to Basics of Mathematical Cryptography (20)

Primality
PrimalityPrimality
Primality
 
Ch08
Ch08Ch08
Ch08
 
Ch08
Ch08Ch08
Ch08
 
The Complexity Of Primality Testing
The Complexity Of Primality TestingThe Complexity Of Primality Testing
The Complexity Of Primality Testing
 
RSA
RSARSA
RSA
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
Cyber Security Part-3.pptx
Cyber Security Part-3.pptxCyber Security Part-3.pptx
Cyber Security Part-3.pptx
 
RSA final notation change2
RSA final notation change2RSA final notation change2
RSA final notation change2
 
11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf
 
ch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.pptch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.ppt
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Real numbers
Real numbersReal numbers
Real numbers
 
Number theory
Number theoryNumber theory
Number theory
 
Prime and Composite Numbers
Prime and Composite NumbersPrime and Composite Numbers
Prime and Composite Numbers
 
Algorithms Exam Help
Algorithms Exam HelpAlgorithms Exam Help
Algorithms Exam Help
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
Infinite Sequences of Primes of Form 4n-1 and 4n+1
Infinite Sequences of Primes of Form 4n-1 and 4n+1Infinite Sequences of Primes of Form 4n-1 and 4n+1
Infinite Sequences of Primes of Form 4n-1 and 4n+1
 
Real number Class 10th
Real number Class 10thReal number Class 10th
Real number Class 10th
 
Eulers totient
Eulers totientEulers totient
Eulers totient
 
P, NP and NP-Complete, Theory of NP-Completeness V2
P, NP and NP-Complete, Theory of NP-Completeness V2P, NP and NP-Complete, Theory of NP-Completeness V2
P, NP and NP-Complete, Theory of NP-Completeness V2
 

Recently uploaded

Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 

Recently uploaded (20)

Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 

Basics of Mathematical Cryptography

  • 2. Problem statement Let’s pretend that Bobby has a certain number of pencils in his bag. If Bobby were to pull out pencils in groups of 7, he would have 5 pencil in his bag. Similarly, if Bobby were to pull out pencils in groups of 11, he would end up with 7 pencils left in his bag. Finally, we know that if Bobby pulls out pencils in groups of 13, he would end up with up 3 pencils left. How many pencils does Bobby have in his bag? HOW DO WE SOLVE THIS???????
  • 3. Chinese Remainder Theorem  Developed in the 3rd century by Chinese Mathematician Sun Tzu.  The Theorem Suppose n1, n2, …, nk are positive integers which are pairwise co prime. Then, for any given set of integers a1,a2, …, ak, there exists an integer x solving the system of simultaneous congruence. (where x=x0 (mod n1*n2*n3..nk) )
  • 4. unique solution is given as x0 =(m2m3)b1.a1 + (m1m3)b2.a2 + (m1m2)b3.a3 Eucledian algorithm  Given two integers a & b, there exist a common divisor d of a & b of the form d= ax+by.
  • 5. How do we apply this? X == 5 (mod 7) X == 7 (mod 11) X == 3 (mod 13)
  • 6. Significance in Cryptography  In cryptography, the CRT is used in secret sharing through error- correcting code.  Let m1,m2,⋯mi be t pairwise relatively prime integers. Suppose we have have a secret which is an integer s with 0≤s<m. The secret s can be shared among t parties as follows. Let P1,P2,⋯Pt denote the t parties that will share the secret. We give Pi the residue si=s(modmi) the information known only to Pi. By the CRT the t pieces of information si are sufficient to determine the original secret s, but with anything less than t number of residue si cannot determine the original s.  Used in secret sharing algorithm like RSA.
  • 7. Quadratic Residues  For all x such that (x,n) =1 , x is called a quadratic residue modulo n if there exists y such that y2x mod n  Note: if p is prime there are exactly (p-1)/2 quadratic residues in Zp*. For eg: X^2 = a mod 11 Then a can be – 1^2=1 , 2^2= 4……. a={1,4,9,5,3}. These are quadratic residue and {2,6,7,8,10} are quadratic non residue.
  • 8. Legendre’s symbol  p – odd prime  Definition:  0, if p divides a  1,if a is quadratic residue.  -1, if a is quadratic non residue.
  • 9. Significance in Cryptography  The fact that finding a square root of a number modulo a large composite n has been used for constructing cryptographic schemes such as the Rabin cryptosystem.  The discrete logarithm is a similar problem that is also used in cryptography.  Graph theory  Primality testing
  • 10. Discrete log  Fix a prime p. Let a, b be nonzero integers (mod p). The problem of finding x such that ax ≡ b (mod p) is called the discrete logarithm problem
  • 11. Cyclic multiplicative group  Some groups have a property, that all the elements in the group can be obtained by repeatedly applying the group operation to a particular group element. If a group has such a property, it is called a cyclic group and the particular group element is called a generator.  21 ≡ 2 mod 5 22 ≡ 4 mod 5 23 ≡ 8 ≡ 3 mod 5 24 ≡ 16 ≡ 1 mod 5  Applications : as this is a one way function it is used in deffie hellman and other key exchange algorithms.
  • 12. Primality Testing  Introduction :  The primality test provides the probability of whether or not a large number is prime.  Several theorems including Fermat’s theorem provide idea of primality test.  Cryptography schemes such as RSA algorithm heavily based on primality test.
  • 13. Definitions  A Prime number is an integer that has no integer factors other than 1 and itself. On the other hand, it is called composite number.  A primality testing is a test to determine whether or not a given number is prime, as opposed to actually decomposing the number into its constituent prime factors.
  • 14. Algorithms  A Naïve Algorithm ◦ Pick any integer P that is greater than 2. ◦ Try to divide P by all odd integers starting from 3 to square root of P. ◦ If P is divisible by any one of these odd integers, we can conclude that P is composite. ◦ The worst case is that we have to go through all odd number testing cases. ◦ Time complexity is O(square root of N)
  • 15. Fermat’s Theorem ◦ Given that P is an integer that we would like to test that it is either a PRIME or not. ◦ And A is another integer that is greater than zero and less than P. ◦ From Fermat’s Theorem, if P is a PRIME, it will satisfy this two equalities:  A^(p-1) = 1(mod P) or A^(p-1)mod P = 1  A^P = A(mod P) or A^P mod P = A ◦ For instances, if P = 341, will P be PRIME? -> from previous equalities, we would be able to obtain that: 2^(341-1)mod 341 = 1, if A = 2
  • 16. ◦ It seems that 341 is a prime number under Fermat’s Theorem. However, if A is now equal to 3: ◦ 3^(341-1)mod 341 = 56 !!! ◦ That means Fermat’s Theorem is not true in this case!
  • 17. Rabin-Miller’s Probabilistic Primality Algorithm ◦ The Rabin-Miller’s Probabilistic Primality test was by Rabin, based on Miller’s idea. This algorithm provides a fast method of determining of primality of a number with a controllably small probability of error. ◦ Given (b, n), where n is the number to be tested for primality, and b is randomly chosen in [1, n-1]. Let n-1 = (2^q)*m, where m is an odd integer. • b^m = 1(mod n) • b^m = -1(mod n)
  • 18. ◦ If the testing number satisfies either cases, it will be said as “inconclusive”. That means it could be a prime number. ◦ From Fermat’s Theorem, it concludes 341 is a prime but it is 11 * 31! ◦ Now try to use Rabin-Miller’s Algorithm.  n = 401 n -1 = 400 = 24*25 k = 4, m = 25 a = 3 b0 = 325 = 268 (mod 401) b1 = 325*2 = 45 (mod 401) b2 = 325*22 = 20 (mod 401) b3 = 325*23 = 400 (mod 401) = -1 (mod 401 • Also, Let n be 341, b be 2. then assume: ◦ q = 2 and m = 85 (since, n -1 = 2^q*m) ◦ 2^85 mod 341 = 32 ◦ Since it is not equal to 1, 341 is composite!