• No results found

CN-4.ppt

N/A
N/A
Protected

Academic year: 2020

Share "CN-4.ppt"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

Cryptography and

Cryptography and

Network Security

Network Security

Chapter 10

Chapter 10

Fourth Edition Fourth Edition by William Stallings by William Stallings

(2)

Chapter 10 –

Chapter 10 –

Key Management;

Key Management;

Other Public Key Cryptosystems

Other Public Key Cryptosystems

No Singhalese, whether man or woman, would No Singhalese, whether man or woman, would

venture out of the house without a bunch of keys venture out of the house without a bunch of keys in his hand, for without such a talisman he would in his hand, for without such a talisman he would fear that some devil might take advantage of his fear that some devil might take advantage of his

weak state to slip into his body. weak state to slip into his body.

(3)

Key Management

Key Management

 public-key encryption helps address public-key encryption helps address key key

distribution problems distribution problems

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

 distribution of public keysdistribution of public keys

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

(4)

Distribution of Public Keys

Distribution of Public Keys

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

 public announcementpublic announcement

 publicly available directorypublicly available directory

 public-key authoritypublic-key authority

(5)

Public Announcement

Public Announcement

 users distribute public keys to recipients or users distribute public keys to recipients or

broadcast to community at large broadcast to community at large

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

post to news groups or email list  major weakness is forgerymajor weakness is forgery

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

someone else and broadcast it

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

(6)

Publicly Available Directory

Publicly Available Directory

 can obtain greater security by registering can obtain greater security by registering

keys with a public directory keys with a public directory

 directory must be trusted with properties:directory must be trusted with properties:  contains {name,public-key} entriescontains {name,public-key} entries

 participants register securely with directoryparticipants register securely with directory

 participants can replace key at any timeparticipants can replace key at any time

 directory is periodically publisheddirectory is periodically published

 directory can be accessed electronicallydirectory can be accessed electronically

(7)

Public-Key Authority

Public-Key Authority

 improve security by tightening control over improve security by tightening control over

distribution of keys from directory distribution of keys from directory

 has properties of directoryhas properties of directory

 and requires users to know public key for and requires users to know public key for

the directory the directory

 then users interact with directory to obtain then users interact with directory to obtain

any desired public key securely any desired public key securely

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

(8)
(9)

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 authoritypublic-key authority

 a certificate a certificate binds binds identityidentity to to public keypublic key  usually with other info such as period of usually with other info such as period of

validity, rights of use etc validity, rights of use etc

 with all contents with all contents signedsigned 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

(10)
(11)

Public-Key D

Public-Key D

istribution of Secret

istribution of Secret

Keys

Keys

 use previous methods to obtain public-keyuse previous methods to obtain public-key  can use for secrecy or authenticationcan use for secrecy or authentication

 but public-key algorithms are slowbut 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 keyhence need a session key

 have several alternatives for negotiating a have several alternatives for negotiating a

(12)

Simple Secret Key

Simple Secret Key

Distribution

Distribution

 proposed by Merkle in 1979proposed by Merkle in 1979

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

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

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

encrypted using the supplied public key  A decrypts the session key and both useA decrypts the session key and both use

 problem is that an opponent can intercept problem is that an opponent can intercept

(13)

Public-Key Distribution of Secret

Public-Key Distribution of Secret

Keys

Keys

(14)

Hybrid Key Distribution

Hybrid Key Distribution

 retain use of private-key KDCretain use of private-key KDC

 shares secret master key with each usershares secret master key with each userdistributes session key using master keydistributes session key using master key

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

 especially useful with widely distributed usersespecially useful with widely distributed users

 rationalerationale

 performanceperformance

(15)

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 the by Diffie & Hellman in 1976 along with the

exposition of public key concepts exposition of public key concepts

 note: now know that note: now know that WilliamsonWilliamson (UK CESG) (UK CESG) secretly proposed the concept in 1970

secretly proposed the concept in 1970

 is a practical method for public exchange is a practical method for public exchange

of a secret key of a secret key

(16)

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) field based on exponentiation in a finite (Galois) field (modulo a prime or a polynomial) - easy

(modulo a prime or a polynomial) - easy

 security relies on the difficulty of computing security relies on the difficulty of computing

(17)

Diffie-Hellman Setup

Diffie-Hellman Setup

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

 large prime integer or polynomial large prime integer or polynomial qq  aa being a primitive root mod being a primitive root mod qq

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

 chooses a secret key (number): chooses a secret key (number): xx

A

A < q < q

 compute their compute their public keypublic key: : yy

A

A = = aa

x

xAA

mod q

mod q

(18)

Diffie-Hellman Key Exchange

Diffie-Hellman Key Exchange

shared session key for users A & B is Kshared session key for users A & B is K

AB

AB: : K

KABAB = = aaxxA.A.xxBB mod q mod q

= y

= yAAxxBB mod q (which mod q (which BB can compute) can compute)

= y

= yBBxxAA mod q (which mod q (which AA can compute) can compute)

KK

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, they if Alice and Bob subsequently communicate, they will have the

will have the samesame key as before, unless they key as before, unless they choose new public-keys

choose new public-keys

(19)

Diffie-Hellman Example

Diffie-Hellman Example

 users Alice & Bob who wish to swap keys:users Alice & Bob who wish to swap keys:  agree on prime agree on prime q=353q=353 and and aa=3=3

 select random secret keys:select random secret keys:

 A chooses A chooses xx

A

A=97, =97, B chooses B chooses xxBB=233=233

 compute respective public keys:compute respective public keys:

yy

A

A==33

97

97

mod 353 = 40

mod 353 = 40 (Alice)(Alice) 

