Tải bản đầy đủ (.ppt) (30 trang)

Cryptography and Network Security Chapter 10 pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.32 MB, 30 trang )





Cryptography and
Cryptography and
Network Security
Network Security
Chapter 10
Chapter 10
Fourth Edition
Fourth Edition
by William Stallings
by William Stallings
Lecture slides by Lawrie Brown
Lecture slides by Lawrie Brown

Chapter 10 –
Chapter 10 –
Key Management;
Key Management;
Other Public Key Cryptosystems
Other Public Key Cryptosystems
No Singhalese, whether man or woman,
No Singhalese, whether man or woman,
would venture out of the house
would venture out of the house
without a bunch of keys in his hand,
without a bunch of keys in his hand,
for without such a talisman he would
for without such a talisman he would


fear that some devil might take
fear that some devil might take
advantage of his weak state to slip
advantage of his weak state to slip
into his body.
into his body.


The Golden Bough,
The Golden Bough,
Sir James George
Sir James George
Frazer
Frazer

Key Management
Key Management

public-key encryption helps address
public-key encryption helps address
key distribution problems
key distribution problems

have two aspects of this:
have two aspects of this:

distribution of public keys
distribution of public keys

use of public-key encryption to

use of public-key encryption to
distribute secret keys
distribute secret keys

Distribution of Public Keys
Distribution of Public Keys

can be considered as using one of:
can be considered as using one of:

public announcement
public announcement

publicly available directory
publicly available directory

public-key authority
public-key authority

public-key certificates
public-key certificates

Public Announcement
Public Announcement

users distribute public keys to
users distribute public keys to
recipients or broadcast to community
recipients or broadcast to community
at large

at large

eg. append PGP keys to email messages or post to
eg. append PGP keys to email messages or post to
news groups or email list
news groups or email list

major weakness is forgery
major weakness is forgery

anyone can create a key claiming to be someone else
anyone can create a key claiming to be someone else
and broadcast it
and broadcast it

until forgery is discovered can masquerade as
until forgery is discovered can masquerade as
claimed user
claimed user

Publicly Available Directory
Publicly Available Directory

can obtain greater security by
can obtain greater security by
registering keys with a public directory
registering keys with a public directory

directory must be trusted with
directory must be trusted with

properties:
properties:

contains {name,public-key} entries
contains {name,public-key} entries

participants register securely with directory
participants register securely with directory

participants can replace key at any time
participants can replace key at any time

directory is periodically published
directory is periodically published

directory can be accessed electronically
directory can be accessed electronically

still vulnerable to tampering or forgery
still vulnerable to tampering or forgery

Public-Key Authority
Public-Key Authority

improve security by tightening
improve security by tightening
control over distribution of keys
control over distribution of keys
from directory
from directory


has properties of directory
has properties of directory

and requires users to know public key
and requires users to know public key
for the directory
for the directory

then users interact with directory to
then users interact with directory to
obtain any desired public key
obtain any desired public key
securely
securely

does require real-time access to directory when keys
does require real-time access to directory when keys
are needed
are needed

Public-Key Authority
Public-Key Authority

Public-Key Certificates
Public-Key Certificates

certificates allow key exchange without
certificates allow key exchange without
real-time access to

real-time access to
public-key authority
public-key authority

a certificate
a certificate
binds
binds
identity
identity
to
to
public
public
key
key



usually with other info such as period of validity, rights of
usually with other info such as period of validity, rights of
use etc
use etc

with all contents
with all contents
signed
signed
by a trusted
by a trusted

Public-Key or Certificate Authority (CA)
Public-Key or Certificate Authority (CA)

can be verified by anyone who knows the
can be verified by anyone who knows the
public-key authorities public-key
public-key authorities public-key

Public-Key Certificates
Public-Key Certificates

Public-Key D
Public-Key D
istribution of Secret
istribution of Secret
Keys
Keys

use previous methods to obtain public-
use previous methods to obtain public-
key
key

can use for secrecy or authentication
can use for secrecy or authentication

but public-key algorithms are slow
but public-key algorithms are slow

so usually want to use private-key

so usually want to use private-key
encryption to protect message contents
encryption to protect message contents

hence need a session key
hence need a session key

have several alternatives for
have several alternatives for
negotiating a suitable session
negotiating a suitable session

