0% found this document useful (0 votes)
23 views112 pages

Secured Communications 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views112 pages

Secured Communications 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 112

1

Secured
Communications
Course outcome 2

At the end of the course, the student will be able to:


➢ Have a fundamental understanding of the objectives of
cryptography and network security.
➢ Become familiar with the cryptographic techniques that provide
information and
➢ Be able to evaluate the security of communication systems
Course evaluation pattern 3

Total Marks: 100

➢ Assignment: 20 Marks
➢ Minor: 10 Marks
➢ Mid Exam: 30 Marks
➢ End Exam: 40 Marks
Course overview 4

➢ Background
✓ Computer and Network Security Concepts
✓ Number Theory
➢ Symmetric Ciphers/Cryptography
✓ Classical Encryption Techniques
✓ Block Ciphers and the Data Encryption Standard
✓ Finite Fields
✓ Advanced Encryption Standard
✓ Random Bit Generation and Stream Ciphers
➢ Asymmetric Ciphers/Cryptography
✓ Public-Key Cryptography
✓ Other Public-Key Cryptosystems
Course overview 5

➢ Cryptographic Data Integrity Algorithms


➢ Mutual Trust
➢ Wireless Network Security
➢ Security Mechanisms in 5G Wireless Systems
➢ Advanced Methods for Secured Communications (part of assignment)
✓ Physical layer security
✓ Quantum Cryptography
✓ Blockchain
✓ AI-driven…etcetera etcetera
6

Text Book:
➢ Cryptography and Network Security: Principles and Practice, Seventh
Edition, William Stallings, 2017, Pearson, ISBN 10:1-292-15858-1.
➢ Introduction to Modern Cryptography by Jonathan Katz and Yehuda Lindell
7

Background
Examples of Security
8
Violations
➢ User A transmits a file to user B. The file contains sensitive information (e.g., payroll
records) that is to be protected from disclosure. User C, who is not authorized to read the
file, is able to monitor the transmission and capture a copy of the file during its transmission.

➢ A network manager, D, transmits a message to a computer, E, under its management. The


message instructs computer E to update an authorization file to include the identities of a
number of new users who are to be given access to that computer. User F intercepts the
message, alters its contents to add or delete entries, and then forwards the message to E,
which accepts the message as coming from manager D and updates its authorization file
accordingly.

➢ Rather than intercept a message, user F constructs its own message with the desired entries
and transmits that message to E as if it had come from manager D. Computer E accepts the
message as coming from manager D and updates its authorization file accordingly.
Examples of Security
9
Violations
➢ An employee is fired without warning. The personnel manager sends a message to a server
system to invalidate the employee’s account. When the invalidation is accomplished, the
server is to post a notice to the employee’s file as confirmation of the action. The employee
value, intercept the message and delay it long enough to make a final access to the server to
retrieve sensitive information. The message is then forwarded, the action taken, and the
confirmation posted. The employee’s action may go unnoticed for some considerable time.

➢ A message is sent from a customer to a stockbroker with instructions for various


transactions. Subsequently, the investments lose value, and the customer denies sending the
message.
Computer Security
10
Concepts
➢ The NIST Computer Security Handbook defines the term computer security as follows:
Computer Security: The protection afforded to an automated information system in order to
attain the applicable objectives of preserving the integrity, availability, and confidentiality
of information system resources (includes hardware, software, firmware, information/data,
and telecommunications).
This definition introduces three key objectives that are at the heart of computer security:
➢ Confidentiality: Preserving authorized restrictions on information access and disclosure,
including means for protecting personal privacy and proprietary information. A loss of
confidentiality is the unauthorized disclosure of information. This term covers two related
concepts:
✓ Data confidentiality: Assures that private or confidential information is not made
available or disclosed to unauthorized individuals.
✓ Privacy: Assures that individuals control or influence what information related to them
may be collected and stored and by whom and to whom that information may be
disclosed.
Computer Security
11
Concepts
➢ Integrity: Guarding against improper information modification or destruction, including
ensuring information authenticity. A loss of integrity is the unauthorized modification or
destruction of information. This term covers two related concepts:
✓ Data integrity: Assures that information (both stored and in transmitted packets) and
programs are changed only in a specified and authorized manner.
✓ System integrity: Assures that a system performs its intended function in an unimpaired
manner, free from deliberate or inadvertent unauthorized manipulation of the system.
➢ Availability: Assures that systems work promptly, and service is not denied to authorized
users. Ensuring timely and reliable access to and use of information. A loss of availability is
the disruption of access to or use of information or an information system.
➢ Authenticity: The property of being genuine and being able to be verified and trusted;
confidence in the validity of a transmission, a message, or message originator. This means
verifying that users are who they say they are and that each input arriving at the system came
from a trusted source.
Computer Security
12
Concepts
➢ 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. Because truly
secure systems are not yet an achievable goal, we must be able to trace a security breach to a
responsible party. Systems must keep records of their activities to permit later forensic
analysis to trace security breaches or to aid in transaction disputes.
OSI Security Architecture
13

