Unit 1
Unit 1
Unit 1
NETWORK SECURITY
CSEN2071
Course Objectives:
Understand basics of security concepts and comprehend Classical
Encryption Techniques
● Impart various symmetric cryptographic techniques
Syllabus
https://drive.google.com/drive/u/0/folders/1IGmhEqrEAGJkBUDhDktap_s
xe-sgeXot
Textbook
https://drive.google.com/drive/u/0/folders/1WPV5bVa8hcILwMIA5U8-
4brpUgLFbEwK
Unit 1-Basics of Computer Networks
Introduction: Computer Security Concepts, The OSI Security Architecture,
Cryptography, cryptanalysis, attacks, services, security mechanisms.
Additional objectives:
4. Authenticity
5. Accountability
8
Objectives of Computer Security
. Authentication
Messages
Non repudiation
Availability
Entity Authentication
Data Confidentiality:
• Protects data from unauthorized disclosure.
• Ensures that the information in a computer system and
transmitted information are accessible only for reading by
authorized parties.
Integrity:
• The assurance that data received are exactly as sent by an
authorized entity. (i.e., contain no modification, insertion,
deletion, or replay).
• Modification includes writing, changing status, deleting,
creating and delaying or replaying of transmitted messages.
-> Authentication:
Access control:
• Requires that access to information resources may be controlled
by or the target system.
• controls who can have access to resource under what condition.
Availability:
• Requires that computer system assets be available to authorized
parties when needed.
• Available to authorized entities for 24/7.
Authorization:
• Authorization provides permission to perform a security
function or activity.
• Authorization is generally granted after the successful execution of
a source authentication service.
7. Security Mechanisms
Feature designed to detect, prevent or recover from a security attack.
Security Mechanisms
Data Integrity
A variety of mechanisms used to assure the integrity of a data
unit or stream of data units.
Truthful
Verifiable Accurate
Data
Integrity
Retrievable Complete
Authentication Exchange
Notarization
The use of a trusted third party to assure certain
properties of a data exchange.
Pervasive Security 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
Classification of Cryptography
Cryptography
Classical Modern
Cryptography Cryptography
Transposition Techniques
Rearranges the position of the characters of the plaintext.
Substitution Techniques
Substitution Techniques
1. Caesar Cipher
2. Monoalphabetic Ciphers
3. Playfair Cipher
4. Hill Cipher
5. Polyalphabetic Ciphers
1. Caesar Cipher
• Earliest and simplest method of encryption technique
• Replaces each letter of alphabet with the letter standing
three places further down the alphabet
Caesar Cipher Algorithm
• Encryption: C = E(k, p ) = (p + k )mod 26
• Decryption: P = D (k, C) = (C – k) mod 26
Example 1: key=3
plaintext: hello how are you
ciphertext: KHOOR KRZ DUH BRX
Example
Example 3: Text : ATTACKATONCE
Shift: 4
Cipher: EXXEGOEXSRGI
✔ If the letter is standing alone in the process of pairing, then add an extra filler letter ‘x’
with the alone letter.
✔ Rules for encryption
Rules of Playfair Cipher
✔ Two plaintext letters that fall in same
row of the matrix are each replaced
by the letter to the right.
Eg: Thus, if "a" is encrypted to "R", then every time we see the letter
"a" in the plaintext, we replace it with the letter "R" in the ciphertext.
Plain :
abcdefghijklmnopqrstuvwxyz
Cipher:
DKVQFIBJWPESCXHTMYAUOLRGZ
The ciphertext alphabet for the cipher where you replace each letter by the random letter in the alphabet .
N
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
4. Hill Cipher
• Hill cipher is a polygraphic substitution cipher based on linear
algebra.
• Each letter is represented by a number modulo 26.
• To encrypt a message, each block of n letters is multiplied by an
invertible n × n matrix, against modulus 26.
Encryption: PK mod 26
• To decrypt the message, each block is multiplied by the inverse of
the matrix used for encryption.
Decryption: CK-1 mod 26
Hill Cipher: Example 1
• Input : Plaintext: ACT
– Key: GYBNQKURP
– Output : Ciphertext: POH
• Encryption
– We have to encrypt the message ‘ACT’ (n=3).The key is
‘GYBNQKURP’ which can be written as the n X n matrix:
Hill Cipher: Example 1
• Encryption:
Ei = (Pi + Ki) mod 26
• Decryption:
Di = (Ei - Ki) mod 26
XOR operation
• Decryption:
Pi = Ci XOR Ki
Vernam Cipher Example
Transposition Technique
• Performed by permutation on the plain text letters.
Rail Fence
• The plaintext is written down as a sequence of diagonals and then read off as a
sequence of rows.
• The Rail Fence cipher works by writing your message on alternate lines across the
page, and then reading off each line in turn.
Encryption