chapter 8: network security - plone sitesangio/so_currentaa/luc_so/security/... · 2014-05-05 ·...

53
8-2 Network Security Chapter 8: Network Security Chapter goals: understand principles of network security: cryptography and its many uses beyond “confidentiality” authentication message integrity security in practice: firewalls and intrusion detection systems security in application, transport, network, link layers

Upload: others

Post on 28-Jun-2020

3 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

Ne

two

rk S

ecu

rity

Chap

ter

8: N

etw

ork

Sec

uri

ty

Cha

pte

r go

als:

under

stan

dpri

nci

ple

sof net

work

sec

uri

ty:

cr

ypto

grap

hy a

nd

its

man

yuse

sbey

ond

“confiden

tial

ity”

au

then

tica

tion

m

essa

ge inte

grity

se

curi

tyin

pra

ctic

e:

fire

wal

lsan

din

trusi

on d

etec

tion s

yste

ms

se

curi

ty in a

pplic

atio

n,t

ransp

ort

,net

work

,lin

k la

yers

Page 2: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

Ne

two

rk S

ecu

rity

Chap

ter

8 r

oad

map

8.1

Wha

tis n

etw

ork

secu

rity

?

8.2

Pri

nci

ple

sof cr

ypto

grap

hy

8.3

Mes

sage

inte

grity,

auth

entica

tion

8.4

Sec

uri

ng

e-m

ail

8.5

Secu

ring

TC

Pco

nnec

tions:

SSL

8.6

Net

work

lay

er s

ecuri

ty:I

Pse

c

8.7

Secu

ring

wir

eles

sLA

Ns

8.8

Oper

atio

nal

secu

rity

:fire

wal

lsan

dID

S

Page 3: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

Ne

two

rk S

ecu

rity

What

is

net

work

sec

uri

ty?

confi

dent

ialit

y:only

sen

der

,inte

nded

rece

iver

should

“under

stan

d”

mes

sage

conte

nts

se

nder

encr

ypts

mes

sage

re

ceiv

er d

ecry

pts

mes

sage

auth

entic

atio

n:se

nder

,rec

eive

r w

ant

toco

nfirm

iden

tity

of

each

oth

er

mes

sage

inte

grity

:sen

der

,rec

eive

r w

ant

toen

sure

mes

sage

not

alte

red

(in t

ransi

t,or

afte

rwar

ds)

without

det

ection

acce

ss a

ndav

aila

bilit

y:se

rvic

esm

ust

be

acce

ssib

le a

nd

avai

lable

to

use

rs

Page 4: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-5

Ne

two

rk S

ecu

rity

Frie

nds

and e

nem

ies:

Alic

e, B

ob,

Trudy

w

ell-kn

ow

n in n

etw

ork

sec

uri

ty w

orl

d

B

ob,A

lice

(love

rs!)

wan

t to

com

munic

ate

“sec

ure

ly”

Tr

udy

(intr

uder

)m

ay inte

rcep

t,del

ete,a

dd

mes

sage

s

se

cu

re

se

nd

er

sse

cu

re

rece

ive

r

ch

an

ne

ld

ata

, co

ntr

ol

me

ssa

ge

s

da

tad

ata

Alic

eB

ob

Tru

dy

Page 5: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-6

Ne

two

rk S

ecu

rity

Who m

ight

Bob,A

lice

be?

wel

l,re

al-li

feB

obs

and

Alic

es!

W

eb b

row

ser/

serv

er for

elec

tronic

tran

sact

ions

(e.g

.,on-lin

e purc

has

es)

on-lin

e ban

king

clie

nt/

serv

er

DN

Sse

rver

s

route

rsex

chan

ging

routing

table

updat

es

oth

er e

xam

ple

s?

Page 6: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-7

Ne

two

rk S

ecu

rity

Ther

e ar

e bad

guys

(an

d g

irls

) out

ther

e!

Q:W

hat

can a

“bad

guy”

do?

A:A

lot!

See

sec

tion 1

.6

ea

vesd

rop:

inte

rcep

tm

essa

ges

ac

tive

lyin

sert

mes

sage

sin

toco

nnec

tion

im

pers

onat

ion:

can fak

e (s

poof)

sourc

e ad

dre

ssin

pac

ket

(or

any

fiel

din

pac

ket)

hi

jack

ing:

“tak

e ove

r”ongo

ing

connec

tion b

yre

movi

ng

sender

or

rece

iver

,inse

rtin

ghim

self

in

pla

ce

de

nial

of s

ervi

ce:p

reve

nt

serv

ice

from

bei

ng