Simple Secret Key
Simple Secret Key
Distribution
Distribution

proposed by Merkle in 1979
proposed by Merkle in 1979

A generates a new temporary public key pair
A generates a new temporary public key pair

A sends B the public key and their identity
A sends B the public key and their identity

B generates a session key K sends it to A encrypted
B generates a session key K sends it to A encrypted
using the supplied public key
using the supplied public key


A decrypts the session key and both use
A decrypts the session key and both use

problem is that an opponent can
problem is that an opponent can
intercept and impersonate both
intercept and impersonate both
halves of protocol
halves of protocol

Public-Key Distribution of Secret
Public-Key Distribution of Secret
Keys
Keys

if have securely exchanged public-
if have securely exchanged public-
keys:
keys:

Hybrid Key Distribution
Hybrid Key Distribution

retain use of private-key KDC
retain use of private-key KDC

shares secret master key with each user
shares secret master key with each user


distributes session key using master
distributes session key using master
key
key

public-key used to distribute master
public-key used to distribute master
keys
keys

especially useful with widely distributed users
especially useful with widely distributed users

rationale
rationale

performance
performance

backward compatibility
backward compatibility

Diffie-Hellman Key Exchange
Diffie-Hellman Key Exchange

first public-key type scheme proposed
first public-key type scheme proposed

by Diffie & Hellman in 1976 along with
by Diffie & Hellman in 1976 along with

the exposition of public key concepts
the exposition of public key concepts

note: now know that
note: now know that
Willi a mso n
Willi a mso n
(UK CESG) secretly
(UK CESG) secretly
proposed the concept in 1970
proposed the concept in 1970

is a practical method for public
is a practical method for public
exchange of a secret key
exchange of a secret key

used in a number of commercial
used in a number of commercial
products
products

Diffie-Hellman Key Exchange
Diffie-Hellman Key Exchange

a public-key distribution scheme
a public-key distribution scheme

cannot be used to exchange an arbitrary message
cannot be used to exchange an arbitrary message


rather it can establish a common key
rather it can establish a common key

known only to the two participants
known only to the two participants

value of key depends on the participants (and
value of key depends on the participants (and
their private and public key information)
their private and public key information)

based on exponentiation in a finite (Galois)
based on exponentiation in a finite (Galois)
field (modulo a prime or a polynomial) - easy
field (modulo a prime or a polynomial) - easy

security relies on the difficulty of
security relies on the difficulty of
computing discrete logarithms (similar to
computing discrete logarithms (similar to
factoring) – hard
factoring) – hard

Diffie-Hellman Setup
Diffie-Hellman Setup

all users agree on global
all users agree on global
parameters:

parameters:

large prime integer or polynomial
large prime integer or polynomial
q
q

a
a
being a primitive root mod
being a primitive root mod
q
q

each user (eg. A) generates their
each user (eg. A) generates their
key
key

chooses a secret key (number):
chooses a secret key (number):
x
x
A
A
< q
< q




compute their
compute their
public key
public key
:
:
y
y
A
A
=
=
a
a
x
x
A
A
mod q
mod q



each user makes public that key
each user makes public that key
y
y
A
A


Diffie-Hellman Key Exchange
Diffie-Hellman Key Exchange

shared session key for users A & B is K
shared session key for users A & B is K
AB
AB
:
:
K
K
AB
AB
=
=
a
a
x
x
A.
A.
x
x
B
B
mod q
mod q
= y
= y
A

A
x
x
B
B
mod q (which
mod q (which
B
B
can compute)
can compute)
= y
= y
B
B
x
x
A
A
mod q (which
mod q (which
A
A
can compute)
can compute)

K
K
AB
AB

is used as session key in private-key
is used as session key in private-key
encryption scheme between Alice and Bob
encryption scheme between Alice and Bob

if Alice and Bob subsequently communicate,
if Alice and Bob subsequently communicate,
they will have the
they will have the
same
same
key as before,
key as before,
unless they choose new public-keys
unless they choose new public-keys

attacker needs an x, must solve discrete
attacker needs an x, must solve discrete
log
log

Diffie-Hellman Example
Diffie-Hellman Example

users Alice & Bob who wish to swap
users Alice & Bob who wish to swap
keys:
keys:

agree on prime

