SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Chapter 3:Chapter 3:Chapter 3:Chapter 3:----
Public Key Cryptography
By:- Sarthak Patel (www.sarthakpatel.in)
Outline
Principles Of Public-Key Cryptography
RSA Algorithm
Key Management
Elliptic Curve CryptographyElliptic Curve Cryptography
Diffie-Hellman Key Exchange
Sarthak Patel (www.sarthakpatel.in)
Classical Cryptography:
Secret-Key or Symmetric Cryptography
Alice and Bob agree on an encryption method and a shared
key.
Alice uses the key and the encryption method to encrypt (or
encipher) a message and sends it to Bob.
Bob uses the same key and the related decryption method toBob uses the same key and the related decryption method to
decrypt (or decipher) the message.
Sarthak Patel (www.sarthakpatel.in)
Advantages of Classical Cryptography
There are some very fast classical encryption (and
decryption) algorithms
Since the speed of a method varies with the length of the key,
faster algorithms allow one to use longer key values.
Larger key values make it harder to guess the key value -- andLarger key values make it harder to guess the key value -- and
break the code -- by brute force.
Sarthak Patel (www.sarthakpatel.in)
Disadvantages of Classical Cryptography
Requires secure transmission of key value
Requires a separate key for each group of people that wishes
to exchange encrypted messages (readable by any group
member)
For example, to have a separate key for each pair of people, 100For example, to have a separate key for each pair of people, 100
people would need 4950 different keys.
Sarthak Patel (www.sarthakpatel.in)
Public-Key Cryptography: Asymmetric
Cryptography
Alice generates a key value (usually a number or pair of
related numbers) which she makes public.
Alice uses her public key (and some additional information)
to determine a second key (her private key).
Alice keeps her private key (and the additional information
she used to construct it) secret.
Sarthak Patel (www.sarthakpatel.in)
Public-Key Cryptography (continued)
Bob can useAlice’s public key to encrypt a message for Alice.
Alice can use her private key to decrypt this message.
No-one without access to Alice’s private key (or the
information used to construct it) can easily decrypt the
message.message.
Sarthak Patel (www.sarthakpatel.in)
Private-Key Cryptography
traditional private/secret/single key cryptography
uses one key
Key is shared by both sender and receiver
if the key is disclosed communications are compromised
also known as symmetric, both parties are equal
hence does not protect sender from receiver forging a message
& claiming is sent by sender
Sarthak Patel (www.sarthakpatel.in)
Public-Key Cryptography
probably most significant advance in the 3000 year
history of cryptography
uses two keys – a public key and a private key
asymmetric since parties are not equal
uses clever application of number theory concepts to
function
complements rather than replaces private key
cryptography
Sarthak Patel (www.sarthakpatel.in)
Public-Key Cryptography
public-key/two-key/asymmetric cryptography
involves the use of two keys:
a public-key, which may be known by anybody, and can be
used to encrypt messages, and verify signatures
a private-key, known only to the recipient, used to decrypt
messages, and sign (create) signaturesmessages, and sign (create) signatures
is asymmetric because
those who encrypt messages or verify signatures cannot
decrypt messages or create signatures
Sarthak Patel (www.sarthakpatel.in)
Public-Key Cryptography
Sarthak Patel (www.sarthakpatel.in)
Why Public-Key Cryptography?
developed to address two key issues:
key distribution – how to have secure communications in
general without having to trust a KDC with your key
digital signatures – how to verify a message comes intact
from the claimed sender
Sarthak Patel (www.sarthakpatel.in)
Public-Key Characteristics
Public-Key algorithms rely on two keys with the
characteristics that it is:
computationally infeasible to find decryption key knowing only
algorithm & encryption key
computationally easy to en/decrypt messages when the relevant
(en/decrypt) key is known(en/decrypt) key is known
either of the two related keys can be used for encryption, with
the other used for decryption (in some schemes)
Sarthak Patel (www.sarthakpatel.in)
Public-Key Applications
can classify uses into 3 categories:
encryption/decryption (provide secrecy)
digital signatures (provide authentication)
key exchange (of session keys)
some algorithms are suitable for all uses, others are specificsome algorithms are suitable for all uses, others are specific
to one
Sarthak Patel (www.sarthakpatel.in)
Security of Public Key Schemes
like private key schemes brute force exhaustive search
attack is always theoretically possible
but keys used are too large (>512bits)
security relies on a large enough difference in difficulty
between easy (en/decrypt) and hard (cryptanalyse)between easy (en/decrypt) and hard (cryptanalyse)
problems
more generally the hard problem is known, its just made
too hard to do in practise
requires the use of very large numbers
hence is slow compared to private key schemes
Sarthak Patel (www.sarthakpatel.in)
Difference between Symm/Asymm
Symmetric (Private Key) Asymmetric (Public Key)
Same key for encry/ decry Asymmetric uses both a public and private
key
Very fast encry Slower encry
Key exchange is a big problem No problem at allKey exchange is a big problem No problem at all
Mainly for Encry/ Decry, cannot be used for
digital signature
Can be used for both
More number of keys required Less than Symmetric
Sarthak Patel (www.sarthakpatel.in)
RSA Algorithm
by Rivest, Shamir &Adleman of MIT in 1977
best known & widely used public-key scheme
uses large integers (eg. 1024 bits)
security due to cost of factoring large numbers
Sarthak Patel (www.sarthakpatel.in)
Algorithm
1. Choose two large prime number P and Q.
2. Calculate N=P*Q
3. Select the public key(i.e. encryption key) E such that it is not a
factor of (P-1) and (Q-1)
4. Select the private key(i.e. decryption key) D such that
following equation is true:following equation is true:
(D*E) mod (P-1) * (Q-1)= 1
5. For encryption calculate the cipher text CT from the PT as :
CT= PTE mod N
6. Send CT as the cipher text to the receiver.
7. For decryption calculate the cipher text PT from the CT as :
PT= CTD mod N
Sarthak Patel (www.sarthakpatel.in)
RSA Example
1. Select primes: p=17 & q=11
2. Compute n = pq =17×11=187
3. Compute ø(n)=(p–1)(q-1)=16×10=160
4. Select e :gcd(e,160)=1; choose e=7
5. Determine d:d*e mod 160=1 and d < 160
Value is d=23 since 23×7=161
Sarthak Patel (www.sarthakpatel.in)
RSA Example cont
sample RSA encryption/decryption is:
given message M = 88 (nb. 88<187)
encryption:
C = 887 mod 187 = 11
decryption:decryption:
M = 1123 mod 187 = 88
Sarthak Patel (www.sarthakpatel.in)
Diffie-Hellman Key Exchange
1. Select two prime numbers: n and g (public)
2. Alice (Sender) chooses another random number x, and
calculatesA such that: A= gx mod n
3. Alice Sends it to Bob(Receiver)
4. Bob chooses another random number y and calculates B4. Bob chooses another random number y and calculates B
such that: B=gy mod n
5. Bob sends it to Alice
6. K1 = Bx mod n
7. K2 = Ay mod n
Sarthak Patel (www.sarthakpatel.in)
Example for Deffie-Hellman
1. n= 11, g=7
2. Let x=3.ThenA=73 mod 11= 343 mod 11= 2
3. Alice sends 2 to Bob
4. Let y=6.Then B=76 mod 11= 117649 mod 11=4
Bob sends 4 to Alice5. Bob sends 4 to Alice
6. K1= 43 mod 11= 64 mod 11= 9
7. K2= 26 mod 11= 64 mod 11= 9
Note: K1=K2
Sarthak Patel (www.sarthakpatel.in)
Elliptic Curve Cryptography
The Elliptic curve cryptography (ECC) is an
approach to public-key cryptography based on the
algebraic structure of elliptic curves over finite
fields.fields.
Sarthak Patel (www.sarthakpatel.in)
ECC
An elliptic curve is the set of solutions of an equation of the form
y2 = x3 + ax + b .
Where the co-efficeints a and b are elements of the field and
4a3 + 27b2 ≠ 0. Each value of the 'a' and 'b' gives a different elliptic
curve.
An equation of this kind can be studied over various mathematicalAn equation of this kind can be studied over various mathematical
structures, such as a ring or a field.
One interesting property of set of solutions of elliptic curve is that it
forms a group which enables us to do Cryptography. The public key is
a point in the curve and the private key is a random number. The
public key is obtained by multiplying the private key with the
generator point G in the curve.
Sarthak Patel (www.sarthakpatel.in)
ECC Diffie-Hellman Key Exchange
Global Public Elements
Eq(a,b) – Elliptic curve with parameter a,b
G – Point on elliptic curve
User A Key Generation
Select Private nA
Calculate Public PA PA = nA * G
User B Key Generation
Calculation of Secret Key by User A
K = nA * PB
User B Key Generation
Select Private nB
Calculate Public PB PB = nB * G
Calculation of Secret Key by User B
K = nB * PA
Sarthak Patel (www.sarthakpatel.in)
Applications of ECCApplications of ECCApplications of ECCApplications of ECC
Many devices are small and have limited storage and
computational power
Where can we apply ECC?
Wireless communication devices
Smart cardsSmart cards
Web servers that need to handle many encryption sessions
Any application where security is needed but lacks
the power, storage and computational power that is
necessary for our current cryptosystems
Sarthak Patel (www.sarthakpatel.in)
Benefits of ECCBenefits of ECCBenefits of ECCBenefits of ECC
Same benefits of the other cryptosystems: confidentiality,
integrity, authentication and non-repudiation but…
Shorter key lengths
Encryption, Decryption and SignatureVerification speed up
Storage and bandwidth savingsStorage and bandwidth savings
Sarthak Patel (www.sarthakpatel.in)
Key Management (Key Distribution)
Key
Distribution
Center (KDC)
IDA || IDB ||N1
Initiator
A
Responder
B
E (Kb, [Ks || IDA])
E (Ks, N2)
E (Ks, f(N2))
Sarthak Patel (www.sarthakpatel.in)
Public key Distribution
PublicAnnouncement
PublicAvailable Directory
Public KeyAuthority
Public Key Certificates
Sarthak Patel (www.sarthakpatel.in)
THE ENDTHE END
Sarthak Patel (www.sarthakpatel.in)