use

dby

oth

ers

(e.g

.,by

ove

rload

ing

reso

urc

es)

Page 7: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-8

Ne

two

rk S

ecu

rity

Chap

ter

8 r

oad

map

8.1

What

isnet

work

sec

uri

ty?

8.2

Princ

iple

s of

cry

ptog

raph

y

8.3

Mes

sage

inte

grity,

auth

entica

tion

8.4

Sec

uri

ng

e-m

ail

8.5

Secu

ring

TC

Pco

nnec

tions:

SSL

8.6

Net

work

lay

er s

ecuri

ty:I

Pse

c

8.7

Secu

ring

wir

eles

sLA

Ns

8.8

Oper

atio

nal

secu

rity

:fire

wal

lsan

dID

S

Page 8: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-9

Ne

two

rk S

ecu

rity

The

langu

age

of cr

ypto

grap

hy

mpla

inte

xt

mes

sage

KA(m

)ci

pher

text,

encr

ypte

dw

ith k

ey K

A

m =

KB(K

A(m

))

pla

inte

xt

pla

inte

xt

cip

hert

ext

KA

en

cry

ption

alg

ori

thm

de

cry

ptio

n

alg

ori

thm

Alic

e’s

en

cry

ption

ke

y

Bo

b’s

de

cry

ptio

n

ke

yK

B

Page 9: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

0N

etw

ork

Se

cu

rity

Bre

akin

g an

encr

yption s

chem

e

ci

pher

-tex

t only

atta

ck:

Trudy

has

cipher

text

she

can a

nal

yze

tw

oap

pro

aches

:

bru

te forc

e:se

arch

th

rough

all

keys

st

atis

tica

lan

alys

is

kn

ow

n-p

lain

text

atta

ck:

Trudy

has

pla

inte

xt

corr

espondin

gto

cipher

text

e.g

.,in

monoal

phab

etic

cipher

,Tru

dy

det

erm

ines

pai

rings

for

a,l,i

,c,e

,b,o

,

ch

ose

n-p

lain

text

atta

ck:

Trudy

can g

et c

ipher

text

for

chose

n p

lain

text

Page 10: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

1N

etw

ork

Se

cu

rity

Sym

met

ric

key

cryp

togr

aphy

sym

met

ric

key

cryp

to:B

ob a

nd

Alic

e sh

are

sam

e (s

ymm

etri

c)ke

y:K

e.g

.,ke

y is

know

ing

subst

itution p

atte

rn in m

ono

alphab

etic

su

bst

itution c

ipher

Q:h

ow

do

Bob a

nd

Alic

e ag

ree

on k

ey v

alue?

pla

inte

xt

cip

hert

ext

KS

en

cry

ption

alg

ori

thm

de

cry

ptio

n

alg

orith

m

S

KS

pla

inte

xt

me

ssa

ge

,m

K(m

)S

m=

KS(K

S(m

))

Page 11: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

2N

etw

ork

Se

cu

rity

Sim

ple

encr

yption s

chem

e

subs

titut

ion

ciph

er:s

ubst

ituting

one

thin

gfo

r an

oth

er

monoal

phab

etic

cipher

:subst

itute

one

lett

er for

anoth

er

plaintext: abcdefghijklmnopqrstuvwxyz

ciphertext: mnbvcxzasdfghjklpoiuytrewq

Plaintext: bob. i love you. alice

ciphertext: nkn. s gktc wky. mgsbc

e.g

.: ncry

ptio

nke

y:m

appin

gfr

om

set

of 26 let

ters

tose

tof 26 let

ters

Page 12: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

3N

etw

ork

Se

cu

rity

A m

ore

sophis

tica

ted e

ncr

yption a

ppro

ach

n s

ubst

itution c

ipher

s,M

1,M

2,…

,Mn

cy

clin

gpat

tern

:

e.g

.,n=

4:M

1,M

3,M

4,M

3,M

2;

M1,M

3,M

4,M

3,M

2;..

fo

r ea

ch n

ewpla

inte

xt

sym

bol,

use

subse

quen

tsu

bsi

tution p

atte

rn in c

yclic

pat

tern

dog:

dfr

om

M1,o

from

M3,g

from

M4

Enc

rypt

ion

key:

n s

ubst

itution c

ipher

s,an

dcy

clic

pat

tern

ke

y nee

dnot

be

just

n-b

it p

atte

rn

Page 13: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

4N

etw

ork

Se

cu

rity

Sym

met

ric

key

cryp

to: D

ES

DES:

Dat

aEncr

yption S

tandar

d

US

encr

yption s

