SlideShare a Scribd company logo
1 of 27
Cryptography
An Introduction
"The art of writing and solving codes"
Internet provides essential communication between tens of millions of
people and is being increasingly used as a tool for commerce, security
becomes a tremendously important issue to deal with.
There are many aspects to security and many applications, ranging from
secure commerce and payments to private communications and protecting
passwords. One essential aspect for secure communications is that of
cryptography. But it is important to note that while cryptography is
necessary for secure communications, it is not by itself sufficient.
Antiquity
 The first documented use of cryptography in writing dates back to
Circa 1900 BC when an Egyptian scribe used non standard hieroglyphs
in an inscription. Some experts argue that cryptography appear
spontaneously sometimes after writing was invented with applications
ranging from diplomatic missives to war-time battle plans.
 Its real era started from World War II when Germany was about to
take over Great Britain, Germany used a device named "Enigma" to
send their messages secretly to their war zones. In reply GBR created
a device named "Turing Machine" by Alan Turing to decrypt or break
Enigma which resulted in saving GBR.
Greek Etymology
 Cryptography
- Crypto -----> "Kryptos" --------> Hidden
- Graphy -----> "Graphein" -------> To Write
Encryption: The translation of data into secret
code.
Decryption: The translation of secret code into
original data.
The Caesar Cipher!
Plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ
 Encryption:
E(x) = (x + n) mod 26
 Decryption:
D(x) = (x - n) mod 26
Hiding Password
Password
Encryption
Key: Shift 1
Key to right
,U[SDDEPTF
Decryption
Key: Read 1
Key to left
Splinter Cipher!
Exxegoexsrgi
Decryption Key:
Shift Gear 4
AttackAtOnce
Encryption Key:
Shift Gear 4
Splinter Vegenere Cipher!
B
• 1
Q
• 16
R
• 17
ATTACKATONCE OATMEALOATME OTMMGKLHDTIR
What in the world is OTP?
Prime Numbers!
How to find a Prime Number?
Immortal are Prime Numbers.
Prime Numbers and Cryptography.
New Prime Number??
Methods to find
Prime Numbers
A Multiplicative
Sieve
The Prime
Number Machine
The Sieve of
Erastothenes
The Sieve of Erastothenes
Let's consider a table of sequential numbers
start
2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
,22,23,24,25,26,27,28,29,30,31,32....
The Sieve of Erastothenes
Cross out multiple of 2
2, 3, X, 5, X, 7, X, 9, X, 11, X, 13....
The Sieve of Erastothenes
The next non-overlined and non crossed out
number is three. Identify it as prime with an
overline, then cross out every third number
(every multiple of three).
2, 3, X, 5, XX, 7, X, X, X, 11, XX, 13 ...
The Sieve of Erastothenes
Continuing the process. Five is the next non-
overlined and non crossed out number. Overline
five and cross out every fifth number.
2, 3, X, 5, XX, 7, X, X, X, 11, XX, 13 ...
The Sieve of Erastothenes
The next prime number is then seven. Since
twice seven is greater than the largest visible
number in our list, all the remaining visible
numbers are prime.
2, 3, X, 5, XX, 7, X, XX, X, 11, XX, 13 ...
The Sieve of Erastothenes
Drawbacks
 The process is too slow
 Not efficient for finding huge primes.
Euclid’S Element
 The statement says that
“There are more than any finite number n of prime
numbers. Suppose that a1, a2, ..., an are prime numbers. Let
m be the product of all considered prime numbers. Consider
the number m + 1. If it's prime, then there are at least n + 1
primes.”
 So suppose m + 1 is not prime. Then, some prime g divides it.
But g cannot be any of the primes a1, a2, ..., an , since they
all divide m and do not divide m + 1. Therefore, there are at
least n + 1 primes.
 Thus, there are not a finite number of primes.
Euclid's Element
RSA
How to make sure that my data is save on the internet?
How to make sure that only an authorized person gets
my secret message?
The RSA model is the correct choice!
RSA Stands for Ron Rivest, Adi Shamir , Leonard
Adleman.
RSA
RSA is a consequence of Fermat's little theorem:
"If 'a' is not divisible by 'p' , where p is prime,
then a^(p-1) -1 is divisible by 'p'.
The Work Flow
 Generate two large random prime numbers p and q
 Find n = p*q
 Find phi = (p-1)*(q-1)
 Choose an integer e, 1 < e < phi such that GCD (e, phi) = 1
 Compute the secret exponent d, 1 < d < phi, such that e.d = 1
(mod phi)
 The public key is (n, e) and the private key is (d, p, q)
 All the values d, p, q and phi are kept secret.
The Work Flow
Select p
and q
n= p*q
phi= (p-1) *
(q-1)
e*d= 1
(mod phi)
C =
(msg)^e
mod n
Message =
(C)^d mod
n
Example
 P = 3 and Q = 11
 n = p*q = 33
 Phi = (p-1) * (q-1) = (3-1) * (11-1) = 20
 e = 7 and d =3 -------------> (3*7) mod 20 = 1
 Public Key (7, 33) and Private Key (3, 33)
 m = 13
 Encrypt: c = m^e mod n -------> c = 13^7 mod 33 = 7
 Decrypt: m = c^d mod n ---------> 7^8 mod 33 = 13
• How to break RSA?
• First we have to find p and q
• Solve the equation to find 'd'
Why is it difficult to get the decryption key?
Factoring the huge number to prime
number takes a lot of computation
Then there can be number of multiples of
N, so might be guessing on wrong number.
Presented By
Talha Saleem
Mohammad Owais

More Related Content

What's hot

Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystemSamdish Arora
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C ProgrammingKamal Acharya
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programmingManoj Tyagi
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicIT Engineering Department
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisEuclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisAmrinder Arora
 
number theory.ppt
number theory.pptnumber theory.ppt
number theory.pptShishu
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam Reagan
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithmsGanesh Solanke
 
Applications of Discrete Structures
Applications of Discrete StructuresApplications of Discrete Structures
Applications of Discrete Structuresaviban
 
Application of discrete math in real life
Application of discrete math in real lifeApplication of discrete math in real life
Application of discrete math in real lifeMdArifHossain30
 

What's hot (20)

Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Cryptography
CryptographyCryptography
Cryptography
 
Diffiehellman
DiffiehellmanDiffiehellman
Diffiehellman
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
Prime numbers
Prime numbersPrime numbers
Prime numbers
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisEuclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
 
Cryptography
CryptographyCryptography
Cryptography
 
number theory.ppt
number theory.pptnumber theory.ppt
number theory.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
RSA algorithm
RSA algorithmRSA algorithm
RSA algorithm
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Applications of Discrete Structures
Applications of Discrete StructuresApplications of Discrete Structures
Applications of Discrete Structures
 
Chap4
Chap4Chap4
Chap4
 
Application of discrete math in real life
Application of discrete math in real lifeApplication of discrete math in real life
Application of discrete math in real life
 

Similar to Cryptography - Discrete Mathematics

11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdfVipinNegi38
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In CryptographyAadya Vatsa
 
Senior Research Final Draft3
Senior Research Final Draft3Senior Research Final Draft3
Senior Research Final Draft3Coleman Gorham
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In CryptographyAbhishek Nand
 
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.SrinivasanMathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasanmunicsaa
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic EncryptionGöktuğ Serez
 
Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!Ashutosh Tripathi
 

Similar to Cryptography - Discrete Mathematics (20)

11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In Cryptography
 
Senior Research Final Draft3
Senior Research Final Draft3Senior Research Final Draft3
Senior Research Final Draft3
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In Cryptography
 
Rsa
RsaRsa
Rsa
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Number theory
Number theoryNumber theory
Number theory
 
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.SrinivasanMathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
crypto1.ppt
crypto1.pptcrypto1.ppt
crypto1.ppt
 
needed.ppt
needed.pptneeded.ppt
needed.ppt
 

Recently uploaded

Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfrohankumarsinghrore1
 
Introduction,importance and scope of horticulture.pptx
Introduction,importance and scope of horticulture.pptxIntroduction,importance and scope of horticulture.pptx
Introduction,importance and scope of horticulture.pptxBhagirath Gogikar
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLkantirani197
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flyPRADYUMMAURYA1
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learninglevieagacer
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxSuji236384
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑Damini Dixit
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryAlex Henderson
 
Unit5-Cloud.pptx for lpu course cse121 o
Unit5-Cloud.pptx for lpu course cse121 oUnit5-Cloud.pptx for lpu course cse121 o
Unit5-Cloud.pptx for lpu course cse121 oManavSingh202607
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)Areesha Ahmad
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxRizalinePalanog2
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticssakshisoni2385
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bSérgio Sacani
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000Sapana Sha
 
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsSérgio Sacani
 
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET
 
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedConnaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)Areesha Ahmad
 

Recently uploaded (20)

Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Introduction,importance and scope of horticulture.pptx
Introduction,importance and scope of horticulture.pptxIntroduction,importance and scope of horticulture.pptx
Introduction,importance and scope of horticulture.pptx
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Unit5-Cloud.pptx for lpu course cse121 o
Unit5-Cloud.pptx for lpu course cse121 oUnit5-Cloud.pptx for lpu course cse121 o
Unit5-Cloud.pptx for lpu course cse121 o
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
 
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedConnaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)
 