➢ The OSI Security Architecture defines a systematic approach to providing security at each
layer. It defines security services and security mechanisms that can be used at each of the
seven layers of the OSI model to provide security for data transmitted over a network.
OSI Security Architecture
14

➢ 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 data processing systems
and information transfers of an organization. Services are intended to counter
security attacks and they make use of one or more security mechanisms to provide
the service.
15

Security Attacks
Security Attacks
16

Two generic types of attacks:


➢ A Passive Attack attempts to learn or make use of information from the system but
does not affect system resources.
Passive Attacks
17

Passive attacks are further divided into two parts based on their behavior:
➢ Eavesdropping: Eavesdropping involves the attacker intercepting and listening to
communications between two or more parties without their knowledge or consent.
Eavesdropping can be performed using a variety of techniques, such as packet
sniffing, or man-in-the-middle attacks.
➢ Traffic analysis: This involves the attacker analyzing network traffic patterns and
metadata to gather information about the system, network, or device. Here the
intruder can’t read the message but only understand the pattern and length of
encryption. Traffic analysis can be performed using a variety of techniques, such as
network flow analysis, or protocol analysis.
Passive Attacks
18

➢ Passive attacks are very difficult to detect, because they do not involve any
alteration of the data. Typically, the message traffic is sent and received in an
apparently normal fashion, and neither the sender nor receiver is aware that a third
party has read the messages or observed the traffic pattern. However, it is feasible
to prevent the success of these attacks, usually by means of encryption. Thus, the
emphasis in dealing with passive attacks is on prevention rather than detection.
Active Attacks
19

➢ Active attacks involve some modification of the data stream or the creation of a
false stream and can be subdivided into four categories:
Active Attacks
20
Active attacks are further divided into four parts based on their behavior:
➢ Masquerade: Masquerade is a type of attack in which the attacker pretends to be
an authentic sender in order to gain unauthorized access to a system. This type of
attack can involve the attacker using stolen or forged credentials, or manipulating
authentication or authorization controls in some other way.
➢ Replay: Replay is a type of active attack in which the attacker intercepts a
transmitted message through a passive channel and then maliciously or fraudulently
replays or delays it at a later time.
➢ Modification of Message: Modification of Message involves the attacker
modifying the transmitted message and making the final message received by the
receiver look like it’s not safe or non-meaningful. This type of attack can be used to
manipulate the content of the message or to disrupt the communication process.
➢ Denial of service (DoS): Denial of Service attacks involve the attacker sending a
large volume of traffic to a system, network, or device in an attempt to overwhelm
it and make it unavailable to users.
Active Attacks
21

➢ Active attacks present the opposite characteristics of passive attacks. Whereas


passive attacks are difficult to detect, measures are available to prevent their
success.
➢ On the other hand, it is quite difficult to prevent active attacks absolutely because of
the wide variety of potential physical, software, and network vulnerabilities.
➢ Instead, the goal is to detect active attacks and to recover from any disruption or
delays caused by them. If the detection has a deterrent effect, it may also contribute
to prevention.
22

Security Services
Security Services
23

➢ 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.
➢ RFC 4949 provides the following definition: 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.

X.800 divides these services into five categories


1. Authentication: The assurance that the communicating entity is the one that it
claims to be.
2. Access Control: The prevention of unauthorized use of a resource (i.e., this
service controls who can have access to a resource, under what conditions access
can occur, and what those accessing the resource are allowed to do).
Security Services
24

3. Data Confidentiality: Data Confidentiality is responsible for the protection of


information from being accessed or disclosed to unauthorized parties.
4. Data integrity: The assurance that data received are exactly as sent by an
authorized entity (i.e., contain no modification, insertion, deletion, or replay).
5. Non- repudiation: Non-repudiation involves the use of techniques to create a
verifiable record of the origin and transmission of a message, which can be used to
prevent the sender from denying that they sent the message.
✓ Nonrepudiation prevents either sender or receiver from denying a transmitted message.
Thus, when a message is sent, the receiver can prove that the alleged sender in fact sent
the message. Similarly, when a message is received, the sender can prove that the
alleged receiver in fact received the message.
❖ Availability service. An availability service is one that protects a system to ensure
its availability. This service addresses the security concerns raised by denial-of-
service attacks. It depends on proper management and control of system resources
and thus depends on access control service and other security services.
25