tandar

d[N

IST

1993]

56-b

it s

ymm

etri

c ke

y,64-b

it p

lain

text

input

blo

ck c

ipher

with c

ipher

blo

ck c

hai

nin

g

how

secu

re is

DES?

D

ES

Chal

lenge

:56-b

it-k

ey-e

ncr

ypte

dphra

se

dec

rypte

d(b

rute

forc

e)in

les

sth

an a

day

no

know

n g

ood

anal

ytic

att

ack

m

akin

gD

ES

more

sec

ure

:

3D

ES:

encr

ypt

3 t

imes

with 3

diff

eren

t ke

ys

Page 14: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

5N

etw

ork

Se

cu

rity

Sym

met

ric

key

cryp

to: D

ES

initia

lper

muta

tion

16 iden

tica

l“r

ounds”

of

funct

ion a

pplic

atio

n,

each

usi

ng

diff

eren

t 48

bits

of ke

y

final

per

muta

tion

DES

oper

atio

n

Page 15: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

6N

etw

ork

Se

cu

rity

AES:

Adva

nce

d E

ncr

yption S

tandar

d

sy

mm

etri

c-ke

yN

IST

sta

ndar

d,r

epla

cied

DES

(Nov

2001)

pro

cess

esdat

ain

128 b

itblo

cks

128,1

92,o

r 256 b

itke

ys

bru

te forc

e dec

ryption (

try

each

key

)ta

king

1 s

econ D

ES,

take

s149 t

rilli

on y

ears

for

AES

Page 16: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

7N

etw

ork

Se

cu

rity

Public

Key

Cry

pto

grap

hy

sym

met

ric

key

cryp

to

requir

esse

nder

,rec

eive

rkn

ow

shar

edse

cret

key

Q

:how

toag

ree

on k

eyin

firs

tpla

ce (

par

ticu

larl

y if

nev

er “

met

”)?

publ

icke

y cr

ypto

ra

dic

ally

diff

eren

tap

pro

ach [

Diffi

e-H

ellm

an76,R

SA78]

se

nder

,rec

eive

r do

not

shar

e se

cret

key

pub

licen

cryp

tion k

ey

know

n t

oal

l

priva

tedec

ryption k

eykn

ow

n o

nly

to

rece

iver

Page 17: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

8N

etw

ork

Se

cu

rity

Public

key

cry

pto

grap

hy

pla

inte

xt

me

ssa

ge

,m

cip

hert

ext

en

cry

ption

alg

ori

thm

de

cry

ptio

n

alg

orith

m

Bo

b’s

pu

blic

ke

y p

lain

text

me

ssa

ge

K(m

)B+

KB+

Bo

b’s

pri

va

te

ke

y

KB-

m=

K(K

(m))

B+

B-

Page 18: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-1

9N

etw

ork

Se

cu

rity

Public

key

encr

yption a

lgori

thm

s

ne

ed

K(

)a

nd

K(

)su

ch

th

at

BB

..

giv

en

pu

blic

ke

y K

,it

sh

ou

ld b

e

imp

ossib

le t

o c

om

pute

priva

te

ke

y K

B

B

requir

emen

ts:

1 2 RSA

:Riv

est,

Sham

ir,A

del

son a

lgori

thm

+-

K(K

(m))

=m

BB-

+

+

-

Page 19: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

0N

etw

ork

Se

cu

rity

Pre

requis

ite:

modula

r ar

ithm

etic

x m

od

n =

rem

ainder

of x w

hen

div

ide

byn

fa

cts:

[(a

mod

n)

+ (

b m

od

n)]

mod

n =

(a+

b)

mod

n

[(a

mod

n)

-(b

mod

n)]

mod

n =

(a-

b)

mod

n

[(a

mod

n)

* (b

mod

n)]

mod

n =

(a*

b)

mod

n

th

us

(am

od

n)d

mod

n =

adm

od

n

exam

ple

:x=

14,n

=10,d

=2:

(x m

od

n)d

mod

n =

42

mod

10 =

6x

d=

14

2=

196

xd

mod

10

=6

Page 20: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

1N

etw

ork

Se

cu

rity

RSA

: get

ting

read

y

m

essa

ge:j

ust

abit p

atte

rn

bit p

atte

rn c

an b

e uniq

uel

y re

pre

sente

dby

an inte

ger

num

ber

th

us,

encr

ypting

am

essa

ge is

equiv

alen

t to

encr

ypting

anum

ber

.

exam

ple:

m

= 1

0010001 .T

his

mes

sage

is

uniq

uel

y re

pre

sente

dby

the

