Tải bản đầy đủ (.pdf) (31 trang)

Advanced Computer Networks: Lecture 40 - Dr. Amir Qayyum

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 (546.9 KB, 31 trang )

CS716
Advanced Computer Networks
By Dr. Amir Qayyum
1

1


Lecture No. 40 

2


Security
Outline






Encryption Algorithms
Authentication Protocols 
Message Integrity Protocols 
Key Distribution 
Firewalls 
3


Overview
• Cryptography functions 


– Secret key (e.g. DES)
– Public key (e.g. RSA)
– Message digest (e.g. MD5)

• Security services
– Privacy: preventing unauthorized release of 
information
– Authentication: verifying identity of the remote 
participant 
– Integrity: making sure message has not been 
altered 
4


Taxonomy of Network Security
Security
Cryptography
algorithms

Security
services

Secret
Public
Message
key
key
digest
(e.g. DES) (e.g. RSA) (e.g. MD5)


Privacy Authentication Message
integrity

5


Secret Key Encryption

6


Secret Key Encryption (DES)
Plaintext

Plaintext

Encrypt with
secret key

Decrypt with
secret key
Ciphertext

7


DES Algorithm
Initial permutation

• 64­bit key (56­bits + 8­bit parity)

• 16 rounds 

Round 1

•  Each Round

Round 2

56­bit
key

L ─1
i

R ─1
i
F
+

Round 16

Ri

Li

Final permutation

8

Ki



Expansion Phase of DES
4-bit chunk
■■■

■■■

■■■

■■■

Expanded to 6 bits by stealing
a bit from left and right chunks

9


Secret Key Encryption
Plaintext Block 3
Plaintext Block 2
Plaintext Block 1
Plaintext Block 0

Encryption
Function

Blocks of Ciphertext

Initialization Vector

(For block 0 only)

10


Cipher Block Chaining (CBC)
• Repeat for larger messages 
Block

IV

1

Block

2

Block

Block

3

4

+

+

+


+

DES

DES

DES

DES

Cipher

1

Cipher

2

Cipher

Cipher

3

11

4



Public Key Encryption

12


Public Key Authentication

13


Public Key Encryption (RSA)
Plaintext

Plaintext

Encrypt with
public key

Decrypt with
private key
Ciphertext



Encryption & Decryption 
c = memod n
m =  cdmod n

14



RSA(cont)
ã Choosetwolargeprimenumberspand
q(each256bits)
ã Multiplypandqtogethertogetn
ã Choosetheencryptionkeye,suchthate
and(pư1)ì(qư1)arerelativelyprime.
Twonumbersarerelativelyprimeifthey
havenocommonfactorgreaterthanone
15


RSA(cont)
ã Computedecryptionkeydsuchthat
d=eư1mod((pư1)ì(qư1))
ã Constructpublickeyas(e,n)
ã Constructprivatekeyas(d,n)
ã Discard(donotdisclose)original
primespandq
16


Message Digest
• Cryptographic checksum 
– Just as a regular checksum protects the 
receiver from accidental changes to the 
message, a cryptographic checksum 
protects the receiver from malicious 
changes to the message.


17


Message Digest
• One­way function
– Given a cryptographic checksum for a 
message, it is virtually impossible to 
figure out what message produced that 
checksum; it is not computationally 
feasible to find two messages that hash to 
the same cryptographic checksum.

18


Message Digest
• Relevance
– If you are given a checksum for a 
message and you are able to compute 
exactly the same checksum for that 
message, then it is highly likely this 
message produced the checksum you 
were given.

19


Overview of Message Digest Operation
Initial “digest”
(constant)


Message (padded)

512 bits 512 bits

512 bits

■■■

Transform

Transform

Transform

Message digest

20


Authentication Protocols 
• Three­way handshake
Client

Server
ClientI
d, E

,
E(x + 1


S

(x , C H
K)
HK)
S
,
Y
(
HK), E

E(y + 1
, CHK)

HK)
S
,
K
E(S

21


Third Party Authentication
• Trusted third party (Kerberos) 
S

A


B

A, B
E((T,
L, K,
K
B) ,
E(A()T,
, L,
K, A
), K

B

)

E( ( A
, T),
E((TK),
, L,
K, A
),

KB )

, K)
1
+
E(T


22


Public Key Authentication
A

B
E(x,
Pu

blic

B )

x

23


Message Integrity

24


Message Integrity Protocols
• Keyed MD5
– Sender: m + MD5 (m + k) + E(E(k, rcv – pub), 
private) 
– Receiver
• Recovers random key using the sender’s 

public key
• Applies MD5 to the concatenation of this 
random key message
25


×