SlideShare a Scribd company logo
CRYPTOGRAPHY – AND THE USE OF
PROBABILITY
Made By: Prankit Mishra(141CC00007)
Submitted To: Dr. Rakesh Pandey (Faculty- Mathematics)
Contents
1. Cryptography
2. Probability
3. Important Terms in Probability
4. Public Key Cryptography
5. Fermat’s Little Theorem
6. Use Of Fermat’s Little Theorem
7. Applications of Probability and Fermat’s Little Theorem in Cryptography
• Checksums and the Birthday Problem
• Pseudo Random Number Generators
• Code Breaking By Metropolis Hastings
8. Conclusions
Cryptography
 Cryptography or cryptology is the practice and study of techniques for secure
communication in the presence of third parties called adversaries.
 More generally, cryptography is about constructing and analyzing protocols that
prevent third parties or the public from reading private messages;various
aspects in information security such as data confidentiality, data
integrity, authentication, and non-repudiation are central to modern
cryptography.
 Modern cryptography is heavily based on mathematical theory and computer
science practice; cryptographic algorithms are designed around computational
hardness assumptions, making such algorithms hard to break in practice by any
adversary.
Probability
 Probability is the measure of the likelihood that an event will occur.
 When dealing with experiments that are random and well-defined in a purely
theoretical setting (like tossing a fair coin), probabilities can be numerically
described by the number of desired outcomes divided by the total number of all
outcomes.
 For example, tossing a fair coin twice will yield "head-head", "head-tail", "tail-
head", and "tail-tail" outcomes. The probability of getting an outcome of "head-
head" is 1 out of 4 outcomes or 1 divided by four or 1/4 (or 25%).
Important Terms
 Event - A subset of the outcomes of a process. For instance, the set of
outcomes {2, 4, 6} when rolling a die is an event that one might call "rolling an
even number".
 Sample space - The set S of all possible outcomes of an experiment, i.e. the
sample space for a die roll is {1, 2, 3, 4, 5, 6}.
 Randomness - Randomness is the lack of pattern or predictability in events.A
random sequence of events, symbols or steps has no order and does not follow an
intelligible pattern or combination.
 Markov model - In probability theory, a Markov model is a stochastic model used
to model randomly changing systems where it is assumed that future states
depend only on the current state and not on the events that occurred before it
(that is, it assumes the Markov property). Generally, this assumption enables
reasoning and computation with the model that would otherwise be intractable.
Public Key Cryptography
 It is a public way to encrypt a message so that only you can decrypt them. The
way it's done, is that there are functions out there called trapdoor functions. It
means they only go one way, like a trapdoor - they are easy for a computer to do
but would take a very long time to reverse.
 It is also known as Asymmetric Key Cryptography.
 This type of cryptography widely uses the Fermat’s Little Theorem which is a
very important theorem and will be discussed in the further slides.
Fermat's Little Theorem
 If p is a prime number, then for any integer a:
ap =a (mod p)
 In words, this means that the remainder of ap when dividing by p is a. It's enough to
test it for a < p, if you think about the properties of remainders, you can
convince yourself that the general case will follow.
 The statement can be modified to work for a product of two primes pq; as
follows:
a(p-1)(q-1)+1 = α ( mod pq)
Use of Fermat’s Little Theorem
 If we try it out for p = 5; q = 7: Then pq = 35; (p 1) (q 1) + 1 = 25: So we're saying that for
any integer a, a25 a ( mod 35):
 To use this in public key cryptography, we might announce our public key 5 and base 35.
Our private key is 5, so that if you raise something that was raised to power 5 again to
power 5, it's equivalent to raising it to power 25 in the first place. Then whoever sends us
a message, will raise it to power 5 and take the remainder modulo 35. Then we will use
our private key, to recover the message by raising what you received to power 5 and
taking the remainder mod 35 again. Exponentiations and taking remainders is an easy
task for a computer, it can be done in little computational time. But going the other way,
finding out what integer ‘a’ was used to get the encrypted message is difficult. Of course,
in real life the primes used in this procedure are very, very big and generated by the
computer.
 This procedure based on Fermat's Little Theorem is called RSA. It ruled the cypher space
