Cryptography and Network Security
Cryptography and Network Security
ETE 448
Introduction to seven layers of OSI model,
Introduction to computer security, CIA TRIAD,
Threats and Attacks, examples of passive
active attacks. Classical Encryption
Techniques: Symmetric Encryption Model,
Cryptanalysis, Substitution Techniques,
Polyalphabetic Cipher, Transposition
Techniques. Block Ciphers: Feistel Cipher,
DES.
PublicKey Cryptography: RSA and Diffie-
Hellman algorithms. Hash functions: SHA. Key
Distribution and User Authentication –
Needham-Schroeder Public-Key Protocol,
Kerberos. Transport-Level Security: SSL,
HTTPS and SSH. IP Security: IPsec Services, IP
security policy, Security Association. Digital
Signature: Requirement, structure and policy.
Computer data often travels from one computer
to another, leaving the safety of its protected
physical surroundings. Once the data is out of
hand, people with bad intention could modify or
forge your data, either for amusement or for
their own benefit.
Cryptography can reformat and transform our
data, making it safer on its trip between
computers. The technology is based on the
essentials of secret codes, augmented by modern
mathematics that protects our data in powerful
ways.
Computer Security - generic name for the
collection of tools designed to protect data
from hackers
Network Security - measures to protect data
during their transmission.
Internet Security - measures to protect data
during their transmission over a collection of
interconnected networks.
To assess the security needs of an
organization effectively, the manager
responsible for security needs some
systematic way of defining the requirements
for security and characterization of
approaches to satisfy those requirements.
One approach is to consider three aspects
of information security:
Security attack – Any action that
compromises the security of information
owned by an organization.
Security mechanism – A mechanism that is
designed to detect, prevent or recover from
a security attack.
Security service – A service that enhances
the security of the data processing systems
and the information transfers of an
organization. The services are intended to
counter security attacks and they make use
of one or more security mechanisms to
provide the service.
Computer Security:
The protection afforded to an automated information
system in order to attain the applicable objectives of
preserving the following properties of information
system resources (includes hardware, software,
firmware, information/data, and telecommunications).
[NIST]
Integrity,
Availability,
Confidentiality
Confidentiality:
◦ Data confidentiality: confidential information
◦ Privacy: individuals control what information related to
them may be collected/stored and by who can access that
Integrity:
◦ Data integrity: information and programs are changed only
in a specified and authorized manner.
◦ System integrity: a system performs its intended function in
an unimpaired manner, free from unauthorized
manipulation of the system.
Availability: Assures that systems work promptly and service
is not denied to authorized users.
Security requirements
Authenticity
◦ The property of being genuine and being able to be
verified and trusted;
◦ confidence in the validity of a message originator.
◦ verifying that users are who they say they are
Accountability
◦ The security goal that generates the requirement for
actions of an entity to be traced uniquely to that entity.
◦ This supports nonrepudiation, deterrence, fault
isolation, intrusion detection and prevention, and after-
action recovery and legal action.
ITU-T X.800 “Security Architecture for OSI”
Defines a systematic way of defining and providing
security requirements
For us it provides a useful, if abstract, overview of
concepts we will study
Consider 3 aspects of information security
Security attack
◦ Any action that compromises the security of information owned
by an organization.
Security mechanism
◦ A process that is designed to detect, prevent, or recover from a
security attack.
Security service
◦ A service that enhances the security of the data processing
systems of an organization.
◦ Intended to counter security attacks, and make use of one or more
security mechanisms to provide the service.
Often threat & attack used to mean same thing
Threat
A potential for violation of security, which exists when
there is a circumstance, capability, action, or event that
could breach security and cause harm. That is, a threat is a
possible danger that might exploit a vulnerability.
Attack
An assault on system security that derives from an
intelligent threat; that is, an intelligent act that is a
deliberate attempt (especially in the sense of a method or
technique) to evade security services and violate the
security policy of a system.
Have a wide range of attacks, we can focus of generic
types of attacks
Passive Attack
◦ nature of eavesdropping on, or monitoring of,
transmissions.
◦ The goal of the opponent is to obtain information
that is being transmitted.
Active Attack
◦ involve some modification of the data stream
◦ or the creation of a false stream
X.800 defines
◦ a security service as a service that is provided by a protocol
layer of communicating open systems and that ensures
adequate security of the systems or of data transfers.
◦ ISO | International Organization for Standardization
RFC (Request for comment) 2828 defines
◦ a processing or communication service that is provided by a
system to give a specific kind of protection to system
resources; security services implement security policies and
are implemented by security mechanisms.
◦ IETF | Internet Engineering Task Force
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
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
Specific security mechanisms: incorporated into the
appropriate protocol layer in order to provide some of
the OSI security services
◦ Encipherment
◦ digital signatures
◦ access controls
◦ data integrity
◦ authentication exchange
◦ traffic padding
◦ routing control
◦ notarization
Pervasive security mechanisms: Mechanisms that are
not specific to any particular OSI security service or
protocol layer.
◦ trusted functionality
◦ security labels
◦ event detection
◦ security audit trails
◦ security recovery
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
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
Conventional / private-key / single-key
sender and recipient share a common key
all classical encryption algorithms are
private-key (opposite to Public Key)
◦ What is the difference between private and public
key ?
was only type prior to invention of public-key
in 1970‟s
and by far most widely used
Plaintext: original message
Cipher text: coded message
Cipher: algorithm for transforming plaintext to
cipher text
Key: info used in cipher known only to
sender/receiver
Encipher (encrypt): converting plaintext to
cipher text
Decipher (decrypt): recovering plain text from
cipher text
Cryptography: study of encryption
principles/methods
two requirements for secure use of symmetric
encryption:
◦ a strong encryption algorithm
◦ a secret key known only to sender / receiver
assume encryption algorithm is known
implies a secure channel to distribute key
Message in plaintext
For encryption, a key of the form
Encryption algorithm forms the cipher text
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
The best-known multiple-letter encryption
cipher is the Playfair, which treats diagrams in
the plaintext as single units and translates
these units into ciphertext diagrams.
Substitution Techniques
1. Caesar Cipher
2. Monoalphabetic Ciphers
3. Playfair Cipher
4. Hill Cipher
Polyalphabetic Cipher
1. Vigenère Cipher
Transposition Techniques
Rotor Machines
Where letters of plaintext are replaced by
other letters or by numbers or symbols
if plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext
bit patterns with ciphertext bit patterns
Earliest known substitution cipher by Julius
Caesar
first attested use in military affairs
replaces each letter by 3rd letter on
example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
can define transformation as:
abcdefghijklmnopqrstuvwxyz
DEFGHIJKLMNOPQRSTUVWXYZABC
mathematically give each letter a number
abcdefghij 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
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Cipher text: WIRFRWAJUHYFTSDVFSFUUFYA
now have a total of 26! = 4 x 10^26 keys
with so many keys, might think is secure
but would be !!!WRONG!!!
problem is language characteristics
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
key concept – mono-alphabetic substitution
ciphers do not change relative letter frequencies
discovered by Arabian scientists in 9th century
calculate letter frequencies for cipher text
compare counts/plots against known values
if Ceaser cipher look for common peaks/troughs
◦ peaks at: A-E-I triple, NO pair, RST triple
◦ troughs at: JK, X-Z
for mono-alphabetic must identify each letter
◦ tables of common double/triple letters help
Given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
count relative letter frequencies
=
This encryption algorithm takes „m‟
successive plaintext letters and
substitutes for them „m‟ cipher text
letters.
The substitution is determined by
linear equations in which each
character is assigned a numerical value
.
For m = 3, the system can be
described as
O
In matrix format,
r
Here
Strength
◦ completely hides single-letter frequencies.
◦ the use of a larger matrix hides more frequency
◦ information. For example, a 3x3 Hill cipher hides
not only single-letter but also two-letter frequency
information.
Weaknesses
◦ easily broken with a known plaintext attack
◦ For an m x m Hill cipher, suppose we have „m‟
plaintext–ciphertext pairs, each of length „m‟, then
we can break the key.
polyalphabetic substitution ciphers
improves security using multiple cipher
alphabets
make cryptanalysis harder with more
alphabets to guess and flatter frequency
distribution
use a key to select which alphabet is used for
each letter of the message
use each alphabet in turn
repeat from start after end of key is reached
simplest polyalphabetic substitution cipher
effectively multiple Caesar ciphers
key is multiple letters long K = k1 k2 ... kd
ith letter specifies ith alphabet to use
use each alphabet in turn
repeat from start after d letters in message
decryption simply works in reverse
write the plaintext out
write the keyword repeated above it
use each key letter as a Caesar cipher
key
encrypt the corresponding plaintext
letter
eg using keyword deceptive
have multiple ciphertext letters for each
plaintext letter
hence letter frequencies are 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 then can attach each
method developed by Babbage / Kasiski
repetitions in ciphertext give clues to period
so find same plaintext an exact period apart
which results in the same ciphertext
of course, could also be random fluke
eg repeated “VTW” in previous example
suggests size of 3 or 9
then attack each monoalphabetic cipher
individually using same techniques as before
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
write message letters out diagonally over a
number of rows
then read off cipher row by row
eg. write message out as:
m e m a t r h t g p r y
e t e f e t e o a a t
giving ciphertext
MEMATRHTGPRYETEFETEOAAT
a more complex transposition
write letters of message out in rows over a
specified number of columns
then reorder the columns according to some
key before reading off the rows
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
Shows an example in which a subset of
the words of the overall message is
used to convey the hidden message.
See if you can decipher this; it‟s not
too hard.