dec

imal

num

ber

145.

to

encr

ypt

m,w

e en

cryp

t th

e co

rres

pondin

gnu

mber

,w

hic

h g

ives

anew

num

ber

(th

e ci

pher

text)

.

Page 21: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

2N

etw

ork

Se

cu

rity

RSA

: Cre

atin

g public

/pri

vate

key

pai

r

1.ch

oose

tw

ola

rge

pri

me

num

ber

sp,

q.(e

.g.,

1024 b

its

each

)

2.co

mpute

n=

pq,

z=

(p-1

)(q-

1)

3.ch

oose

e(w

ith

e<n)

that

has

no

com

mon fac

tors

with z

(e,z

are

“rel

ativ

ely

pri

me”

).

4.ch

oose

dsu

ch t

hat

ed-1

isex

actly

div

isib

le b

yz.

(in o

ther

word

s:ed

mod

z=

1 )

.

5.pu

blic

key

is(n

,e).

priv

ate

key

is(n

,d).

KB+

KB-

Page 22: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

3N

etw

ork

Se

cu

rity

RSA

: encr

yption, d

ecry

ption

0.

give

n (

n,e)

and

(n,d

)as

com

pute

dab

ove

1.to

encr

ypt

mes

sage

m(<

n),c

om

pute

c=

mm

od

ne

2.to

dec

rypt

rece

ived

bit

pat

tern

,c,c

om

pute

m=

cm

od

nd

m

=

(m

mo

dn

)e

mo

dn

dm

agic

happ

ens!

c

Page 23: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

4N

etw

ork

Se

cu

rity

RSA

exam

ple

:

Bo

bch

oo

se

s p

=5

,q

=7

.T

he

nn

=3

5,

z=

24

.

e=

5(s

oe

,z

rela

tive

ly p

rim

e).

d=

29

(so

ed

-1e

xa

ctly d

ivis

ible

by z

).

bit

pa

tte

rnm

me

c =

m

mo

dn

e

00

00

l00

01

22

48

32

17

en

cry

pt:

en

cry

ptin

g8

-bit

me

ssa

ge

s.

cm

= c

m

od

nd

17

48

19

68

57

21

06

75

09

15

09

14

11

82

52

23

07

16

97

12

cd

de

cry

pt:

Page 24: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

5N

etw

ork

Se

cu

rity

Why

does

RSA

work

?

m

ust

show

that

cd

mod

n =

m

wher

e c

= m

em

od

n

fa

ct:f

or

any

x a

nd

y:x

ym

od

n =

x(y

mod

z)m

od

n

wher

e n=

pq a

nd z

=(p

-1)(

q-1

)

th

us,

cdm

od

n =

(m

em

od

n)d

mod

n

= m

edm

od

n

= m

(ed

mod

z)m

od

n

= m

1m

od

n

= m

Page 25: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

6N

etw

ork

Se

cu

rity

RSA

: anoth

er im

port

ant

pro

per

ty

The

follo

win

gpro

per

tyw

illbe

very

use

fulla

ter:

K(K

(m))

=m

BB-

+K

(K(m

))B

B+-

=

use

public

key

firs

t,fo

llow

edby

pri

vate

key

use

pri

vate

key

firs

t,fo

llow

edby

public

key

resu

lt is t

he s

ame!

Page 26: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

7N

etw

ork

Se

cu

rity

follo

ws

dir

ectly

from

modula

r ar

ithm

etic

:

(me

mod

n)d

mod

n =

med

mod

n

=m

de

mod

n

=(m

dm

od

n)e

mod

n

K(K

(m))

=m

BB-

+K

(K(m

))B

B+-

=W

hy?

Page 27: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

8N

etw

ork

Se

cu

rity

Why

is

RSA

sec

ure

?

su

ppose

you k

now

Bob’s

public

key

(n,e

).H

ow

har

dis

itto

det

erm

ine

d?

es

sential

lynee

dto

find

fact

ors

of n w

ithout

know

ing

the

two

fact

ors

p a

nd

q

fa

ct:f

acto

ring

abig

num

ber

is

har

d

Page 28: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-2

9N

etw

ork

Se

cu

rity

RSA

in p

ract

ice:

ses

sion k

eys

ex

ponen

tiat

ion in R

SAis

com

puta

tional

lyin

tensi

ve

D

ES

isat

leas

t100 t

imes

fast

er t

han

RSA

use

public

key

cryt

oto

esta

blis

h s

ecure

co

nnec

tion,t

hen

est

ablis

h s

econd

key

sym

met

ric

sess

ion k

ey– for

encr