Security Mechanisms
Security Mechanisms
26

➢ The mechanism that is built to identify any breach of security or


attack on the organization, is called a security mechanism. Security
Mechanisms are also responsible for protecting a system, network, or
device against unauthorized access, tampering, or other security
threats.
❖ Security Mechanisms (X.800)

➢ Specific security mechanisms: May be incorporated into the


appropriate protocol layer in order to provide some of the OSI
security services.
➢ Pervasive security mechanisms: Mechanisms that are not specific to
any particular OSI security service or protocol layer.
Specific Security
27
Mechanisms
➢ Encipherment: The use of mathematical algorithms to transform
data into a form that is not readily intelligible. The transformation and
subsequent recovery of the data depend on an algorithm and zero or
more encryption keys.
➢ Digital Signature: Data appended to, or a cryptographic
transformation of, a data unit that allows a recipient of the data unit to
prove the source and integrity of the data unit and protect against
forgery (e.g., by the recipient)
➢ Access Control: A variety of mechanisms that enforce access rights
to resources.
➢ Data Integrity: A variety of mechanisms used to assure the integrity
of a data unit or stream of data units.
➢ Authentication Exchange: A mechanism intended to ensure the
identity of an entity by means of information exchange.
Specific Security
28
Mechanisms
➢ Traffic Padding: The insertion of bits into gaps in a data stream to
frustrate traffic analysis attempts.
➢ Routing Control: Enables selection of particular physically secure
routes for certain data and allows routing changes, especially when a
breach of security is suspected.
➢ Notarization: The use of a trusted third party to assure certain
properties of a data exchange.
Pervasive Security
29
Mechanisms
➢ Trusted Functionality: That which is perceived to be correct with
respect to some criteria (e.g., as established by a security policy).
➢ Security Label: The marking bound to a resource (which may be a
data unit) that names or designates the security attributes of that
resource.
➢ Event Detection: Detection of security-relevant events.
➢ Security Audit Trail: Data collected and potentially used to
facilitate a security audit, which is an independent review and
examination of system records and activities.
➢ Security Recovery: Deals with requests from mechanisms, such as
event handling and management functions, and takes recovery
actions.
30

Model for Network


Security
Model for Network Security
31

➢ A general model to describe the process of network security is shown


below.
➢ A message is to be transferred from one party to another across some
sort of Internet service.
Model for Network Security
32

➢ The two parties, who are the principals in this transaction, must
cooperate for the exchange to take place.
➢ A logical information channel is established by defining a route
through the Internet from source to destination and by the cooperative
use of communication protocols (e.g., TCP/IP) by the two principals.
Model for Network Security
33

➢ Security aspects come into play when it is necessary or desirable to


protect the information transmission from an opponent who may
present a threat to confidentiality, authenticity, and so on.
➢ All the techniques for providing security have two components:
▪ A security-related transformation on the information to be sent.
Examples include the encryption of the message, which scrambles the
message.
Model for Network Security
34

▪ Some secret information shared by the two principals and, it is hoped,


unknown to the opponent.
▪ An example is an encryption key used in conjunction with the
transformation to scramble the message before transmission and
unscramble it on reception.
▪ A trusted third party may be needed to achieve secure transmission. Or a
third party may be needed to arbitrate disputes between the two
principals concerning the authenticity of a message transmission.
Model for Network Security
35

This general model shows that there are four basic tasks in designing a
particular security service:
➢ Design an algorithm for performing the security-related
transformation (message de/encryption). The algorithm should be
such that an opponent cannot defeat its purpose.
➢ Generate the secret information to be used with the algorithm.
➢ Develop methods for the distribution and sharing of the secret
information.
➢ Specify a protocol to be used by the two principals that makes use of
the security algorithm and the secret information to achieve a
particular security service.
Network Access Security
36
Model
This reflects a concern for protecting an information system from
unwanted access. :
➢ Hackers, who attempt to penetrate systems that can be accessed over
a network.
➢ Another type of unwanted access is the placement in a computer system of
logic that exploits vulnerabilities in the system and that can affect
application programs as well as utility programs, such as editors and
compilers.
Standards
37

Many of the security techniques and applications which we will study


have been specified as standards. Standards have been developed to
cover management practices and the overall architecture of security
mechanisms and services. The most important (in the current context) of
these organizations are as follows:
➢ National Institute of Standards and Technology.
➢ Internet Society.
➢ ITU-T: The International Telecommunication Union (ITU).
➢ ISO: The International Organization for Standardization (ISO)
38

