0% found this document useful (0 votes)
100 views

Public Key Cryptography: - Public-Key Encryption Helps Address Key Distribution Problems - Have Two Aspects of This

Public key cryptography uses two keys: a public key to encrypt data, and a private key to decrypt it. There are several methods for distributing public keys, including public announcement, publicly available directories, or using public key certificates signed by a certificate authority. The Diffie-Hellman key exchange protocol allows two parties to establish a shared secret key over an insecure channel, by each generating and sharing public keys, without either party transmitting the private key.

Uploaded by

jagmohan bisht
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

Public Key Cryptography: - Public-Key Encryption Helps Address Key Distribution Problems - Have Two Aspects of This

Public key cryptography uses two keys: a public key to encrypt data, and a private key to decrypt it. There are several methods for distributing public keys, including public announcement, publicly available directories, or using public key certificates signed by a certificate authority. The Diffie-Hellman key exchange protocol allows two parties to establish a shared secret key over an insecure channel, by each generating and sharing public keys, without either party transmitting the private key.

Uploaded by

jagmohan bisht
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Public Key Cryptography

• Public-key encryption helps


address key distribution problems
• Have two aspects of this:
–Distribution of public keys
–Use of public-key encryption to
distribute secret keys
Distribution of Public Keys
• Can be considered as using
one of:
–Public announcement
–Publicly available directory
–Public-key authority
–Public-key certificates
Public Announcement
• Users distribute public keys to recipients
or broadcast to community at large
– e.g. Append PGP keys to email messages or
post to news groups or email list
• Major weakness is forgery
– Anyone can create a key claiming to be
someone else and broadcast it
– Until forgery is discovered can masquerade
as claimed user
Publicly Available Directory
• Can obtain greater security by registering
keys with a public directory
• Directory must be trusted with
properties:
– Contains {name, public-key} entries
– Participants register securely with directory
– Participants can replace key at any time
– Directory is periodically published
– Directory can be accessed electronically
• Still vulnerable to tampering or forgery
Public-Key Authority
• Improve security by tightening control
over distribution of keys from directory
• It has properties of directory
• And requires users to know public key for
the directory
• Then users interact with directory to
obtain any desired public key securely
– Does require real-time access to directory
when keys are needed
Public-Key Authority
Public-Key Certificate
• Certificates allow key exchange without
real-time access to public-key authority
• A certificate binds identity to public key
– Usually with other info such as period of
validity, rights of use etc
• With all contents signed by a trusted
public-key or certificate authority (CA)
• Can be verified by anyone who knows the
public-key authorities public-key
Public-Key Certificates
Public-Key Distribution of Secret Keys
• Use previous methods to obtain public-
key
• Can use for secrecy or authentication
• But public-key algorithms are slow
• So usually want to use private-key
encryption to protect message contents
• Hence need a session key
• Have several alternatives for negotiating
a suitable session
Simple Secret Key Distribution
• Proposed by Merkle in 1979
– A generates a new temporary public key pair
– A sends B the public key and their identity
– B generates a session key K sends it to A
encrypted using the supplied public key
– A decrypts the session key and both use
• Problem is that an opponent can intercept
and impersonate both halves of protocol
Public-Key Distribution of Secret Keys
• if have securely exchanged public-keys:
Hybrid Key Distribution
• Retain use of private-key KDC
• Shares secret master key with each user
• Distributes session key using master key
• Public-key used to distribute master keys
– Especially useful with widely distributed
users
• Rationale
– Performance
– Backward compatibility
Diffie-Hellman Key Exchange
• First public-key type scheme proposed by
Diffie & Hellman in 1976 along with the
exposition of public key concepts
– Note: now know that Williamson secretly
proposed the concept in 1970
• Is a practical method for public exchange
of a secret key
• Used in a number of commercial
products
Diffie-Hellman Key Exchange
• A public-key distribution scheme
– Cannot be used to exchange an arbitrary message
– Rather it can establish a common key
– Known only to the two participants
• Value of key depends on the participants (and
their private and public key information)
• Based on exponentiation in a finite (Galois)
Field (modulo a prime or a polynomial) - easy
• Security relies on the difficulty of computing
discrete logarithms (similar to factoring) –
hard
Diffie-Hellman Setup
• All users agree on global parameters:
– Large prime integer or polynomial ‘q’
– ‘a’ being a primitive root mod ‘q’
• Each user (e.g. A) generates their key
– Chooses a secret key (number): xA < q
– Compute their public key: yA = axA mod q
• Each user makes public that key yA, or YB
Diffie-Hellman Key Exchange
• Shared session key for users A & B is KAB:
KAB = axA.xB mod q
= yAxB mod q (which B can compute)
= yBxA mod q (which A can compute)
• KAB is used as session key in private-key
encryption scheme between Alice and Bob
• If Alice and Bob subsequently communicate,
they will have the same key as before, unless
they choose new public-keys
• Attacker needs an x, must solve discrete log
Diffie-Hellman Example
• Users Alice & Bob who wish to swap keys:
• Agree on prime q=353 and a=3
• Select random secret keys:
– A chooses xA=97, B chooses xB=233
• Compute respective public keys:
– yA=397 mod 353 = 40 (Alice)
– yB=3233 mod 353 = 248 (Bob)
• Compute shared session key as:
– KAB= yBxA mod 353 = 24897 = 160 (Alice)
– KAB= yAxB mod 353 = 40233 = 160 (Bob)
Key Exchange Protocols
• Users could create random private/public
D-H keys each time they communicate
• Users could create a known
private/public D-H key and publish in a
directory, then consulted and used to
securely communicate with them
• Both of these are vulnerable to a meet-
in-the-middle attack
• Authentication of the keys is needed
Summary
• Have considered:
–Distribution of public keys
–Public-key distribution of secret
keys
–Diffie-Hellman key exchange
Powers of integers – Modulo 19
Primitive Roots of 19 are 2, 3, 10, 13, 14, 15

You might also like