SlideShare a Scribd company logo
UNIT-3 PUBLIC KEY
CRYPTOGRAPHY
Information Security
Principles of Public key
Cryptography
 Asymmetric encryption is a form of
cryptosystem in which encryption and
decryption are performed using the different
keys- one public key and one private key
 Also known as public-key encryption
 It uses mathematical functions rather than
substitution and permutation
 More secure from cryptanalysis than the
symmetric encryption
 Asymmetric keys
 Two related keys, a public key and a private key,
that are used to perform complementary
operations, such as encryption and decryption or
signature generation and signature verification
 Public key certificate
 A digital document issued and digitally signed by
the private key of a Certification authority that
binds the name of a subscriber to a public key.
The certificate indicates that the subscriber
identified in the certificate has sole control and
access to the corresponding private key
 Public key cryptographic algorithm
 A cryptographic algorithm that uses two related
keys, a public key and a private key
 Public key infrastructure
 A set of policies, processes, server platform,
software and workstations used for the
purpose of administrating certificates and
public-private key pairs, including the ability to
issue, maintain, and revoke public certificate
Public-key cryptosystem
 Asymmetric algorithms rely on one key for
encryption and a different but related key for
decryption
 These algorithms have the following important
characteristics
 It is computationally infeasible to determine
the decryption key given only knowledge of the
cryptographic algorithm and the encryption key
 Six ingredients:
 Plaintext - This is a readable message or data
that is fed into the algorithm as the input
 Encryption algorithm - The encryption algorithm
performs various transformations on the plaintext
 Public and private keys - this is a pair of keys
that have been selected so that if one is used for
encryption, the other is used for decryption. The
exact transformations performed by the algorithm
depend on the public key and the private key that
is provided as input
 Cipher text - this is the scrambled message
produced as output
 Decryption algorithm - The algorithm that
accepts the cipher text and matching key and
produces the original plain text
 The essential steps are
1. Each user generates a pair of keys to be used for the
encryption and decryption of messages
2. Each user places one of the two keys in public register or
other accessible file. This is public key. The other key is
kept private. Each user maintains a collection of public keys
obtained from others
3. If Bob wishes to send a confidential message to Alice, Bob
encrypts the message using Alice’s public key
4. When Alice receives the message, she decrypts it using her
private key
5. No other recipient can decrypt the message because only
Alice knows her private key
 Here, all participants have access to public
keys, and private keys are generated locally
by each participant and therefore need never
be distributed
 As long as a user’s private key remains
protected and secret, incoming communication
is secure
 At any time, a system can change its private
key and publish the related public key to
replace its old public key
Difference between conventional
encryption and Public-key
encryption
Public-key Cryptosystem:
Secrecy
Public-key Cryptosystem:
Authentication
Public-key Cryptosystem:
Authentication and Secrecy
Applications of Public-key
Cryptosystem
 A applications are divided in three broad
categories:
 Encryption/decryption – The sender encrypts
the message with the recipient’s public key
 Digital Signature – The sender “signs” a
message with its private key
 Key exchange – two sides cooperate to
exchange a session key
RSA Algorithm
 Asymmetric key cryptographic algorithm
 Rivest-Shamir-Adleman (RSA) name is given by taking the
firstname of its inventors
 It uses prime numbers
 This algorithm is based on the fact that it is easy to find and
multiply large prime numbers together, but it is extremely
difficult to factor their product
 The private and public keys in RSA are based on very large
prime numbers
 The real challenge in RSA is the selection and generation of
the public key and private key
 Lets know how private key and public key are generated and,
using them, how can we perform encryption and decryption
Algorithm
1. Choose two prime numbers P and Q
2. Calculate N = P * Q
3. Select the public key E (i.e. Encryption key) such that it is not a
factor of (P–1) and (Q–1)
4. Select the private key D (i.e. Decryption key) such that the
following equation is true
(D * E) mod (P–1) * (Q–1) = 1
5. For encryption, calculate the cipher text CT from the plain text PT
as follows
CT = PTE mod N
6. Send CT as the cipher text to the receiver
7. For decryption, calculate the plain text PT from the cipher text CT
as follows
PT = CTD mod N
Example of RSA
1. Choose two large prime numbers P and Q
 Let P= 7, Q=17
2. Calculate N = P * Q
 N= 7 * 17= 119
3. Select the public key E such that it is not a
factor of (P-1) * (Q-1)
 Lets find (7-1) * (17-1)= 6*16= 96
 The factors of 96 are 2,2,2,2,2 and 3 ( because 96 =
2*2*2*2*2*3)
 Thus we have to choose E such that none of the
factors of E is 2 and 3
 Lets choose E as 5
4. Select the private key D such that the
following equation is true
(D * E) mod (P–1) * (Q–1) = 1
 Lets substitute the values of E, P and Q in the
equation
 We have (D * 5) mod (7-1) * (17-1) = 1
 i.e. (D * 5) mod (6) * (16) = 1
 i.e. (D * 5) mod (96) = 1
 After some calculations, let us take D=77
 So that (77 * 5) mod (96) = 385 mod 96 = 1