Cryptography - Discrete Mathematics

  • 2. An Introduction "The art of writing and solving codes" Internet provides essential communication between tens of millions of people and is being increasingly used as a tool for commerce, security becomes a tremendously important issue to deal with. There are many aspects to security and many applications, ranging from secure commerce and payments to private communications and protecting passwords. One essential aspect for secure communications is that of cryptography. But it is important to note that while cryptography is necessary for secure communications, it is not by itself sufficient.
  • 3. Antiquity  The first documented use of cryptography in writing dates back to Circa 1900 BC when an Egyptian scribe used non standard hieroglyphs in an inscription. Some experts argue that cryptography appear spontaneously sometimes after writing was invented with applications ranging from diplomatic missives to war-time battle plans.  Its real era started from World War II when Germany was about to take over Great Britain, Germany used a device named "Enigma" to send their messages secretly to their war zones. In reply GBR created a device named "Turing Machine" by Alan Turing to decrypt or break Enigma which resulted in saving GBR.
  • 4. Greek Etymology  Cryptography - Crypto -----> "Kryptos" --------> Hidden - Graphy -----> "Graphein" -------> To Write Encryption: The translation of data into secret code. Decryption: The translation of secret code into original data.
  • 5. The Caesar Cipher! Plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ  Encryption: E(x) = (x + n) mod 26  Decryption: D(x) = (x - n) mod 26
  • 6. Hiding Password Password Encryption Key: Shift 1 Key to right ,U[SDDEPTF Decryption Key: Read 1 Key to left
  • 7. Splinter Cipher! Exxegoexsrgi Decryption Key: Shift Gear 4 AttackAtOnce Encryption Key: Shift Gear 4
  • 8. Splinter Vegenere Cipher! B • 1 Q • 16 R • 17 ATTACKATONCE OATMEALOATME OTMMGKLHDTIR
  • 9. What in the world is OTP?
  • 10. Prime Numbers! How to find a Prime Number? Immortal are Prime Numbers. Prime Numbers and Cryptography. New Prime Number??
  • 11. Methods to find Prime Numbers A Multiplicative Sieve The Prime Number Machine The Sieve of Erastothenes
  • 12. The Sieve of Erastothenes Let's consider a table of sequential numbers start 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 ,22,23,24,25,26,27,28,29,30,31,32....
  • 13. The Sieve of Erastothenes Cross out multiple of 2 2, 3, X, 5, X, 7, X, 9, X, 11, X, 13....
  • 14. The Sieve of Erastothenes The next non-overlined and non crossed out number is three. Identify it as prime with an overline, then cross out every third number (every multiple of three). 2, 3, X, 5, XX, 7, X, X, X, 11, XX, 13 ...
  • 15. The Sieve of Erastothenes Continuing the process. Five is the next non- overlined and non crossed out number. Overline five and cross out every fifth number. 2, 3, X, 5, XX, 7, X, X, X, 11, XX, 13 ...
  • 16. The Sieve of Erastothenes The next prime number is then seven. Since twice seven is greater than the largest visible number in our list, all the remaining visible numbers are prime. 2, 3, X, 5, XX, 7, X, XX, X, 11, XX, 13 ...
  • 17. The Sieve of Erastothenes Drawbacks  The process is too slow  Not efficient for finding huge primes.
  • 18. Euclid’S Element  The statement says that “There are more than any finite number n of prime numbers. Suppose that a1, a2, ..., an are prime numbers. Let m be the product of all considered prime numbers. Consider the number m + 1. If it's prime, then there are at least n + 1 primes.”  So suppose m + 1 is not prime. Then, some prime g divides it. But g cannot be any of the primes a1, a2, ..., an , since they all divide m and do not divide m + 1. Therefore, there are at least n + 1 primes.  Thus, there are not a finite number of primes.
  • 20. RSA How to make sure that my data is save on the internet? How to make sure that only an authorized person gets my secret message? The RSA model is the correct choice! RSA Stands for Ron Rivest, Adi Shamir , Leonard Adleman.
  • 21. RSA RSA is a consequence of Fermat's little theorem: "If 'a' is not divisible by 'p' , where p is prime, then a^(p-1) -1 is divisible by 'p'.
  • 22. The Work Flow  Generate two large random prime numbers p and q  Find n = p*q  Find phi = (p-1)*(q-1)  Choose an integer e, 1 < e < phi such that GCD (e, phi) = 1  Compute the secret exponent d, 1 < d < phi, such that e.d = 1 (mod phi)  The public key is (n, e) and the private key is (d, p, q)  All the values d, p, q and phi are kept secret.
  • 23. The Work Flow Select p and q n= p*q phi= (p-1) * (q-1) e*d= 1 (mod phi) C = (msg)^e mod n Message = (C)^d mod n
  • 24. Example  P = 3 and Q = 11  n = p*q = 33  Phi = (p-1) * (q-1) = (3-1) * (11-1) = 20  e = 7 and d =3 -------------> (3*7) mod 20 = 1  Public Key (7, 33) and Private Key (3, 33)  m = 13  Encrypt: c = m^e mod n -------> c = 13^7 mod 33 = 7  Decrypt: m = c^d mod n ---------> 7^8 mod 33 = 13
  • 25. • How to break RSA? • First we have to find p and q • Solve the equation to find 'd'
  • 26. Why is it difficult to get the decryption key? Factoring the huge number to prime number takes a lot of computation Then there can be number of multiples of N, so might be guessing on wrong number.