y

yBB==33233233 mod 353 = 248 mod 353 = 248 (Bob)(Bob)

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

K

KABAB= y= yBBxxAA mod 353 = mod 353 = 2482489797 = 160 = 160 (Alice)(Alice)

K

(20)

Key Exchange Protocols

Key Exchange Protocols

 users could create random private/public users could create random private/public

D-H keys each time they communicate D-H keys each time they communicate

 users could create a known private/public users could create a known private/public

D-H key and publish in a directory, then D-H key and publish in a directory, then

consulted and used to securely consulted and used to securely

communicate with them communicate with them

 both of these are vulnerable to a meet-in-both of these are vulnerable to a

meet-in-the-Middle Attack the-Middle Attack

(21)

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 arithmetic use either integer or polynomial arithmetic

with very large numbers/polynomials with very large numbers/polynomials

 imposes a significant load in storing and imposes a significant load in storing and

processing keys and messages processing keys and messages

 an alternative is to use elliptic curvesan alternative is to use elliptic curves

(22)

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, with equation in two variables x & y, with

coefficients coefficients

 consider a cubic elliptic curve of formconsider a cubic elliptic curve of formyy22 = = xx33 + + ax ax + + bb

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

 also define zero point Oalso define zero point O

 have addition operation for elliptic curvehave addition operation for elliptic curve  geometrically sum of Q+R is reflection of geometrically sum of Q+R is reflection of

(23)
(24)

Finite Elliptic Curves

Finite Elliptic Curves

 Elliptic curve cryptography uses curves Elliptic curve cryptography uses curves

whose variables & coefficients are finite whose variables & coefficients are finite

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

 prime curves prime curves EE

p

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

• use integers modulo a primeuse integers modulo a prime

• best in softwarebest in software

 binary curves binary curves EE

2

2mm(a,b)(a,b) defined over GF(2 defined over GF(2nn))

• use polynomials with binary coefficientsuse polynomials with binary coefficients

(25)

Elliptic Curve Cryptography

Elliptic Curve Cryptography

 ECC addition is analog of modulo multiplyECC addition is analog of modulo multiply  ECC repeated addition is analog of modulo ECC repeated addition is analog of modulo

exponentiation exponentiation

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

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

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

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

 known as the elliptic curve logarithm problemknown as the elliptic curve logarithm problem

Certicom example: Certicom example: EE

23

(26)

ECC Diffie-Hellman

ECC Diffie-Hellman

 can do key exchange analogous to D-Hcan do key exchange analogous to D-Husers select a suitable curve users select a suitable curve EE

p

p(a,b)(a,b)

select base point select base point G=(xG=(x

1

1,y,y11))

 with large order n s.t. with large order n s.t. nG=OnG=O  A & B select private keys A & B select private keys nn

A

A<n, n<n, nBB<n<n

compute public keys: compute public keys: PP

A

A=n=nAAG, G, PPBB=n=nBBGG

compute shared key: compute shared key: KK=n=n

A

APPBB,, KK=n=nBBPPAA

 same since same since KK=n=n

A

(27)

ECC Encryption/Decryption

ECC Encryption/Decryption

 several alternatives, will consider simplestseveral alternatives, will consider simplest

 must first encode any message M as a point on must first encode any message M as a point on the elliptic curve P

the elliptic curve Pmm

 select suitable curve & point G as in D-Hselect suitable curve & point G as in D-H

 each user chooses private key each user chooses private key nnAA<n<n  and computes public key and computes public key PP

A

A=n=nAAGG

 to encrypt Pto encrypt Pmm : : CCmm={kG, P={kG, Pmm+kP+kPbb}}, k random, k random  decrypt Cdecrypt Cmm compute: compute:

P

(28)

ECC Security

ECC Security

 relies on elliptic curve logarithm problemrelies on elliptic curve logarithm problem

 fastest method is “Pollard rho method”fastest method is “Pollard rho method”  compared to factoring, can use much compared to factoring, can use much

smaller key sizes than with RSA etc smaller key sizes than with RSA etc

 for equivalent key lengths computations for equivalent key lengths computations

are roughly equivalent are roughly equivalent

 hence for similar security ECC offers hence for similar security ECC offers

(29)

Comparable Key Sizes for

Comparable Key Sizes for

Equivalent Security

Equivalent Security

Symmetric scheme

(key size in bits)

ECC-based scheme

(size of n in bits)

RSA/DSA

RSA/DSA

(modulus size in bits)

56

56 112 512

80 160 1024

112 224 2048

128 256 3072

192 384 7680

(30)

Summary

Summary

 have considered:have considered:

 distribution of public keysdistribution of public keys

 public-key distribution of secret keyspublic-key distribution of secret keys

 Diffie-Hellman key exchangeDiffie-Hellman key exchange

References

Related documents

In this consideration of individual authors and their experiences and representations of specific Gothic abbey sites, my study demonstrates the usefulness of sustained

immigration policies and initiates several programs, including a revised border security policy for the Southwest border; deferred action programs for some unauthorized

The present study will offer a novel behavioural perspective in examining consumer confusion in retail settings. It will demonstrate the way to explore consumer

The percentage of subjects consuming alcohol remained same in day workers but in shift workers it increased to 61.7 per cent after taking up the job and the quantity of

l  Instead, modern encryption depends on open (public) algorithms and secret (private) keys. l  Number theory offers a way to

In order to explain the adhesion phenomenon and biofilm formation, cell surface properties of cells grown in artificial saliva growth medium without and with subMIC concentrations

Public key systems use a mathematically matched pair of keys for encryption and decryption: a public key to encrypt content data and a private key to decrypt the data.. The public