for many years, but by now, it is being gradually abandoned in favor of another type of
trapdoor function-based protocol, elliptic curve cryptography.
Applications of Probability and
Fermat’s Little Theorem in
Cryptography
Checksums and the Birthday Problem
 If you transmit a bunch of encrypted data, how do you check if it didn't get corrupted on
the way? You could do a simple calculation, and transmit the result along with the data.
Then whoever receives it, can do the calculation on the data again and if they get the
same result, they will know that the data is not corrupted. Or will they?
 The result of that calculation is called a checksum and is often used to verify that data
was transmitted correctly. Depending on the nature of the calculation, it may be very
hard for an attacker to construct another stream of encrypted data that results in the
same checksum. However, there is a chance that in a collection of different encrypted
texts there will be two distinct ones that have the same checksum. Suppose that the
checksum is 8-bit long and roughly uniformly distributed over the space of 8-bit strings.
Then there are 28 = 256 possible checksums and according to the Birthday
 Problem, there is a better than 50% chance that in a set of 19 different data streams two
will have the same checksum.
Pseudo Random Number Generators
 Computers can't really generate random numbers. They instead try to generate
sequences of numbers with properties that approximate a random sequence, but
are not really random. If they approximate it well, a sequence of such numbers is
called pseudo-random.
 Sometimes, a PRNG uses a random seed, a smaller amount of bits that are
assumed to be random, to extrapolate a much larger pseudo-random number.
 A generator may use this seed and perform a calculation whose result may land
anywhere in some larger space. There are services that sell random bits, they
tend to use radioactive decay or atmospheric noise - that are believed to be truly
random.
 The random package in Python uses a pseudo random number generator called
Mersenne Twister.
Code breaking by Metropolis-Hastings
 The wheel pictured below was an invention
attributed to Julius Caesar, and assists in encoding
and decoding the Caesar cipher.
 It simply replaces each letter with a letter k spots
further in the alphabet, for some k of your choice,
and by turning the inside wheel you get a helpful
that lets you check which letter corresponds to
which.
 This is the simplest of the substitution ciphers, a class
of ciphers that replace a letter by another (for
example A by N, B by Q, C by E etc.) but not all of
them preserve the order, as the Caesar cipher does.
 A modern, much more sophisticated descendant of
the Caesar wheel was the Enigma machine, and
while the Caesar wheel had only 26 settings, Enigma
had 158,962,555,217,826,360,000 (158 quintillion)
of them. And that's still less than one in two million
of all the possible permutations of the letters of the
alphabet.
Cont.….
 What is the best way to break a substitution cypher? If the text is long, statistical analysis. By
Law of Large Numbers, if a letter appears a given percentage of the time in a given language, it
with high probability approach that proportion in any text that is sufficiently long. What
happens if the text is short? Checking one permutation per nanosecond would take 12 billion
years. But if the text is short, there are also relatively few possibilities as to what the original,
unencrypted text could have been. An in that case, any substitution cipher, from Caesar to
Enigma, can be broken using our recent acquaintance, the Metropolis-Hastings algorithm.
 Let g be a permutation of the alphabet, and sg be the stationary distribution probability
associated to g. Consider a Markov chain on the space of permutations, defined by: pick two
entries in permutation g and swap them. What are the transition probabilities in this chain?
What is the stationary distribution?
 If two permutations cannot be achieved from one another by swapping two entries, then the
transition probabilities are 0. Otherwise, they're each 1/(26
2). Since the transition matrix is
symmetric, the stationary distribution is uniform. Since the transition matrix is symmetric, the
stationary distribution is uniform. Since the transition matrix of the original chain is
symmetric, the probabilities aij in the Metropolis-Hastings procedure are:
aij = min(1, sjPji/siPij) = min(1, sj/si)
Conclusion
 Probability and Cryptography is both a very vast fields and there are many more
things to be done in both the sectors of science. In todays world when there so
many cyber attacks and web hacking is going on which is dangerous and
harmful for this society these things are very important and cryptography using
probability indeed saves this society from many of such dangers.
Thank You

More Related Content

What's hot

DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
Public key algorithm
Public key algorithmPublic key algorithm
Public key algorithm
Prateek Pandey
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
SamiaAziz4
 
Compiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLRCompiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLR
Riazul Islam
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
CheapSSLsecurity
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Babu Appat
 
