2. Objective
Theories,
To understand Cryptography
Algorithms and Systems.
To understand necessary Approaches and
Techniques to build protection mechanisms
inorder to secure computer networks.
3. Outcome
Understand the fundamentals of networks
security
, security architecture, threats and
vulnerabilities
Apply the different cryptographic operations of
symmetric cryptographic algorithms
Apply the different cryptographic operations of
public key cryptography
Apply the various Authentication schemes to
simulate differentapplications.
Understand various Security practices and
System security standards
7. Information Security-
Definitions
ComputerSecurity - generic name for thecollection of
tools designed to protectdata and to thwart hackers
Network Security - measures to protectdata during
theirtransmission
Internet Security - measures to protect data during
their transmission over a collection of interconnected
networks.
8. Internet Security
Our focus is on Internet Security
which consists of measures todeter, prevent, detect, and
correct security violations that involve the transmission
& storage of information
9. OSI Security Architecture
ITU-TX.800 “Security Architecturefor OSI”
defines a systematic way of defining and providing
security requirements
for us it provides a useful, if abstract, overview of
aspects of security concepts are
Security Services
Security Mechanisms
SecurityAttack
10. Security Services
enhance security of data processing systems and
information transfers of anorganization
intended to counter securityattacks
using one or more security mechanisms
often replicates functions normally associated with
physical documents
which, for example, have signatures, dates; need
protection from disclosure, tampering, or
destruction; be notarized or witnessed; be recorded
or licensed
11. Definition
X.800:
“a service provided by a protocol layer of
communicating open systems, which ensures
adequate security of the systemsor of data transfers”
RFC 2828:
“a processing or communication service provided by
a system to give a specific kind of protection to
system resources”
12. 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
byan authorized entity
Non-Repudiation - protection against denial by one
of the parties in acommunication
13. Authentication
• Theassurance that the communicating entity is the
one that it aims to be.
• PeerEntity Authentication: Used inassociation with
a logical connection to provide confidence in the
identity of the entities connected.
• Data Origin Authentication: In a connectionless
transfer, provides assurance that the source of received
data is as claimed.
14. Data Confidentiality
• Theprotectionof data from unauthorizeddisclosure.
ConnectionConfidentiality:Theprotectionof all userdata ona
connection.
• ConnectionlessConfidentiality:Theprotectionof all userdata
in asingledata block
• Selective-Field Confidentiality: Theconfidentialityof selected
fieldswithintheuser Dataon aconnectionorina singledata
block.
• TrafficFlow Confidentiality: Theprotectionof theinformation
thatmightbe Derived from observationof trafficflows.
15. Data Integrity
• Connection Integrity with Recovery: Provides for
the integrity of all user data on a connection and
detects any modification, insertion, deletion, or replay
of any data within an entire data sequence, with
recovery attempted.
• Connection Integritywithout Recovery: Asabove,
but provides only detection without recovery.
16. Data Integrity
• Selective-Field Connection Integrity:Providesforthe integrity
of selected fields within the user data of a data block transferred
overaconnectionand takes the formof determinationof whether
the selected fields have been modified, inserted, deleted, or
replayed.
• Connectionless Integrity: Provides for the integrity of a single
connectionless data block and may take the form of detection of
data modification.
• Selective-Field Connectionless Integrity: Provides for the
integrityof selected fieldswithin asingleconnectionlessdata
17. Non repudiation
• Provides protection against denial by oneof the
entities involved in a communication of having
participated in all or part of the communication.
• Nonrepudiation, Origin: Proof that the message was
sent bythe specified party
.
• Nonrepudiation, Destination: Proof that the
message was received bythe specified party
.
18. Security Mechanisms
Provides feature designed todetect, prevent, or recover
from a security attack
no single mechanism that will support all services
required
however one particularelement underlies manyof the
security mechanisms in use:
cryptographic techniques
20. Security Attacks
Anyaction that compromises the security of
information owned by anorganization
Information security is about how to prevent attacks,
or failing that, todetect attacks on information-based
systems
often threat & attack used to mean same thing
have awide range of attacks
can focus of generic types of attacks
passive
active
21. Passive Attacks
Network Security
Activeattacks
Passive attacks
Passiveattacks
interception of the messages
Whatcan the attacker do?
use information internally
hard to understand
release the content
can be understood
traffic analysis
hard toavoid
Hard to detect, try to prevent
23. Active Attacks
Attacker actively manipulates
the communication
Masquerade
pretend as someone else
possibly toget more privileges
Replay
passively capture data
and send later
Denial-of-service
prevention the normal useof
servers, end users, or network
itself
25. Modification of messages
Active attacks (cont’d)
deny
repudiatesending/receiving a message later
modification
change the content of a message
26. Model for Network Security
using this model requires us to:
design a suitable algorithm for the security
transformation
generate the secret information (keys) used by
thealgorithm
develop methods to distribute and share the
secret information
specify a protocol enabling the principals to use
the transformation and secret information for a
security service
29. Model for Network Access
Security
using this model requires us to:
select appropriate gatekeeper functions to
identify users
implementsecurity controls to ensureonly
authorised users access designated information
or resources
trusted computer systems may be useful to help
implement this model
31. Symmetric Encryption
or conventional / private-key / single-key
sender and recipientshare 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 mostwidely used
32. Some Basic Terminology
plaintext - original message
ciphertext - coded message
cipher - algorithm for transforming plaintext to
ciphertext
key - infoused incipher known only to
sender/receiver
encipher(encrypt) - converting plaintext to
ciphertext
decipher(decrypt) - recovering ciphertext from
plaintext
33. Some Basic Terminology
cryptography - studyof
encryption principles/methods
cryptanalysis (codebreaking) - study of
principles/ methods of deciphering
ciphertext without knowing key
cryptology - field of both cryptography
and cryptanalysis
35. Requirements
Two requirements for secure use of symmetric
encryption:
a strong encryption algorithm
a secret key known only tosender / receiver
mathematically have:
Y = EK(X)
X = DK(Y)
assumeencryption algorithm is known
impliesa secure channel to distribute key
36. Cryptography
characterize cryptographic system by:
typeof encryption operations used
substitution / transposition / product
numberof keys used
single-keyor private / two-key or public
way in which plaintext is processed
block / stream
37. Cryptanalysis
objective to recover key not just message
general approaches:
cryptanalytic attack
brute-forceattack
38. Cryptanalytic Attacks
ciphertextonly
only know algorithm & ciphertext, is statistical,
know orcan identify plaintext
known plaintext
know/suspect plaintext & ciphertext
chosen plaintext
select plaintext and obtain ciphertext
chosenciphertext
selectciphertext and obtain plaintext
chosen text
select plaintext or ciphertext to en/decrypt
39. More Definitions
unconditional security
no matter how much computerpower or time is
available, the ciphercannot be broken since the
ciphertext provides insufficient information to
uniquelydetermine the corresponding
plaintext
computational security
given limited computing resources (eg time
needed forcalculations is greater than ageof
universe), the ciphercannot be broken
40. Classical Substitution Ciphers
where letters of plaintext are replaced by other
letters or by numbers or symbols
or if plaintext is viewed as a sequence of bits, then
substitution involves replacing plaintext bit
patterns with ciphertext bit patterns
41. Caesar Cipher
Earliest known substitution cipher
by Julius Caesar
first attested use in military affairs
replaces each letter by 3rd letter on
example:
meet meafter the toga party
PHHW PH DIWHU WKH WRJD SDUWB
42. Caesar Cipher
can define transformation as:
a bcd e f g h i j k l m n o pq r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W XY Z A B C
mathematically give each letter a number
a bcd e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25
then have Caesar cipheras:
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26)
43. Cryptanalysis of Caesar Cipher
only have 26 possibleciphers
A maps to A,B,..Z
could simply try each in turn
a brute forcesearch
given ciphertext, just try all shiftsof letters
Three important characteristics are known.
Encryption and Decryption algorithms are known.
only 25 keys to try
do need to recognize when have plaintext
44. Monoalphabetic Cipher
rather than just shifting thealphabet
could shuffle (jumble) the letters arbitrarily
each plaintext letter maps to a different random
ciphertext letter
hence key is 26 letters long
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
45. Monoalphabetic Cipher Security
now have a total of 26! = 4 x 1026 keys
with so many keys, might think is secure
If the cryptanalyst knows the natureof the
plaintext then it would be !!!WRONG!!!
problem is language characteristics
46. Language Redundancy and
Cryptanalysis
human languages are redundant
eg "th lrd s m shphrd shll ntwnt"
letters are not equally commonlyused
in English E is by far the mostcommon letter
followed byT,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 forvarious languages
48. Use in Cryptanalysis
key concept - monoalphabetic substitution ciphers
do notchange relative letter frequencies
calculate letter frequencies forciphertext
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPES
XUDBMETSXAIZ
• VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWY
MXUZUHSX
• EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDT
MOHMQ
49. Example Cryptanalysis
givenciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBME
TSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
countrelativeletterfrequencies (see text)
guess P & Z areeand t
guess ZW is th and hence ZWP is the
proceedingwithtrialand errorfinallyget:
itwas disclosedyesterdaythatseveral informal but
directcontactshave been madewithpolitical
representativesof thevietcong in moscow
50. Playfair Cipher
not even the large numberof keys ina
monoalphabetic cipherprovides security
one approach to improving security was toencrypt
multiple letters
the Playfair Cipher is an example
invented by Charles Wheatstone in 1854, but
named after his friend Baron Playfair
51. Playfair Key Matrix
a 5X5 matrixof letters based on a keyword
fill in letters of keyword (sans duplicates)
fill rest of matrix with other letters
eg. using the keyword MONARCHY
52. Encrypting and Decrypting
plaintext is encrypted two letters ata time
if a pair is a repeated letter, insert filler like 'X’
if both letters fall in the same row, replace each
with letter to right (wrapping back to start from
end)
if both letters fall in the same column, replace
each with the letter below it (again wrapping to
top from bottom)
otherwise each letter is replaced by the letter in
the same row and in the column of the other
letterof the pair
53. Securityof Playfair Cipher
security much improved over monoalphabetic
since have 26 x 26 = 676 digrams
would need a 676 entry frequency table to analyze
(verses 26 fora monoalphabetic)
and correspondingly more ciphertext
was widely used for manyyears
eg. by US & British military in WW1
it can be broken, given a few hundred letters
since still has much of plaintext structure
54. Hill Cipher
Invented by L. S. Hill in 1929.
Inputs : String of English letters, A,B,…,Z.
An nxn matrix K, with entries drawn from 0,1,…,25.
(The matrix K serves as the secret key. )
Divide the input string into blocks of size n.
Identify A=0, B=1, C=2, …, Z=25.
Encryption: Multiply each block by K and then
reduce mod 26.
Decryption: multiply each block by the inverse of
K, and reduce mod 26.
55. Hill Cipher
The decryption must be the inverse function of the
encryption function.
It is required that K-1 K = In mod 26.
Provided that det(K) has a multiplicative inverse
mod 26, i.e., if det(K) and n has no common factor,
the inverse of K can be computed by the adjoint
formula for matrix inverse.
Inverse of an integer mod 26 can be obtained by
trial and error.
56. Polyalphabetic Ciphers
polyalphabeticsubstitution ciphers
improvesecurity using multiplecipheralphabets
make cryptanalysis harder with more alphabets to
guess and flatter frequencydistribution
use a key to select which alphabet is used for each
letterof the message
use each alphabet in turn
repeat from startafterend of key is reached
57. Vigenère Cipher
simplest polyalphabetic substitution cipher
effectively multiplecaesar ciphers
key is multiple letters long K = k1 k2 ... kd
ith letter specifies ith alphabet to use
use each alphabet in turn
repeat from startafterd letters in message
decryption simplyworks in reverse
58. Example of Vigenère Cipher
write the plaintext out
write the keyword repeated above it
use each key letteras acaesar cipherkey
encrypt the corresponding plaintext letter
eg using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLM
GJ
60. Securityof Vigenère Cipher
have multiple ciphertext letters for each plaintext
letter
hence letter frequenciesare obscured
but not totally lost
start with letter frequencies
see if look monoalphabetic or not
if not, then need to determine number of
alphabets, since thencan attach each
61. One Time Pad
if a trulyrandom keyas long as the message is used,
the cipherwill be secure
called a One-Timepad
is unbreakable since ciphertext bears no statistical
relationship to the plaintext
since for any plaintext & any ciphertext there
exists a key mapping one toother
can onlyuse the key once though
problems in generation & safedistribution of key
62. Transposition Techniques
now consider classical transposition or
permutation ciphers
these hide the message by rearranging the letter
order
without altering the actual letters used
can recognise these since have the same frequency
distribution as the original text
64. Rail Fence Techniques
Rail-Fence is the simple Transposition technique
which involves writing plain text as a sequence of
diagonals and then reading it row by row to produce
the ciphertext.
Algorithm
Step 1: Write down all the characters of plain text
message in a sequence of diagnosis.
Step 2: Read the plain text written in step 1 as a
sequenceof rows.
65. Example
Suppose plain text corporate bridge and we want
to create the ciphertext of the given.
First, we arrange the plain text in a sequence of
diagnosis as shown below.
Now read the plain text by row wise i.e.
croaerdeoprtbig.
So, here the plain text is corporate bridge and
ciphertext iscroaerdeoprtbig.
66. Simple Columnar Transposition
The simple columnar transposition technique can
be categorized into two parts – Basic technique and
multiple rounds.
The simple columnar transposition technique
simply arranges the plain text in a sequence of rows
of a rectangle and reads it in a columnar manner.
Step 1: Write all the characters of plain text
message row by row in a rectangle of predefined
size.
Step 2: Read the message in a columnar manner i.e.
column bycolumn. (can be byany random order).
Step 3: Theresultant message iscipher text.
67. Example
Let’s assume that Plain text is acorporate bridge
and we need tocalculate the ciphertext using a
simplecolumnar transposition technique.
Let’s take 6 columns and arrange the plain text ina
row-wise manner.
68. Example
Decide the column order for reading the message –
let’s assume 1,3,5,2,4,6 is an order.
Now read the message in a columnar manner
using the decided order. – cadreeorotgpbri
cadreeorotgpbri is a cipher text.
69. Multiple rounds
Simple columnar transposition technique with
multiple rounds is the same as basic only the
difference is, in multiple rounds, we iterate the
process multiple times.
•Step 1: Write all the characters of plain text message
row by row in a rectangle of predefined size.
•Step 2: Read the message in a columnar manner i.e.
column bycolumn.
•Note: For reading the message, it needs not to be in
the order of columns. Itcan byany random sequence.
•Step 3: Theresultant message isciphertext.
•Step 4: Repeat the procedure from step 1 to step 3
manytimes as desired.
70. Example
Let’s assume that Plain text is acorporate bridge
and we need tocalculate the ciphertext using a
simplecolumnar transposition technique.
Let’s take 6 columns and arrange the plain text ina
row-wise manner.
71. Example
Decide the column order for reading the message –
let’s assume 1,3,5,2,4,6 is an order.
Now read the message in a columnar manner
using the decided order. – cadreeorotgpbri
cadreeorotgpbri is a cipher text.
Let’s perform step 1 to step 3 one more time.
72. Example
In thesecond iteration, theorder of the columns
will be thesame.
Ciphertext – cobdoiegarrrtep
Continue the same procedure if more iteration is
required.
73. Steganography
an alternative toencryption
hides existence of message
using only a subsetof letters/words ina longer
message marked in some way
using invisible ink
hiding in LSB in graphic image or sound file
hasdrawbacks
high overhead to hide relatively few info bits