0% found this document useful (0 votes)
143 views60 pages

CNS - Unit I

Cryptography is the study of encryption and decryption techniques. Cryptanalysis is the study of decrypting cipher text without the key. Information security is needed due to threats to assets like bank transactions. Security principles include confidentiality, authentication, integrity, non-repudiation, access control, and availability. There are passive and active security attacks. Symmetric key encryption uses the same key for encryption and decryption while common symmetric techniques are Caesar cipher, monoalphabetic cipher, Playfair cipher, and polyalphabetic cipher like the Hill cipher.

Uploaded by

Ayush Gandhi
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)
143 views60 pages

CNS - Unit I

Cryptography is the study of encryption and decryption techniques. Cryptanalysis is the study of decrypting cipher text without the key. Information security is needed due to threats to assets like bank transactions. Security principles include confidentiality, authentication, integrity, non-repudiation, access control, and availability. There are passive and active security attacks. Symmetric key encryption uses the same key for encryption and decryption while common symmetric techniques are Caesar cipher, monoalphabetic cipher, Playfair cipher, and polyalphabetic cipher like the Hill cipher.

Uploaded by

Ayush Gandhi
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/ 60

UNIT-1

• INTRODUCTION:
Cryptography:
• Study of Both Encryption and Decryption
techniques is called Cryptography.
Cryptanalysis(Code breaking):
• The study of principles/methods of deciphering
the cipher text without knowing key is called
Cryptanalysis.
Why we need Information Security?
• Because of Threats
A Threat is an object, person, or other entity
that causes constant danger to an asset.

Ex: Bank transaction, IRCTC booking, Military


websites.
• PRICIPLES OF SECURITY:
• Confidentiality:
The degree of confidentiality determines the secrecy of
the information. The principle specifies that only the
sender and receiver will be able to access the
information shared between them.
• Authentication:
Authentication is the mechanism to identify the user or
system or the entity. It ensures the identity of the
person trying to access the information.
• Integrity:
Integrity gives the assurance that the information
received is exact and accurate. If the content of the
message is changed after the sender sends it but before
reaching the intended receiver, then it is said that the
integrity of the message is lost.
• Non-Repudiation:
Non-repudiation is a mechanism that prevents the
denial of the message content sent through a network.
In some cases the sender sends the message and later
denies it. But the non-repudiation does not allow the
sender to refuse the receiver.
• Access control:
The principle of access control is determined by role
management and rule management. Role management
determines who should access the data while rule
management determines up to what extent one can
access the data.
• Availability:
The principle of availability states that the resources will
be available to authorize party at all times. Information
will not be useful if it is not available to be accessed.
Types of Security Attacks
• Any action that compromises the security of
information owned by an organization.
• The goal of Information Security is
how to prevent Attacks
If it fails
How to detect Attacks.
• There are 2 types of Attacks:
1.Passive Attacks
2. Actives Attacks
Passive Attacks: Eavesdropping on information with out
modifying it.
a.Release of Message Content:Reads the info.
b.Traffic Analysis: Observes the traffic.
Active Attacks: Involves modification or creation of
information
a. Masquerade: Entity impersonate the original
entity
b. Replying: Impersonate and then reply it
c. Modification of a Message: message has
been altered.
d. Denial of Service: Inhibits normal use of
computer or resources.
Ex: flooding of computer networks
swapping of CPU or a Server
Security Threats:
Security Services
• X.800 standard provides 5 security services.
1. Authentication
2. Access Control
3. Data Confidentiality
4. Data Integrity
5. Non repudiation
• Authentication: assures recipient that
the message is from the source that it claims
to be from.
• Access Control: controls who can have access
to resource under what condition
• Confidentiality: information is not made
available to unauthorized individual
• Integrity: assurance that the message is
unaltered
• Non-Repudiation: protection against denial of
sending or receiving in the communication
Security Mechanisms
• Encipherment:(encryption):Process of
applying mathematical algorithms for
converting data into a form that is not
intelligible.

• Digital Signatures: The appended data or a


cryptographic transformation applied to any
data unit allowing to prove the source and
integrity.
• Access control:A variety of techniques used
for enforcing access permissions to the system
resources.

• Data Integrity: A variety of mechanisms used


to assure the integrity of a data unit.

• Authentication Exchange: A mechanism


intended to ensure the identity of an entity by
means of information exchange.
• Traffic Padding: The insertion of a 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 once a breach
of security is suspected.

• Notarization: The use of trusted third party to


assure certain properties of a data exchange.
Model for Network Security
Using this model requires us to:
1. design a suitable algorithm for the security
transformation (message de/encryption)
2. generate the secret information (keys) used by
the algorithm
3. develop methods to distribute and share the
secret information (keys)
4. specify a protocol enabling the principals to use
the transformation and secret information for a
security service (e.g. ssh)

15
Model for Network Access Security

16
Using this model requires us to implement:
1. Authentication
 select appropriate gatekeeper functions to identify
users
2. Authorization
 implement security controls to ensure only
authorized users access designated information or
resources
Trusted computer systems may be useful to
help implement this model

