Unit - 1
Unit - 1
Unit - 1
Security
Credit – 6
Theory – 4, Practical -2
10. Web Security threats and approaches, SSL architecture and protocol,
Transport layer security, HTTPS and SSH
Course Outcomes (Cos)
• Define information security and outline its major components.
• Study and use the Wireshark for the various network protocols.
Chapter 1 – Introduction
– Active
• Active attack involves some modification of the data stream or the
creation of a false stream.
Passive Attacks
Passive Attacks (Cont.)
Active Attacks
• RFC 2828:
“a processing or communication service provided by
a system to give a specific kind of protection to
system resources”
Security Services (X.800)
• Authentication - assurance that the communicating
entity is the one claimed
• Access Control - prevention of the unauthorized use of
a resource
• Data Confidentiality –protection of data from
unauthorized disclosure
• Data Integrity - assurance that data received is as sent
by an authorized entity
• Non-Repudiation - protection against denial by one of
the parties in a communication
Security Mechanism
• feature designed to detect, prevent, or
recover from a security attack
• no single mechanism that will support all
services required
• however one particular element underlies
many of the security mechanisms in use:
– cryptographic techniques
• hence our focus on this topic
Security Mechanisms (X.800)
• specific security mechanisms:
– encipherment, digital signatures, access controls,
data integrity, authentication exchange, traffic
padding, routing control, notarization
• pervasive security mechanisms:
– trusted functionality, security labels, event
detection, security audit trails, security recovery
Model for Network Security
Model for Network Security
• using this model requires us to:
1. design a suitable algorithm for the security
transformation
2. generate the secret information (keys) used by
the algorithm
3. develop methods to distribute and share the
secret information
4. specify a protocol enabling the principals to use
the transformation and secret information for a
security service
Model for Network Access Security
Model for Network Access Security
• using this model requires us to:
1. select appropriate gatekeeper functions to
identify users
2. implement security controls to ensure only
authorised users access designated information
or resources
• trusted computer systems may be useful to
help implement this model
Summary
• have considered:
– definitions for:
• computer, network, internet security
• X.800 standard
• security attacks, services, mechanisms
• models for network (access) security
Chapter 2 – Classical Encryption
Techniques
Symmetric Encryption
• or conventional / private-key / single-key
• sender and recipient share a common key
• all classical encryption algorithms are private-
key
• was only type prior to invention of public-key
in 1970’s
• and by far most widely used
Some Basic Terminology
• plaintext - original message
• ciphertext - coded message
• cipher - algorithm for transforming plaintext to ciphertext
• key - info used in cipher known only to sender/receiver
• encipher (encrypt) - converting plaintext to ciphertext
• decipher (decrypt) - recovering ciphertext from plaintext
• cryptography - study of encryption principles/methods
• cryptanalysis (codebreaking) - study of principles/ methods
of deciphering ciphertext without knowing key
• cryptology - field of both cryptography and cryptanalysis
Symmetric Cipher Model
Requirements
• two requirements for secure use of symmetric
encryption:
– a strong encryption algorithm
– a secret key known only to sender / receiver
• mathematically have:
Y = EK(X)
X = DK(Y)
• assume encryption algorithm is known
• implies a secure channel to distribute key
If P is the plaintext, C is the ciphertext, and K is the key,
Cryptanalysis attacks
Chosen-text
Continued
Ciphertext-Only Attack
Ciphertext-only attack
Known information:
• Encryption algorithm
• Cipher text
Continued
Known-Plaintext Attack
Known-plaintext attack
Known information:
• Encryption algorithm
• Cipher text
• One or more plaintext-cipher text pairs formed with the secret key
Continued
Chosen-Plaintext Attack
Chosen-plaintext attack
Known information:
• Encryption algorithm
• Cipher text
• Plaintext message chosen by cryptanalyst, together with its
corresponding ciphertext generated with the secret key
Continued
Chosen-Ciphertext Attack
Chosen-ciphertext attack
Known information:
• Encryption algorithm
• Cipher text
• Purported ciphertext chosen by cryptanalyst, together with its corresponding
decrypted plaintext generated with the secret key
Chosen text
Known information:
• Encryption algorithm
• Ciphertext
Solution
We apply the encryption algorithm to the plaintext, character by
character:
Continued
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Monoalphabetic Cipher Security
• now have a total of 26! = 4 x 1026 keys
• with so many keys, might think is secure
• but would be !!!WRONG!!!
• problem is language characteristics
Language Redundancy and
Cryptanalysis
• human languages are redundant
• eg "th lrd s m shphrd shll nt wnt"
• letters are not equally commonly used
• in English E is by far the most common letter
– followed by T,R,N,I,O,A,S
• other letters like Z,J,K,Q,X are fairly rare
• have tables of single, double & triple letter
frequencies for various languages
3.2.1 Continued
Table 3.1 Frequency of characters in English
Solution
When Eve tabulates the frequency of letters in this ciphertext, she
gets: I =14, V =13, S =12, and so on. The most common character
is I with 14 occurrences.
Use in Cryptanalysis
• key concept - monoalphabetic substitution ciphers
do not change relative letter frequencies
• discovered by Arabian scientists in 9th century
• calculate letter frequencies for ciphertext
• compare counts/plots against known values
• if caesar cipher look for common peaks/troughs
– peaks at: A-E-I triple, NO pair, RST triple
– troughs at: JK, X-Z
• for monoalphabetic must identify each letter
– tables of common double/triple letters help
Example Cryptanalysis
• given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
• count relative letter frequencies (see text)
• guess P & Z are e and t
• guess ZW is th and hence ZWP is the
• proceeding with trial and error finally get:
it was disclosed yesterday that several informal but
direct contacts have been made with political
representatives of the viet cong in moscow
Playfair Cipher
• not even the large number of keys in a
monoalphabetic cipher provides security
• one approach to improving security was to
encrypt multiple letters
• the Playfair Cipher is an example
• invented by Charles Wheatstone in 1854, but
named after his friend Baron Playfair
Playfair Key Matrix
• a 5X5 matrix of letters based on a keyword
• fill in letters of keyword (sans duplicates)
• fill rest of matrix with other letters
• eg. using the keyword MONARCHY
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Encrypting and Decrypting
• plaintext is encrypted two letters at a time
1. if a pair is a repeated letter, insert filler like 'X’ E.G balloon -
> ba lx lo on
2. if both letters fall in the same row, replace each with letter
to right(wrapping back to start from end) E.G. ar -> RM
3. if both letters fall in the same column, replace each with
the letter below it (again wrapping to top from bottom)
E.G. mu -> CM
4. otherwise each letter is replaced by the letter in the same
row and in the column of the other letter of the pair. E.G.
ea -> IM
Security of Playfair Cipher
• security much improved over monoalphabetic
• since have 26 x 26 = 676 digrams
• would need a 676 entry frequency table to analyse
(verses 26 for a monoalphabetic)
• and correspondingly more ciphertext
• was widely used for many years
– eg. by US & British military in WW1
• it can be broken, given a few hundred letters
• since still has much of plaintext structure
Hill Cipher
• Another interesting multiletter cipher is the Hill cipher, developed by the
mathematician Lester Hill in 1929. The encryption algorithm takes m
successive plaintext letters and substitutes for them m ciphertext letters. The
substitution is determined by m linear equations in which each character is
assigned a numerical value (a = 0, b = 1 ... z = 25). For m = 3, the system can
be described as follows:
• c1 = (k11P1 + k12P2 + k13P3) mod 26
• c2 = (k21P1 + k22P2 + k23P3) mod 26
• c3 = (k31P1 + k32P2 + k33P3) mod 26
• This can be expressed in term of column vectors and matrices:
• or
• C = KP mod 26
• where C and P are column vectors of length 3, representing the plaintext
and ciphertext, and K is a 3 x 3 matrix, representing the encryption key.
Operations are performed mod 26.
• For example, consider the plaintext "paymoremoney"
and use the encryption key
Figure
Steganography
• an alternative to encryption
• hides existence of message
– using only a subset of letters/words in a longer
message marked in some way
– using invisible ink
– hiding in LSB in graphic image or sound file
• has drawbacks
– high overhead to hide relatively few info bits
Steganography
• Character marking: Selected letters of printed or
typewritten text are overwritten in pencil. The marks
are ordinarily not visible unless the paper is held at
an angle to bright light.