Genetic algorithms vs Traditional algorithms
Genetic algorithms vs Traditional algorithmsGenetic algorithms vs Traditional algorithms
Genetic algorithms vs Traditional algorithms
Dr. C.V. Suresh Babu
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
Sunita Kharayat
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rajendran
 
Classical Sets & fuzzy sets
Classical Sets & fuzzy setsClassical Sets & fuzzy sets
Classical Sets & fuzzy sets
Dr.Ashvini Chaudhari Bhongade
 
Fuzzy Logic in the Real World
Fuzzy Logic in the Real WorldFuzzy Logic in the Real World
Fuzzy Logic in the Real World
BCSLeicester
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCEARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCESabique Khan
 
Confusion and Diffusion.pptx
Confusion and Diffusion.pptxConfusion and Diffusion.pptx
Confusion and Diffusion.pptx
bcanawakadalcollege
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
Riya Choudhary
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
Abhishek Singh
 
Computer Security Lecture 7: RSA
Computer Security Lecture 7: RSAComputer Security Lecture 7: RSA
Computer Security Lecture 7: RSA
Mohamed Loey
 
Learning set of rules
Learning set of rulesLearning set of rules
Learning set of rules
swapnac12
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSACryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSA
aritraranjan
 
Hashing
HashingHashing
Hashing
Amar Jukuntla
 

What's hot (20)

DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
Public key algorithm
Public key algorithmPublic key algorithm
Public key algorithm
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
 
Compiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLRCompiler Design LR parsing SLR ,LALR CLR
Compiler Design LR parsing SLR ,LALR CLR
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Genetic algorithms vs Traditional algorithms
Genetic algorithms vs Traditional algorithmsGenetic algorithms vs Traditional algorithms
Genetic algorithms vs Traditional algorithms
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Classical Sets & fuzzy sets
Classical Sets & fuzzy setsClassical Sets & fuzzy sets
Classical Sets & fuzzy sets
 
Fuzzy Logic in the Real World
Fuzzy Logic in the Real WorldFuzzy Logic in the Real World
Fuzzy Logic in the Real World
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCEARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
 
Confusion and Diffusion.pptx
Confusion and Diffusion.pptxConfusion and Diffusion.pptx
Confusion and Diffusion.pptx
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
Computer Security Lecture 7: RSA
Computer Security Lecture 7: RSAComputer Security Lecture 7: RSA
Computer Security Lecture 7: RSA
 
Learning set of rules
Learning set of rulesLearning set of rules
Learning set of rules
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSACryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSA
 
Hashing
HashingHashing
Hashing
 

Similar to Cryptography using probability

Quantum cryptography
Quantum cryptographyQuantum cryptography
Quantum cryptography
Nishant Bhardwaj
 
Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
thai
 
Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?
AlexWang212277
 
Introduction to Cryptography Week4 Part1-ISrevisionSu.docx
Introduction to Cryptography  Week4 Part1-ISrevisionSu.docxIntroduction to Cryptography  Week4 Part1-ISrevisionSu.docx
Introduction to Cryptography Week4 Part1-ISrevisionSu.docx
mariuse18nolet
 
Unit-2-IS (1).pdf
Unit-2-IS (1).pdfUnit-2-IS (1).pdf
Unit-2-IS (1).pdf
ShaikSameena24
 
Cryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using VerilogCryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using Verilog
ijcncs
 
The Most Important Algorithms
The Most Important AlgorithmsThe Most Important Algorithms
The Most Important Algorithmswensheng wei
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
Ankur Choudhary
 
A Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA VariantsA Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA Variants
ijsrd.com
 
Cryptography - An Overview
Cryptography - An OverviewCryptography - An Overview
Cryptography - An Overview
ppd1961
 
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final DraftMathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
AlexanderCominsky
 
Cryptography chap#6.pptx
Cryptography chap#6.pptxCryptography chap#6.pptx
Cryptography chap#6.pptx
HamnaMalik31
 
A probabilistic data encryption scheme (pdes)
A probabilistic data encryption scheme (pdes)A probabilistic data encryption scheme (pdes)
A probabilistic data encryption scheme (pdes)
Alexander Decker
 
Senior Research Final Draft3
Senior Research Final Draft3Senior Research Final Draft3
Senior Research Final Draft3Coleman Gorham
 
DOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITYDOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITYTuhin_Das
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
mukesh prajapati
 
ITNW 2164 ResearchPaper
ITNW 2164 ResearchPaperITNW 2164 ResearchPaper
ITNW 2164 ResearchPaperManuel Garza
 
Cryptography & Quantum Computing.pptx
Cryptography & Quantum Computing.pptxCryptography & Quantum Computing.pptx
Cryptography & Quantum Computing.pptx
RohanTakke
 
Post quantum cryptography
Post quantum cryptographyPost quantum cryptography
Post quantum cryptography
Martins Okoi
 
M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)
SrideviM4
 

Similar to Cryptography using probability (20)

Quantum cryptography
Quantum cryptographyQuantum cryptography
Quantum cryptography
 
Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
 
Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?
 
Introduction to Cryptography Week4 Part1-ISrevisionSu.docx
Introduction to Cryptography  Week4 Part1-ISrevisionSu.docxIntroduction to Cryptography  Week4 Part1-ISrevisionSu.docx
Introduction to Cryptography Week4 Part1-ISrevisionSu.docx
 
Unit-2-IS (1).pdf
Unit-2-IS (1).pdfUnit-2-IS (1).pdf
Unit-2-IS (1).pdf
 
Cryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using VerilogCryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using Verilog
 
The Most Important Algorithms
The Most Important AlgorithmsThe Most Important Algorithms
The Most Important Algorithms
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
 
A Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA VariantsA Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA Variants
 
Cryptography - An Overview
Cryptography - An OverviewCryptography - An Overview
Cryptography - An Overview
 
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final DraftMathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
 
Cryptography chap#6.pptx
Cryptography chap#6.pptxCryptography chap#6.pptx
Cryptography chap#6.pptx
 
A probabilistic data encryption scheme (pdes)
A probabilistic data encryption scheme (pdes)A probabilistic data encryption scheme (pdes)
A probabilistic data encryption scheme (pdes)
 
Senior Research Final Draft3
Senior Research Final Draft3Senior Research Final Draft3
Senior Research Final Draft3
 
DOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITYDOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITY
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
ITNW 2164 ResearchPaper
ITNW 2164 ResearchPaperITNW 2164 ResearchPaper
ITNW 2164 ResearchPaper
 
Cryptography & Quantum Computing.pptx
Cryptography & Quantum Computing.pptxCryptography & Quantum Computing.pptx
Cryptography & Quantum Computing.pptx
 
Post quantum cryptography
Post quantum cryptographyPost quantum cryptography
Post quantum cryptography
 
M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)M.Sridevi II-M.Sc (computer science)
M.Sridevi II-M.Sc (computer science)
 

More from Prankit Mishra

Tourist management system using .NET
Tourist management system using .NETTourist management system using .NET
Tourist management system using .NET
Prankit Mishra
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVA
Prankit Mishra
 
Fog computing : The new age Technology
Fog computing : The new age TechnologyFog computing : The new age Technology
Fog computing : The new age Technology
Prankit Mishra
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
Prankit Mishra
 
Ajanta and Ellora Caves
Ajanta and Ellora CavesAjanta and Ellora Caves
Ajanta and Ellora Caves
Prankit Mishra
 
Probability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer ScienceProbability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer Science
Prankit Mishra
 
Bipolar Junction Transistor
Bipolar Junction TransistorBipolar Junction Transistor
Bipolar Junction Transistor
Prankit Mishra
 
Autotransformers
AutotransformersAutotransformers
Autotransformers
Prankit Mishra
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
Prankit Mishra
 
Forward error correction
Forward error correctionForward error correction
Forward error correction
Prankit Mishra
 
DDR SDRAMs
DDR SDRAMsDDR SDRAMs
DDR SDRAMs
Prankit Mishra
 

More from Prankit Mishra (11)

Tourist management system using .NET
Tourist management system using .NETTourist management system using .NET
Tourist management system using .NET
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVA
 
Fog computing : The new age Technology
Fog computing : The new age TechnologyFog computing : The new age Technology
Fog computing : The new age Technology
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
Ajanta and Ellora Caves
Ajanta and Ellora CavesAjanta and Ellora Caves
Ajanta and Ellora Caves
 