Introduction to Number
Theory
Divisibility
39

➢ We say that a nonzero 𝑏 divides 𝑎 if 𝑎 = 𝑚𝑏 for some 𝑚, where


𝑎, 𝑏, and 𝑚 are integers. That is, 𝑏 divides 𝑎 if there is no remainder
on division.
➢ Also, if 𝑏|𝑎, we say that 𝑏 is a divisor of 𝑎.

➢ Properties of divisibility for integers:


▪ If 𝑎|1, then 𝑎 = ±1.
▪ If 𝑎|𝑏 and 𝑏|𝑎 , then 𝑎 = ± 𝑏.
▪ Any b ≠ 0 divides 0.
▪ If 𝑎|𝑏 and 𝑏|𝑐, then 𝑎|𝑐:
Divisibility
40

▪ If 𝑏|𝑔 and 𝑏|ℎ, then 𝑏|(𝑚𝑔 + 𝑛ℎ) for arbitrary integers 𝑚 and 𝑛.
To prove this, note that
▪ If 𝑏|𝑔, then 𝑔 is of the form 𝑔 = 𝑏 × 𝑔1 for some integer 𝑔1 .
▪ If 𝑏|ℎ, then ℎ is of the form h = 𝑏 × ℎ1 for some integer ℎ1 .
So
𝑚𝑔 + 𝑛ℎ = 𝑚𝑏𝑔1 + 𝑛𝑏ℎ1 = 𝑏 × (𝑚𝑔1 + 𝑛ℎ1 )
and therefore, 𝑏 divides 𝑚𝑔 + 𝑛ℎ.
The Division Algorithm
41

Given any positive integer 𝑛 and any nonnegative integer 𝑎, if we


divide 𝑎 by 𝑛, we get an integer quotient 𝑞 and an integer remainder 𝑟
that obey the following relationship:

𝑎 = 𝑞𝑛 + 𝑟 0 ≤ 𝑟 < 𝑛; 𝑞 = 𝑎/𝑛
Where 𝑥 is the largest integer less than or equal to 𝑥. The above equation is
referred to as the division algorithm.
The Euclidean Algorithm
42

➢ A simple procedure for determining the greatest common divisor of


two positive integers.
➢ Two integers are relatively prime if and only if their only common
positive integer factor is 1.
➢ Greatest Common Divisor: The greatest common divisor of 𝑎 and 𝑏,
gcd(𝑎, 𝑏), is the largest integer that divides both 𝑎 and 𝑏. Also,
gcd(0, 0) = 0.
➢ More formally, the positive integer 𝑐 is said to be the greatest
common divisor of 𝑎 and 𝑏 if
▪ 𝑐 is a divisor of 𝑎 and of 𝑏.
▪ any divisor of 𝑎 and 𝑏 is a divisor of 𝑐.
The Euclidean Algorithm
43

➢ An equivalent definition is the following:


gcd(𝑎, 𝑏) = max[𝑘, such that 𝑘|𝑎 and 𝑘|𝑏]
➢ Because we require that the greatest common divisor be positive,
gcd(𝑎, 𝑏) = gcd(𝑎, −𝑏) = gcd(−𝑎, 𝑏) = gcd(−𝑎, −𝑏).
➢ In general, gcd(𝑎, 𝑏) = gcd(|𝑎|, |𝑏|).

➢ As all nonzero integers divide 0, we have gcd(𝑎, 0) = |𝑎|.


The Euclidean Algorithm
44

➢ Finding the greatest common divisor: an algorithm credited to


Euclid for easily finding the greatest common divisor of two integers.
This algorithm has broad significance in cryptography.
The Euclidean Algorithm
45

➢ Example
The Euclidean Algorithm
46

➢ Example
Modular Arithmetic
47

➢ Example
48

Classical Encryption
Techniques
Symmetric Cipher Model
49

➢ Symmetric encryption, also referred to as conventional encryption or


single-key encryption or private-key encryption.
➢ Was the only type of encryption in use prior to the development of
public-key encryption in the 1970s.
➢ It remains by far the most widely used of the two types of
encryption.
➢ All classical encryption algorithms are private-key.
Symmetric Cipher Model
50

➢ Cryptography: Study of encryption principles/methods.


▪ The many schemes used for encryption constitute the area of study
known as cryptography.
▪ Such a scheme is known as a cryptographic system or a cipher.
➢ Cryptanalysis: It is the science of recovering plain text of the
message without having access to the key.
➢ Cryptology: Field of both cryptography and cryptanalysis
Symmetric Cipher Model
51

A symmetric encryption scheme has five ingredients:


➢ Plaintext: This is the original intelligible message or data that is fed
into the algorithm as input.
➢ Encryption algorithm: The encryption algorithm performs various
substitutions and transformations on the plaintext.
➢ Secret key: The secret key is also input to the encryption algorithm.
▪ The key is independent of the plaintext and of the algorithm.
▪ The algorithm will produce a different output depending on the specific
key being used at the time.
▪ The exact substitutions and transformations performed by the algorithm
depend on the key.
Symmetric Cipher Model
52

➢ Ciphertext: This is the scrambled message produced as output.


▪ It depends on the plaintext and the secret key.
▪ For a given message, two different keys will produce two different
ciphertexts.
▪ The ciphertext is an apparently random stream of data and is
unintelligible.
➢ Decryption algorithm: This is essentially the encryption algorithm
run in reverse.
▪ It takes the ciphertext and the secret key and produces the original
plaintext.
Model of Symmetric
53
Encryption
Symmetric Cipher Model
54

There are two requirements for secure use of conventional encryption::


1. We need a strong encryption algorithm.
▪ The opponent should be unable to decrypt ciphertext or discover the key
even if he or she is in possession of a number of ciphertexts together
with the plaintext that produced each ciphertext.
2. Sender and receiver must have obtained copies of the secret key in a
secure fashion and must keep the key secure.
➢ We assume that it is impractical to decrypt a message on the basis of
the ciphertext plus knowledge of the encryption/decryption algorithm.
➢ We do not need to keep the algorithm secret; we need to keep only
the key secret.
➢ This feature of symmetric encryption is what makes it feasible for
widespread use.
Symmetric Cipher Model
55

➢ The fact that the algorithm need not be kept secret means that
manufacturers can and have developed low-cost chip
implementations of data encryption algorithms.
➢ These chips are widely available and incorporated into a number of
products.
➢ With the use of symmetric encryption, the principal security problem
is maintaining the secrecy of the key.
Symmetric Cryptosystem
56
Symmetric Cryptosystem
57

Let us take a closer look at the essential elements of a symmetric


encryption scheme.
➢ A source produces a message in plaintext, 𝑋 = [𝑋1 , 𝑋2 , … , 𝑋𝑀 ].
➢ The 𝑀 elements of 𝑋 are letters in some finite alphabet.
➢ For encryption, a key 𝐾 = [𝐾1 , 𝐾2 , … , 𝐾𝐽 ] is generated.
➢ If the key is generated at the message source, then it must also be
provided to the destination by means of some secure channel.
Symmetric Cryptosystem
58

➢ Alternatively, a third party could generate the key and securely


deliver it to both source and destination.
➢ With the message 𝑋 and the encryption key 𝐾 as input, the
encryption algorithm forms the ciphertext 𝑌 = [𝑌1 , 𝑌2 , … , 𝑌𝑁 ] as
𝑌 = E(𝐾, 𝑋)
➢ The intended receiver, in possession of the key, is able to invert the
transformation:
𝑋 = D(𝐾, 𝑌)
Symmetric Cryptosystem
59

➢ An opponent, observing 𝑌 but not having access to 𝐾 or 𝑋, may


attempt to recover 𝑋 or 𝐾 or both 𝑋 and 𝐾.
➢ If the opponent is interested in only this particular message, then the
focus of the effort is to recover 𝑋 by generating a plaintext estimate

𝑋.
➢ Often, however, the opponent is interested in being able to read
future messages as well, in which case an attempt is made to recover
𝐾 by generating an estimate 𝐾.෡
Cryptography
60
Cryptographic systems are characterized along three independent dimensions:
1. The type of operations used for transforming plaintext to ciphertext. All
encryption algorithms are based on two general principles:
▪ Substitution, in which each element in the plaintext (bit, letter, group of bits or
letters) is mapped into another element.
▪ Transposition, in which elements in the plaintext are rearranged.
▪ The fundamental requirement is that no information be lost (i.e., that all
operations are reversible).
2. The number of keys used.
▪ If both sender and receiver use the same key, the system is referred to as
symmetric, single-key, secret-key, or conventional encryption.
▪ If the sender and receiver use different keys, the system is referred to as
asymmetric, two-key, or public-key encryption.
Cryptography
61
3. The way in which the plaintext is processed.
▪ A block cipher processes the input one block of elements at a time,
producing an output block for each input block.
▪ A stream cipher processes the input elements continuously, producing
output one element at a time, as it goes along.
Cryptanalysis and Brute-Force
Attack 62
Typically, the objective of attacking an encryption system is to recover
the key in use rather than simply to recover the plaintext of a single
ciphertext. There are two general approaches to attacking a
conventional encryption scheme:
➢ Cryptanalysis:
▪ Cryptanalytic attacks rely on the nature of the algorithm plus perhaps
some knowledge of the general characteristics of the plaintext or even
some sample plaintext–ciphertext pairs.
▪ This type of attack exploits the characteristics of the algorithm to
attempt to deduce a specific plaintext or to deduce the key being used.
➢ Brute-force attack:
▪ The attacker tries every possible key on a piece of ciphertext until an
intelligible translation into plaintext is obtained.
▪ On average, half of all possible keys must be tried to achieve success.
63