agree on prime
q=353
q=353
and
and
a
a
=3
=3

select random secret keys:
select random secret keys:

A chooses
A chooses
x
x
A
A
=97,
=97,
B chooses
B chooses
x
x
B
B
=233
=233


compute respective public keys:
compute respective public keys:

y
y
A
A
=
=
3
3
97
97
mod 353 = 40
mod 353 = 40
(Alice)
(Alice)

y
y
B
B
=
=
3
3
233
233
mod 353 = 248
mod 353 = 248

(Bob)
(Bob)

compute shared session key as:
compute shared session key as:

K
K
AB
AB
= y
= y
B
B
x
x
A
A
mod 353 =
mod 353 =
248
248
97
97
= 160
= 160
(Alice)
(Alice)

K

K
AB
AB
= y
= y
A
A
x
x
B
B
mod 353 =
mod 353 =
40
40
233
233
= 160
= 160
(Bob)
(Bob)

Key Exchange Protocols
Key Exchange Protocols

users could create random
users could create random
private/public D-H keys each time
private/public D-H keys each time
they communicate

they communicate

users could create a known
users could create a known
private/public D-H key and publish
private/public D-H key and publish
in a directory, then consulted and
in a directory, then consulted and
used to securely communicate with
used to securely communicate with
them
them

both of these are vulnerable to a
both of these are vulnerable to a
meet-in-the-Middle Attack
meet-in-the-Middle Attack

authentication of the keys is needed
authentication of the keys is needed

Elliptic Curve Cryptography
Elliptic Curve Cryptography

majority of public-key crypto (RSA, D-H)
majority of public-key crypto (RSA, D-H)
use either integer or polynomial
use either integer or polynomial
arithmetic with very large
arithmetic with very large

numbers/polynomials
numbers/polynomials

imposes a significant load in storing
imposes a significant load in storing
and processing keys and messages
and processing keys and messages

an alternative is to use elliptic curves
an alternative is to use elliptic curves

offers same security with smaller bit
offers same security with smaller bit
sizes
sizes

newer, but not as well analysed
newer, but not as well analysed

Real Elliptic Curves
Real Elliptic Curves

an
an
elliptic curve is defined by an
elliptic curve is defined by an
equation in two variables x & y,
equation in two variables x & y,
with coefficients
with coefficients


consider a cubic elliptic curve of
consider a cubic elliptic curve of
form
form

y
y
2
2
=
=
x
x
3
3
+
+
ax
ax
+
+
b
b

where x,y,a,b are all real numbers
where x,y,a,b are all real numbers

also define zero point O
also define zero point O


have addition operation for elliptic
have addition operation for elliptic
curve
curve

geometrically sum of Q+R is reflection of intersection
geometrically sum of Q+R is reflection of intersection
R
R

Real Elliptic Curve Example
Real Elliptic Curve Example

Finite Elliptic Curves
Finite Elliptic Curves

Elliptic curve cryptography uses
Elliptic curve cryptography uses
curves whose variables &
curves whose variables &
coefficients are finite
coefficients are finite

have two families commonly used:
have two families commonly used:

prime curves
prime curves
E

E
p
p
(a,b)
(a,b)
defined over Z
defined over Z
p
p



use integers modulo a prime
use integers modulo a prime

best in software
best in software

binary curves
binary curves
E
E
2
2
m
m
(a,b)
(a,b)
defined over GF(2
defined over GF(2

n
n
)
)

use polynomials with binary coefficients
use polynomials with binary coefficients

best in hardware
best in hardware

Elliptic Curve Cryptography
Elliptic Curve Cryptography

ECC addition is analog of modulo
ECC addition is analog of modulo
multiply
multiply

ECC repeated addition is analog of
ECC repeated addition is analog of
modulo exponentiation
modulo exponentiation

need “hard” problem equiv to discrete
need “hard” problem equiv to discrete
log
log

Q=kP

Q=kP
, where Q,P belong to a prime curve
, where Q,P belong to a prime curve

is “easy” to compute Q given k,P
is “easy” to compute Q given k,P

but “hard” to find k given Q,P
but “hard” to find k given Q,P

known as the elliptic curve logarithm problem
known as the elliptic curve logarithm problem

Certicom example:
Certicom example:
E
E
23
23
(9,17)
(9,17)


×