Mais conteúdo relacionado

Mais procurados

I mage encryption using rc5
I mage encryption using rc5I mage encryption using rc5
I mage encryption using rc5Suramrit Singh
 
Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...CAS
 
Cs6701 cryptography and network security
Cs6701 cryptography and network securityCs6701 cryptography and network security
Cs6701 cryptography and network securityArthyR3
 
Implementation of-hybrid-cryptography-algorithm
Implementation of-hybrid-cryptography-algorithmImplementation of-hybrid-cryptography-algorithm
Implementation of-hybrid-cryptography-algorithmIjcem Journal
 
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
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareProf. Swapnil V. Kaware
 
DOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITYDOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITYTuhin_Das
 
A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...
A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...
A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...IOSR Journals
 

Mais procurados (20)

Hybrid AES DES
Hybrid AES DESHybrid AES DES
Hybrid AES DES
 
I mage encryption using rc5
I mage encryption using rc5I mage encryption using rc5
I mage encryption using rc5
 
Rc6 algorithm
Rc6 algorithmRc6 algorithm
Rc6 algorithm
 
Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...
 
An effective RC4 Stream Cipher
An effective RC4 Stream CipherAn effective RC4 Stream Cipher
An effective RC4 Stream Cipher
 
Ch10
Ch10Ch10
Ch10
 
