Network Security
Network Security
Network Security
Chapter IV
Network Security
Many daily activities have been shifted from physical world to cyber space
Use of computers
Protect files and other stored information
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Definitions
3
Computer Security
Generic name for the collection of tools designed to protect data and 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
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
A threat to a computing system is a set of circumstances that has the potential to cause
loss or harm
A vulnerability is a weakness in the security system that might be exploited to cause loss
or harm
Interception
Interruption
Modification and
Fabrication
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Example
Malicious destruction of a hardware device
Malfunction of an operating system file manager so that it cannot find a particular disk file.
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Modification: If an unauthorized party not only accesses but tampers with an asset
Example
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Security Goals
10
Confidentiality
Integrity and
Availability.
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Security Goals …
11
Confidentiality: Ensures that Integrity: An assets can be modified Availability: An assets are
computer-related assets are only by authorized parties or only in accessible to authorized
accessed only by authorized authorized ways. parties at appropriate
parties. In this context, modification includes times.
Writing, Changing, changing status,
That is, only those who If some person or system
Deleting and Creating
should have access to has legitimate access to a
If we say that we have preserved particular set of objects,
something will actually get the integrity of an item, we may that access should not be
that access. mean that the item is prevented.
By "access," we mean not
Accurate and unmodified For this reason,
only reading but also modified only in acceptable ways availability is sometimes
viewing, printing, or simply modified only by authorized people known by its opposite
knowing that a particular modified only by authorized denial of service.
asset exists. processes
Confidentiality is sometimes Consistent, meaningful and usable
Security Goals…
12
An object or service is thought to be available if
It is present in a usable form.
It has capacity enough to meet the service's needs.
It is making clear progress, and, if in wait mode, it has a bounded waiting time
The service is completed in an acceptable period of time.
There is a timely response to our request.
Resources are allocated fairly so that some requesters are not favored over others.
The service or system involved follows a philosophy of fault tolerance, whereby hardware or
software faults lead to graceful cessation of service or to work-around rather than to crashes and
abrupt loss of information.
The service or system can be used easily and in the way it was intended to be used.
Concurrency is controlled; that is, simultaneous access, deadlock management, and exclusive
access are supported as required.
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Hardware Controls
Smartcard
Policies
Frequent changes of passwords
Physical Controls
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Methods of Defense/Control/Protection
14
To protect against harm, then, we can neutralize the threat, close the vulnerability, or both
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Software Controls
15
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Hardware Controls
16
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Multiple Controls
17
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
4. specify a protocol enabling the principals to use the transformation and secret
information for a security service
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Background
Cryptography
Symmetric and Asymmetric Cryptosystems
Substitution Techniques
Caesar Cipher
Vernam Cipher
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Background
21
Any time after S transmits message via T, the message is vulnerable to exploitation, and
O might try to access the message in any of the following ways:
Block it, by preventing its reaching R, thereby affecting the availability of the message.
Intercept it, by reading or listening to the message, thereby affecting the confidentiality of the
message.
Modify it, by seizing the message and changing it in some way, affecting the message's integrity.
Fabricate an authentic-looking message, arranging for it to be delivered as if it came from S,
thereby also affecting the integrity of the message
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Background…
22
Encryption is the process of encoding a message so that its meaning is not obvious
Decryption is the reverse process, transforming an encrypted message back into its
normal, original form.
Alternatively, the terms encode and decode or encipher and decipher are used
instead of encrypt and decrypt.
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Background…
23
For instance, the plaintext message "I want cookies" can be denoted as the message
string <I, ,w,a,n,t, , c,o,o,k,i,e,s>.
It can be transformed into ciphertext <c1, c2, …, c14>, and the encryption algorithm tells
us how the transformation is done.
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Background…
24
Cryptography means hidden writing, and it refers to the practice of using encryption to conceal
text.
A cryptanalyst studies encryption and encrypted messages, hoping to find the hidden meanings.
A Cryptographer and a cryptanalyst attempt to translate coded material back to its original
form.
A cryptographer works on behalf of a legitimate sender or receiver
A cryptanalyst works on behalf of an unauthorized interceptor
Cryptology is the research into and study of encryption and decryption. Includes
cryptography and
cryptanalysis
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Formal Notation
25
We want to be able to get the original message back so that the receiver can read it properly
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Encryption Algorithms
26
The encryption and decryption rules, called algorithms, often use a device called a
key, denoted by K
Thus the resulting ciphertext depends on
The original plaintext message
The algorithm and
The key value
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Conventional/private-key /single-key
Sender and recipient share a common key
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Representing Characters
29
Substitution Technique
30
The technique of substituting a character or symbol for each character of the original
message is called a monoalphabetic cipher or simple substitution.
The Caesar Cipher
Each letter is translated to the letter a fixed number of places after it in the alphabet.
Caesar used a shift of 3, so plaintext letter p was enciphered as ciphertext letter c by the
i i
rule ci = E(pi) = pi + 3
Using this encryption, the message TREATY IMPOSSIBLE would be encoded as
TREATY IMPOSSIBLE
wuhdwb lpsrvvleoh
Advantage: Simple
Disadvantage: Algorithm has to be secret
Once Algorithm is known all messages can be decrypted
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Vernam Cipher
32
teletype machine.
The tape contained random numbers that were combined with characters typed
once.
As long as the key tape does not repeat or is not reused, this type of cipher is
Vernam Cipher…
33
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Single Round
36
Uses two 32-bit L & R halves
As for any Feistel cipher can describe as:
Li = Ri–1
Ri = Li–1 F(Ri–1, Ki)
F takes 32-bit R half and 48-bit subkey:
Public-Key Cryptography
37
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
1. Plaintext: This is the readable message or data that is fed into the algorithm as
input
2. Encryption algorithm: The encryption algorithm performs various
transformations on the plaintext
3. Public and private keys: This is a pair of keys that have been selected so that if
one is used for encryption, the other is used for decryption
The exact transformations performed by the algorithm depend on the public or private key that is
provided as input
5. Ciphertext: This is the scrambled message produced as output
It depends on the plaintext and the key
For a given message, two different keys will produce two different ciphertexts
6. Decryption algorithm: This algorithm accepts the ciphertext and the matching key
and produces the original plaintext
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
those who can encrypt messages or verify signatures cannot decrypt messages or
create signatures
Application of public key encryption
some algorithms are suitable for all uses, others are specific to one
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
The RSA algorithm also operates with arithmetic mod n like many other.
The two keys used in RSA, d and e, are used for decryption and encryption.
They are actually interchangeable
Either can be chosen as the public key, but once one having been chosen, the other one must be
kept private.
P = E(D(P)) = D(E(P))
You can think of E and D as two complementary functions, each of which "undoes" the other
The RSA scheme is a block cipher in which the plaintext and ciphertext are integers between 0
and n - 1 for some n
A typical size for n is 1024 bits, or 309 decimal digits
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
So far, nobody has found a shortcut or easy way to factor large numbers in a finite set
called a field.
In a highly technical but excellent paper, Boneh reviews all the known
cryptanalytic attacks on RSA and concludes that none is significant
Because the factorization problem has been open for many years, most
cryptographers consider this problem a solid basis for a secure cryptosystem
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Steps in RSA
47
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Steps in RSA…
48
P= 1123 mod 187 = [(118 mod 187) x (118 mod 187) x (114 mod 187) X
(112 mod 187)]* 11) mod 187 = (33x33x55x121x11)mod 187 = 88
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Exercise 1
51
Suppose n= 187, e = 7 and d = 23, show the Encryption and Decryption of z = 122
Solution
Encryption
Decryption
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Exercise 2
52
Let p= 113, q = 157, e=101 and d =173, Show the Encryption and Decryption of P = “BA”.
Use the following function to change the text in to its integer equivalent
Solution
The integer equivalent of “BA” is
PI= 66* 256^0+65*256^1= 16706
n = 113*157 = 17741
Encryption
= 11205
Decryption
CT = 11205
P = (CT)dmod n = 11205173mod 17741 = 16706
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
Exercise 3
53
Let N = 1591 p= 37, q = 43, e=17 and d =89, Show the Encryption and Decryption of P = “LARGE NO” by
employing a block of two characters at a time.
Solution B1 = “LA” , B2=“RG”, B3 = “E “, B4=“NO”
Use the following function to change the text in to its integer equivalent
L A R G E N O
12 1 18 7 5 27 19 20
CipherText = “1054 1337 327 731”
= 1054 = 39
= 1337 = 207
= 327 = 734
= 731 = 559
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023
Advanced Computer Networks /Chapter IV
for i = 1 to lb do
Pi[i] = PI mod 27
PI = PI/27
end
Example
B1I = 39
Pi[1] = 39 mod 27 = 12 => “L”
Pi[2] = (39/27) mod 27=1 mod 27 = 1=> “A”
Haramaya University, HiT, SECE Computer Network and Security Saturday, August 12, 2023