5. For encryption, calculate the cipher text CT
from the plain text PT as follows
CT = PTE mod N
 Lets assume that plaintext PT = 10
 Then, CT = 105 mod 119 = 100000 mod 119 = 40
6. Send CT as the cipher text to the receiver
 Send 40 as the cipher text to the receiver
7. For decryption, calculate the plain text PT
from the cipher text CT as follows
PT = CTD mod N
 PT = 4077 mod 119 = 10
The Security of RSA
 Four possible approaches to attacking the RSA
algorithm are as follows:
 Brute force: This involves trying all possible
private keys.
 Mathematical attacks: There are several
approaches, all equivalent in effort to factoring the
product of two primes.
 Timing attacks: These depend on the running
time of the decryption algorithm.
 Chosen cipher text attacks: This type of attack
exploits properties of the RSA algorithm.
Key management
Key management
 One of the major roles of public-key encryption
has been to address the problem of key
distribution
 There are actually two distinct aspects to the
use of public-key cryptography in this regard:
 The distribution of public keys
 The use of public-key encryption to distribute
secret keys
Distribution of Public Keys
 Schemes for Key distribution:
 Public announcement
 Publicly available directory
 Public-key authority
 Public-key certificates
Public announcement of Public
Keys
 The point of public-key encryption is that the public key is
public
 Thus, if there is some broadly accepted public-key algorithm,
such as RSA, any participant can send his or her public key
to any other participant or broadcast the key to the
community at large
 Although this approach is convenient, it has a major
weakness
 Anyone can forge such a public announcement
 That is, some user could pretend to be user A and send a
public key to another participant or broadcast such a public
key
 Until such time as user A discovers the forgery and alerts
other participants, the forger is able to read all encrypted
messages intended for A and can use the forged keys for
authentication
Publicly Available Directory
 A greater degree of security can be achieved
by maintaining a publicly available dynamic
directory of public keys
 Maintenance and distribution of the public
directory would have to be the responsibility of
some trusted entity or organization
 Such a scheme would include the following
elements:
1. The authority maintains a directory with a {name,
public key} entry for each participant.
2. Each participant registers a public key with the
directory authority. Registration would have to be in
person or by some form of secure authenticated
communication.
3. A participant may replace the existing key with a new
one at any time, either because of the desire to
replace a public key that has already been used for a
large amount of data, or because the corresponding
private key has been compromised in some way.
4. Participants could also access the directory
electronically. For this purpose, secure,
authenticated communication from the authority to
the participant is mandatory.
 This scheme is clearly more secure than
individual public announcements but still has
vulnerabilities
 If an adversary succeeds in obtaining or
computing the private key of the directory
authority, the adversary could authoritatively
pass out counterfeit public keys and
subsequently impersonate any participant and
eavesdrop on messages sent to any
participant
Public-Key Authority
 Stronger security for public-key distribution
can be achieved by providing tighter control
over the distribution of public keys from the
directory
 As before, the scenario assumes that a central
authority maintains a dynamic directory of
public keys of all participants
 Each participant reliably knows a public key for
the authority, with only the authority knowing
the corresponding private key
 The following steps occur:
1. A sends a timestamped message to the public-key authority
containing a request for the current public key of B.
2. The authority responds with a message that is encrypted
using the authority's private key, PRauth Thus, A is able to
decrypt the message using the authority's public key.
Therefore, A is assured that the message originated with the
authority. The message includes the following:
1. B's public key, PUb which A can use to encrypt messages
destined for B
2. The original request, to enable A to match this response with
the corresponding earlier request and to verify that the original
request was not altered before reception by the authority
3. The original timestamp, so A can determine that this is not an
old message from the authority containing a key other than B's
current public key
3. A stores B's public key and also uses it to encrypt a
message to B containing an identifier of A (IDA) and
a nonce (N1), which is used to identify this
transaction uniquely.
4, 5.B retrieves A's public key from the authority in the
same manner as A retrieved B's public key
6. B sends a message to A encrypted with PUa and
containing A's nonce (N1) as well as a new nonce
generated by B (N2) because only B could have
decrypted message (3), the presence of N1 in
message (6) assures A that the correspondent is B.
7. A returns N2, encrypted using B's public key, to
assure B that its correspondent is A.
Public-Key Certificates
 The public-key authority could be somewhat of a bottleneck
in the system, for a user must appeal to the authority for a
public key for every other user that it wishes to contact
 The directory of names and public keys maintained by the
authority is vulnerable to tampering.
 An alternative approach is to use certificates that can be
used by participants to exchange keys without contacting a
public-key authority
 A certificate consists of a public key plus an identifier of the
key owner, with the whole block signed by a trusted third
party
 The third party is a certificate authority, such as a government
agency or a financial institution, that is trusted by the user
community
 A user can present his or her public key to the
authority in a secure manner, and obtain a
certificate And then can publish the certificate
 Anyone needed this user's public key can
obtain the certificate and verify that it is valid
by way of the attached trusted signature
 A participant can also convey its key
information to another by transmitting its
certificate. Other participants can verify that
the certificate was created by the authority
 We can place the following requirements on