Analysis of a Modified RC4
Analysis of a Modified RC4 Analysis of a Modified RC4
Analysis of a Modified RC4
 
Cs6701 cryptography and network security
Cs6701 cryptography and network securityCs6701 cryptography and network security
Cs6701 cryptography and network security
 
Implementation of-hybrid-cryptography-algorithm
Implementation of-hybrid-cryptography-algorithmImplementation of-hybrid-cryptography-algorithm
Implementation of-hybrid-cryptography-algorithm
 
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
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil Kaware
 
public-key cryptography Shamir
public-key cryptography Shamirpublic-key cryptography Shamir
public-key cryptography Shamir
 
DOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITYDOCS ON NETWORK SECURITY
DOCS ON NETWORK SECURITY
 
Unit 3(1)
Unit 3(1)Unit 3(1)
Unit 3(1)
 
Unit 3(1)
Unit 3(1)Unit 3(1)
Unit 3(1)
 
Unit 2
Unit 2Unit 2
Unit 2
 
Ch07
Ch07Ch07
Ch07
 
A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...
A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...
A Secure Encryption Technique based on Advanced Hill Cipher For a Public Key ...
 
Unit 4
Unit 4Unit 4
Unit 4
 
Hybrid encryption
Hybrid encryption Hybrid encryption
Hybrid encryption
 