ypting

dat

a

sess

ion

key,

KS

B

ob a

nd

Alic

e use

RSA

to

exch

ange

asy

mm

etri

c ke

y K

S

once

both

hav

e K

S,th

ey u

se s

ymm

etri

c ke

y cr

ypto

grap

hy

Page 29: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

0N

etw

ork

Se

cu

rity

Chap

ter

8 r

oad

map

8.1

What

isnet

work

sec

uri

ty?

8.2

Pri

nci

ple

sof cr

ypto

grap

hy

8.3

Mes

sage

inte

grity,

auth

entic

atio

n

8.4

Sec

uri

ng

e-m

ail

8.5

Secu

ring

TC

Pco

nnec

tions:

SSL

8.6

Net

work

lay

er s

ecuri

ty:I

Pse

c

8.7

Secu

ring

wir

eles

sLA

Ns

8.8

Oper

atio

nal

secu

rity

:fire

wal

lsan

dID

S

Page 30: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

1N

etw

ork

Se

cu

rity

Auth

entica

tion

Goa

l:B

ob w

ants

Alic

e to

“pro

ve”

her

iden

tity

tohim

Prot

ocol

ap1.0

:A

lice

says

“I a

m A

lice”

Fa

ilure

sce

na

rio

??

“Ia

m A

lice

Page 31: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

2N

etw

ork

Se

cu

rity

ina

ne

two

rk,

Bo

bca

nn

ot“s

ee

”A

lice

,

so

Tru

dy s

imp

ly d

ecla

res

he

rse

lfto

be

Alic

e“I

am

Alic

e”

Auth

entica

tion

Goa

l:B

ob w

ants

Alic

e to

“pro

ve”

her

iden

tity

tohim

Prot

ocol

ap1.0

:A

lice

says

“I a

m A

lice”

Page 32: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

3N

etw

ork

Se

cu

rity

Auth

entica

tion: a

noth

er t

ry

Pro

toco

la

p2

.0:

Alic

esa

ys “

Ia

m A

lice

”in

an

IPp

acke

t

co

nta

inin

gh

er

so

urc

eIP

ad

dre

ss

Fa

ilure

sce

na

rio

??

“Ia

mA

lice

”A

lice

’s

IP a

dd

ress

Page 33: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

4N

etw

ork

Se

cu

rity

Tru

dy c

an

cre

ate

ap

acke

t“s

po

ofin

g”

Alic

e’s

ad

dre

ss

“Ia

mA

lice

”A

lice

’s

IP a

dd

ress

Auth

entica

tion: a

noth

er t

ry

Pro

toco

la

p2

.0:

Alic

esa

ys “

Ia

m A

lice

”in

an

IPp

acke

t

co

nta

inin

gh

er

so

urc

eIP

ad

dre

ss

Page 34: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

5N

etw

ork

Se

cu

rity

Prot

ocol

ap3.0

:A

lice

says

“I a

m A

lice”

and

sends

her

secr

etpas

sword

to“p

rove

”it.

Fa

ilure

sce

na

rio

??

“I’m

Alic

e”

Alic

e’s

IPa

dd

r

Alic

e’s

pa

ssw

ord

OK

Alic

e’s

IPa

dd

r

Auth

entica

tion: a

noth

er t

ry

Page 35: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

6N

etw

ork

Se

cu

rity

pla

yb

ack a

tta

ck:

Tru

dy

reco

rds A

lice

’s p

acke

t

an

dla

ter

pla

ys it

ba

ck t

oB

ob

“I’m

Alic

e”

Alic

e’s

IPa

dd

r

Alic

e’s

pa

ssw

ord

OK

Alic

e’s

IPa

dd

r

“I’m

Alic

e”

Alic

e’s

IPa

dd

r

Alic

e’s

pa

ssw

ord

Prot

ocol

ap3.0

:A

lice

says

“I a

m A

lice”

and

sends

her

secr

etpas

sword

to“p

rove

”it.

Auth

entica

tion: a

noth

er t

ry

Page 36: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

7N

etw

ork

Se

cu

rity

Auth

entica

tion: y

et a

noth

er t

ry

Prot

ocol

ap3.1

:A

lice

says

“I a

m A

lice”

and

sends

her

encr

ypte

dse

cret

pas

sword

to“p

rove

”it.

Fa

ilure

sce

na

rio

??

“I’m

Alic

e”

Alic

e’s

IPa

dd

r

en

cry

pte

d

pa

ssw

ord

OK

Alic

e’s

IPa

dd

r

Page 37: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

8N

etw

ork

Se

cu

rity

