SlideShare a Scribd company logo
1 of 15
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

Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key CryptographyGopal Sakarkar
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key CryptosystemDevakumar Kp
 
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksRPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksPradeep Kumar TS
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption StandardPrince Rachit
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic ProgrammingSahil Kumar
 
Quantum Cryptography presentation
Quantum Cryptography presentationQuantum Cryptography presentation
Quantum Cryptography presentationKalluri Madhuri
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacyPawan Arya
 
Security Attacks.ppt
Security Attacks.pptSecurity Attacks.ppt
Security Attacks.pptZaheer720515
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)Haris Ahmed
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithmSunita Kharayat
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network LayerManoj Kumar
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 

What's hot (20)

Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksRPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy Networks
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 
Ssl and tls
Ssl and tlsSsl and tls
Ssl and tls
 
NP completeness
NP completenessNP completeness
NP completeness
 
Replication in Distributed Systems
Replication in Distributed SystemsReplication in Distributed Systems
Replication in Distributed Systems
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Quantum Cryptography presentation
Quantum Cryptography presentationQuantum Cryptography presentation
Quantum Cryptography presentation
 
If then rule in fuzzy logic and fuzzy implications
If then rule  in fuzzy logic and fuzzy implicationsIf then rule  in fuzzy logic and fuzzy implications
If then rule in fuzzy logic and fuzzy implications
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
 
Security Attacks.ppt
Security Attacks.pptSecurity Attacks.ppt
Security Attacks.ppt
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Randomized Algorithm
Randomized AlgorithmRandomized Algorithm
Randomized Algorithm
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 

Similar to Cryptography using probability

Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applicationsthai
 
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.docxmariuse18nolet
 
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 Verilogijcncs
 
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 cryptosystemAnkur 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 Variantsijsrd.com
 
Cryptography - An Overview
Cryptography - An OverviewCryptography - An Overview
Cryptography - An Overviewppd1961
 
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 DraftAlexanderCominsky
 
Cryptography chap#6.pptx
Cryptography chap#6.pptxCryptography chap#6.pptx
Cryptography chap#6.pptxHamnaMalik31
 
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 cryptographymukesh 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.pptxRohanTakke
 
Post quantum cryptography
Post quantum cryptographyPost quantum cryptography
Post quantum cryptographyMartins 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 .NETPrankit Mishra
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVAPrankit Mishra
 
Fog computing : The new age Technology
Fog computing : The new age TechnologyFog computing : The new age Technology
Fog computing : The new age TechnologyPrankit Mishra
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemPrankit Mishra
 
Ajanta and Ellora Caves
Ajanta and Ellora CavesAjanta and Ellora Caves
Ajanta and Ellora CavesPrankit 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 SciencePrankit Mishra
 
Bipolar Junction Transistor
Bipolar Junction TransistorBipolar Junction Transistor
Bipolar Junction TransistorPrankit Mishra
 
Forward error correction
Forward error correctionForward error correction
Forward error correctionPrankit 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

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Recently uploaded (20)

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

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.