You are on page 1of 2

Title: Diffie-H ellm a n ( D-H ) k ey ex c h a n g e c a lc u la tio n s

T e c h n o lo g y : S e c u r ity : I P S e c V P N
R e la te d C o u r s e s : I I N S , S N R S , S N A F a n d S N A A
S u b m itte d b y P a t L a o (R & S C C IE /C C S P /C IS S P /C C S I) fro m
D H is a
o th e r to
k e y c a n
L e a rn m
T h e D
m e th o
N e tw o
k e y e x

c ry p to
jo in tly
th e n b
o re a b

i f f i e -H
d s .T h
rk s (V
c h a n g

W h itfie ld
fro m th e d
a lg o rith m
m o d e rn k e
D E S ,3 D E
In
fir
b e
n u
o w
its

o rd e
st n u
m a d
m b e
n se
p u b

g ra p
e s ta
e u se
o u t D

h ic p
b lis h
d to
H b

e llm a n (D H
e In te rn e t K
P N s) u se s D
e o v e r u n tru

D iffie a n d M
iffic u lty o f c
p ro v id e s s e c
y m a n a g e m e
S o r A E S

ro to c o l
a sh a re
e n c ry p t
y re a d in
) a
e y
H
s te

th a t a llo
d se c re t
su b se q u
g th is s h

w s
k e y
e n t
o rt

tw o
o v
c o m
p a p

L e a rn in g @ C is c o

p a rtie s th a t h a v e n o p rio r k n o w le d g e o f e a c h
e r a n in s e c u r e c o m m u n ic a tio n s c h a n n e l.T h is
m u n ic a tio n s u s in g a s y m m e tric k e y c ip h e r.
e r o n it!

lg o rith m is th e b a s is o f m o s t m o d e rn a u to m a tic k e y e x c h a n g e
E x c h a n g e (IK E ) p ro to c o l in IP S e c u rity (IP s e c ) V irtu a l P riv a te
a lg o rith m s e x te n s iv e ly to p ro v id e a re lia b le a n d tru s te d m e th o d fo r
d c h a n n e ls .

a rtin H e llm a n in v e
a lc u la tin g th e d is c r
u re k e y e x c h a n g e o
n t to p ro v id e k e y in

n te
e te
v e r
g m

r to s ta r t a D H e x c h a n g e ,th e tw o p a
m b e r i s g, t h e g e n e r a t o r , a n d t h e s e c
e p u b lic a n d a re u s u a lly c h o s e n fro m
r ,s u c h a s 2 ,3 ,a n d 4 ,a n d pis a v e r y
c r e t v a l u e . T h e n , b a s e d o n g, p, a n d
lic v a lu e .T h e p u b lic v a lu e is c o m p u

d th
lo g
in s
a te

e D H
a rith m
e c u re
ria l fo

rtie s m u s t
o n d n u m b
a ta b le o
la rg e p rim
th e s e c re t
te d a c c o rd

a lg o
s o f
c h a n
r o th

rith m
v e ry
n e ls
e r sy

in 1 9 7 6
la rg e n u
a n d is fr
m m e tric

a g re e o n tw o n
e r i s p, t h e m o d
f k n o w n v a lu e s
e n u m b e r .N e x
v a lu e o f e a c h p
in g to th e fo llo

.Its
m b e
e q u e
a lg o

o n se c re t
u lu s .T h
.gis u s u
t,e v e r y
a r ty ,e a c
w in g fo r

se c u r
r s .T h
n tly u
rith m

ity s te m s
e D H
s e d in
s ,s u c h a s

n u m b e r s .T h e
e se n u m b e rs c a n
a lly a v e ry s m a ll
p a rty g e n e ra te s its
h p a rty c a lc u la te s
m u la :

Y=gxm o d p
In th is f o r m u la xis th e s e c r e t v a lu e o f th e e n tity ,a n d Yis th e p u b lic v a lu e o f th e e n tity .
A fte r c o
th e n e x p
s h a r e d -s
w h ic h th
N o
k n o
c o m
th e

m p u tin g th
o n e n tia te s
e c re t v a lu e
e y h a v e c o

o n e lis te n
w n ;a t le a
p u te th e
sh a re d se

e p
th e
.W
m p

u b lic
re c e
h e n
u te d

v a
iv e
th e
fro

lu
d
a
m

e s ,th e
p u b lic
lg o rith
th e ir

tw o
v a lu
m c o
se c re

p a r
e w
m p
t v a

tie s
ith
le te
lu e

e x c h a n g e
its s e c re t v
s ,b o th p a r
a n d th e p u

th e ir p u b
a lu e to c
tie s h a v e
b lic v a lu

lic v
o m p
th e
e o f

a lu
u te
sa m
th e

e s
a
e
o

.E a
c o m
sh a
th e r

c h p a rty
m o n
re d s e c re t,
p a rty .

i n g o n t h e c h a n n e l c a n c o m p u t e t h e s e c r e t v a l u e , b e c a u s e o n l y g, p, YA a n d YB a r e
s t o n e s e c r e t v a lu e is n e e d e d to c a lc u la te th e s h a r e d s e c r e t.U n le s s th e a tta c k e r c a n
d i s c r e t e a l g o r i t h m o f t h e a b o v e e q u a t i o n t o r e c o v e r X A o r X B, t h e y c a n n o t o b t a i n
c re t.

DH Exchange
Alice

Private Value, XA
Pub lic Value, Y A

YA =g

XA

Private Value, XB
Pub lic Value, YB
XB

m o d p

YB = g

YA

XA

YB m o d p = zz

XB

YB

YA

B o b

m o d p

m o d p = zz

(B o b calculated)

(Alice calculated)

zz = s h a r e d s e c r e t = g

XA XB

m o d p

T h e fo llo w in g s te p s d e s c rib e a D H e x c h a n g e :
Step 1

A l i c e a n d B o b a g r e e o n g e n e r a t o r g a n d m o d u l u s p.

Step 2

A lic e c h o o s e s a ra n d o m
YA= gx( A) m o d p.

Step 3
Step 4
Step 5
Step 6

B o b c h o o se s a ra n d o m
YB=gx( B) m o d p.

l a r g e i n t e g e r XA a n d s e n d s B o b i t s p u b l i c v a l u e , YA w h e r e
l a r g e i n t e g e r X B a n d s e n d s A l i c e h i s p u b l i c v a l u e , Y B, w h e r e

A l i c e c o m p u t e s k=YBx( A)m o d p.

B o b c o m p u t e s k =YAx( B) m o d p.

B o t h k a n d k a r e t h e e q u a l t o gx(A)x

(B)

m o d p.

A l i c e a n d B o b n o w h a v e a s h a r e d s e c r e t ( k= k ) a n d e v e n i f s o m e o n e h a s l i s t e n e d o n t h e
u n tr u s te d c h a n n e l,th e r e is n o w a y th e y c o u ld c o m p u te th e s e c r e t f r o m th e c a p tu r e d
i n f o r m a t i o n , a s s u m i n g t h a t c o m p u t i n g a d i s c r e t e l o g a r i t h m o f YA o r YB i s p r a c t i c a l l y u n f e a s i b l e .
N o te

More details about the values of g an d p c an be foun d in R F C s 2 4 0 9 an d 3 5 2 6 .

You might also like