reco

rd

an

d

pla

yb

ack

still

wo

rks!

“I’m

Alic

e”

Alic

e’s

IPa

dd

r

en

cry

pte

d

pa

ssw

ord

OK

Alic

e’s

IPa

dd

r

“I’m

Alic

e”

Alic

e’s

IPa

dd

r

en

cry

pte

d

pa

ssw

ord

Auth

entica

tion: y

et a

noth

er t

ry

Prot

ocol

ap3.1

:A

lice

says

“I a

m A

lice”

and

sends

her

encr

ypte

dse

cret

pas

sword

to“p

rove

”it.

Page 38: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-3

9N

etw

ork

Se

cu

rity

Goa

l:av

oid

pla

ybac

k at

tack

Fa

ilure

s,

dra

wb

acks?

nonc

e:num

ber

(R

)use

donly

onc

e-in

-a-li

fetim

e

ap4.0

:to

pro

ve A

lice

“liv

e”,B

ob s

ends

Alic

e no

nce,

R.

Alic

e

must

ret

urn

R,e

ncr

ypte

dw

ith s

har

edse

cret

key

“Ia

m A

lice

R

K

(R)

A-B

Alic

eis

live

,a

nd

on

ly A

lice

kn

ow

s

ke

yto

en

cry

pt

no

nce

,so

itm

ust

be

Alic

e!

Auth

entica

tion: y

et a

noth

er t

ry

Page 39: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

0N

etw

ork

Se

cu

rity

Auth

entica

tion: a

p5.0

ap4.0

req

uir

essh

ared

sym

met

ric

key

ca

n w

e au

then

tica

te u

sing

public

key

tech

niq

ues

?

ap5.0

:use

nonce

,public

key

cryp

togr

aphy

“Ia

m A

lice

RB

ob

co

mp

ute

s

K

(R)

A-

“se

nd

me

yo

ur

pu

blic

ke

y” K A+

(K

(R))

= R

A-K

A+

an

dkn

ow

s o

nly

Alic

e

co

uld

ha

ve

the

priva

te

ke

y,th

at

en

cry

pte

dR

su

ch

tha

t

(K(R

))=

RA-

KA+

Page 40: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

1N

etw

ork

Se

cu

rity

ap5.0

: sec

uri

ty h

ole

man

(or

wom

an)

inth

e m

iddl

e at

tack

:Tru

dy

pose

sas

Alic

e (t

oB

ob)

and

asB

ob (

toA

lice)

I a

m A

lice

I a

m A

lice

R

TK

(

R)

-

Se

nd

me

yo

ur

pu

blic

ke

y TK

+

AK

(

R)

-

Se

nd

me

yo

ur

pu

blic

ke

y

AK

+

TK

(

m)

+

Tm

= K

(K

(

m))

+ T

-T

rud

y g

ets

se

nd

s m

to

Alic

e

en

cry

pte

d w

ith

Alic

e’s

pu

blic

ke

y

AK

(m

)+

Am

= K

(K

(

m))

+ A

-

R

Page 41: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

2N

etw

ork

Se

cu

rity

diffi

cult

todet

ect:

B

ob r

ecei

ves

ever

ythin

gth

at A

lice

sends,

and

vice

ver

sa.

(e.g

.,so

Bob,

Alic

e ca

n m

eet

one

wee

k la

ter

and

reca

llco

nver

sation!)

pro

ble

m is

that

Tru

dy

rece

ives

allm

essa

ges

asw

ell!

ap5.0

: sec

uri

ty h

ole

man

(or

wom

an)

inth

e m

iddl

e at

tack

:Tru

dy

pose

sas

Alic

e (t

oB

ob)

and

asB

ob (

toA

lice)

Page 42: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

3N

etw

ork

Se

cu

rity

Chap

ter

8 r

oad

map

8.1

What

isnet

work

sec

uri

ty?

8.2

Pri

nci

ple

sof cr

ypto

grap

hy

8.3

Mes

sage

inte

grity

,auth

entica

tion

8.4

Sec

uri

ng

e-m

ail

8.5

Secu

ring

TC

Pco

nnec

tions:

SSL

8.6

Net

work

lay

er s

ecuri

ty:I

Pse

c

8.7

Secu

ring

wir

eles

sLA

Ns

8.8

Oper

atio

nal

secu

rity

:fire

wal

lsan

dID

S

Page 43: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

4N

etw

ork

Se

cu

rity

Dig

ital

sig

nat

ure

s

cryp

togr

aphic

tech

niq

ue

anal

ogo

us

tohan

d-w

ritt

en