Destaque

Intro to Criminal Justice: Term Paper Resources
Intro to Criminal Justice: Term Paper ResourcesIntro to Criminal Justice: Term Paper Resources
Intro to Criminal Justice: Term Paper Resourceserikabehling
 
Term paper proposal
Term paper proposalTerm paper proposal
Term paper proposalEssayAcademy
 
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation swarnapatil
 
Term paper format_apa_stlye
Term paper format_apa_stlyeTerm paper format_apa_stlye
Term paper format_apa_stlyeAinul Azmin
 
Writing a term paper
Writing a term paperWriting a term paper
Writing a term paperEssayAcademy
 
APA research paper format
APA research paper formatAPA research paper format
APA research paper formatEssayAcademy
 
Structure of Term papers
Structure of Term papersStructure of Term papers
Structure of Term papersEssay Academia
 
9.tumbate el rollo
9.tumbate el rollo9.tumbate el rollo
9.tumbate el rollodec-admin
 
27 proyecto cruzada ambiental
27 proyecto cruzada ambiental27 proyecto cruzada ambiental
27 proyecto cruzada ambientaldec-admin
 
Digital Pie 02 | Linguagem & Infra-estrutura
Digital Pie 02 | Linguagem & Infra-estruturaDigital Pie 02 | Linguagem & Infra-estrutura
Digital Pie 02 | Linguagem & Infra-estruturaOgilvyAction Brasil
 
186. como mejorar el transito vehicular
186. como mejorar el transito vehicular186. como mejorar el transito vehicular
186. como mejorar el transito vehiculardec-admin
 
163. escuela primaria profesor enrique gomez bravo
163. escuela primaria profesor enrique gomez bravo163. escuela primaria profesor enrique gomez bravo
163. escuela primaria profesor enrique gomez bravodec-admin
 
ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3
ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3
ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3katnakamol
 

Destaque (20)

Intro to Criminal Justice: Term Paper Resources
Intro to Criminal Justice: Term Paper ResourcesIntro to Criminal Justice: Term Paper Resources
Intro to Criminal Justice: Term Paper Resources
 
Reverse Engineering Android Application
Reverse Engineering Android ApplicationReverse Engineering Android Application
Reverse Engineering Android Application
 
Term paper outline
Term paper outlineTerm paper outline
Term paper outline
 
Term paper proposal
Term paper proposalTerm paper proposal
Term paper proposal
 
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation
 
Term paper format_apa_stlye
Term paper format_apa_stlyeTerm paper format_apa_stlye
Term paper format_apa_stlye
 
Writing a term paper
Writing a term paperWriting a term paper
Writing a term paper
 
APA research paper format
APA research paper formatAPA research paper format
APA research paper format
 
Structure of Term papers
Structure of Term papersStructure of Term papers
Structure of Term papers
 
Ponte verde
Ponte verdePonte verde
Ponte verde
 
9.tumbate el rollo
9.tumbate el rollo9.tumbate el rollo
9.tumbate el rollo
 
27 proyecto cruzada ambiental
27 proyecto cruzada ambiental27 proyecto cruzada ambiental
27 proyecto cruzada ambiental
 
урок №5 4 класс
урок №5 4 классурок №5 4 класс
урок №5 4 класс
 
Digital Pie 02 | Linguagem & Infra-estrutura
Digital Pie 02 | Linguagem & Infra-estruturaDigital Pie 02 | Linguagem & Infra-estrutura
Digital Pie 02 | Linguagem & Infra-estrutura
 
Seccion 5. unidad 8
Seccion 5. unidad 8Seccion 5. unidad 8
Seccion 5. unidad 8
 
Sección 6. normativa trafico de vida silvestre
Sección 6. normativa trafico de vida silvestreSección 6. normativa trafico de vida silvestre
Sección 6. normativa trafico de vida silvestre
 
