JNTUH - R18
B.Tech., IV-1 (CSE)
CRYPTOGRAPHY
& NETWORK SECURITY
Iresh A. Dhotre Vilos S. Bagad
MME. (information Technology)
Ex-Facuby,
Sinhgad Collage of Engineering, Pure. Foculy, inattvte of Tale. Mang.
EnFocuy, Siohgod College o Engineer
-—_—— (Features )—a
© Written by Popular Authors of Text Books of Technical Publicaskons
© covers Emive Sylabus 2) Question -Anower Format) Exact Annwer
EZ MCQs with Answers and for Mid Term Exam
11 Fi in che Blanks with Answers for Mid Term Exam [2] Short Answered Questions
{21 Chupterwive Solved TNTU Questions May -2016 to Dee-2020 %
‘Scnned By Coméra ScannerSYLLABUS
“DECODE
——
CRYPTOGRAPHY & NETWORK SECURITY
SUBNET CODE /CS7OTPC
Beck. We [CSE]
2 Caegtt ne Tic Pestone
Pa neds ore Schr onen Ten toTABLE OF CONTENTS
Chapter-1 Security Concepts
(1-1) to (4-25)
1.1 The Need for Security }
1.2 Security Approaches : . Le
1.3 Principles of Security . 12
1.4 Types of Security Attacks S ie
LS Security Services and Security
Mechanisms 17
1.6 A Model for Network Security 1-8
17 Cryptography Concepts
and Techniques. 1-9
18 Substinution Techniques 1-10
1.9 Transposition Techniques. ........ 1-14
1.10 Symmetric and Asymmetric
Key Cryptography 1-15
1.11 Stegmography 1-20
1.12. Key Range and Key Size 1-23
1.13 Possible Types of Attacks
Multiple Choice Questions with Answers ...1 -
Fillin the Blanks with Answers.
‘Chapter-2 Symmetric Key Ciphers:
(21) to (2-28)
211 Block Cipher Principles
D8 DM cco soe sies Coo oen coxa 24
A' Blewiith aiisiocsc cress seem 2-13
OS ROS OMRON. 2600.15. 0cceeee
dw)
26 IDEA
Block Cipher Operation «
‘Stream Ciphers
‘Asymmetric Key Ciphers Principle of Ful !
Cryptosystems ney
at
a 2a
ey
2.10 RSA Algorithm
2.11 Elgamal Cryptogray
212. Diffie-Hellman Key Exchange
Knapsack Algorithm
Chapter -3
3.1 Cryptographic Hash Functions =
‘Message Authentication
Secure Hash Algorithm (SHA-512).
Message Authentication Codes
HMAC and CMAC
Dig! Shgmcres ond Ege Digi Signe
ae
3.6 Key Management and Distribution .
3.7 Kerberos
3.8 X.509 Authemicstion Service .
39
‘Scanned By Camera ScannerChapter -4 Transport-Level Security =
(4-4) to (4 - 13)
4.1 Introduction of Transport-Level Security: 4°10
42° Sccure Socket Layer and
‘Transport Layer Security .....000.000055. 463 3
43° HTTPS... Mayes Tess
4d Secure Shell (SSH)....00e-ce ere de | SE
4S. Wireless Network Sccurity. a7 | 86
46 IEEE 802.11 Wireless LAN... sevehep | $7
4:7, TEBE 902.111 Wireless LAN Security...... 4-10 54
Multiple Chatce Questions with Answers..4 «13
24013
so
Fill in the Blanks with Answers.
Multiple Choice Questions with
Fill in the Blanks with Answers.
Solved JNTU Question Papers
‘Scanned Sy Camera ScannerSecurity Concepts
“ALL The Need for Security
2.1 What is NIST definition of computer wecurity?
Ans.: © The protection afforded (0 an automated
information systems in order to attain the applicable
‘objectives of preserving the integrity, availability and
confidentiality of information system resources,
Q2 What is computer security and network
security?
Ams. : » Computer security is a generic name for the
‘collection of tools designed to protect data and to
thwart hackers
Network Security : It measures to protect data
during their transmission,
23 What is the need for security 7
GAPIANTU : RAS: May-16, Marks-5]
‘Ans. : Now a day, protection is easier because many
factors working against the potential criminal. Very
sophisticated alarm and camera systems silently
Protect secure places like banks.
* Traditionally information security provided by
physical Le. rugged filing cabinets with locks and
administrative mechanisms Le. personnel screening
procedures during hiring process.
* Asset protection systems are designed to recover
stolen cash and high value assets, apprehend
criminals and deter crime. The sysiem has the
capacity to track. protect and manage critical assets
in real-time
*The techniques of criminal investigation have
become so effective that a person can be identified
by genetic material, voice, retinal pattern,
fingerprints ete.
* Use of networks and communications links requires
‘measures to protect data during transmission,
«Data security is the science and study of
Of protecting data from unauthorized dise
modification.
Data and information security is about
cullaboration while managing, risk with an
that balances availability versus the conf
of data
of tools designed to protect data and to
+ Network security : Measures to protect
their transmission.
+ Internet security : Measures to protect
their transmission over ao
interconnected networks,
Protecting valuables
* Following are certain aspects for the fy
security
Increasing threat of attacks.
Fast’ growth of computer
information sharing.
Availability of number of tools and 1
internet
Lack of specialized resources that
allotted for securing system.com vend Network Security
4 Defining security policy is one of the good security
‘management practices. The key element in policy is
that it should state management's intention toward
security.
‘© Senior management helps paint out the general
direction, and risk-assessment and _risk-analysis
activities are used to determine where protective
mechanisms should be placed,
‘+ Following are the parameters, considered while
deciding security policies :
1. Affordabitity
+ Affordability ; It is related to implementation cost.
= Functionality ; Mechanism for providing security
siege 2 Dame te Soils (eee HS A, understand a confidential
requirement, may have the ability to change the
+ Cultural issue ; Is it elated to people working being, transmitted.
style and beliefs a
| 13 : Principles of Security
Availability refers, to the
information resources, An informatio
that is not available when you need it i
as bad as none at all. Availability a
'Q5 Define confidentiality and authentication,
people who are authorized to use i
(6G [UNTW = Aprtot8, Marks 2] For prevented. fon daiageeateae
‘Ans.: «Confidentiality is the concealment of
information or resources. It is the protection. of
transmitted data from passive attacks
Authentication is the process of determining
whether someone or something is, in fact, who ot
what it is declared to be. in public and. private
computer network, authentication is commonly
done through the use of login passwords.
6 Define non
(ES NTU + Oee-27, Marks 2]
‘Ans, ; + Nonrepudiation prevents either sender or
receiver from denying # transmitted message. It
provides protection against denial by one of the
entities involved in a communication of having
participated in all or part of the communication.
Q.7_What are the principles of securtty ?
‘Scanned By Camera ScannerCeyptosrapey and Network Seerity a
© The MITM attack may include one or more of
1. Eavesdropping, including traffic analysis and
possibly a known-plaintext attack.
2. Chosen ciphertext attack, depeniding on what
the receiver does with a imessage that it
decrypts.
3. Substitution attack
4 Replay attacks
5. Denial af service attack The attacker may for
instance jam all communications before
attacking one of the parties. The defense is for
Both parties to periodically serid auithenticated
Status messages and to treat their
disappearance with paranoia.
*MITM is typically used to refer to active
manipulation of the mieassages, rather than
Passively eavesdropping
‘Example of a successful MITM attack against public-key
encryption
* Suppose Alice wishes to communicate with Bob
and that Mallory wishes to eavesdrop on the
‘conversation, of possibly deliver s false message to
Bob. To get started. Alice must ask Bob for his
public key. If Bob sends his public key to Alice, but
‘Mallory is able to intercept it, a man-in-the-middle
attack can begin.
Mallory can simply send Alice a public key for
which she has the private, matching. key, Alice,
believing this public key to be Bob's, then encrypts
‘her message with Mallory's key and sends the
renciphered message back to Bob.
© Mallory again intercepts, deciphers the message,
‘keeps a copy, and reenciphers it using the puiblic
‘key Bob originally sent to Alice, When Bob receives
‘the newly enciphered message, he will believe it
came from Alice.
# This example shows the need for Alice and Bob to
have some way to ensure that they arc truly using
the correct public keys of each other. Otherwise,
‘such attacks are generally possible in principle,
against any message sent using publicckey
‘technology.
Defenses against the attack
The possibility of a manin-the-middle attack
remains a serioiss security problem
1, Public keys
2. Stronger mutual authentication
3. Secret keys (high information entropy sec
4, Passwords (low information entropy
8. Other criteria, such as voice
other biometrics
«The integrity of public keys must ger
assured in some mannez, but need not
whereas passwords and shared secret ke}
additional secrecy requirement. Public: i
verified by a Certificate Authority,
key is distributed through a secure ch
Q.10 Expiain the terminologies used in enery
EP DNTU : Nort,
‘Ans. i * Basic terminology used for
are as follows
a. Cryptography : The art or science
the principles and methods of t
plaintext message into one that is
and then retransforming that message
oniginal form. y
b. Plaintext : The original message.
© Ciphertext : The transformed message
as output, It depends on the plaintext
4. Cipher : An algorithm for transformin
message into one that is
transposition and/or substitution
Key : Some critical information
Cipher, known only to the sender and rec
Encipher (encode) : The process
Plaintext to ciphertext using a ciphet a
‘Scanned By Camera Scanner‘Cryptanaiyst an do any or all of the three
different things :
1. Attempt to break a single message.
2 Attempt to recognize pattems in encrypted
messages, in order to be able to break
subsequent ones by applying a
strainghtforward decryption algorithm,
3. Attempt to find general weakness in an
‘encryption algorithm, without necessarily ang : p
having intercepted any messages.
L Cryptology: Both cayptography and
cryptanalysis.
j. Code : An algotithm for transforming an
plaintest message into an unintelligible one using
a code-book.
| ——— + The attacker aims to obtain
ER hell transit. The term passive indicates
does not attempt
2.11 What are the types of security attacks * ne eee ee
j SU ANT: Moy-16, MHS 2] ioe attack are of two types:
a ae - 1. Release of message contents ~
|e Types of security attacks are passive attacks and 2, Traffic analysis
! active attacks.
| © A passive attack attempts to lea or make use of
information from the system but does not affect
system resources
© Active attacks involve some modification of the
data stream or the creation of a false stream, These
attacks cannot be prevented easily.
Scanned By Camera ScannerSemrmeeapey aoe Necwork Secerty ae
Traffic analysis: Mask thé
contents of message so that
‘opponents could not extract the ° ‘Observe pattern.
information from the message. Onponent rmssonaen
receiver
Encryption is used for masking
Fig. Q132 shows the traffic
analysis.
Passive attacks are very difficult to!
Sender
detect because they do not involve
any alternation of data. It is
feasible to prevent the success of
attack, usually by means of encryption.
Active Attack
«Active attacks involve some. modification of the data stream or the creation of a false streamisiRe
attacks can not be prevented easily.
+ Active attacks can be subdivided into four types
1. Masquerade 2. Replay i
Fig. @.13.2 Tratc analysis
3. Modification of message
4 Denial of service
1. Masquerade ae j
«It takes place when one entity
pretends to be a different entity.
pega ae
«For example : Authentication
=e md me eT Fig, 0.13.3 Masquerade
authentication sequence has taken place, thus enabling an authorized entity with few privi
obtain extra privileges by impersonating, an entity that has those privileges.
1s Interruption attacks are called as masquerade attacks.
2. Replay
It involves the passive
capture of # data unit if
and its subsequent
retransmission to ‘message from
es Se cw
Zooomr $M
Fig. 0.13.4 Replay
TECHNICAL PUBLICATIONS - An up tue for owes ¥ a
see
‘Scanned By Camera Scanner“Allow Mahesh Awati to read
confidential file accounts".
4, Denial of service
«Fabrication causes Denial Of 2
Service (DOS) attacks
DOS prevents the normal use
or ‘management of
‘communications facilities.
‘Another form of service denial
is the disruption of an entire §
network, either by disabling
the network oF by overloading
it with messages so as to
degrade periormance
* Fig, Q.13.6 shows denial of service attack,
‘+ It is difficult to prevent active attack because
of the wide variety of potential physical,
software and network vulnerabilities.
The first type of DOS altacks’ were single
source attacks, meaning that a single system
Was used to attack another system and cause
something on that system to fail. SYN flood is
the most widely used DOS attack.
‘= Fig, Q.137 shows the SYN flood DOS attack.
| + Source system sends & large number of TCP
SYN packets to the target system. The SYN
‘packets are used to begin a new TCP
‘Scanned By Comera Scanner1-7
+The target also places the new connection
information into a pending connection buffer
4 For a real TCP connection, the source woud send &
final TCP ACK packet when it receives the SYN
‘ACK.
# However, for this attack, the sourme ignores the
SYN ACK ahd continues to send SYN packets
Eventually, the target's pending. connection buffer
fills wp and it can no longer respond to new
connection requests.
1.14 Compare passive and active attack.
Ans. :
Active attacks
Active attacks involve |
Passive attacks are in
some modification. of
the nature of
eavesdropping on, of the data stream or the
monitoring
R
c
PF
WwW
Step 3: Encryption
By following the above rules of
text the cipher text is :
VRFKAFGONVNBULLMIZIHIEFESHZY
G42 Use play fair cipher to enceypt
‘message “This is a columnar
key - APPLE.
Key = APPLE
‘Scanned By Camera Scanner“Message ~Th is is acco! um na rt fa ns po si Hon:
Ciphertext = UG MQ MQ BH MB SO IE SU MT BK
‘QM.NQ KN
Q.43 Using hill cipher enerypt plain text “COE”
use key “ANOTHERBZ”.
Ans. : Plain text = COE
Key ~ ANOTHERBZ,
For plaintest COE, here C-2 0-14
Therefore
2
4
4 «For example, to enciphere the 1
For key ANOTHERRZ the numbers are 0, 13, 14, 19, after this party” with a rail fence of
SAL eee Sees:
| The numbers in the matrix form : 6
oe 4] ek «© @ « ©
Ee4
P=
«© The ciphertext is
MEMATRHSATETEFETIPRY
Ciphertext = ( Key X Plaintext ) Mod 25
: oo : * Attacking a transposition
Beye Se noone: rearrangement of the letters of the
A pure transposition dpher is ©
because it has the same letter
original plaintext,
c« mod26
0 13 i4)(2)
wo6 4/|i4
(7 1 25,
a 4 Plaintext : The book is suitable for self
~ |138| mod 26 =| 8
1 148 18 Key 564132
:
| Ciphertext = 4=E, 8 =Tand 16 = 5 re aS oe
‘Scanned By Comera Scannera
8
‘Arrange the key number as per ascending order
| KEY A rE r
| KeVNUMBER 100203 ‘Ans.: A. symmetric encryption scheme
rk ingradients : Plaintext, Encryption alg
PLAIN TEXT key, Ciphertext, Decryption algorithm,
Eg s
2 (Q.48 Define symmetric encryption.
‘Ans. : In symmetric encryption, sender
Symmetric and Asymmetric use same key for encryption and decryption:
Key Crypt hy
failed 0.49 What is symmetric key
as Dik Sindh eons Re Discuss its advantages and limitations.
Bar| NTU : April-12, Marks 2) (6a [NTU + Maye 17, |
= — OR Describe in detail about ee
Conventional encryption Public key encryption ‘encryption model. EP INTU + How 16,
‘One algorithm is used far Ans, Symmetric key cryptography : A
‘anerypiian and decryption encryption model has five ingredients.
encryption and decryption. with a pair of keys, one for Set eo ee
pape ot er og 1. Plaintest
| Secryption 2 Eneryption algorithm
‘The wenden and receiver ‘The sender and receiver 3 Secret key
| fist share the algorithm ust each have one of the
| ara tay tmatched pair of keys © Cpe
} 5. Decryption
“The key must be kept. One of the two keys must ian eaeitn
fesde be bept secret + Fig. Q491 shows the conventional
a