Substitution Techniques
Substitution Technique
64
➢ A substitution technique is one in which the letters of plaintext are
replaced by other letters or by numbers or symbols.
➢ If the plaintext is viewed as a sequence of bits, then substitution
involves replacing plaintext bit patterns with ciphertext bit patterns.
Caesar Cipher:
▪ The earliest known, and the simplest, use of a substitution cipher was
by Julius Caesar.
Caesar Cipher
65
➢ The Caesar cipher involves replacing each letter of the alphabet with
the letter standing three places further down the alphabet.
➢ Let us assign a numerical equivalent to each letter:

➢ Then the algorithm can be expressed as follows. For each plaintext


letter p, substitute the ciphertext letter C:
𝐶 = 𝐸(3, 𝑝) = (𝑝 + 3) mod 26
Caesar Cipher
66
➢ A shift may be of any amount, so that the general Caesar algorithm
is:
𝐶 = 𝐸(𝑘, 𝑝) = (𝑝 + 𝑘) mod 26
➢ If it is known that a given ciphertext is a Caesar cipher, then a brute-
force cryptanalysis is easily performed, i.e., simply try all the 25
possible keys.
Caesar Cipher
67
Caesar Cipher
68
➢ Three important characteristics of this problem enabled us to use a
brute-force cryptanalysis:
▪ The encryption and decryption algorithms are known.
▪ There are only 25 keys to try.
▪ The language of the plaintext is known and easily recognizable.
➢ In most networking situations, we can assume that the algorithms are
known.
➢ What generally makes brute-force cryptanalysis impractical is the use of
an algorithm that employs a large number of keys.
Monoalphabetic Ciphers
69
➢ With only 25 possible keys, the Caesar cipher is far from secure.
➢ A dramatic increase in the key space can be achieved by allowing an
arbitrary substitution.

➢ If cipher line can be any permutation of the 26 alphabetic characters,


then there are 26! or greater than 4 × 1026 possible keys.
➢ This is 10 orders of magnitude greater than the key space for DES
and would seem to eliminate brute-force techniques for
cryptanalysis.
➢ Such an approach is referred to as a monoalphabetic substitution
cipher, because a single cipher alphabet (mapping from plain
alphabet to cipher alphabet) is used per message.
Monoalphabetic Ciphers
70
➢ There is, however, another line of attack. If the cryptanalyst knows
the nature of the plaintext (e.g., noncompressed English text), then
the analyst can exploit the regularities of the language.
➢ Example

➢ As a first step, the relative frequency of the letters can be


determined and compared to a standard frequency distribution for
English.
Monoalphabetic Ciphers
71
Monoalphabetic Ciphers
72

➢ Comparing this breakdown, it seems


likely that cipher letters P and Z are
the equivalents of plain letters e and
t, but it is not certain which is which.
➢ The letters S, U, O, M, and H are all
of relatively high frequency and
probably correspond to plain letters
from the set {a, h, i, n, o, r, s}.
➢ The letters with the lowest
frequencies (namely, A, B, G, Y, I, J)
are likely included in the set {b, j, k,
q, v, x, z}.
Monoalphabetic Ciphers
73
➢ A more systematic approach is to look for other regularities. For example, certain
words may be known to be in the text. Or we could look for repeating sequences of
cipher letters and try to deduce their plaintext equivalents.
➢ A powerful tool is to look at the frequency of two-letter combinations, known as
digrams.
➢ The most common such digram is th. In our ciphertext, the most common digram is
ZW, which appears three times. So we make the correspondence of Z with t and W
with h.
➢ Then, by our earlier hypothesis, we can equate P with e. Now notice that the
sequence ZWP appears in the ciphertext, and we can translate that sequence as
“the.” This is the most frequent trigram (three-letter combination) in English,
which seems to indicate that we are on the right track.
Monoalphabetic Ciphers
74
➢ Next, notice the sequence ZWSZ in the first line. We do not know that these four
letters form a complete word, but if they do, it is of the form th_t. If so, S equates
with a.
➢ So far, then, we have
Monoalphabetic Ciphers
75
➢ Only four letters have been identified, but already we have quite a bit of the
message.
➢ Continued analysis of frequencies plus trial and error should easily yield a solution
from this point.