186. como mejorar el transito vehicular
186. como mejorar el transito vehicular186. como mejorar el transito vehicular
186. como mejorar el transito vehicular
 
163. escuela primaria profesor enrique gomez bravo
163. escuela primaria profesor enrique gomez bravo163. escuela primaria profesor enrique gomez bravo
163. escuela primaria profesor enrique gomez bravo
 
ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3
ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3
ตลาดสำคัญในบางกอก กลุ่มที่ 4 ชั้นม.3 3
 
Sección 1c. unidad 11
Sección 1c. unidad 11Sección 1c. unidad 11
Sección 1c. unidad 11
 

Semelhante a IS Unit 3_Public Key Cryptography

aacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxaacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxImXaib
 
Computer Security (Cryptography) Ch01
Computer Security (Cryptography) Ch01Computer Security (Cryptography) Ch01
Computer Security (Cryptography) Ch01Saif Kassim
 
A new hybrid text encryption approach over mobile ad hoc network
A new hybrid text encryption approach over mobile  ad hoc network A new hybrid text encryption approach over mobile  ad hoc network
A new hybrid text encryption approach over mobile ad hoc network IJECEIAES
 
CH02-CompSec4e.pptx
CH02-CompSec4e.pptxCH02-CompSec4e.pptx
CH02-CompSec4e.pptxams1ams11
 
Cryptography Lecture by Sam Bowne
Cryptography Lecture by Sam BowneCryptography Lecture by Sam Bowne
Cryptography Lecture by Sam BowneSecurityTube.Net
 
IRJET- Comparative Analysis of Encryption Techniques
IRJET-  	  Comparative Analysis of Encryption TechniquesIRJET-  	  Comparative Analysis of Encryption Techniques
IRJET- Comparative Analysis of Encryption TechniquesIRJET Journal
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batchJaimin Jani
 
“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”
“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”
“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”IOSR Journals
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptxSurendraBasnet6
 
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptxSecret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptxjibonjibon5
 
Unit III Public Key Crypto Systems.pptx
Unit III Public Key Crypto Systems.pptxUnit III Public Key Crypto Systems.pptx
Unit III Public Key Crypto Systems.pptxSayeeKumarMadhesh
 
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptxSecret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptxukd789555
 
Ch12 Cryptography it-slideshares.blogspot.com
Ch12 Cryptography it-slideshares.blogspot.comCh12 Cryptography it-slideshares.blogspot.com
Ch12 Cryptography it-slideshares.blogspot.comphanleson
 
Hybrid Encryption for Database Security
Hybrid Encryption for Database SecurityHybrid Encryption for Database Security
Hybrid Encryption for Database SecurityIRJET Journal
 
Analysis of symmetric key cryptographic algorithms
Analysis of symmetric key cryptographic algorithmsAnalysis of symmetric key cryptographic algorithms
Analysis of symmetric key cryptographic algorithmsIRJET Journal
 

Semelhante a IS Unit 3_Public Key Cryptography (20)

encrption.PDF
encrption.PDFencrption.PDF
encrption.PDF
 
encrption.PDF
encrption.PDFencrption.PDF
encrption.PDF
 
encrption.PDF
encrption.PDFencrption.PDF
encrption.PDF
 
aacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptxaacyberessential3cryptography-131067585699078884.pptx
aacyberessential3cryptography-131067585699078884.pptx
 
Computer Security (Cryptography) Ch01
Computer Security (Cryptography) Ch01Computer Security (Cryptography) Ch01
Computer Security (Cryptography) Ch01
 
A new hybrid text encryption approach over mobile ad hoc network
A new hybrid text encryption approach over mobile  ad hoc network A new hybrid text encryption approach over mobile  ad hoc network
A new hybrid text encryption approach over mobile ad hoc network
 
CH02-CompSec4e.pptx
CH02-CompSec4e.pptxCH02-CompSec4e.pptx
CH02-CompSec4e.pptx
 
Cryptography Lecture by Sam Bowne
Cryptography Lecture by Sam BowneCryptography Lecture by Sam Bowne
Cryptography Lecture by Sam Bowne
 
IRJET- Comparative Analysis of Encryption Techniques
IRJET-  	  Comparative Analysis of Encryption TechniquesIRJET-  	  Comparative Analysis of Encryption Techniques
IRJET- Comparative Analysis of Encryption Techniques
 
