CN Module4
CN Module4
Network Security
Overview of Network Security
Network security is required by the users to communicate on the network.
If medium is insecure then an intruder may intercept, read and modify the transmitted-data
from sender to receiver.
(a) Message content and sender identity falsified by intruder; (b) a method of applied security
In figure a, user 1 sends a message ("i am user 1") to user 2. Since the network lacks any
security system, an intruder can receive the message and change its content to a different
message ("hi i am user 1") and send it to user 2. User 2 may not know that this falsified
message is really from user 1(authentication).
In figure 10.1b, a security block is added to each side of the communication, and a secret key
that only users 1 and 2 would know about is included. Therefore, the message is changed to a
form that cannot be altered by the intruder.
Link Attack
• Link attack occurs when a hacker gets access to a link and thereby intercepts, interrupts or
modifies routing messages. This act similarly on both the link-state and the distance-vector
protocols.
• If an attacker succeeds in placing an attack in a link-state routing protocol, a router may send
incorrect updates about its neighbors or remain silent even if the link state of its neighbor has
changed
Router Attack
• Router Attack may affect the link-state protocol or even the distance-vector protocol.
• In link-state protocol, if routers are attacked, they become malicious. As a result, routers may
add a non existing link to a routing table delete an existing link or change the cost of a link.
• In the distance-vector protocol, an attacker may cause routers to send wrong updates about
any node in the network, thereby misleading a router and resulting in network problems.
5) Ping of death: An attacker may send a ping message, which is large and therefore must be
fragmented for transport. The receiver then starts to reassemble the fragments as the ping
fragments arrive. The total packet length becomes too large and might cause a system crash.
Cryptographic Techniques
• Cryptography is the process of transforming a piece of information or message shared by two
parties into some sort of code.
• The message is scrambled before transmission so that it is undetectable by outside watchers.
• The scrambled-message needs to be decoded at the receiving-end before any further
processing.
• The main tool used to encrypt a message M is a secret-key K.
• The fundamental operation used to encrypt a message is the exclusive-OR( ).
• Assume that we have one-bit M and a secret-bit K. A simple encryption is carried out using
M K.
• To decrypt this message, the second party can detect M by performing the following
operation: (M K) K=M
• In end-to-end encryption, secret coding is carried out at both end systems. In link encryption,
all the traffic passing over that link is secured.
• Two types of encryption techniques are secret-key & public-key encryption
1) In secret-key model, both sender & receiver conventionally use same key for an
encryption process.
2) In public-key model, a sender and a receiver each use a different key.
The public-key system is more powerful than the secret key system & provides better
security and message privacy.
Drawbacks of public-key system: slow speed and more complex computationally
Authentication Techniques
Encryption methods offer the assurance of message confidentiality. A networking-system must
be able to verify the authenticity of the message and the sender of the message. These forms of
security techniques are known as authentication techniques.
Authentication techniques are categorized as
i) authentication with message digest
ii) authentication with digital signature.
2) Each incoming 64-bit message is broken into two 32-bit halves denoted by Li and Ri
respectively.
3) The 56 bits of the key are also broken into two 28-halves, and each half is rotated one or two
bit positions, depending on the round.
4) All 56 bits of the key are permuted, producing version ki of the key on round i.
5) Li and Ri are determined by
Li = Ri-1
and
Ri = Li-1 F(Ri-1,ki)
6) All 64 bits of a message are permuted.
Operation of function F()
• Out of 56 bits of key ki, function F( ) chooses 48 bits.
• The 32-bit R i - 1 is expanded from 32 bits to 48 bits so that it can be combined with 48-bit k i .
The expansion of R i-1 is carried out by first breaking R i -1 into eight 4-bit chunks and then
expanding each chunk by copying the leftmost bit and the rightmost bit from left and right
adjacent chunks , respectively.
• F( ) also partitions the 48 bits of ki into eight 6-bit chunks.
• The corresponding eight chunks of Ri-1 and eight chunks of kiare combined as follows
Ri-1 = Ri-1 ki
RSA ALGORITHM
• Assume that a plaintext m must be encrypted to a cipher text c.
• This has three phases: key generation, encryption and decryption.
k2 = y1 x2 mod a
5) The two keys k1 and k2 are equal. The two users can now encrypt their messages, each using
its own key
AUTHENTICATION
• Message-authentication verifies the authenticity of both the message-sender and themessage-
content.
• Message-sender is authenticated through implementation of a digital signature.
• Message-content is authenticated through implementation of a hash function and encryption
of the resulting message-digest.
• Hash-function is used to produce a "fingerprint" of a message.
• The hash-value is added at the end of message before transmission.
• The receiver re-computes the hash-value from the received message and compares it to the
received hash value.
• If the two hash-values are the same, the message was not altered during transmission.
• Once a hash-function is applied on a message m, the result is known as a message-digest
h(m).
• The hash-function has the following properties
1) Unlike the encryption-algorithm, the authentication algorithm is not required to be
reversible.
2) Given a message-digest h(m),it is computationally infeasible to find m.
3) This is computationally infeasible to find two different messages m1 and m2 such that
h(m1)=h(m2).
• Message-authentication can be implemented by two methods.
2) In second method, no encryption is involved. The two parties share a secret key. Hence, at the
receiving site, the comparison is made between the received h(m) and the message-digest made
locally from the received message.
And
Firewalls
• Firewall is placed between hosts of a certain network and the outside world.
• Firewall is used to protect the network from unwanted web sites and potential hackers.
• The main objective is to monitor and filter packets coming from unknown sources.
• Firewall can also be used to control data traffic.
• Firewall can be a software program or a hardware device.
1) Software firewalls can be installed in home computers by using an Internet connection
with gateways.
• 2) Hardware firewalls are more secure than software firewalls are not expensive.
A firewall controls the flow of traffic by one of the following three methods:
1) Packet filtering: A firewall filters those packets that pass through. If packets can get
through the filter, they reach their destinations: otherwise, they are discarded
2) A firewall filters packets based on the source IP address. This filtering is helpful when a
host has to be protected from any unwanted external packets.
3) Denial of Service (DOS). This method controls the number of packets entering a
network.