this scheme:
1. Any participant can read a certificate to
determine the name and public key of the
certificate's owner.
2. Any participant can verify that the certificate
originated from the certificate authority and is
not counterfeit.
3. Only the certificate authority can create and
update certificates.
Distribution of Secret Keys Using
Public-Key Cryptography
 Simple Secret Key Distribution
 Secret Key Distribution with Confidentiality and
Authentication
 A Hybrid Scheme
Simple Secret Key Distribution
 If A wishes to communicate with B, the following
procedure is employed:
1. A generates a public/private key pair {PUa, PRa}
and transmits a message to B consisting of PUa
and an identifier of A, IDA.
2. B generates a secret key, Ks, and transmits it to
A, encrypted with A's public key.
3. A computes D(PRa, E(PUa, Ks)) to recover the
secret key. Because only A can decrypt the
message, only A and B will know the identity of
Ks.
4. A discards PUa and PRa and B discards PUa.
 A and B can now securely communicate using
conventional encryption and the session key
Ks
 At the completion of the exchange, both A and
B discard Ks.
 Despite its simplicity, this is an attractive
protocol. No keys exist before the start of the
communication and none exist after the
completion of communication.
 The risk of compromise of the keys is minimal
 The protocol depicted in Figure is insecure
against an adversary who can intercept
messages and then either relay the
intercepted message or substitute another
message
 Such an attack is known as a man-in-the-
middle attack
 In this case, If an adversary, E, has control of
the intervening communication channel, then
E can compromise the communication in the
following fashion without being detected:
1. A generates a public/private key pair {PUa, PRa}
and transmits a message intended for B
consisting ofP Ua and an identifier of A, IDA.
2. E intercepts the message, creates its own
public/private key pair {PUe, PRe} and transmits
PUe||IDA to B.
3. B generates a secret key, Ks, and transmits
E(PUe, Ks).
4. E intercepts the message, and learns Ks by
computing D(PRe, E(PUe, Ks)).
5. E transmits E(PUa, Ks) to A.
Secret Key Distribution with
Confidentiality and Authentication
 It provides protection against both active and passive attacks
 It is assumed that A and B have exchanged public keys by one of the
schemes
1. A uses B's public key to encrypt a message to B containing an identifier
of A (IDA) and a nonce (N1), which is used to identify this transaction
uniquely.
2. B sends a message to A encrypted with PUa and containing A's nonce
(N1) as well as a new nonce generated by B (N2) Because only B could
have decrypted message (1), the presence of N1 in message (2) assures
A that the correspondent is B.
3. A returns N2 encrypted using B's public key, to assure B that its
correspondent is A.
4. A selects a secret key Ks and sends M = E(PUb, E(PRa, Ks)) to B.
Encryption of this message with B's public key ensures that only B can
read it; encryption with A's private key ensures that only A could have
sent it.
5. B computes D(PUa, D(PRb, M)) to recover the secret key.
A Hybrid Scheme
 This scheme retains the use of a key
distribution center (KDC) that shares a secret
master key with each user and distributes
secret session keys encrypted with the master
key
 A public key scheme is used to distribute the
master keys
 The following rationale is provided for using
this three-level approach:
 Performance:
 There are many applications, especially transaction-
oriented applications, in which the session keys
change frequently.
 Distribution of session keys by public-key encryption
could degrade overall system performance because of
the relatively high computational load of public-key
encryption and decryption. With a three-level
hierarchy, public-key encryption is used only
occasionally to update the master key between a user
and the KDC.
 Backward compatibility:
 The hybrid scheme is easily overlaid on an existing
KDC scheme, with minimal disruption or software
changes.
 The addition of a public-key layer provides a
secure, efficient means of distributing master
keys
 This is an advantage in a configuration in
which a single KDC serves a widely distributed
set of users
Diffie-Hellman key exchange
Algorithm
 The two parties, who want to communicate
securely, can agree on a symmetric key using
this technique
 The can then can be used for encryption and
decryption
 This algorithm can be used only for key
agreement, but not for encryption and
decryption
 Once both parties agree on the key to be
used, they need to use other symmetric
encryption algorithms
Description of algorithm
 Lets assume that Alice and Bob want to agree
upon a key to be used for encrypting/decrypting
messages that would be exchanged between
them
 Then the Diffie-Hellman algorithm works as
follows:
1. Firstly, Alice and Bob agree on two large prime
numbers, n and g. these two integers need not
be kept secret. Alice and Bob can use insecure
channel to agree on them
2. Alice chooses another large random number x,
and calculates A such that
A = gx mod n
3. Alice sends the number A to Bob
4. Bob independently chooses another large
random integer y and the n calculates B such
that
B = gy mod n
5. Bob sends the number B to Alice
6. A now computes the secret key K1
K1 = Bx mod n
7. B now computes the secret key K2
K2 = Ay mod n
Example
1. Let n=11, g=7
2. Let x=3. then, we have A=73 mod 11=343
mod 11 =2
3. Alice sends 2 to Bob
4. Let y=6. then we have, B=76 mod 11=117649
mod 11 =4
5. Bob sends the 4 to Alice
6. We have, K1=43 mod 11= 64 mod 11 = 9
7. We have K2 = 26 mod 11=64 mod 11 = 9
Elliptic Curve
Cryptography(ECC)
 An elliptic curve (EC) is a smooth, projective algebraic curve