sign

ature

s:

sender

(Bob)

dig

ital

ly s

igns

docu

men

t, e

stab

lishin

g he

is d

ocu

men

t ow

ner

/cre

ator.

ve

rifia

ble,

non

forg

eabl

e:re

cipie

nt

(Alic

e) c

an p

rove

to

som

eone

that

Bob,

and

no

one

else

(incl

udin

g A

lice)

,m

ust

hav

e si

gned

docu

men

t

Page 44: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

5N

etw

ork

Se

cu

rity

sim

ple

dig

ital

sign

ature

for

mes

sage

m:

B

ob s

igns

m b

y en

cryp

ting

with h

ispri

vate

key

KB,

crea

ting

“sig

ned

”m

essa

ge,K

B(m

)-

-

De

ar

Alic

e

Oh

,ho

wI

ha

ve

mis

se

d

yo

u.

Ith

ink o

fyo

ua

llth

e

tim

e!

…(b

lah

bla

h b

lah

)

Bo

b

Bo

b’s

me

ssa

ge

,m

Pu

blic

key

en

cry

ption

alg

orith

m

Bo

b’s

priva

te

ke

y

KB-

Bo

b’s

me

ssa

ge

,

m, sig

ne

d

(en

cry

pte

d)

with

his

pri

va

te k

ey

m,K

B-(m

)

Dig

ital

sig

nat

ure

s

Page 45: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

6N

etw

ork

Se

cu

rity

-

Alic

e th

us

veri

fies

that

:

Bob s

igned

m

no

one

else

sig

ned

m

Bob s

igned

m a

nd

not

m‘

non-r

epudia

tion:

A

lice

can t

ake

m,a

nd

sign

ature

KB(m

)to

court

and

pro

ve t

hat

Bob s

igned

m

-

Dig

ital

sig

nat

ure

s

suppose

Alic

e re

ceiv

esm

sgm

,with s

ignat

ure

:m,K

B(m

)

A

lice

veri

fies

m s

igned

by

Bob b

y ap

ply

ing

Bob’s

public

key

KB

toK

B(m

)th

en c

hec

ksK

B(K

B(m

))

= m

.

If K

B(K

B(m

))

= m

,whoev

er s

igned

m m

ust

hav

e use

dB

ob’s

pri

vate

key

.

-

--

+

++

Page 46: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

7N

etw

ork

Se

cu

rity

Mes

sage

dig

ests

com

puta

tional

ly e

xpen

sive

to

public

-key

-encr

ypt

long

mes

sage

s

goal

:fixe

d-len

gth,e

asy-

to-

com

pute

dig

ital

“finge

rpri

nt”

ap

ply

has

h funct

ion H

to

m,

get

fixe

dsi

ze m

essa

gedig

est,

H(m

).

Has

h funct

ion p

roper

ties

:

m

any-

to-1

pro

duce

sfixe

d-s

ize

msg

dig

est

(finge

rpri

nt)

gi

ven m

essa

ge d

iges

t x,

com

puta

tional

ly infe

asib

le t

ofind

m s

uch

that

x =

H(m

)

larg

e

me

ssa

ge

m

H:

Ha

sh

Fu

nctio

n

H(m

)

Page 47: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

8N

etw

ork

Se

cu

rity

Inte

rnet

chec

ksum

: poor

cryp

to h

ash funct

ion

Inte

rnet

chec

ksum

has

som

e pro

per

ties

of has

h funct

ion:

pro

duce

sfixe

dle

ngt

h d

iges

t (1

6-b

it s

um

)of m

essa

ge

ism

any-

to-o

ne

But

give

n m

essa

ge w

ith g

iven

has

h v

alue,i

t is

easy

to

find

anoth

er

mes

sage

with s

ame

has

h v

alue:

IO

U1

00

.9

9B

OB

49

4F

55

31

30

30

2E

39

39

42

D2

42

me

ssa

ge

AS

CII

form

at

B2

C1

D2

AC

IO

U9

00

.1

9B

OB

49

4F

55

39

30

30

2E

31

39

42

D2

42

me

ssa

ge

AS

CII

form

at

B2

C1

D2

AC

diffe

ren

tm

essag

es

bu

tid

en

tica

lch

ecksu

ms!

Page 48: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-4

9N

etw

ork

Se

cu

rity

larg

em

essa

ge

mH

(m)

Bo

b’s

pri

va

te

ke

y

KB-

+

Bob s

ends

dig

ital

lysi

gned

mes

sage

:A

lice

veri

fies

sign

ature

,inte

grity

of dig

ital

ly s

igned