Probability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer ScienceProbability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer Science
 
Bipolar Junction Transistor
Bipolar Junction TransistorBipolar Junction Transistor
Bipolar Junction Transistor
 
Autotransformers
AutotransformersAutotransformers
Autotransformers
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Forward error correction
Forward error correctionForward error correction
Forward error correction
 
DDR SDRAMs
DDR SDRAMsDDR SDRAMs
DDR SDRAMs
 

Recently uploaded

ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 

Recently uploaded (20)

ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 

Cryptography using probability

  • 1. CRYPTOGRAPHY – AND THE USE OF PROBABILITY Made By: Prankit Mishra(141CC00007) Submitted To: Dr. Rakesh Pandey (Faculty- Mathematics)
  • 2. Contents 1. Cryptography 2. Probability 3. Important Terms in Probability 4. Public Key Cryptography 5. Fermat’s Little Theorem 6. Use Of Fermat’s Little Theorem 7. Applications of Probability and Fermat’s Little Theorem in Cryptography • Checksums and the Birthday Problem • Pseudo Random Number Generators • Code Breaking By Metropolis Hastings 8. Conclusions
  • 3. Cryptography  Cryptography or cryptology is the practice and study of techniques for secure communication in the presence of third parties called adversaries.  More generally, cryptography is about constructing and analyzing protocols that prevent third parties or the public from reading private messages;various aspects in information security such as data confidentiality, data integrity, authentication, and non-repudiation are central to modern cryptography.  Modern cryptography is heavily based on mathematical theory and computer science practice; cryptographic algorithms are designed around computational hardness assumptions, making such algorithms hard to break in practice by any adversary.
  • 4. Probability  Probability is the measure of the likelihood that an event will occur.  When dealing with experiments that are random and well-defined in a purely theoretical setting (like tossing a fair coin), probabilities can be numerically described by the number of desired outcomes divided by the total number of all outcomes.  For example, tossing a fair coin twice will yield "head-head", "head-tail", "tail- head", and "tail-tail" outcomes. The probability of getting an outcome of "head- head" is 1 out of 4 outcomes or 1 divided by four or 1/4 (or 25%).
  • 5. Important Terms  Event - A subset of the outcomes of a process. For instance, the set of outcomes {2, 4, 6} when rolling a die is an event that one might call "rolling an even number".  Sample space - The set S of all possible outcomes of an experiment, i.e. the sample space for a die roll is {1, 2, 3, 4, 5, 6}.  Randomness - Randomness is the lack of pattern or predictability in events.A random sequence of events, symbols or steps has no order and does not follow an intelligible pattern or combination.  Markov model - In probability theory, a Markov model is a stochastic model used to model randomly changing systems where it is assumed that future states depend only on the current state and not on the events that occurred before it (that is, it assumes the Markov property). Generally, this assumption enables reasoning and computation with the model that would otherwise be intractable.
  • 6. Public Key Cryptography  It is a public way to encrypt a message so that only you can decrypt them. The way it's done, is that there are functions out there called trapdoor functions. It means they only go one way, like a trapdoor - they are easy for a computer to do but would take a very long time to reverse.  It is also known as Asymmetric Key Cryptography.  This type of cryptography widely uses the Fermat’s Little Theorem which is a very important theorem and will be discussed in the further slides.
  • 7. Fermat's Little Theorem  If p is a prime number, then for any integer a: ap =a (mod p)  In words, this means that the remainder of ap when dividing by p is a. It's enough to test it for a < p, if you think about the properties of remainders, you can convince yourself that the general case will follow.  The statement can be modified to work for a product of two primes pq; as follows: a(p-1)(q-1)+1 = α ( mod pq)
  • 8. Use of Fermat’s Little Theorem  If we try it out for p = 5; q = 7: Then pq = 35; (p 1) (q 1) + 1 = 25: So we're saying that for any integer a, a25 a ( mod 35):  To use this in public key cryptography, we might announce our public key 5 and base 35. Our private key is 5, so that if you raise something that was raised to power 5 again to power 5, it's equivalent to raising it to power 25 in the first place. Then whoever sends us a message, will raise it to power 5 and take the remainder modulo 35. Then we will use our private key, to recover the message by raising what you received to power 5 and taking the remainder mod 35 again. Exponentiations and taking remainders is an easy task for a computer, it can be done in little computational time. But going the other way, finding out what integer ‘a’ was used to get the encrypted message is difficult. Of course, in real life the primes used in this procedure are very, very big and generated by the computer.  This procedure based on Fermat's Little Theorem is called RSA. It ruled the cypher space for many years, but by now, it is being gradually abandoned in favor of another type of trapdoor function-based protocol, elliptic curve cryptography.
  • 9. Applications of Probability and Fermat’s Little Theorem in Cryptography
  • 10. Checksums and the Birthday Problem  If you transmit a bunch of encrypted data, how do you check if it didn't get corrupted on the way? You could do a simple calculation, and transmit the result along with the data. Then whoever receives it, can do the calculation on the data again and if they get the same result, they will know that the data is not corrupted. Or will they?  The result of that calculation is called a checksum and is often used to verify that data was transmitted correctly. Depending on the nature of the calculation, it may be very hard for an attacker to construct another stream of encrypted data that results in the same checksum. However, there is a chance that in a collection of different encrypted texts there will be two distinct ones that have the same checksum. Suppose that the checksum is 8-bit long and roughly uniformly distributed over the space of 8-bit strings. Then there are 28 = 256 possible checksums and according to the Birthday  Problem, there is a better than 50% chance that in a set of 19 different data streams two will have the same checksum.
  • 11. Pseudo Random Number Generators  Computers can't really generate random numbers. They instead try to generate sequences of numbers with properties that approximate a random sequence, but are not really random. If they approximate it well, a sequence of such numbers is called pseudo-random.  Sometimes, a PRNG uses a random seed, a smaller amount of bits that are assumed to be random, to extrapolate a much larger pseudo-random number.  A generator may use this seed and perform a calculation whose result may land anywhere in some larger space. There are services that sell random bits, they tend to use radioactive decay or atmospheric noise - that are believed to be truly random.  The random package in Python uses a pseudo random number generator called Mersenne Twister.
  • 12. Code breaking by Metropolis-Hastings  The wheel pictured below was an invention attributed to Julius Caesar, and assists in encoding and decoding the Caesar cipher.  It simply replaces each letter with a letter k spots further in the alphabet, for some k of your choice, and by turning the inside wheel you get a helpful that lets you check which letter corresponds to which.  This is the simplest of the substitution ciphers, a class of ciphers that replace a letter by another (for example A by N, B by Q, C by E etc.) but not all of them preserve the order, as the Caesar cipher does.  A modern, much more sophisticated descendant of the Caesar wheel was the Enigma machine, and while the Caesar wheel had only 26 settings, Enigma had 158,962,555,217,826,360,000 (158 quintillion) of them. And that's still less than one in two million of all the possible permutations of the letters of the alphabet.
  • 13. Cont.….  What is the best way to break a substitution cypher? If the text is long, statistical analysis. By Law of Large Numbers, if a letter appears a given percentage of the time in a given language, it with high probability approach that proportion in any text that is sufficiently long. What happens if the text is short? Checking one permutation per nanosecond would take 12 billion years. But if the text is short, there are also relatively few possibilities as to what the original, unencrypted text could have been. An in that case, any substitution cipher, from Caesar to Enigma, can be broken using our recent acquaintance, the Metropolis-Hastings algorithm.  Let g be a permutation of the alphabet, and sg be the stationary distribution probability associated to g. Consider a Markov chain on the space of permutations, defined by: pick two entries in permutation g and swap them. What are the transition probabilities in this chain? What is the stationary distribution?  If two permutations cannot be achieved from one another by swapping two entries, then the transition probabilities are 0. Otherwise, they're each 1/(26 2). Since the transition matrix is symmetric, the stationary distribution is uniform. Since the transition matrix is symmetric, the stationary distribution is uniform. Since the transition matrix of the original chain is symmetric, the probabilities aij in the Metropolis-Hastings procedure are: aij = min(1, sjPji/siPij) = min(1, sj/si)
  • 14. Conclusion  Probability and Cryptography is both a very vast fields and there are many more things to be done in both the sectors of science. In todays world when there so many cyber attacks and web hacking is going on which is dangerous and harmful for this society these things are very important and cryptography using probability indeed saves this society from many of such dangers.