➢ Monoalphabetic ciphers are easy to break because they reflect the frequency data of
the original alphabet.
Playfair Ciphers
76
➢ The best-known multiple-letter encryption cipher is the Playfair,
which treats digrams in the plaintext as single units and translates
these units into ciphertext digrams.
➢ The Playfair algorithm is based on the use of a 5 × 5 matrix of letters
constructed using a keyword.
Playfair Ciphers
77
➢ In this case, the keyword is monarchy.
➢ The matrix is constructed by filling in the letters of the keyword
(minus duplicates) from left to right and from top to bottom, and then
filling in the remainder of the matrix with the remaining letters in
alphabetic order.
➢ The letters I and J count as one letter. Plaintext is encrypted two
letters at a time, according to the following rules:
Playfair Ciphers
78
1. Repeating plaintext letters that are in the same pair are separated
with a filler letter, such as x, so that balloon would be treated as ba
lx lo on.
2. Two plaintext letters that fall in the same row of the matrix are each
replaced by the letter to the right, with the first element of the row
circularly following the last. For example, ar is encrypted as RM.
Playfair Ciphers
79
3. Two plaintext letters that fall in the same column are each replaced
by the letter beneath, with the top element of the column circularly
following the last. For example, mu is encrypted as CM.
4. Otherwise, each plaintext letter in a pair is replaced by the letter that
lies in its own row and the column occupied by the other plaintext
letter. Thus, hs becomes BP and ea becomes IM (or JM, as the
encipherer wishes).
Playfair Ciphers
80
➢ The Playfair cipher is a great advance over simple monoalphabetic
ciphers.
➢ For one thing, whereas there are only 26 letters, there are 26 * 26 =
676 digrams so that identification of individual digrams is more
difficult.
➢ Furthermore, the relative frequencies of individual letters exhibit a
much greater range than that of digrams, making frequency analysis
much more difficult.
➢ For these reasons, the Playfair cipher was for a long time considered
unbreakable. It was used as the standard field system by the British
Army in World War I and still enjoyed considerable use by the U.S.
Army and other Allied forces during World War II.
Playfair Ciphers
81
➢ Exercise: Encrypt the plaintext HIDE THE GOLD.
Relative Frequency of
Occurrence of Letters 82
Hill Cipher
83
➢ This encryption algorithm takes 𝑚 successive plaintext letters and
substitutes for them 𝑚 ciphertext letters.
➢ The substitution is determined by 𝑚 linear equations in which each
character is assigned a numerical value (𝑎 = 0, 𝑏 = 1, … , 𝑧 =
25).
➢ For 𝑚 = 3, the system can be described as
Hill Cipher
84

➢ C and P are row vectors of length 3 representing the plaintext and


ciphertext.
➢ K is a 3 × 3 matrix representing the encryption key. Operations are
performed mod 26.
Hill Cipher
85

➢ Exercise: Encrypt the plaintext “paymoremoney” and use the


following encryption key
Hill Cipher
86

➢ The first three letters of the plaintext are represented by the vector
(15 0 24).
➢ (15 0 24)K = (303 303 531) mod 26 = (17 17 11) = RRL
➢ Continuing in this fashion, the ciphertext for the entire plaintext is
RRLMWBKASPDH.
➢ Decryption requires using the inverse of the matrix K.
➢ In general terms, the Hill system can be expressed as
Hill Cipher
87

➢ As with Playfair, the strength of the Hill cipher is that it completely


hides single-letter frequencies.
➢ Indeed, with Hill, the use of a larger matrix hides more frequency
information.
➢ Thus, a 3 × 3 Hill cipher hides not only single-letter but also two-
letter frequency information.
Polyalphabetic Ciphers
88

➢ Another way to improve on the simple monoalphabetic technique is


to use different monoalphabetic substitutions as one proceeds
through the plaintext message.
➢ The general name for this approach is polyalphabetic substitution
cipher. All these techniques have the following features in common:
▪ A set of related monoalphabetic substitution rules is used.
▪ A key determines which particular rule is chosen for a given
transformation.
Vigenère Ciphers
89

➢ Vigenère cipher is the best known, and one of the simplest,


