Secured Communications 1
Secured Communications 1
Secured
Communications
Course outcome 2
➢ 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
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.
➢ 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.
➢ 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
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
Security Services
Security Services
23
Security Mechanisms
Security Mechanisms
26
➢ 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
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
Introduction to Number
Theory
Divisibility
39
▪ 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
𝑎 = 𝑞𝑛 + 𝑟 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
➢ Example
The Euclidean Algorithm
46
➢ Example
Modular Arithmetic
47
➢ Example
48
Classical Encryption
Techniques
Symmetric Cipher Model
49
➢ 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
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:
➢ 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
➢ 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
➢ 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
Transposition Techniques
Google Classroom
98
Transposition Techniques
99
Rotor Machines
Rotor Machines 10
7
Steganography
Steganography 11
1