17
Some basic Terminologies
• Plain text- - Original message
• Cipher text- - Coded message
• Cipher- - Algorithm used in plaintext to cipher
text
• Key- - Information used in algorithm only
known to sender and receiver
• Encipher(encrypt)- - Converting Plain text into
cipher text
• Decipher(Decrypt)- - Recovering plain text
from cipher text.
• Cryptography- - Study of Encryption and
Decryption techniques
• Cryptanalysis(Code breaking)- - The study of
principles/methods of deciphering the cipher
text without knowing key.
• Cryptology- - The field of both cryptography
and Crypt analysis.
Symmetric Key Encryption (or) Conventional Key Encryption (or)
Single Key Encryption:
If the sender and the receiver uses the same key for
Encryption & Decryption then it is called Symmetric
Encryption
• Plaintext: Information that sender has to send
• Encryption Algorithm: Sender uses the
Encryption algorithm to convert plain text into
cipher text
• Secret Key: Secret Information used in both
Encryption and Decryption Algorithms
• Cipher text: Scrambled format or user un
readable format.
• Decryption Algorithm: Receiver uses the
Decryption algorithm to convert the Cipher text
into plain text
Symmetric Substitution techniques
1.Caesar Cipher
• The Caesar cipher is one of the earliest known
and simplest ciphers. It is a type of substitution
cipher in which each letter in the plaintext is
'shifted' a certain number of places down the
alphabet. For example, with a shift of 1, A would
be replaced by B, B would become C, and so on.

• plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
• cipher:BCDEFGHIJKLMNOPQRSTUVWXYZA
• Example
• To pass an encrypted message from one
person to another, it is first necessary that both
parties have the 'key' for the cipher, so that the
sender may encrypt it and the receiver may
decrypt it. For the caesar cipher, the key is the
number of characters to shift the cipher
alphabet.
• Here is a quick example of the encryption and
decryption steps involved with the caesar
cipher, with a shift (key) of 1.

• plaintext: welcome to gitam university


• Ciphertext:xfmdpnf up hjubn vojwfstjuz

• It is easy to see how each character in the


plaintext is shifted up the alphabet.
Decryption is just as easy, by using an offset of
-1.
2.mono alphabetic cipher
Ex2:
• Plain text: gitam university
• Cipher text: BWUDC OXWLYAWUZ
3.Play Fair Cipher
• Algorithm:
1. Construct 5x5 matrix
2. Take the key for ex(playfairexample)
Procedure to fill the matrix
1. Write from top Left Right
2. Repeated letters in a key are ignored
3. Fill remaining letters in alphabetical order in
empty cells(condition is both i/j occupies a
single cell)
• To Perform Encryption Operation:
Rules:
1.Divide the plain text into pair of letters
Ex: plaintext=welcome
we|lc|om|ex (if pair contains single letter add x)

2. Pair contains repeated letters add x in the middle


Ex: plaintext=hello
he|ll|o
helxlo(Add x in the middle of repeated letters)
he|lx|lo
3. If two letters are in the same row then replace
with immediate right letter

4. If two letters are in same column then replace


with immediate below letter.

5.If not in same row/column then draw a


rectangle/square as corners of plaintext and
remaining two corners in same row become
cipher text.
• E.g:
Construct a 5x5 matrix
Key=playfairexample

p l a y f
i/j r e x m
b c d g h
k n o q s
t u v w z
• Cases:

Plain text Cipher text


cd dg
ch db
ed do
dv oa
cx gr
• E.g: goodmorning

• Plain text: go od mo rn in gx

• Ciphter text: dq vo es cu rk qg
Play fair ex2:
4.Poly alphabetic cipher
Ex: It is called many alphabetic substitution
technique
Key decides which mono alphabetic substitution
is to be performed
1 A B C D E . .
2 B C D E F
3 C D E F G
4 D E F G H
5 E F G H I
. .
. .
• Example 1:
• Plain text: DAD
• Key: 54321
• Cipher text is: HDF
Example 2:
5.Hill Cipher
• Works on multiple letters at same time
Ex:
plain text=HELL
Key k= 3 3
2 5 2x2 matrix

Cipher text C=K.P Mod 26


A B C D E F G H I J
0 1 2 3 4 5 6 7 8 9

K L M N O P Q R S T
10 11 12 13 14 15 16 17 18 19

U V W X Y Z
20 21 22 23 24 25
Key is in 2x2 matrix so our plain text should be
devided into 2 letters each
Plain text p=HE LL
For HE=7/4
C=K.P Mod 26
3 3 7
2 5 4

=33 Mod 26
34
7
8
H
I
• FOR
LL= 11
11
• C=K.P Mod 26
K.P= 3 3 11
2 5 11

= 66 Mod 26
77
= 14
25

= o
z
Hill cipher ex2:
6. OTP(One Time Pad)(Vernam Cipher)
• OTP is also called as Vernam cipher
• Length of the vernam cipher text is same as the length of
the original plain text
Encryption
• Plain text=HELLO
• Key=DGHBC
H E L L O
7 4 11 11 14
D G H B C
3 6 7 1 2
-----------------------
10 10 18 12 16(Addition)
K K S M Q ----Cipher text
• Decryption:
Perform subtraction operation
Cipher text= K K S M Q
10 10 18 12 16
Key =D G H B C
3 6 7 1 2
-------------------------------
7 4 11 11 14(Subtraction)
H E L L O(Thus got the
plain text)
Transposition Techniques
Transposition technique is a method of
encrypting plain text into cipher text by
performing permutation over the pain text

There are 2 types of transposition techniques


• 1.Rail fense
• 2. Columnar Transposition technique
• Rail fense technique:
The plaintext is written down as a sequence of
diagonals and then read off as a sequence of
rows.
Columnar Transposition technique:

The message is written out in rows of a fixed


length: The message is then read out by column
by column.
The order is chosen by the alphabetical order of
the letters in the keyword
Example 2:
Steganography
• Steganography is the technique of hiding
secret data within an ordinary, non-secret, file
or message in order to avoid detection; the
secret data is then extracted at its destination.

• Steganography is the practice of concealing a


file, message, image, or video within another
file,

You might also like