mes

sage

:

KB(H

(m))

-

en

cry

pte

d

msg

dig

est

KB(H

(m))

-

en

cry

pte

d

msg

dig

est

larg

em

essa

ge

m

H(m

)H

(m)

Bo

b’s

pu

blic

ke

y

KB+

eq

ua

l

?

Dig

ital

sig

nat

ure

= s

igned

mes

sage

dig

est

Page 49: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-5

0N

etw

ork

Se

cu

rity

Has

h funct

ion a

lgori

thm

s

M

D5 h

ash funct

ion w

idel

yuse

d(R

FC1321)

co

mpute

s128-b

it m

essa

ge d

iges

t in

4-s

tep p

roce

ss.

ar

bitra

ry 1

28-b

it s

trin

gx,a

ppea

rsdiffi

cult t

oco

nst

ruct

m

sgm

whose

MD

5 h

ash is

equal

tox

SH

A-1

is

also

use

d

US

stan

dar

d[N

IST,

FIPS

PU

B180-1

]

160-b

it m

essa

ge d

iges

t

Page 50: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-5

1N

etw

ork

Se

cu

rity

Rec

all:

ap5.0

sec

uri

ty h

ole

man

(or

wom

an)

inth

e m

iddl

e at

tack

:Tru

dy

pose

sas

Alic

e (t

oB

ob)

and

asB

ob (

toA

lice)

I a

m A

lice

I a

m A

lice

R

TK

(

R)

-

Se

nd

me

yo

ur

pu

blic

ke

y TK

+

AK

(

R)

-

Se

nd

me

yo

ur

pu

blic

ke

y

AK

+

TK

(

m)

+

Tm

= K

(K

(

m))

+ T

-T

rud

y g

ets

se

nd

s m

to

Alic

e

en

cry

pte

d w

ith

Alic

e’s

pu

blic

ke

y

AK

(m

)+

Am

= K

(K

(

m))

+ A

-

R

Page 51: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-5

2N

etw

ork

Se

cu

rity

Public

-key

cer

tifica

tion

m

otiva

tion:T

rudy

pla

yspiz

zapra

nk

on B

ob

Tr

udy

crea

tes

e-m

ailord

er:

Dea

r Pi

zza

Stor

e,Pl

ease

del

iver

to

me

four

pep

per

oni

piz

zas.

Tha

nk y

ou,B

ob

Tr

udy

sign

sord

er w

ith h

er p

riva

te k

ey

Tr

udy

sends

ord

er t

oPiz

zaSt

ore

Tr

udy

sends

toPiz

zaSt

ore

her

public

key

,but

says

it’s

Bob’s

public

key

Piz

zaSt

ore

ver

ifies

sign

ature

;then

del

iver

sfo

ur

pep

per

onipiz

zas

toB

ob

B

ob d

oes

n’t

eve

n lik

e pep

per

oni

Page 52: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-5

3N

etw

ork

Se

cu

rity

Cer

tifica

tion a

uth

ori

ties

ce

rtifi

catio

nau

thor

ity (

CA):

bin

ds

public

key

to

par

ticu

lar

entity

,E.

E (

per

son,r

oute

r)re

gist

ers

its

public

key

with C

A.

E p

rovi

des

“pro

of of id

entity

”to

CA

.

C

Acr

eate

s ce

rtifi

cate

bin

din

gE t

oits

public

key.

ce

rtifi

cate

conta

inin

gE’s

public

key

dig

ital

lysi

gned

by

CA

– C

Asa

ys“t

his

is

E’s

public

key”

Bo

b’s

pu

blic

ke

y

KB+

Bo

b’s

ide

ntify

ing

info

rma

tio

n

CA

pri

va

te

ke

y K

CA-

KB+

ce

rtific

ate

for

Bo

b’s

pu

blic

ke

y,

sig

ne

db

y C

A

Page 53: Chapter 8: Network Security - Plone sitesangio/SO_currentAA/Luc_SO/Security/... · 2014-05-05 · 8-3 Network Security Chapter 8 roadmap 8.1 What is network security? 8.2Principles

8-5

4N

etw

ork

Se

cu

rity

w

hen

Alic

e w

ants

Bob’s

public

key

:

ge

tsB

ob’s

cert

ifica

te (

Bob o

r el

sew

her

e).

ap

ply

CA

’spublic

key

to

Bob’s

cert

ifica

te,g

et B

ob’s

public

key

Bo

b’s

pu

blic

ke

y

KB+

CA

pu

blic

ke

y

KC

A+

KB+

Cer

tifica

tion a

uth

ori

ties