on which there is a specified point O
 The main difference between RSA and ECC is that unlike
RSA, ECC offers the same level of security for smaller key
sizes
 ECC requires much smaller keys than those used in
conventional public key cryptosystem, while maintaining the
same level of security
 The use of elliptic cures therefore allows faster encryption
and decryption
 ECC is highly mathematical in nature
 An Elliptic Curve is similar to a normal curve draw as a graph
on x-axes and y-axes and has points
 Each point can be designated by an (x , y) coordinate
 This is how elliptic curve public key
cryptography works
 For Alice and Bob to communicate securely
over an unsecure network they can exchange
a private key over this network in the following
way:
 A particular rationale base point P is published
in a public domain for use with a particular
elliptic curve E also published in a public
domain
 Alice and Bob choose random integers Ka and
Kb respectively, which they use as private key
 Alice computes Ka * P, Bob computes Kb * P and
they exchange these values over the network
 Using the information they received from each
other and their private keys, both Alice and Bob
compute (Ka * Kb)*P = Ka * (Kb * P) =Kb * (Ka *
P)
 This value is then the shared secret that only Alice
and Bob possess.
 The private keys Ka and Kb and the shared
secrety (Ka * Kb)*P are difficult to compute given
Ka * P and Kb * P
 Thus Alice and Bob do not compromise their
private keys or their shared secret in exchange

More Related Content

What's hot

Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
Pawan Arya
 
Message authentication
Message authenticationMessage authentication
Message authentication
CAS
 
X.509 Certificates
X.509 CertificatesX.509 Certificates
X.509 Certificates
Sou Jana
 
Hash Function
Hash FunctionHash Function
Hash Function
Siddharth Srivastava
 
Digital Signature Standard
Digital Signature StandardDigital Signature Standard
Digital Signature Standard
Sou Jana
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
6. cryptography
6. cryptography6. cryptography
6. cryptography7wounders
 
Digital signature schemes
Digital signature schemesDigital signature schemes
Digital signature schemes
ravik09783
 
Web Security
Web SecurityWeb Security
Web Security
Dr.Florence Dayana
 
Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
Computer_ at_home
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
Niloy Biswas
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
kusum sharma
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
Dr.Florence Dayana
 
CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signature
Adarsh Patel
 
Diffie Hellman Key Exchange
Diffie Hellman Key ExchangeDiffie Hellman Key Exchange
Diffie Hellman Key Exchange
SAURABHDHAGE6
 
block ciphers
block ciphersblock ciphers
block ciphers
Asad Ali
 
Authentication Protocols
Authentication ProtocolsAuthentication Protocols
Authentication Protocols
Trinity Dwarka
 

What's hot (20)

DES
DESDES
DES
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
X.509 Certificates
X.509 CertificatesX.509 Certificates
X.509 Certificates
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Digital Signature Standard
Digital Signature StandardDigital Signature Standard
Digital Signature Standard
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
6. cryptography
6. cryptography6. cryptography
6. cryptography
 
Digital signature schemes
Digital signature schemesDigital signature schemes
Digital signature schemes
 
Web Security
Web SecurityWeb Security
Web Security
 
Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
 
CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signature
 
Diffie Hellman Key Exchange
Diffie Hellman Key ExchangeDiffie Hellman Key Exchange
Diffie Hellman Key Exchange
 
block ciphers
block ciphersblock ciphers
block ciphers
 
Authentication Protocols
Authentication ProtocolsAuthentication Protocols
Authentication Protocols
 

Viewers also liked

Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptographyanusachu .
 
Public key cryptography and RSA
Public key cryptography and RSAPublic key cryptography and RSA
Public key cryptography and RSA
Shafaan Khaliq Bhatti
 
Public key Cryptography & RSA
Public key Cryptography & RSAPublic key Cryptography & RSA
Public key Cryptography & RSAAmit Debnath
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptographydrewz lin
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
Indra97065
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3koolkampus
 
Cryptography
CryptographyCryptography
Cryptography
Sidharth Mohapatra
 
Cryptography
CryptographyCryptography
Cryptography
Shivanand Arur
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101Joshua Thijssen
 
public key infrastructure
public key infrastructurepublic key infrastructure
public key infrastructure
vimal kumar
 
Digital Signature
Digital SignatureDigital Signature
Digital Signature
saurav5884
 
Public key cryptography
Public key cryptographyPublic key cryptography
Public key cryptographyIsrael Herraiz
 
Public Key Authentication With SSH
Public Key Authentication With SSHPublic Key Authentication With SSH
Public Key Authentication With SSHDon Norwood
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Israel Herraiz
 
Cryptography
CryptographyCryptography
Cryptography
amiable_indian
 
Diffie-Hellman key exchange
Diffie-Hellman key exchangeDiffie-Hellman key exchange
Diffie-Hellman key exchangehughpearse
 
Digital signatures
Digital signaturesDigital signatures
Digital signaturesIshwar Dayal
 

Viewers also liked (20)

Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Public key cryptography and RSA
Public key cryptography and RSAPublic key cryptography and RSA
Public key cryptography and RSA
 
Symmetric and asymmetric key
Symmetric and asymmetric keySymmetric and asymmetric key
Symmetric and asymmetric key
 