Kleptography
KleptographyKleptography
Kleptography
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
 
“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”
“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”
“Proposed Model for Network Security Issues Using Elliptical Curve Cryptography”
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
 
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptxSecret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
 
Unit III Public Key Crypto Systems.pptx
Unit III Public Key Crypto Systems.pptxUnit III Public Key Crypto Systems.pptx
Unit III Public Key Crypto Systems.pptx
 
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptxSecret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
Secret-Key-Cryptography-ppt-by-alljobs.co_.in_.pptx
 
Ch12 Cryptography it-slideshares.blogspot.com
Ch12 Cryptography it-slideshares.blogspot.comCh12 Cryptography it-slideshares.blogspot.com
Ch12 Cryptography it-slideshares.blogspot.com
 
Hybrid Encryption for Database Security
Hybrid Encryption for Database SecurityHybrid Encryption for Database Security
Hybrid Encryption for Database Security
 
Analysis of symmetric key cryptographic algorithms
Analysis of symmetric key cryptographic algorithmsAnalysis of symmetric key cryptographic algorithms
Analysis of symmetric key cryptographic algorithms
 
Data encryption
Data encryptionData encryption
Data encryption
 

Mais de Sarthak Patel

IS Unit 9_Web Security
IS Unit 9_Web SecurityIS Unit 9_Web Security
IS Unit 9_Web SecuritySarthak Patel
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecuritySarthak Patel
 
IS Unit 7_Network Security
IS Unit 7_Network SecurityIS Unit 7_Network Security
IS Unit 7_Network SecuritySarthak Patel
 
Is unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsIs unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsSarthak Patel
 
Is unit 4_number_theory
Is unit 4_number_theoryIs unit 4_number_theory
Is unit 4_number_theorySarthak Patel
 
Is unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesIs unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesSarthak Patel
 
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesIS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesSarthak Patel
 

Mais de Sarthak Patel (7)

IS Unit 9_Web Security
IS Unit 9_Web SecurityIS Unit 9_Web Security
IS Unit 9_Web Security
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email Security
 
IS Unit 7_Network Security
IS Unit 7_Network SecurityIS Unit 7_Network Security
IS Unit 7_Network Security
 
Is unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsIs unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functions
 
Is unit 4_number_theory
Is unit 4_number_theoryIs unit 4_number_theory
Is unit 4_number_theory
 
Is unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesIs unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniques
 
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesIS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
 

