CS-09 – Data Communications and Networks
Problem Solutions
Application layer
Cryptography
Substitution/Transposition/One-time Pad Ciphers
Public Key Cryptography
Application Layer & Cryptography
· Real Useful functionality for user is here.
· Security Related, DNS Related, Network Management related protocols.
· Applications like Email, Browsers, Multimedia Interfaces.
Security Concerns:
· Secrecy: Stop Un-authorised listening.
· Authentication: Open for authorized users
· Non-repudiation: Source Identity Establishment
· Integrity: Data is same as it was sent.
Cryptography:
· Text : Encryption with encryption key = Cipher.
· Cipher: Decryption with decryption key = Text.
· Passive Intruder just listens.
· Active Intruder alters message.
C= Ek (P) (Encryption with ‘K’ key)
P= Dk (C) (Decryption with ‘K’ key)
P = Dk (Ek (P))
Ciphers
Substitution Cipher:
· Letter or group of letter are replaced by another.
· Order of letter is preserved.
· Fixed offset Shifting (Caesar Cipher)
a+3 = D
b+3 = E
z+3 = C k (key) = offset
· Alphabet Mapping.
a b c d ………………… z
N O B E ………………………. U k = 26 letter string
· Difficult to break by random testing.
· Easy to break by knowing frequency of alphabets in English (e,t,o,a,n,I – th, in, er, re, an – the, ing, and, ion etc.).
Transposition Cipher:
· Order of letter is not preserved.
· Non repeated alphabet word is chosen as a key.
· Lowest alphabet is given lowest column number.
· Lowest column written as first letter(s) of cipher.
C A T (key)
2 1 3 (columns)
u p t (plain text)
e c
CIPHER = PCUET
· To break this type of Cipher type of cipher, alphabet letter frequency, suspected letter combination help.
Ciphers contd. - OTP and Public Key methods
One time Pads:
· Random Bit stream chosen as key.
· Bit pattern of plain text is bit by bit EX-Ored with key bit pattern to get the ciphered pattern.
· This is impossible to break as bit pattern uniformity or probability of finding regular patterns is low.
· Since both sender and receiver as supposed to have the key in written form, spying is a big threat.
· Often CD or other media can be used to store bit patterns that can be used as keys.
Public key Cryptography:
· Different keys for encryption and decryption.
· Encryption key is made public.
· Decryption key is private.
· Encryption with public key of user ‘X’ allows decryption by using private key of ‘X’ only.
· RSA is a popular public/private key making algorithm.