Public key Cryptography & RSA
Public key Cryptography & RSAPublic key Cryptography & RSA
Public key Cryptography & RSA
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptography
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101
 
public key infrastructure
public key infrastructurepublic key infrastructure
public key infrastructure
 
Digital Signature
Digital SignatureDigital Signature
Digital Signature
 
Public key cryptography
Public key cryptographyPublic key cryptography
Public key cryptography
 
Public Key Authentication With SSH
Public Key Authentication With SSHPublic Key Authentication With SSH
Public Key Authentication With SSH
 
Public private key
Public private keyPublic private key
Public private key
 
Cryptography
CryptographyCryptography
Cryptography
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Diffie-Hellman key exchange
Diffie-Hellman key exchangeDiffie-Hellman key exchange
Diffie-Hellman key exchange
 
Digital signatures
Digital signaturesDigital signatures
Digital signatures
 

Similar to 3 public key cryptography

Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its Uses
Mohsin Ali
 
White Paper on Cryptography
White Paper on Cryptography White Paper on Cryptography
White Paper on Cryptography
Durgesh Malviya
 
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsaInformation and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
Mazin Alwaaly
 
Lesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptx
Lesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptxLesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptx
Lesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptx
MohamedNowfeek1
 
Encryption in Cryptography
Encryption in CryptographyEncryption in Cryptography
Encryption in Cryptography
Uttara University
 
network security
network securitynetwork security
network security
BishalWosti1
 
Unit 7 : Network Security
Unit 7 : Network SecurityUnit 7 : Network Security
Unit 7 : Network Security
Chandan Gupta Bhagat
 
asymmetric encryption.pptx
asymmetric encryption.pptxasymmetric encryption.pptx
asymmetric encryption.pptx
ab2478037
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
RSA 32-bit Implementation Technique
RSA 32-bit Implementation TechniqueRSA 32-bit Implementation Technique
RSA 32-bit Implementation Technique
Universitas Pembangunan Panca Budi
 
Encryption
EncryptionEncryption
Encryption
Naiyan Noor
 
Cryptography.pptx
Cryptography.pptxCryptography.pptx
Cryptography.pptx
AnmolBansal66
 
A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...
ijsrd.com
 
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
SayeeKumarMadhesh
 
Data encryption
Data encryptionData encryption
Data encryption
Balvant Biradar
 
Module2.pptx
Module2.pptxModule2.pptx
Module2.pptx
ShilpaShettyA1
 
Digital Certified Mail
Digital Certified MailDigital Certified Mail
Digital Certified Mail
Matthew Chang
 
Public key cryptography
Public key cryptographyPublic key cryptography
Public key cryptography
Lilies DLiestyowati
 

Similar to 3 public key cryptography (20)

Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its Uses
 
White Paper on Cryptography
White Paper on Cryptography White Paper on Cryptography
White Paper on Cryptography
 
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsaInformation and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
 
Lesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptx
Lesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptxLesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptx
Lesson 04 - Symmetric and Asymmetric Key Encryptions (1).pptx
 
Encryption in Cryptography
Encryption in CryptographyEncryption in Cryptography
Encryption in Cryptography
 
network security
network securitynetwork security
network security
 
Unit 7 : Network Security
Unit 7 : Network SecurityUnit 7 : Network Security
Unit 7 : Network Security
 
asymmetric encryption.pptx
asymmetric encryption.pptxasymmetric encryption.pptx
asymmetric encryption.pptx
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
RSA 32-bit Implementation Technique
RSA 32-bit Implementation TechniqueRSA 32-bit Implementation Technique
RSA 32-bit Implementation Technique
 
Unit 3(1)
Unit 3(1)Unit 3(1)
Unit 3(1)
 
Encryption
EncryptionEncryption
Encryption
 
Cryptography.pptx
Cryptography.pptxCryptography.pptx
Cryptography.pptx
 
A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...
 
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
 
Data encryption
Data encryptionData encryption
Data encryption
 
Unit 3(1)
Unit 3(1)Unit 3(1)
Unit 3(1)
 
Module2.pptx
Module2.pptxModule2.pptx
Module2.pptx
 
Digital Certified Mail
Digital Certified MailDigital Certified Mail
Digital Certified Mail
 
Public key cryptography
Public key cryptographyPublic key cryptography
Public key cryptography
 

Recently uploaded

ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 

Recently uploaded (20)

ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 