IS Unit 3_Public Key Cryptography

  • 1. Chapter 3:Chapter 3:Chapter 3:Chapter 3:---- Public Key Cryptography By:- Sarthak Patel (www.sarthakpatel.in)
  • 2. Outline Principles Of Public-Key Cryptography RSA Algorithm Key Management Elliptic Curve CryptographyElliptic Curve Cryptography Diffie-Hellman Key Exchange Sarthak Patel (www.sarthakpatel.in)
  • 3. Classical Cryptography: Secret-Key or Symmetric Cryptography Alice and Bob agree on an encryption method and a shared key. Alice uses the key and the encryption method to encrypt (or encipher) a message and sends it to Bob. Bob uses the same key and the related decryption method toBob uses the same key and the related decryption method to decrypt (or decipher) the message. Sarthak Patel (www.sarthakpatel.in)
  • 4. Advantages of Classical Cryptography There are some very fast classical encryption (and decryption) algorithms Since the speed of a method varies with the length of the key, faster algorithms allow one to use longer key values. Larger key values make it harder to guess the key value -- andLarger key values make it harder to guess the key value -- and break the code -- by brute force. Sarthak Patel (www.sarthakpatel.in)
  • 5. Disadvantages of Classical Cryptography Requires secure transmission of key value Requires a separate key for each group of people that wishes to exchange encrypted messages (readable by any group member) For example, to have a separate key for each pair of people, 100For example, to have a separate key for each pair of people, 100 people would need 4950 different keys. Sarthak Patel (www.sarthakpatel.in)
  • 6. Public-Key Cryptography: Asymmetric Cryptography Alice generates a key value (usually a number or pair of related numbers) which she makes public. Alice uses her public key (and some additional information) to determine a second key (her private key). Alice keeps her private key (and the additional information she used to construct it) secret. Sarthak Patel (www.sarthakpatel.in)
  • 7. Public-Key Cryptography (continued) Bob can useAlice’s public key to encrypt a message for Alice. Alice can use her private key to decrypt this message. No-one without access to Alice’s private key (or the information used to construct it) can easily decrypt the message.message. Sarthak Patel (www.sarthakpatel.in)
  • 8. Private-Key Cryptography traditional private/secret/single key cryptography uses one key Key is shared by both sender and receiver if the key is disclosed communications are compromised also known as symmetric, both parties are equal hence does not protect sender from receiver forging a message & claiming is sent by sender Sarthak Patel (www.sarthakpatel.in)
  • 9. Public-Key Cryptography probably most significant advance in the 3000 year history of cryptography uses two keys – a public key and a private key asymmetric since parties are not equal uses clever application of number theory concepts to function complements rather than replaces private key cryptography Sarthak Patel (www.sarthakpatel.in)
  • 10. Public-Key Cryptography public-key/two-key/asymmetric cryptography involves the use of two keys: a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures a private-key, known only to the recipient, used to decrypt messages, and sign (create) signaturesmessages, and sign (create) signatures is asymmetric because those who encrypt messages or verify signatures cannot decrypt messages or create signatures Sarthak Patel (www.sarthakpatel.in)
  • 11. Public-Key Cryptography Sarthak Patel (www.sarthakpatel.in)
  • 12. Why Public-Key Cryptography? developed to address two key issues: key distribution – how to have secure communications in general without having to trust a KDC with your key digital signatures – how to verify a message comes intact from the claimed sender Sarthak Patel (www.sarthakpatel.in)
  • 13. Public-Key Characteristics Public-Key algorithms rely on two keys with the characteristics that it is: computationally infeasible to find decryption key knowing only algorithm & encryption key computationally easy to en/decrypt messages when the relevant (en/decrypt) key is known(en/decrypt) key is known either of the two related keys can be used for encryption, with the other used for decryption (in some schemes) Sarthak Patel (www.sarthakpatel.in)
  • 14. Public-Key Applications can classify uses into 3 categories: encryption/decryption (provide secrecy) digital signatures (provide authentication) key exchange (of session keys) some algorithms are suitable for all uses, others are specificsome algorithms are suitable for all uses, others are specific to one Sarthak Patel (www.sarthakpatel.in)
  • 15. Security of Public Key Schemes like private key schemes brute force exhaustive search attack is always theoretically possible but keys used are too large (>512bits) security relies on a large enough difference in difficulty between easy (en/decrypt) and hard (cryptanalyse)between easy (en/decrypt) and hard (cryptanalyse) problems more generally the hard problem is known, its just made too hard to do in practise requires the use of very large numbers hence is slow compared to private key schemes Sarthak Patel (www.sarthakpatel.in)
  • 16. Difference between Symm/Asymm Symmetric (Private Key) Asymmetric (Public Key) Same key for encry/ decry Asymmetric uses both a public and private key Very fast encry Slower encry Key exchange is a big problem No problem at allKey exchange is a big problem No problem at all Mainly for Encry/ Decry, cannot be used for digital signature Can be used for both More number of keys required Less than Symmetric Sarthak Patel (www.sarthakpatel.in)
  • 17. RSA Algorithm by Rivest, Shamir &Adleman of MIT in 1977 best known & widely used public-key scheme uses large integers (eg. 1024 bits) security due to cost of factoring large numbers Sarthak Patel (www.sarthakpatel.in)
  • 18. Algorithm 1. Choose two large prime number P and Q. 2. Calculate N=P*Q 3. Select the public key(i.e. encryption key) E such that it is not a factor of (P-1) and (Q-1) 4. Select the private key(i.e. decryption key) D such that following equation is true:following equation is true: (D*E) mod (P-1) * (Q-1)= 1 5. For encryption calculate the cipher text CT from the PT as : CT= PTE mod N 6. Send CT as the cipher text to the receiver. 7. For decryption calculate the cipher text PT from the CT as : PT= CTD mod N Sarthak Patel (www.sarthakpatel.in)
  • 19. RSA Example 1. Select primes: p=17 & q=11 2. Compute n = pq =17×11=187 3. Compute ø(n)=(p–1)(q-1)=16×10=160 4. Select e :gcd(e,160)=1; choose e=7 5. Determine d:d*e mod 160=1 and d < 160 Value is d=23 since 23×7=161 Sarthak Patel (www.sarthakpatel.in)
  • 20. RSA Example cont sample RSA encryption/decryption is: given message M = 88 (nb. 88<187) encryption: C = 887 mod 187 = 11 decryption:decryption: M = 1123 mod 187 = 88 Sarthak Patel (www.sarthakpatel.in)
  • 21. Diffie-Hellman Key Exchange 1. Select two prime numbers: n and g (public) 2. Alice (Sender) chooses another random number x, and calculatesA such that: A= gx mod n 3. Alice Sends it to Bob(Receiver) 4. Bob chooses another random number y and calculates B4. Bob chooses another random number y and calculates B such that: B=gy mod n 5. Bob sends it to Alice 6. K1 = Bx mod n 7. K2 = Ay mod n Sarthak Patel (www.sarthakpatel.in)
  • 22. Example for Deffie-Hellman 1. n= 11, g=7 2. Let x=3.ThenA=73 mod 11= 343 mod 11= 2 3. Alice sends 2 to Bob 4. Let y=6.Then B=76 mod 11= 117649 mod 11=4 Bob sends 4 to Alice5. Bob sends 4 to Alice 6. K1= 43 mod 11= 64 mod 11= 9 7. K2= 26 mod 11= 64 mod 11= 9 Note: K1=K2 Sarthak Patel (www.sarthakpatel.in)
  • 23. Elliptic Curve Cryptography The Elliptic curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields.fields. Sarthak Patel (www.sarthakpatel.in)
  • 24. ECC An elliptic curve is the set of solutions of an equation of the form y2 = x3 + ax + b . Where the co-efficeints a and b are elements of the field and 4a3 + 27b2 ≠ 0. Each value of the 'a' and 'b' gives a different elliptic curve. An equation of this kind can be studied over various mathematicalAn equation of this kind can be studied over various mathematical structures, such as a ring or a field. One interesting property of set of solutions of elliptic curve is that it forms a group which enables us to do Cryptography. The public key is a point in the curve and the private key is a random number. The public key is obtained by multiplying the private key with the generator point G in the curve. Sarthak Patel (www.sarthakpatel.in)
  • 25. ECC Diffie-Hellman Key Exchange Global Public Elements Eq(a,b) – Elliptic curve with parameter a,b G – Point on elliptic curve User A Key Generation Select Private nA Calculate Public PA PA = nA * G User B Key Generation Calculation of Secret Key by User A K = nA * PB User B Key Generation Select Private nB Calculate Public PB PB = nB * G Calculation of Secret Key by User B K = nB * PA Sarthak Patel (www.sarthakpatel.in)
  • 26. Applications of ECCApplications of ECCApplications of ECCApplications of ECC Many devices are small and have limited storage and computational power Where can we apply ECC? Wireless communication devices Smart cardsSmart cards Web servers that need to handle many encryption sessions Any application where security is needed but lacks the power, storage and computational power that is necessary for our current cryptosystems Sarthak Patel (www.sarthakpatel.in)
  • 27. Benefits of ECCBenefits of ECCBenefits of ECCBenefits of ECC Same benefits of the other cryptosystems: confidentiality, integrity, authentication and non-repudiation but… Shorter key lengths Encryption, Decryption and SignatureVerification speed up Storage and bandwidth savingsStorage and bandwidth savings Sarthak Patel (www.sarthakpatel.in)
  • 28. Key Management (Key Distribution) Key Distribution Center (KDC) IDA || IDB ||N1 Initiator A Responder B E (Kb, [Ks || IDA]) E (Ks, N2) E (Ks, f(N2)) Sarthak Patel (www.sarthakpatel.in)
  • 29. Public key Distribution PublicAnnouncement PublicAvailable Directory Public KeyAuthority Public Key Certificates Sarthak Patel (www.sarthakpatel.in)
  • 30. THE ENDTHE END Sarthak Patel (www.sarthakpatel.in)