Docsity

Network Security - Computer Networks - Lecture Slides, Slides of Computer Networks

Partial preview of the text

Download Network Security - Computer Networks - Lecture Slides and more Slides Computer Networks in PDF only on Docsity!

Network Security^ Security Crytographic algorithms^

Security Services Secret keyPublic keyMessage digest(DES)(RSA)(MD5)

privacy^ authenticity^ Message

integrity Docsity.com

Secret Key Encryption

Decrypt usingsecret key Plain text^ Encrypt usingsecret key

Plain text Docsity.com

Message Digest Encryption • Map a potentially large message into asmall fixed length number • Compute checksum for message • Given cryptographic checksum – Difficult to figure out the message

DES (secret key encryption) • Block cipher (operates on a fixed block ofbits) • Encrypts a 64-bit of plain text using a 64-bitkey – Only 56 bits used – Last bit of every byte is a parity bit • Three phases in DES – 64-bits in each block are permuted

DES (secret key encryption) – Choose 48-bit from 56-bit key^ L^ i-

R^ i- L^ I

Ki F^ L^ = R^ i-1^ i-1 + RI = L^ F(R^ +^ i-1^ i-1 R I ,K)i Docsity.com

DES (secret key encryption) • Define F, generate K

i

  • Initially the permuted 56-bit key is dividedinto two blocks of 28-bitth^ – Ignore every 8

bit in original key – Each half is rotated 1/2 bits depending upon theround – A table is used to define the rotation of the 28-bit

DES (secret key encryption)^ • 1-bit from left, 1-bit from rightst^ • 1^ and last bit –use circular shift – they get fromeach other – Divide 48-bit into 6-bit chunks – XOR expanded R – Finally pass 6-bit through substitution box toget 4-bit from 6-bit

DES (Decryption) • Algorithm works exactly the same as that ofencryption • Apply keys in reverse – K, K, K, …, K^16 15 14 1 • Encryption of large messages – Cipher block chaining

Public Key Encryption (RSA) • Choose two large prime numbers p and q(typically greater than 10

100

  • Choose^ – n = p × q^ – z = (p-1) ×(q-1) • Choose a number d relatively prime to z^ – z and d are coprimes – GCD (z,d) = 1 • Find e s.t. e × d = 1 mod z

Public Key Encryption (RSA)^ – Compute these parameters in advance • Divide plaintext into blocks s.t. eachplaintext is 0^ ≤^ P < n^ – i.e group bits such that (if k-bits) 2

k^ < n

  • To encrypt P, computee^ – c = P^ (mod n) • To decrypt C, computed^ – P = c(mod n)

Message Digest^ Message Padded Initial Digiest(128 bit)^512 Transform Transform Transform

(^512512) Message Digest

Message Digest • Modern day: Operates on 32-bit quantities • Current digest (d^ , d^ , d^ , d^0123

  • Works on the hope that it is difficult tocreate the^ transformations

and the^ initial digest.