3 public key cryptography

  • 2. Principles of Public key Cryptography  Asymmetric encryption is a form of cryptosystem in which encryption and decryption are performed using the different keys- one public key and one private key  Also known as public-key encryption  It uses mathematical functions rather than substitution and permutation  More secure from cryptanalysis than the symmetric encryption
  • 3.  Asymmetric keys  Two related keys, a public key and a private key, that are used to perform complementary operations, such as encryption and decryption or signature generation and signature verification  Public key certificate  A digital document issued and digitally signed by the private key of a Certification authority that binds the name of a subscriber to a public key. The certificate indicates that the subscriber identified in the certificate has sole control and access to the corresponding private key
  • 4.  Public key cryptographic algorithm  A cryptographic algorithm that uses two related keys, a public key and a private key  Public key infrastructure  A set of policies, processes, server platform, software and workstations used for the purpose of administrating certificates and public-private key pairs, including the ability to issue, maintain, and revoke public certificate
  • 5. Public-key cryptosystem  Asymmetric algorithms rely on one key for encryption and a different but related key for decryption  These algorithms have the following important characteristics  It is computationally infeasible to determine the decryption key given only knowledge of the cryptographic algorithm and the encryption key
  • 6.  Six ingredients:  Plaintext - This is a readable message or data that is fed into the algorithm as the input  Encryption algorithm - The encryption algorithm performs various transformations on the plaintext  Public and private keys - this is a pair of keys that have been selected so that if one is used for encryption, the other is used for decryption. The exact transformations performed by the algorithm depend on the public key and the private key that is provided as input
  • 7.  Cipher text - this is the scrambled message produced as output  Decryption algorithm - The algorithm that accepts the cipher text and matching key and produces the original plain text
  • 8.
  • 9.
  • 10.  The essential steps are 1. Each user generates a pair of keys to be used for the encryption and decryption of messages 2. Each user places one of the two keys in public register or other accessible file. This is public key. The other key is kept private. Each user maintains a collection of public keys obtained from others 3. If Bob wishes to send a confidential message to Alice, Bob encrypts the message using Alice’s public key 4. When Alice receives the message, she decrypts it using her private key 5. No other recipient can decrypt the message because only Alice knows her private key
  • 11.  Here, all participants have access to public keys, and private keys are generated locally by each participant and therefore need never be distributed  As long as a user’s private key remains protected and secret, incoming communication is secure  At any time, a system can change its private key and publish the related public key to replace its old public key
  • 12. Difference between conventional encryption and Public-key encryption
  • 16. Applications of Public-key Cryptosystem  A applications are divided in three broad categories:  Encryption/decryption – The sender encrypts the message with the recipient’s public key  Digital Signature – The sender “signs” a message with its private key  Key exchange – two sides cooperate to exchange a session key
  • 17. RSA Algorithm  Asymmetric key cryptographic algorithm  Rivest-Shamir-Adleman (RSA) name is given by taking the firstname of its inventors  It uses prime numbers  This algorithm is based on the fact that it is easy to find and multiply large prime numbers together, but it is extremely difficult to factor their product  The private and public keys in RSA are based on very large prime numbers  The real challenge in RSA is the selection and generation of the public key and private key  Lets know how private key and public key are generated and, using them, how can we perform encryption and decryption
  • 18. Algorithm 1. Choose two prime numbers P and Q 2. Calculate N = P * Q 3. Select the public key E (i.e. Encryption key) such that it is not a factor of (P–1) and (Q–1) 4. Select the private key D (i.e. Decryption key) such that the following equation is true (D * E) mod (P–1) * (Q–1) = 1 5. For encryption, calculate the cipher text CT from the plain text PT as follows CT = PTE mod N 6. Send CT as the cipher text to the receiver 7. For decryption, calculate the plain text PT from the cipher text CT as follows PT = CTD mod N
  • 19. Example of RSA 1. Choose two large prime numbers P and Q  Let P= 7, Q=17 2. Calculate N = P * Q  N= 7 * 17= 119 3. Select the public key E such that it is not a factor of (P-1) * (Q-1)  Lets find (7-1) * (17-1)= 6*16= 96  The factors of 96 are 2,2,2,2,2 and 3 ( because 96 = 2*2*2*2*2*3)  Thus we have to choose E such that none of the factors of E is 2 and 3  Lets choose E as 5
  • 20. 4. Select the private key D such that the following equation is true (D * E) mod (P–1) * (Q–1) = 1  Lets substitute the values of E, P and Q in the equation  We have (D * 5) mod (7-1) * (17-1) = 1  i.e. (D * 5) mod (6) * (16) = 1  i.e. (D * 5) mod (96) = 1  After some calculations, let us take D=77  So that (77 * 5) mod (96) = 385 mod 96 = 1
  • 21. 5. For encryption, calculate the cipher text CT from the plain text PT as follows CT = PTE mod N  Lets assume that plaintext PT = 10  Then, CT = 105 mod 119 = 100000 mod 119 = 40 6. Send CT as the cipher text to the receiver  Send 40 as the cipher text to the receiver 7. For decryption, calculate the plain text PT from the cipher text CT as follows PT = CTD mod N  PT = 4077 mod 119 = 10
  • 22. The Security of RSA  Four possible approaches to attacking the RSA algorithm are as follows:  Brute force: This involves trying all possible private keys.  Mathematical attacks: There are several approaches, all equivalent in effort to factoring the product of two primes.  Timing attacks: These depend on the running time of the decryption algorithm.  Chosen cipher text attacks: This type of attack exploits properties of the RSA algorithm.
  • 24. Key management  One of the major roles of public-key encryption has been to address the problem of key distribution  There are actually two distinct aspects to the use of public-key cryptography in this regard:  The distribution of public keys  The use of public-key encryption to distribute secret keys
  • 25. Distribution of Public Keys  Schemes for Key distribution:  Public announcement  Publicly available directory  Public-key authority  Public-key certificates
  • 26. Public announcement of Public Keys  The point of public-key encryption is that the public key is public  Thus, if there is some broadly accepted public-key algorithm, such as RSA, any participant can send his or her public key to any other participant or broadcast the key to the community at large  Although this approach is convenient, it has a major weakness  Anyone can forge such a public announcement  That is, some user could pretend to be user A and send a public key to another participant or broadcast such a public key  Until such time as user A discovers the forgery and alerts other participants, the forger is able to read all encrypted messages intended for A and can use the forged keys for authentication
  • 27.
  • 28. Publicly Available Directory  A greater degree of security can be achieved by maintaining a publicly available dynamic directory of public keys  Maintenance and distribution of the public directory would have to be the responsibility of some trusted entity or organization  Such a scheme would include the following elements:
  • 29. 1. The authority maintains a directory with a {name, public key} entry for each participant. 2. Each participant registers a public key with the directory authority. Registration would have to be in person or by some form of secure authenticated communication. 3. A participant may replace the existing key with a new one at any time, either because of the desire to replace a public key that has already been used for a large amount of data, or because the corresponding private key has been compromised in some way. 4. Participants could also access the directory electronically. For this purpose, secure, authenticated communication from the authority to the participant is mandatory.
  • 30.  This scheme is clearly more secure than individual public announcements but still has vulnerabilities  If an adversary succeeds in obtaining or computing the private key of the directory authority, the adversary could authoritatively pass out counterfeit public keys and subsequently impersonate any participant and eavesdrop on messages sent to any participant
  • 31.
  • 32. Public-Key Authority  Stronger security for public-key distribution can be achieved by providing tighter control over the distribution of public keys from the directory  As before, the scenario assumes that a central authority maintains a dynamic directory of public keys of all participants  Each participant reliably knows a public key for the authority, with only the authority knowing the corresponding private key
  • 33.  The following steps occur: 1. A sends a timestamped message to the public-key authority containing a request for the current public key of B. 2. The authority responds with a message that is encrypted using the authority's private key, PRauth Thus, A is able to decrypt the message using the authority's public key. Therefore, A is assured that the message originated with the authority. The message includes the following: 1. B's public key, PUb which A can use to encrypt messages destined for B 2. The original request, to enable A to match this response with the corresponding earlier request and to verify that the original request was not altered before reception by the authority 3. The original timestamp, so A can determine that this is not an old message from the authority containing a key other than B's current public key
  • 34. 3. A stores B's public key and also uses it to encrypt a message to B containing an identifier of A (IDA) and a nonce (N1), which is used to identify this transaction uniquely. 4, 5.B retrieves A's public key from the authority in the same manner as A retrieved B's public key 6. B sends a message to A encrypted with PUa and containing A's nonce (N1) as well as a new nonce generated by B (N2) because only B could have decrypted message (3), the presence of N1 in message (6) assures A that the correspondent is B. 7. A returns N2, encrypted using B's public key, to assure B that its correspondent is A.
  • 35.
  • 36. Public-Key Certificates  The public-key authority could be somewhat of a bottleneck in the system, for a user must appeal to the authority for a public key for every other user that it wishes to contact  The directory of names and public keys maintained by the authority is vulnerable to tampering.  An alternative approach is to use certificates that can be used by participants to exchange keys without contacting a public-key authority  A certificate consists of a public key plus an identifier of the key owner, with the whole block signed by a trusted third party  The third party is a certificate authority, such as a government agency or a financial institution, that is trusted by the user community
  • 37.  A user can present his or her public key to the authority in a secure manner, and obtain a certificate And then can publish the certificate  Anyone needed this user's public key can obtain the certificate and verify that it is valid by way of the attached trusted signature  A participant can also convey its key information to another by transmitting its certificate. Other participants can verify that the certificate was created by the authority
  • 38.  We can place the following requirements on this scheme: 1. Any participant can read a certificate to determine the name and public key of the certificate's owner. 2. Any participant can verify that the certificate originated from the certificate authority and is not counterfeit. 3. Only the certificate authority can create and update certificates.
  • 39.
  • 40. Distribution of Secret Keys Using Public-Key Cryptography  Simple Secret Key Distribution  Secret Key Distribution with Confidentiality and Authentication  A Hybrid Scheme
  • 41. Simple Secret Key Distribution  If A wishes to communicate with B, the following procedure is employed: 1. A generates a public/private key pair {PUa, PRa} and transmits a message to B consisting of PUa and an identifier of A, IDA. 2. B generates a secret key, Ks, and transmits it to A, encrypted with A's public key. 3. A computes D(PRa, E(PUa, Ks)) to recover the secret key. Because only A can decrypt the message, only A and B will know the identity of Ks. 4. A discards PUa and PRa and B discards PUa.
  • 42.
  • 43.  A and B can now securely communicate using conventional encryption and the session key Ks  At the completion of the exchange, both A and B discard Ks.  Despite its simplicity, this is an attractive protocol. No keys exist before the start of the communication and none exist after the completion of communication.  The risk of compromise of the keys is minimal
  • 44.  The protocol depicted in Figure is insecure against an adversary who can intercept messages and then either relay the intercepted message or substitute another message  Such an attack is known as a man-in-the- middle attack  In this case, If an adversary, E, has control of the intervening communication channel, then E can compromise the communication in the following fashion without being detected:
  • 45. 1. A generates a public/private key pair {PUa, PRa} and transmits a message intended for B consisting ofP Ua and an identifier of A, IDA. 2. E intercepts the message, creates its own public/private key pair {PUe, PRe} and transmits PUe||IDA to B. 3. B generates a secret key, Ks, and transmits E(PUe, Ks). 4. E intercepts the message, and learns Ks by computing D(PRe, E(PUe, Ks)). 5. E transmits E(PUa, Ks) to A.
  • 46. Secret Key Distribution with Confidentiality and Authentication  It provides protection against both active and passive attacks  It is assumed that A and B have exchanged public keys by one of the schemes 1. A uses B's public key to encrypt a message to B containing an identifier of A (IDA) and a nonce (N1), which is used to identify this transaction uniquely. 2. B sends a message to A encrypted with PUa and containing A's nonce (N1) as well as a new nonce generated by B (N2) Because only B could have decrypted message (1), the presence of N1 in message (2) assures A that the correspondent is B. 3. A returns N2 encrypted using B's public key, to assure B that its correspondent is A. 4. A selects a secret key Ks and sends M = E(PUb, E(PRa, Ks)) to B. Encryption of this message with B's public key ensures that only B can read it; encryption with A's private key ensures that only A could have sent it. 5. B computes D(PUa, D(PRb, M)) to recover the secret key.
  • 47.
  • 48. A Hybrid Scheme  This scheme retains the use of a key distribution center (KDC) that shares a secret master key with each user and distributes secret session keys encrypted with the master key  A public key scheme is used to distribute the master keys  The following rationale is provided for using this three-level approach:
  • 49.  Performance:  There are many applications, especially transaction- oriented applications, in which the session keys change frequently.  Distribution of session keys by public-key encryption could degrade overall system performance because of the relatively high computational load of public-key encryption and decryption. With a three-level hierarchy, public-key encryption is used only occasionally to update the master key between a user and the KDC.  Backward compatibility:  The hybrid scheme is easily overlaid on an existing KDC scheme, with minimal disruption or software changes.
  • 50.  The addition of a public-key layer provides a secure, efficient means of distributing master keys  This is an advantage in a configuration in which a single KDC serves a widely distributed set of users
  • 51. Diffie-Hellman key exchange Algorithm  The two parties, who want to communicate securely, can agree on a symmetric key using this technique  The can then can be used for encryption and decryption  This algorithm can be used only for key agreement, but not for encryption and decryption  Once both parties agree on the key to be used, they need to use other symmetric encryption algorithms
  • 52. Description of algorithm  Lets assume that Alice and Bob want to agree upon a key to be used for encrypting/decrypting messages that would be exchanged between them  Then the Diffie-Hellman algorithm works as follows: 1. Firstly, Alice and Bob agree on two large prime numbers, n and g. these two integers need not be kept secret. Alice and Bob can use insecure channel to agree on them 2. Alice chooses another large random number x, and calculates A such that A = gx mod n
  • 53. 3. Alice sends the number A to Bob 4. Bob independently chooses another large random integer y and the n calculates B such that B = gy mod n 5. Bob sends the number B to Alice 6. A now computes the secret key K1 K1 = Bx mod n 7. B now computes the secret key K2 K2 = Ay mod n
  • 54.
  • 55. Example 1. Let n=11, g=7 2. Let x=3. then, we have A=73 mod 11=343 mod 11 =2 3. Alice sends 2 to Bob 4. Let y=6. then we have, B=76 mod 11=117649 mod 11 =4 5. Bob sends the 4 to Alice 6. We have, K1=43 mod 11= 64 mod 11 = 9 7. We have K2 = 26 mod 11=64 mod 11 = 9
  • 56. Elliptic Curve Cryptography(ECC)  An elliptic curve (EC) is a smooth, projective algebraic curve on which there is a specified point O  The main difference between RSA and ECC is that unlike RSA, ECC offers the same level of security for smaller key sizes  ECC requires much smaller keys than those used in conventional public key cryptosystem, while maintaining the same level of security  The use of elliptic cures therefore allows faster encryption and decryption  ECC is highly mathematical in nature  An Elliptic Curve is similar to a normal curve draw as a graph on x-axes and y-axes and has points  Each point can be designated by an (x , y) coordinate
  • 57.  This is how elliptic curve public key cryptography works  For Alice and Bob to communicate securely over an unsecure network they can exchange a private key over this network in the following way:  A particular rationale base point P is published in a public domain for use with a particular elliptic curve E also published in a public domain  Alice and Bob choose random integers Ka and Kb respectively, which they use as private key
  • 58.  Alice computes Ka * P, Bob computes Kb * P and they exchange these values over the network  Using the information they received from each other and their private keys, both Alice and Bob compute (Ka * Kb)*P = Ka * (Kb * P) =Kb * (Ka * P)  This value is then the shared secret that only Alice and Bob possess.  The private keys Ka and Kb and the shared secrety (Ka * Kb)*P are difficult to compute given Ka * P and Kb * P  Thus Alice and Bob do not compromise their private keys or their shared secret in exchange