polyalphabetic ciphers.
➢ In this scheme, the set of related monoalphabetic substitution rules
consists of the 26 Caesar ciphers with shifts of 0 through 25.
➢ Each cipher is denoted by a key letter, which is the ciphertext letter
that substitutes for the plain-text letter a.
➢ Thus, a Caesar cipher with a shift of 3 is denoted by the key value 3.
➢ Assume a sequence of plaintext letters 𝑃 = 𝑝0 , 𝑝1 , 𝑝2 , … , 𝑝𝑛−1 .
➢ A key consisting of the sequence of letters 𝐾=
𝑘0 , 𝑘1 , 𝑘2 , … , 𝑘𝑚−1 , where typically 𝑚 < 𝑛.
Vigenère Ciphers
90

➢ The sequence of ciphertext letters 𝐶 = 𝐶0 , 𝐶1 , 𝐶2 , … , 𝐶𝑛−1 is


calculated as follows:

➢ Thus, the first letter of the key is added to the first letter of the
plaintext, mod 26, the second letters are added, and so on through the
first 𝑚 letters of the plaintext.
➢ For the next 𝑚 letters of the plaintext, the key letters are repeated.
➢ This process continues until all of the plaintext sequence is
encrypted.
Vigenère Ciphers
91

➢ A general equation of the encryption process is

➢ In essence, each plaintext character is encrypted with a different


Caesar cipher, depending on the corresponding key character.
➢ Similarly, decryption is

➢ To encrypt a message, a key is needed that is as long as the message.


Usually, the key is a repeating keyword.
Vigenère Ciphers
92

➢ Exercise: If the keyword is deceptive, encrypt the message “we are


discovered save yourself”.
Vigenère Ciphers
93
Vigenère Ciphers
94

➢ The periodic nature of the keyword can be eliminated by using a


nonrepeating keyword that is as long as the message itself.
➢ Vigenère proposed what is referred to as an autokey system, in which
a keyword is concatenated with the plaintext itself to provide a
running key. For our example,
Vernam Ciphers
95

➢ The ultimate defense against a cryptanalysis is to choose a keyword


that is as long as the plaintext and has no statistical relationship to it.
➢ Such a system was introduced by an AT&T engineer named Gilbert
Vernam in 1918.
➢ His system works on binary data (bits) rather than letters. The system
can be expressed as follows
Vernam Ciphers
96

➢ Thus, the ciphertext is generated by performing the bitwise XOR of


the plaintext and the key.
➢ Because of the properties of the XOR, decryption simply involves
the same bitwise operation:
97

Transposition Techniques
Google Classroom
98
Transposition Techniques
99

➢ All the techniques examined so far involve the substitution of a


ciphertext symbol for a plaintext symbol.
➢ Transposition cipher involves a mapping by performing some sort of
permutation on the plaintext letters.
➢ The simplest such cipher is the rail fence technique, in which the
plaintext is written down as a sequence of diagonals and then read
off as a sequence of rows.
➢ Example:
Transposition Techniques 10
0

➢ The encrypted message is

➢ A more complex scheme is to write the message in a rectangle, row


by row, and read the message off, column by column, but permute
the order of the columns. The order of the columns then becomes the
key to the algorithm.
➢ For example,
Transposition Techniques 10
1

➢ A pure transposition cipher is easily recognized because it has the


same letter frequencies as the original plaintext.
➢ Cryptanalysis is fairly straightforward and involves laying out the
ciphertext in a matrix and playing around with column positions.
Transposition Techniques 10
2

➢ The transposition cipher can be made significantly more secure by


performing more than one stage of transposition.
Transposition Techniques 10
3

➢ To visualize the result of this double transposition, designate the


letters in the original plaintext message by the numbers designating
their position.
Transposition Techniques 10
4

➢ After the first transposition, we have


Transposition Techniques 10
5

➢ After the second transposition, we have


10
6

Rotor Machines
Rotor Machines 10
7

➢ It has now become apparent that multiple stages of encryption can


produce an algorithm that is significantly more difficult to
cryptanalyze.
➢ Before the introduction of Data Encryption Standard (DES), the most
important application of the principle of multiple stages of
encryption was a class of systems known as rotor machines.
Rotor Machines 10
8
Rotor Machines 10
9
11
0

Steganography
Steganography 11
1

➢ The methods of steganography conceal the existence of the message,


whereas the methods of cryptography render the message
unintelligible to outsiders by various transformations of the text.
➢ Various other techniques have been used historically, for example:
▪ 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.
▪ Invisible ink: A number of substances can be used for writing but leave
no visible trace until heat or some chemical is applied to the paper.
▪ Pin punctures: Small pin punctures on selected letters are ordinarily
not visible unless the paper is held up in front of a light.
▪ Typewriter correction ribbon: Used between lines typed with a black
ribbon, the results of typing with the correction tape are visible only
under a strong light.
Steganography 11
2

You might also like