17cs61 - Computer Networks and Cryptography
17cs61 - Computer Networks and Cryptography
17cs61 - Computer Networks and Cryptography
Lecture Notes on
CRYPTOGRAPHY,NETWORK SECURITY
AND CYBER LAWS
(17CS61)
Prepared by
Vision/ ಆಶಯ
Mission/ ಧ್ಯೇಯ
ಜ್ಞಕನ್ಸಂರ್ನ್ುರಕಗಿಸನವುದ್ನ.
ಹೊಂದ್ನವುದ್ನ.
ರೂಪಿಸನವುದ್ನ.
Maharaja Institute of Technology Mysore
Department of Information Science and Engineering
Program Outcomes
Course Overview
SUBJECT: CRYPTOGRAPHY, NETWORK SECURITY AND CYBER LAW
SUBJECT CODE: 17CS61
Though technology changes rapidly, the need to assure the confidentiality, integrity,
authenticity, and accountability of information. Understanding the basics of cryptography is
fundamental to keeping networks, systems and data secure.
This course covers the basics of the science of cryptography. It explains how
programmers and network professionals can use cryptography to maintain the privacy of
computer data. Starting with the origins of cryptography, it moves on to explain
cryptosystems, various traditional and modern ciphers, public key encryption, data
integration, message authentication, and digital signatures. The course emphasizes to give a
basic understanding of previous attacks on cryptosystems with the aim of preventing future
attacks. The course also gives a brief introduction to cyber laws.
Nowadays, the networks have gone global and information has taken the digital form of
bits and bytes. Critical information now gets stored, processed and transmitted in digital
form on computer systems and open communication channels. Since information plays
such a vital role, adversaries are targeting the computer systems and open communication
channels to either steal the sensitive information or to disrupt the critical information
system. Modern cryptography provides a robust set of techniques to ensure that the
malevolent intentions of the adversary are thwarted while ensuring the legitimate users get
access to information.
Course Objectives
• Explain the concepts of Cyber security.
• Illustrate key management issues and solutions.
• Familiarize with Cryptography and very essential algorithms.
• Introduce Cyber Law and ethics to be followed.
Course Outcomes
MODULE-2
Public Key Cryptography and RSA – RSA Operations, Why Does RSA Work?,Performance,
Applications, Practical Issues, Public Key Cryptography Standard (PKCS), Cryptographic Hash
- Introduction, Properties, Construction, Applications and Performance, The Birthday Attack, 10 Hours
Discrete Logarithm and its Applications - Introduction, Diffie-Hellman Key exchange, Other
Applications.
MODULE -3
Key Management - Introduction, Digital Certificates, Public Key Infrastructure, Identity–based
Encryption, Authentication–I - One way Authentication, Mutual Authentication, Dictionary
Attacks, Authentication – II – Centralised Authentication, The Needham-Schroeder Protocol,
Kerberos, Biometrics, IPSec- Security at the Network Layer – Security at Different layers: Pros 10
Hours
and Cons, IPSec in Action, Internet Key Exchange (IKE) Protocol, Security Policy and IPSEC,
Virtual Private Networks, Security at the Transport Layer - Introduction, SSL Handshake
Protocol, SSL Record Layer Protocol, OpenSSL.
MODULE-4
IEEE 802.11 Wireless LAN Security - Background, Authentication, Confidentiality and
Integrity, Viruses, Worms, and Other Malware, Firewalls – Basics, Practical Issues, Intrusion
Prevention and Detection - Introduction, Prevention Versus Detection, Types of Instruction 10
Detection Systems, DDoS Attacks Prevention/Detection, Web Service Security – Motivation, Hours
Technologies for Web Services, WS- Security, SAML, Other Standards.
MODULE-5
IT act aim and objectives, Scope of the act, Major Concepts, Important provisions, Attribution,
acknowledgement, and dispatch of electronic records, Secure electronic records and secure
digital signatures, Regulation of certifying authorities: Appointment of Controller and Other
officers, Digital Signature certificates, Duties of Subscribers, Penalties and adjudication, The 10
Hours
cyber regulations appellate tribunal, Offences, Network service providers not to be liable in
certain cases, Miscellaneous Provisions.
List of Text Books
1. Cryptography, Network Security and Cyber Laws – Bernard Menezes, Cengage Learning, 2010 edition
(Chapters-1,3,4,5,6,7,8,9,10,11,12,13,14,15,19(19.1- 19.5),21(21.1-21.2),22(22.1-22.4),25
List of Reference Books
1. Cryptography and Network Security- Behrouz A Forouzan, Debdeep Mukhopadhyay, Mc-GrawHill,
3rd Edition, 2015
2. Cryptography and Network Security- William Stallings, Pearson Education, 7th Edition
3. Cyber Law simplified- Vivek Sood, Mc-GrawHill, 11th reprint , 2013
4. Cyber security and Cyber Laws, Alfred Basta, Nadine Basta, Mary brown, ravindra kumar, Cengage
Learning
Index
MODULE 1
Introduction, Basics of Cryptography, Secret Key
Cryptography
➢ Computer security is all about studying cyber attacks with a view to defending against them.
➢ The attacks include pharming and phishing attacks together with assorted malware and denial
of service attacks.
➢ Understanding what makes systems vulnerable to these attacks is an important first step in
avoiding or preventing them.
➢ There are different classes of vulnerabilities including those caused by poorly written or
configured software.
➢ There are diverse defence strategies such as Access control, authentication, and data
protection techniques are introduced.
1.1 Cyber Attacks
1.1.1Motives
Year Event
1988 Robert Morrisa 23-year-old Cornell graduate student, released a worm that over an
Page 1
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
2. Disruption of service.
Interruption or disruption of service is launched against an organization's servers so they
are made unavailable or inaccessible.
In recent times, there have been unconfirmed reports of such attacks being launched by
business rivals of e-commerce websites.
Page 2
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
The goal here appears to be "my competitor's loss is my gain." In 2001, there were a
series of such attacks that targeted the websites of Yahoo, Microsoft, etc. in a short span
of time.
They were meant to alert corporates and others of the dangers of this class of attacks.
3. Illegal access to or use of resources.
The goal here is to obtain free access or service to paid services.
Examples of this include free access to online digital products such as magazine or
journal articles, free talk time on someone else's account, free use of computing power on
a supercomputer, etc.
In each case, the attacker is able to circumvent controls that permit access to only paid
subscribers of such services.
1.1.2 Common Attacks
Some of the common attacks are :
1. Phishing
2. Pharming
3. Dictionary attacks
4. Denial of Service (dos)
5. Trojan
6. Spyware
1. Phishing:
➢ One set of attacks are those that attempt to retrieve personal information from an
individual.
➢ It provokes the victims to a fake website — an on-line bank, for example.
➢ The fake site has the look and feel of the authentic bank with which the victim has an
account.
➢ The victim is then asked to enter sensitive information such as his/her login name and
password, which are then passed on to the fake website.
➢ Personal information may also be leaked out from credit cards, smart cards, and ATM
cards through a variety of skimming attacks.
2. Pharming:
➢ It attempts to deduce sensitive information from lost or stolen smart cards through
advanced power and timing measurements conducted on them.
➢ Finally, leakage of information may also take place through eavesdropping or
snooping on the link between two communicating parties.
3. Dictionary attacks :
➢ One means of intruding into a computer system is through password-guessing attacks.
➢ The ultimate goal of the attacker is to impersonate his/her victim.
➢ The attacker can then perform unauthorized logins (break-ins), make on-line purchases,
initiate banking transactions, etc., all under the assumed identity of the victim.
Page 3
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 4
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
1.1.3 Vulnerabilities
➢ Behind every attack is a vulnerability of some type or the other.
➢ Definition:A vulnerability is a weakness in a procedure, protocol, hardware, or software
within an organization that has the potential to cause damage.
➢ There are at least four important vulnerability classes in the domain of security:
1. Human Vulnerabilities:
➢ These are vulnerabilities caused by human behaviour or action.
➢ For example, the user clicks on a link in an e-mail message received from a
questionable source. By so doing, the user can be directed to a site controlled by the
attacker as in a phishing attack or a cross-site scripting attack.
➢ Similarly clicking on an e-mail attachment may open up a document causing a macro
to be executed.
➢ The macro may be designed to infect other files on the system and/or spread the
infected e-mail to other e-mail addresses harvested from the victim's inbox.
Page 5
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 6
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 7
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Once an attack or infection has been detected, response measures should be taken .
➢ These include shutting down all or part of the system.
➢ Many intrusion attempts leave information
➢ Cyber forensics is an emerging discipline with a set of tools that help trace back the
perpetrators of cyber crime.
➢ Table 1.2 defines some of the most widely used terms in cyber security parlance.
Page 8
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
1. Security is as much (or more) a human problem than a technological problem and must be
addressed at different levels.
➢ At the highest level, security should be addressed by top-level management in
large organizations.
➢ Robust security policies should be formulated and a comprehensive
implementation strategy outlined by a dedicated team of security specialists,
possibly headed by a Chief Information Security Officer (CISO).
➢ Some of the mechanisms used to implement high-level policies are in the realm
of technology.
➢ Security engineers have a key role to play in designing techniques and products to
protect organizations from the various cyber attacks.
➢ System administrators handle day-to-day operations.
➢ They should be proactive in crucial security practices such as patch application.
➢ One of the key tasks of a system administrator is to configure systems and
applications. Their job also involves setting user/group permissions to various
system resources such as files, configuring firewalls, sifting through system logs
for signs of an intrusion, and processing alerts.
➢ The final link in the security chain is the rank and file within an organization.
➢ The employees within an organization should be educated on various do's and
don'ts through periodically updated security awareness programs.
➢ In summary, a healthy combination of enlightened security policy and
procedures, backed by enforcement, aided by technology, coupled with diligent
Page 9
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ There have been a number of cryptographic algorithms proposed which was made
mandatory in newly standardized protocols, but their details were not made public.
➢ The flaws are exposed over time after the protocols have been widely deployed,
attracting closer attention from the hacker community.
➢ There are ethical hackers whose goal is to break software/ protocols/algorithms so that
they can be fixed before things get out of hand.
➢ It is the ethical hacker community at least, if not the public at large, who should be
able to study new protocols and algorithms prior to widespread adoption.
➢ One such example was the procedure followed for selecting an algorithm in the late
1990s for the new secret key cryptography standard — AES was finally chosen after
much public scrutiny and debate. As another example, open source software is usually
freely available. Public review of its security features can make or break its reputation.
4. Always consider the "Default Deny" policy for adoption in access control.
➢ The subjects in an access control policy could be people, network packets, operating
system processes or even user input.
➢ One policy is the "Default Permit," i.e., grant the subject's request unless the subject is
on a blacklist or it has certain blacklisted attributes.
➢ The dual of this policy is the "Default Deny" policy. In this case, the subject's request
is denied unless it is on a whitelist.
➢ Clearly, whitelisting is the more conservative approach.
Page 10
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ With whitelisting, the access controller may reject a legitimate subject whose name
has been mistakenly excluded from the whitelist but that is the price to be paid for
greater security.
➢ Blacklisting, on the other hand, may accept a bad guy because his name or attributes
were mistakenly excluded from the blacklist.
➢ The tradeoffs between blacklisting and whitelisting should be carefully examined (see
Principle 8). However, in general, prudent security design should seriously consider
adoption of the "Default Deny" policy.
Page 11
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ They may, and typically do, have some overlapping functionality. Because of differences
in the hardware/software design and in configuration, what escapes Firewall 1 may be
caught by Firewall 2 and vice versa.
Page 12
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Basics of Cryptography
PRELIMINARIES
➢ Cryptography is the science of disguising messages so that only the intended recipient can
decipher the received message.
➢ Cryptography is the lynchpin of data security — besides providing for message
confidentiality, it also helps in providing message integrity, authentication, and digital
signatures.
➢ The original message or document to be transferred is called plaintext
➢ The plaintext which is encrypted is called ciphertext.
➢ The process of converting the original plaintext to ciphertext is called encryption
➢ The process of recovering the original plaintext from the ciphertext is called decryption.
➢ Encryption involves the use of an encryption function or algorithm, denoted by E, and an
encryption key, e.
➢ Decryption involves the use of a decryption function denoted by D, and a decryption key, d.
➢ These operations are summarized below.
➢ c = Ee(p)
➢ p = Dd(c)
➢ Here, p denotes a block of plaintext. It is encrypted by the sender to produce ciphertext
denoted by c.
➢ Decryption operation is performed by the receiver on the ciphertext to recover the plaintext.
➢ Kerckhoff's Principle: The secrecy should be in the key used for decryption, not in the
decryption or encryption algorithms.
➢ In secret key cryptography, both sender ➢ In public key cryptography, two distinct keys
and receiver share a common secret - the forming a key pair are used –
same secret key is used for encryption as I. the encryption key or public key and
well as decryption. So e = d , this form of II. the decryption key or private key.
cryptography is also referred to as ➢ The public key of a user(receiver) is used to
symmetric key cryptography. encrypt messages to that user.
➢ It is the private key of the recipient that is used to
decrypt the message.
➢ Because the public and private keys are distinct,
this form of cryptography is also referred to as
asymmetric key cryptography.
➢ If Alka and Brijesh share a secret key, k, ➢ Assuming that Brijesh has a public key-private
Page 13
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
then she encrypts the message using the key pair, she would encrypt her message using his
common secret. public key , B.pu.
➢ The encrypted message received by Brijesh ➢ Brijesh then decrypts the message using the
is decrypted using the same secret. corresponding private key, B.pr.
➢ The secret key operations are summarized ➢ Assuming that Brijesh keeps his private key
below. securely, he and only he can decrypt the message
➢ Operation performed by Alka received from Alka.
➢ c = Ek(p) ➢ The public key-private key operations are
➢ Operation performed by Brijesh: summarized below.
➢ p = Dk(c) ➢ Operation performed by Alka:
➢ c = E B.pu(p)
➢ Operation performed by Brijesh:
➢ p=D B.pr(c)
➢
➢ EX:Data Encryption Standard, Advanced RSA, Elliptic Curve Cryptography (ECC).
Encryption Standard (AES)
Page 14
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ He would then look for patterns in the ciphertext in an attempt to reconstruct some
plaintext and/or deduce the key. Such an attack which exclusively uses ciphertext is
referred to as a "known ciphertext" attack.
➢ Occasionally, all or part of some plaintext blocks are predictable or may be guessed.
➢ A cryptanalyst may then build a list of corresponding plaintext, ciphertext pairs with the
intention of deducing the key. Such an attack is referred to as a "known plaintext"
attack.
➢ It may even be possible for a shrewd attacker to carefully choose pieces of plaintext and
then induce the sender to encrypt such text.
➢ An attack on a cryptographic scheme which makes use of pairs of attacker-chosen
plaintext and the corresponding ciphertext is referred to as a "chosen plaintext" attack.
➢ The most obvious, though compute-intensive, attack with known plaintext is a brute
force attempt at obtaining the key by trying all possible key values.
➢ Let (p1,c1) , (p2,c2) , (p3,c3) be plaintext—ciphertext pairs.
Page 15
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
E for B,
A for X,
B for Y, etc.
➢ Such a scheme is referred to as a Caesar cipher.
➢ A sample plaintext and the corresponding ciphertext for k= 3 is
➢ In substitution ciphers, like the Caesar cipher, each letter is always substituted for another
unique letter. Such ciphers are said to be monoalphabetic.
4.2.2 Polyalphabetic Ciphers
➢ In a polyalphabetic cipher, the ciphertext corresponding to a particular character in the
plaintext is not fixed. It may depend on, for example, its position in the block.
➢ We next study two examples of such ciphers.
a. The Vigenere Cipher
➢ The Vigenere cipher is a polyalphabetic cipher that uses a multi-digit key k1, k2, k3, k4…
km
➢ Here , k1, k2, k3, k4… km are each integers.
➢ The plaintext is split into non-overlapping blocks, each containing m consecutive
characters.
➢ Then the first letter of each block is replaced by the letter k1 positions to its right the
second letter of each block is replaced by the letter k2 positions to its right, and soon.
Plain W I S H I N G Y O U S U C C E S S
text
➢ Key: 04 19 03 22 07 12 05 11 04 19 03 22 07 12 05 11 4
➢ Ciphertext: A B V D P Y L J S N P Q J T X F G V H O Z
➢ The first letter in the above text is W. The corresponding key value is 04.
➢ This means that the ciphertext is the letter 4 positions ahead (in the modulo 26 sense).
➢ The key length = 8, i.e., the keystring repeats after every 8 characters.
➢ There are four occurrences of the letter "s" in the above text
➢ However, each occurrence of "s" is encrypted as a different character in the ciphertext - "
V", "X", "O," and "Z".
Page 16
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Unlike the Caesar and Vigenere ciphers, each character in the ciphertext is a function of all
the characters in that block.
➢ Let p1,, p2, . . . pm„, be the numeric representation of the characters in the plaintext and
➢ let c1,c2,c3,…cm represent the corresponding characters in the ciphertext.
➢ To compute the ciphertext, we map each alphabet to an integer.
➢ We use the mapping,
A 0
B 1
C 2
D 3
E 4
F 5
c.One—time Pad
➢ To perform theone time pad cipher encryption operation, the pad values are added to
numeric values that represent the plaintext that needs to be encrypted.
➢ Each character of the plaintext is turned into a number and a pad value for that position is
added to it.
➢ The resulting sum for that character is then converted back to a ciphertext letter for
transmission.
➢
Page 17
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 18
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ ATNOTIARGIEBONONPEON
➢ To decrypt the message, the recipient would have to cast the cipher text in a 5 x 4 matrix,
reverse the column shuffles, and then reverse the row shuffles.
➢ For example, with a combination of guesswork, luck, and limited prior information, a spy
might be able to deduce that the planned start time of an attack is 11:15 pm upon receiving
the following ciphertext.
➢ 11KCTATAMMOCPM51CENE
➢ This is the ciphertext using the row and column shuffling as in the example above.
➢ The corresponding plaintext is
Commence Attack 11 15 pm
➢ In 1949, Claude Shannon first proposed the ideas of confusion and diffusion in the operation
of a cipher.
➢ Confusion is the property of a cipher whereby it provides no clue regarding the relationship
between the ciphertext and the key.
➢ Given plaintext p, a sequence of keys k1, k2, . . . ki and the corresponding ciphertexts are
obtained using this encryption Ek1(p), Ek2(p), Ek3(p), ............. Eki(p),
➢ It is nearly impossible to deduce the value of a new, arbitrarily chosen key kj used to create
the ciphertext,Ekj(p).
➢ Confusion reigns supreme with a cipher if , for any plaintext,p if even a single bit in a key k
is changed to produce k’, then roughly half the bits in the ciphertexts Ek(p) and Ek’(p) are
different.
➢ While confusion is concerned with the relationship between the key and the ciphertext,
➢ Diffusion is concerned with the relationship between the plaintext and the corresponding
ciphertext.
Page 19
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Block Ciphers
➢ With block ciphers, the plaintext is split into fixed size chunks called blocks, and each
block is encrypted separately.
➢ Typically all blocks in the plaintext are encrypted using the same key.
➢ Block ciphers include DES, AES, RSA, and ECC.
➢ Block sizes used in secret key cryptography are usually smaller — 64 bits in DES and
128 bits in AES.
➢ The block size in RSA is much larger — 768 or more bits, while the block size in ECC is
about 200 bits.
➢ If two blocks of plaintext within a message are identical, their corresponding ciphertexts
are identical. This statement, however, is only partially true.
Stream cipher
Page 20
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Modern day secret-key ciphers are typically synthesized using the Substitution Box (S-Box)
and the Permutation Box (P-Box).
Substitution Box (S-Box)
➢ An S-box is a device that takes as input a (binary) string of length m and returns a
(binary) string 1 of length n. While it is often the case that m = n, this need not
always be so.
➢ An S-box is implemented using a table (or array) of 2m rows with each row
containing an n-bit value.
➢ The input to the S-box is used to index the table which returns the n-bit output of the
S-Box.
Permutation Box (P-Box).
➢ The three operations that take place in sequence as shown in Fig. below.
Page 21
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 22
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ For a block size of 64, the use of eight S-boxes (each with 8 inputs) would bring down the
storage requirements to about 16,000 bits.
➢ Usage of s box injects non-linearity into the design of the cipher.
➢ Non-linearity implies the absence of a linear relationship between any subset of bits in the
plaintext, cipher text, and key.
➢ Finally, the third step in each round or iteration is a permutation.
➢ A P-Box re-orders the inputs that it receives. it diffuses or spreads contiguous bits of the
input across the entire block.
➢ Without the P-Box, the first b/s bits of the output would be a function of the first b/s bits of
the input, the second b/s bits of the output would be a function of the second b/s bits of the
input and so on.
➢ DES is the successor to a cipher called Lucifer designed by cryptographers at IBM in the
1960's.
➢ It was first published in March 1975 and was chosen by the U.S. National Bureau of
Standards or NBS (later re-named National Institute of Standards and Technology or NIST)
as the standard cipher for secret key cryptography in January 1977.
Figure:DES encryption
Page 23
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 24
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Two bits of the i-th chunk serve as a row index (i5,i0)into the i-th table (Fig. 5.3) and the
remaining four bits serve as a column index(i4,i3,i2,i1).
➢ The output of the S-box is simply the 4-bit string pointed to by the row and column indices.
i5 i4 i3 i2 i1 i0
S BOX
o3 o2 o1 o0
column 0 to column 15
Row 0
Row 1
Row 2
Row 3
Figure s box implementation using array size 4X16
Page 25
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Module 2
Cryptographic Hash
2.1 INTRODUCTION
➢ Definition: A hash function is a deterministic function that maps an input element from
a larger (possibly infinite) set to an output element in a much smaller set.
➢ The input element is mapped to a hash value.
➢ For example, in a district-level database of residents of that district, an individual's
record may be mapped to one of 26 hash buckets.
➢ Each hash bucket is labelled by a distinct alphabet corresponding to the first alphabet of
a person's name.
➢ Given a person's name (the input), the output or hash value is simply the first letter of
that name (Fig. 7.1).
➢ Hashes are often used to speed up insertion, deletion, and querying of databases.
➢ In the example above, two names beginning with the same alphabet map to the same
hash bucket and result in a collision.
Page 1
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
2.2 PROPERTIES
7.2.1 Basics
➢ A cryptographic hash function, h(x), maps a binary string of arbitrary length to a fixed
length binary string.
➢ The properties of h are as follows:
1. One-way property. Given a hash value, y (belonging to the range of the hash
function), it is computationally infeasible to find an input x such that b(x) = y
2. Weak collision resistance. Given an input value x1, it is computationally
infeasible to find another input value x2 such that h(x1) = h(x2)
3. Strong collision resistance. It is computationally infeasible to find two input values
x1 and no x2 such that h(x1)=h(x2)
4. Confusion + diffusion. If a single bit in the input string is flipped, then each bit
of the hash value is flipped with probability roughly equal to 0.5.
Page 2
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ assuming that any given string is equally likely to map to any one of the 2 W
hash
values, it follows that the above loop would have to run, on the average, 2w-1 times
before finding an x' such that h(x') = y.
Page 3
Cryptography, Network Security and Cyber Law(17CS61)
MODULE 2(chapter 2)
➢ A similar loop could be used to find a string, x2, that has the same hash value as a given
string x1.
Strong Collision Resistance
➢ A Brute-force attack on strong collision-resistance of a hash function involves
looping through the program in Fig. 7.4.
➢ Unlike the program that attacks weak collision resistance, this program terminates
when the hash of a newly chosen random string collides with any of the previously
computed hash values.
Page 4
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 5
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
2.3 CONSTRUCTION
2.3.1 Generic Cryptographic Hash
➢ The input to a cryptographic hash function is often a message or document.
➢ To accommodate inputs of arbitrary length, most hash functions (including the
commonly used MD-5 and SHA-1) use iterative construction as shown in Fig. 7.5.
➢ C is a compression box.
➢ It accepts two binary strings of lengths b and w and produces an output string of length
w.
➢ Here, b is the block size and w is the width of the digest.
➢ During the first iteration, it accepts a pre-defined initialization vector (IV), while the
top input is the first block of the message.
➢ In subsequent iterations, the "partial hash output" is fed back as the second input to
the C-box.
➢ The top input is derived from successive blocks of the message.
➢ This is repeated until all the blocks of the message have been processed.
➢ The above operation is summarized below:
➢ h, = C (IV, m1) for first block of message
➢ hi = C (hi-1.mi) for all subsequent blocks of the message
\
Page 6
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 7
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 8
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 9
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ On receipt of the message + MAC, the receiver performs the computation using the
common secret and the received message.
➢ It checks to see whether the MAC computed by it matches the received MAC.
➢ A change of even a single bit in the message or MAC will result in a mismatch
between the computed MAC and the received MAC.
➢ In the event of a match, the receiver concludes the following:
➢ (a) The sender of the message is the same entity it shares the secret with — thus
the MAC provides source authentication.
➢ (b) The message has not been corrupted or tampered with in transit — thus the
MAC provides verification of message integrity.
➢ Drawbacks:
➢ An attacker might obtain one or more message—MAC pairs in an attempt to
determine the MAC secret.
➢ First, if the hash function is one-way, then it is not feasible for an attacker to deduce
the input to the hash function that generated the MAC and thus recover the secret.
➢ If the hash function is collision-resistant, then it is virtually impossible for an
attacker to suitably modify a message so that the modified message and the original
both map to the same MAC value.
HMAC
➢ There are other ways of computing the hash MAC other than this method using
HMAC .
➢ Another possibility is to use key itself as the Initialization Vector (IV) instead of
concatenating it with the message.
➢ Bellare, Canetti, and Krawczyk proposed the HMAC and showed that their scheme
is re against a number of subtle attacks on the simple hash-based MAC.
➢ Figure 7.7 shows how an HMAC is computed given a key and a message.
Page 10
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ The key is padded with O's (if necessary) to form a 64-byte string denoted K' and
XORed with a constant (denoted IPAD).
➢ It is then concatenated with the message and a hash is performed on the result.
➢ K' is also XORed with another constant (denoted OPAD) after which it is
prepended to the output of the first hash.
➢ Once again hash is then computed to yield the HMAC.
➢ As shown in Fig. 7.7, HMAC performs an extra hash computation but provides
greatly enhanced security.
2.4.2 Digital Signatures
The same secret that is used to generate a MAC on a message is the one that is used
to verify the MAC.
Thus the MAC secret should be known by both parties - the party that generates the
MAC and the party that verifies it.
A digital signature, on the other hand, uses a secret that only the signer is privy to.
An example of such a secret is the signer's private key.
A crude example of an RSA signature by A on message, m, is EA.pr(m)
where A.pr is A’s private key.
The use of the signer's private key is a fundamental aspect of signature generation.
Hence, a message sent together with the sender's signature guarantees not just
integrity and authentication but also non-repudiation, i.e., the signer of a document
Page 11
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
cannot later deny having signed it since she alone has knowledge or access to her private
key used for signing.
The verifier needs to perform only a public key operation on the digital signature
(using the signer's public key) and a hash on the message.
The verifier concludes that the signature is authentic if the results of these two
operations tally,
Page 12
Cryptography, Network Security and Cyber Law(17CS61)
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Maharaja Institute of Technology Mysore Dept of ISE
MODULE 3
Chapters
1.Key Management 2.Authentication-I
Page 1
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 2
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 3
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
✓ It may be necessary to check other fields in the certificate such as the subject's web
page URL or e-mail address.
✓ A should check if the certificate is still valid. Since the validity period is contained in
the certificate, this is easily done.
✓ Finally, the certificate must be signed by a CA or RA.
✓ A should verify the signature contained in the certificate.
✓ A requires the CA’s public key for signature verification.
✓ The CA may be globally known or may be known to the community that A and B
belong.
✓ In this case A has access to the CA’s public key.
Page 4
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 5
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Apractical solution to the problem of scalability is to have CA1 certify other CAs who in turn
certify other CAs and so on.
➢ This creates a tree of CAs known as a hierarchical PKI architecture [see above Fig.(b)].
➢ Here, CA1 issues certificates to CA2, CA3, and CA4.
➢ CA2 in turn issues certificates to CA5 and end user Ul.
➢ CA5 issues certificates to users U2 and U3.
➢ The advantage of this approach is easy scalability — each CA is responsible for certifying a
limited number of users or other CAs.
➢ CA1, the root CA, is sometimes referred to as the trust anchor.
➢ every node in the tree will know the root CA's public key.
➢ Suppose U1 in Fig.(b) needs U5's public key.
➢ U5 would have to provide an entire chain of certificates as follows:
➢ (1) Certificate signed by CA1 vouching for CA3's public key
➢ (2) Certificate signed by CA3 vouching for CA6's public key
➢ (3) Certificate signed by CA6 vouching for U5's public key
➢ It is assumed that each node has a copy of the root's public key.
➢ So, upon receiving the above certificate chain, U1 can verify the signature on the first
certificate using CA1's (the trust anchor'! public key.
Page 6
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Figure 10.2(d) shows a bridge CA that extends the web of trust between two existing
organizational PKIs.
Revocation Scenarios
Scenario 1: The certificates subject, Prashant, was issued a certificate valid between Jan 01,
2010, and Dec 31, 2010.however he quit the organization on April 1, 2010.
➢ Assume that Prashant's certificate is used for key exchange/authentication and that he
has made a copy of it.
➢ The session key itself is then used to encrypt all messages in both directions for the
duration of the ensuing session.
➢ Generally speaking, it is not legal for Prashant to act on behalf of his company beyond
the date of his resignation. However, that is precisely what he could do when he
attempts to establish official business communication with a customer of his company
on say June 10, 2010.
➢ Based on the expiration date in Prashant's certificate, the customer would deduce that
the certificate was valid.
➢ Moreover, Prashant would be able to authenticate himself or perform unauthorized
decryption since he knows the private key corresponding to the public key in his
certificate. Thus, Prashant might continue to do business on behalf of his company even
after resigning.
➢ Based on Scenario 1, we need a mechanism to revoke a certificate issued by an
organization to an employee when the he leaves or changes roles.
Scenario 2:
Page 7
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ The attacker would provide a certificate chain of two certificates — the certificate issued
by CA1 vouching for CA3's public key and the above certificate created by him.
➢ This chain is a valid trust path from the root CA to the subject U.
➢ Using the public key of CA1 and the certificate chain, the verifier would accept the
fraudulent signature generated using Y as an authentic signature of U.
➢ Scenario 2 is that if a CA's private key is compromised, then any certificate issued by
that CA is invalid and it should not be included in any trust path or certificate chain.
Handling Revocation
Solution 1:
➢ One possible solution to the problem of certificate revocation is to use an on-line facility that
provides information on the current status of digital certificates.
➢ For this purpose, a protocol called On-line Certificate Status Protocol (OCSP) is employed.
Solution 2:
Solution 3
➢ Design a system wherein the signer requires the cooperation of a Trusted Third Party
(TTP) in generating a signature.
➢ Both, the signer and the TTP have a part of the private key with neither party knowing the
other part.
➢ To sign a document, the signer would contact the TTP.
Page 8
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Before requesting to sign , the TTP could check whether the signer's certificate has been
revoked and participate only if the signer's certificate has not been revoked.
➢ Indeed, the TTP may itself maintain certificate revocation information.
➢ The TTP may also act as a timestamp authority and certify the time at which the document
is signed.
➢ This may be done, for example, by signing a value obtained by concatenating a timestamp
with the hash of the document.
3.4.1 Preliminaries
➢ The digital certificate is a verifiable way of communicating the public key of a entity .
➢ Certificates are transmitted along with messages for purposes such as authentication,
signature verification, and encryption.
➢ An alternative to digital certificates emerged in 1984 in the form of Identity-based
Encryption (IBE).
➢ Shamir's used a scheme wherein a person's public key could be computed as a function of
that person's unique credential such as his/her e-mail address. Thus, anyone can reliably
compute A's public key only knowing A's e-mail address, for example.
➢ IBE assumes the use of a TTP called the Private Key Generator (PKG).
➢ The PKG has a private key and associated public key parameters.(Kpr ,public key
parameters)
➢ To obtain a private key, A informs the PKG that she wishes to receive a private key
corresponding to her ID, say alka@iitb.ac.in
➢ The PKG makes sure that that the credential does indeed belong to A.
➢ The PKG also makes sure that this ID is universally unique, i.e., there is no other individual
with the same credential (in this case alka@iitb.ac.in).
➢ If so, it generates a private key for A, which is a function of her ID and the private key of
the PKG.
➢ The PKG then securely transmits the private key to A.
➢ Disadvantage:With knowledge of the PKG's public parameters and A's unique ID, anyone
can compute A's public key
Page 9
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ A bilinear mapping ,B(x,y) maps any pair of elements from one given set to an element in
a second set.
➢ The term bilinear follows from the following property mapping:
➢ Here u1,u2 and v are elements of the first set and k1 and k2 are integer constants.
➢ An example of dot product of vectors
Page 10
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
CHAPTER 2
Authentication-I
➢ Authentication is a process in which a principal proves that he/she/it is the entity it claims
to be.
➢ The principal is referred to as the prover, while the party to whom proof is submitted identity
verification is called the verifier.
➢ Authentication may be based on what the principal knows (e.g., a password or a passphrase)
or has (an identity card or passport, for example).
➢ A principal is often a human ,a computer, an application, or a robot.
➢ In the case of a human principal, authentication may use physical characteristics such as
voice, a fingerprint, a retinal scan, or even a DNA sample — this form of authentication is
referred to as biometric authentication.
➢ With password-based authentication, an individual is often expected to communicate his/her
password to a verifying entity. However, in many cases it may not be advisable for the
individual to reveal his/her password.
➢ Instead, he/she may be required to perform some "one-way" cryptographic operation using
his/her secret, which cannot be performed without knowledge of it.
➢ Finally, many authentication systems today use a combination of techniques. This is referred
to as multi-factor authentication.
One way Authentication
1)password basedAuthentication
2)certificate based authentication
Authentication
Mutual authentication
1)shared secret based authentication
2)Asymmetric based authentication
3)authentication and key agreement
➢ In client—server communications over a campus, network, for example, it is often the case
that the client authenticates itself to the server.
➢ The server may or may not be authenticated to the client. This is referred to as one-way
authentication.
Page 11
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Categorized to
1. password based authentication
2. certificate based authentication
Page 12
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ An effective strategy to thwart a replay attack is for the verifier (in this 'case the server) to
offer a fresh challenge to the prover (the client).
➢ In response, the client does not communicate its password but rather proves that it knows
the password.
➢ The server is thus able to verify whether the client is genuine or not.
➢ The freshness of the challenge requires previous response to answer the current challenge.
Such an authentication protocol is commonly referred to as a Challenge—Response
Protocol.
Page 13
Cryptography, Network Security and Cyber Law(17CS61)
Network Security & Cryptography Module 3
Page 14
Maharaja Institute of Technology Mysore Dept of ISE
Page 15
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 16
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 17
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 18
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 19
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Use of Timestamps
Page 20
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 21
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
23-05-86 Birthdays/anniversaries are convenient but would almost always be part of the
attacker's password dictionary
ashyea Permutation of letters in mother's or spouse's name,
(Ayesha name in this example)is a poor choice especially if the attacker has
personal information about his victim
Kolkata Place names are often part of password dictionaries
Page 22
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ One approach to frustrating a dictionary attack is to increase the cost of performing such
an attack. The cost is the time to successfully complete the attack.
➢ The most time-consuming operation in each iteration of the dictionary attack program is
f(D[i], R). Hence, to decrease the attacker's chance of success, the function f(D[i], R)
could be made more computationally expensive.
➢ Suppose, for example, instead of the function f being a simple cryptographic hash, it was
the cryptographic hash, h, applied successively a hundred times,that is,
➢ h (... h (h (D[i], R)) ........... )
➢ If the above function were used in the loop of the program, we would expect the program
to run about 100 times slower.
➢ A protocol that virtually eliminates off-line dictionary attacks is the Encrypted Key
Exchange (EKE) protocol.
➢ This is a password-based protocol that combines Diffie—Hellman key exchange with
mutual authentication based on a shared secret.
➢ the Diffie—Hellman protocol is vulnerable to a man-in-the-middle attack which is due to
the unauthenticated exchange of "partial secrets", ga mod p and gb mod p.
➢ To mitigate this attack, EKE uses a novel idea — each side transmits its partial secret
after encrypting it.
➢ The encryption key, PW,is the hash of the password.
➢ Below Figure shows the four messages that are exchanged in EKE.
➢ After MSG 2, both sides should be able to compute the new session key k = gab mod p
denoted by K in the figure.
Page 23
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Chapter 3
Authentication-II
➢ Key Distribution Centre (KDC) – a trusted third party that shares long-term keys-
with clients and servers alike.
➢ Two protocols that make use of a KDC—the Needham-Schroeder protocol and
Kerberos.
➢ We then look at the biometric authentication as a complement to and, in some cases,
as a substitute for cryptographic authentication.
Page 24
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ In Figbelow,
Page 25
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Figure 3.10 a
Preliminary Version 1
➢ MSG 1:Identity of A and B
➢ MSG 2: In response KDCencloses the ticket to B.ie EB{A,KAB}
➢ MSG 3: A then forwards the ticketalong with the challenge to B (R1)
➢ MSG 4: R1 is decremented and B challenges A with R2.
➢ MSG 5:R2 is decremented by A and forwarded to B.
Page 26
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Figure 3.10 b
Man in the middle attack on Preliminary Version 1
➢ The protocol in Fig. 3.10(a) is susceptible to an impersonation attack shown in Fig.
3.10(b).
➢ Theattacker, X, is an insider who shares a long-term key with the KDC.
➢ The attacker, X, intercepts Message 1, substitutes "B" for "X" and sends the
modified message to the KDC.
➢ In response, the KDC creates a ticket encrypted with X's long-term key and sends it to
A in Message 2.
➢ Now X Intercepts Message 3. He decrypts the ticket using the long-term secret he
shares with the KDC. He thus obtains the session key, KAX.
➢ Message 3 also contains A's challenge R1.
➢ X uses the session key, KAX to decrypt the part of the message containing A's
challenge. He successfully responds to A's challenge in Message 4.
➢ Thus, X successfully impersonates B to A.
Page 27
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Preliminary Version 2
➢ A simple fix to the protocol is to include B's identity in the encrypted message from
the KDC to A (Message 2). The modified message is
➢ EA{KAB, "B", EB {"A", KAB}}
Figure 3.11 b Man in the middle attack and replay attack.( B’ is the old key , B is the new key)
Preliminary version 2
➢ MSG 1:Identity of A and B
➢ MSG 2: In response KDCencloses the ticket to B.ie EB{A,KAB}, b’s identity
➢ Now, after A receives and decrypts Message 2, she checks whether B's identity is
contained inside the message. The presence of B's identity confirms to A that the KDC
knows that A wishes to communicate with B.
➢ MSG 3: A then forwards the ticketalong with the challenge to B (R1)
➢ MSG 4: R1 is decremented and B challenges A with R2.
➢ MSG 5:R2 is decremented by A and forwarded to B.
Page 28
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 29
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Preliminary Version 3
Page 30
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Preliminary version 3
Page 31
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Figure 3.13
➢ The problem in previous versions could be fixed if B were allowed to choose a
nonce(R4)andthe same nonce were enclosed by the KDC in the ticket it generates.
➢ MSG 1:Identity of A and B sent from A to B
➢ MSG2: random number R4 generated by B
➢ MSG3:A forwards his challenge as R3 along with R4.
➢ MSG 4:KDC generates ticket and includes R4
➢ When B receives this ticket in msg 5, B can verify the random number/nonce
generated in msg 2 is same or not.
3.10 Kerberos
➢ A user could use the same password for all servers but distributing and maintaining a
password file across multiple servers poses a securit risk.
➢ A password-based system should ensure the following: y
Page 32
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 33
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 34
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ The TGS generates a fresh session key, Kc,s, to be shared between C and S.
➢ This key is encrypted using the session key KC,TGS, so only C can decrypt it.
➢ The fresh nonce, R2, from C is also encrypted by the TGS using K C,TGS
➢ This convinces C that the received message is from the TGS
➢ Finally, the fresh session key Kc,s is enclosed in a service-granting ticket to be
forwarded by C to S.
Page 35
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ The service-granting ticket is encrypted with the long-term secret shared between the
TGS and S.
Message 5
C →S
Message 6
S→ C
3.11 BIOMETRICS
3.11.1 Preliminaries
➢ A biometric is a biological featureor characteristic of a person that uniquely identifies
him/her over his/her lifetime.
➢ Common forms of biometric identification include face recognition, voice recognition,
manual signatures, and fingerprints.
➢ More recently, patterns in the iris of the human eye and DNA have been used.
➢ Behavioural traits such as keystroke dynamics and a person's walk have also been
suggested for biometric identification.
➢ Biometric forms were first proposed as an alternative or a complement to passwords.
➢ Passwords are based on what a user knows.
➢ Commonly used ID cards, including personal smart cards, are based on what a
person has.
➢ A biometric, on the other hand, links the identity of a person to his/her
physiological or behavioural characteristics.
➢ The two main processes involved in a biometric system are enrolment and
recognition.
1. Enrolment:
✓ In this phase, a subject's biometric sample is acquired.
Page 36
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 37
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Case studies
1. Fingerprints
2. Iris scan
1. Fingerprints:
✓ A fingerprint is an impression left by the ridges and valleys of a
human finger.
✓ Each individual fingerprints exhibit distinctive patterns.
✓ During the enrolment and recognition phase ,an image of the fingertip
is taken by placing it on the plane surface of a scanner.
✓ During the recognition phase the input template must match with the
patterns stored in database.
✓ The simplest approach involves identification of distinctive patterns
formed by ridges.these are called as singularities.
✓ They are:arch,loop and whorls.
✓ Arch : the ridge starts from one side of the finger and forms an arc
and ends on other side.
✓ Loop: the ridge starts and ends at the same side of the finger.
✓ Whorls:appear as closed cycles or spirals in a fingerprints.
2. Iris scan
✓ The iris is a thin opaque diaphragm of smooth muscle situated in
front of the lens in the human eye.
✓ Its annular shape surrounds the pupil.
✓ The intricate patterns on the iris appear to be unique.
✓ Two identical twins have iris pattern s that are different as those of
two unrelated individuals.
✓ The patterns of an iris are also stable with age.
Page 38
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Chapter 4
IPSec-Security at the Network Layer
4.1 SECURITY AT DIFFERENT LAYERS: PROS AND CONS
➢ Security may be implemented at different layers of the OSI model.
➢ Security is commonly implemented
1. In the network layer or
2. between the transport and application layers and/or
3. within the application
➢ IPsec — the best-known protocol for providing security at the network layer.
➢ There are two main IPSec protocols and their modes of operation.
Page 39
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ Each node has a database of SAs for all connections originating from or terminating at it.
This database is referred to as the SA Database (SADB).
➢ Finally, it should be noted that two communicating parties, A and B, establish two SAs
— one for communications from A to B and another from B to A.
1. Transport mode
AH in transport
mode
Page 40
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 41
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
➢ ESP does not provide protection to any part of the IP header in transport mode.
Sequence number:
➢ All IPSec headers (both AH and ESP in both modes) have 32-bit fields each for the
SPI and a packet sequence number , to protect against replay attacks.
Padding:
➢ Padding is added so that the length of the encrypted payload is a multiple of block size
(as required by most encryption algorithms).
➢ Padding also helps in hiding the actual length of the data when ESP is used with the
encryption option turned on.
Page 42
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 43
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 44
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
✓ The motivation for introducing Main Mode is to hide the identities of the sender and receiver
from eavesdroppers.
✓ The six messages exchanged in Phase 1 for each of these cases.
✓ Main Mode
✓ IKE derives a hierarchy of keys —KEYr, KEYd, , KEYa, and KEYe.
✓ The subscripts r, d, a, and e denote 'root', 'derived', 'authentication', and 'encryption',
respectively.
Page 45
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Option 1 :
✓ A and B share a secret key Figure 13.4(a) shows the sequence of messages exchanged
between A and B under the assumption that A and B share a secret key, s.
✓ The first message contains the cryptographic algorithms proposed by A for use in the IKE
security association (in addition to the cookie CA). This is denoted SAA.
✓ Message 2 shows the cryptographic algorithms accepted by B.
✓ In Messages 3 and 4, both sides exchange nonces and the Diffie—Hellman partial keys.
✓ After Message 4 has been received, A and B independently compute a hierarchy of secrets
such as keyr,keya,keye.
Page 46
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Aggressive Mode
,The aggressive mode involves only three messages.
➢ As shown in Fig. 13.5, the identities of A and B are sent in the clear in messages 1 and 2.
➢ Another aspect of IKE Phase 1 in aggressive mode is that the Diffie—Hellman group is used and
the group parameters are decided by A.
➢ A computes its partial key and sends it to B in Message 1.
➢ B has no choice but to quietly accept the group chosen by A.
Page 47
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
IKE phase 2
IKE Phase 2
➢ IKE phase 2 to be used for authentication (and encryption) as part of the IPSec SA.
➢ Two parties participate in an IKE Phase 2 exchange in order to establish a new IPSec SA.
➢ Either party can initiate this phase in which the cipher suite and the keys that comprise the
new IPSec SA are agreed upon.
➢ Above Figure shows the three messages exchanged in "Quick Mode."
➢ All messages, encrypted using the secret, KEYe, computed in theprevious phase .
➢ Message integrity and data source authentication is provided by using an HMAC.
➢ The key for the HMAC is KEYa, also computed in Phase 1.
➢ A 32-Bit "Message ID”, MID, is used to distinguish this phase 2 session from, possibly,
others that may be set up concurrently within the same IKE SA.
➢ The MID together with the two cookies created in Phase 1, CA and CB, are dispatched as part
of each of the three messages.
➢ Both sides send their proposals for a suite of cryptographic algorithms to be used in the
IPSec SA.
➢ These are denoted SAA and SAB in Fig. 13.6.
➢ To guarantee freshness, both sides also generate and transmit nonces, NA and NB.
➢ In addition to the agreement on a cryptographic suite, the purpose of this phase is to agree on
the secrets
➢ These secrets are computedsimultaneously by both sides and are a function of KEYd
computed in Phase 1 and the nonces NA and NB exchanged in this phase.
➢ To integrity protect the messages each side computes a MAC on their messages. MACS
includes integrity protection for both nonces, NA and NB.
Page 48
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 49
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Chapter 5
Security at the Transport Layer
3.12 INTRODUCTION
➢ Developed by Netscape in 1994, the Secure Sockets Layer (SSL) protocol has emerged
as the principal means of securing communications between an Internet client (such as
a browser) and a server.
➢ It was standardized by IETF in 1999 and called Transport Layer Security (TLS).
➢ SSL is sandwiched between TCP (it only runs over TCP) and an application layer
protocol.
➢ It is application protocol independent.
➢ Protocols such as HTTP, FTP, SMTP, IMAP, and POP can all be run over SSL.
➢ Application protocols secured by SSL are usually suffixed by an "S" and run on
different port numbers.
➢ For example, HTTP runs on port 80 but HTTPS runs on port 443.
➢ FTP runs on port 21 but FTPS runs on port 990.
➢ SSL is comprised of two main protocols (see Fig. 14.1)
Page 50
Cryptography, Network Security and Cyber Law(17CS61)
Maharaja Institute of Technology Mysore Dept of ISE
Page 51
Maharaja Institute of Technology Mysore Dept of ISE
Module 3
➢ Step 1:Two messages are communicated in this step —Client Hello and Server
Hello.
➢ Step 2. The server communicates its certificate to the client (see Fig. 14.2).
➢ On receipt of the certificate, the client checks the owner's name/URL and validity
period.
➢ It also verifies the signature of the CA on the certificate.
➢ Successful verification of these fields does not guarantee the authen ticity of the
sender
➢ Authentication of the server only occurs at the end of Step 4,
Page 52
Maharaja Institute of Technology Mysore Dept of ISE
Module 3
Step 3.
➢ Finally six secrets are derived using HMAC-style functions of the master secret,
the two nonces, anddifferent pre-defined constants
Step 4: This step involves the exchange of two messages in each direction.
Page 53
Maharaja Institute of Technology Mysore Dept of ISE
Module 3
➢ It then computes its own keyed hash that covers the previous handshake messages + a pre-
defined constant, which is distinct from the one used by the client.
➢ The client receives the keyed hash and verifies it. Only at this point is the server authenticated
to the client.
➢ On the other hand, client authentication as part of the SSL handshake is optional.
➢ In Step 2, the server dispatches its certificate so the client can use the public key contained in
the certificate to encrypt the pre-master secret.
➢ In some cases, however, the server's certificate may be a "signature-only certificate."
➢ This means that the public key in the certificate and the corresponding private key may
only be used exclusively for signature generation/verification, not for encryption.
➢ In that case, SSL permits the server to create a temporary public key/private key pair.
The public key (including modulus) are signed by the server using the private key
corresponding to the public key in the signature-only certificate.
➢ The signed public key and certificate are communicated by the server to the client.
➢ The client verifies the signature on the public key and then uses it to encrypt the pre-
master secret.
➢ SSL offers a rich set of options for key exchange.
➢ Such as RSA-based key exchange methods, Diffie—Hellman key exchange may be used.
Server Authentication
➢ The MAC computed by both parties and sent in step 4 is used as an integrity checkon the
previous handshake messages.
➢ All the handshake messages are sent in the clear (except for encryption of the pre-master
secret).
➢ It is possible for an attacker to alter one or more of the handshake messages.
➢ For example, he may replace128-bit DES by a 56-bit DES.
➢ This may induce both parties to use a weaker cipher, which can be compromised by the
attacker.
➢ The MAC detects any modification in the handshake messages.
➢ The hash computed by the server and verified by the client uses the server MAC secret,
➢ It is a function of the master secret which in turn is a function of the pre-master secret.
➢ Recall that the pre-master secret is chosen by the client and encrypted with the server's public
key so that the server alone can read it. So, nobody but the server and client could compute
the six secrets.
➢ Only after the client receives and verifies the keyed hash from the server, is it convinced
that it is talking to the authentic server.
Page 54
Maharaja Institute of Technology Mysore Dept of ISE
Module 3
Page 55
Maharaja Institute of Technology Mysore Dept of ISE
Module 3
3.15 OpenSSL
➢ OpenSSL is open source software that implements the SSL/TLS protocol.
➢ It is comprised of a number of libraries that implement various cryptographic
algorithms.
➢ It provides extensive support for communicating and validating digital
certificates.
➢ OpenSSL is based on the SSLeay library developed by Eric A. Young and Tim J.
Hudson.
➢ OpenSSL enhances the productivity of application developers by providing a rich set
of APIs that handle diverse aspects of SSL-enabled communication from
connection set-up and tear-down to certificate storage, management, and
verification.
➢ The developers can rely on the OpenSSL APIs to implement the required security.
Page 56
Maharaja Institute of Technology Mysore Dept of ISE
MODULE 4
Chapters
1.IEEE 802.11 wireless LAN 2.viruses,worms and other
security malware
3.firewalls 4.Intrusion Prevention and
detection
5.Web Services Security
1. IEEE 802.11 Wireless LAN Security
Wireless networks present formidable challenges in the area of security.
The open nature of such networks makes it relatively easy to sniff packets or even modify and
inject malicious packets into the network.
The ease with which such attacks are launched necessitates careful design and deployment of
security protocols for wireless networks.
1.1 BACKGROUND
Wired network
In many organizations, the wired network is an Ethernet LAN with an existing security
infrastructure that includes an authentication server (AS).
AAA (Authentication/Authorization/Accounting) functionality is often provided by a
RADIUS (Remote Authentication Dial in User Service) server.
WLANs(wireless LANs)
There are two principal types of WLANs —
1. Ad hoc networks: where stations (possibly mobile) communicate directly with each
other.
2. Infrastructure WLANs: which use an access point (AP) as shown in below figure.
Page 1 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Infrastructure WLANs :
A station first, sends a frame to an AP and the AP then delivers it to its final destination.
The destination may be another wireless station or it may be a station on the wired network
that the AP is connected to.
The AP thus serves as a bridge between the WLAN and the existing wired network.
The challenge then is to develop protocols that seamlessly integrate the WLAN with the
security infrastructure of the wired network.
A network of wireless stations associated with an AP is referred to as a basic service set. Such
a network may be adequate for a home or small enterprise.
The union of the basic service sets comprises an extended service set (ESS).
Each station and AP in the ESS is uniquely identified by a MAC address — a 48-bit quantity.
Each AP is also identified by an SSID (service set ID), which is a character string of length at
most 32 characters.
A wireless station, on power-up, needs to first discover an AP within its range.
This can be done by monitoring the Alternatively, a station may send a Probe
wireless medium for a special kind of Request frame, which probes for APs
frame called a Beacon, which is within its range.
periodically broadcast by the AP. An AP, on hearing such a request, responds
The Beacon usually contains the SSID of with a Probe Response frame.
the broadcasting AP. Like the Beacon, the Probe Response
frame contains the SSID of the AP and also
information about its capabilities,
supported data rates, etc.
Page 2 of 62
Maharaja Institute of Technology Mysore Dept of ISE
The AP replies with an Associate Response frame if it accepts the request for associating with
it.
1. The earliest protocol that incorporated security in WiFi was WEP.
Designed to provide authentication/access control, data integrity, and
confidentiality, it failed on all three counts.
2. WiFi Protected Access (WPA)
WPA was intended to fix the shortcomings of WEP without requiring new wireless
network cards.
But WPA is not perfect — it too is susceptible to attacks on its cryptographic
algorithms.
3. WPA2
All the deficiencies in WEP have been addressed in the IEEE 802.11i
(implemented in WPA2) .
1.2 AUTHENTICATION
1.2.1 Pre-WEP Authentication
Drawbacks:
1. An attacker could easily sniff the value of SSID from frames such as the beacon or probe
response and then use it for authentication.
2. Another approach was to restrict admission to the WLAN by MAC address.
The AP would maintain a list of MAC addresses (access control list) of stations
permitted to join the WLAN.
valid MAC addresses could be obtained by sniffing the wireless medium.
The attacker could then modify his network card to spoof a valid MAC address. So,
neither of these approaches was truly secure.
The response together with the IV is sent by the station to the AP.
The shared secret, S, is common to all stations authorized to use the WLAN.
Drawbacks:
Page 3 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Different authentication mechanisms and message types are defined by the Extensible
authenticationProtocol (EAP) standardized by Internet Engineering Task Force (IETF).
EAP is not really an authentication protocol but rather a framework upon which various
authentication protocolscan be supported.
EAP exchanges are mostly comprised of requests and responses.
For example one party requests the ID of another party.
The latter responds with its user_name or e-mail address.
EAP also defines messages that may contain challenges and responses used in authentication
protocols.
The AP broadcasts its security capabilities in the Beacon or Probe Response frames.
The station uses the Associate Request frame to communicate its security capabilities.
802.11i authentication takes place after the station associates with an AP.
IEEE 802.11i
The generic authentication messages in IEEE 802.11i are shown in Fig. 15.2.
The protocol used between the station and the AP is EAP but that used between the AP and
the authentication server depends upon the specifics.
For example, the authentication server is often a RADIUS server which uses its own message
types and formats. (RADIUS stands for Remote Authentication Dial in User Service.
It is a client—server protocol used for authentication, authorization, and accounting.)
Page 4 of 62
Maharaja Institute of Technology Mysore Dept of ISE
1. EAP-MDS
This is most basic of the EAP authentication methods.
Here, the authentication server challenges the station to transmit the
MD5hash of the user's password.
The station prompts the user to type his/her password.
It then computes the hash of the password and sends this across.
This method is insecure since an attacker could eavesdrop on such a message
exchange and then replay the hashed password thus impersonating the owner of the
password.
Also, this method does not support authentication of the AP to the station.
Page 5 of 62
Maharaja Institute of Technology Mysore Dept of ISE
2. EAP-TLS
EAP-TLS is based on the SSL/TLS protocol
most secure and provides mutual authentication and agreement on a master session
key.
It requires the AP as well as the user (station) to have digital certificates.
It is relatively straightforward to equip each AP with a digital certificate and a
corresponding private key but extending the Via to each user of the WLAN may
not be feasible.
3. EAP-TTLS
(tunnelled TLS) requires certificates only at the AP end.
TheAP authenticates itself to the station and both sides construct a secure tunnel
between themselves.
Over this secure tunnel, the station authenticates itself to the AP.
The station could transmit attribute-value pairs such as
user_name = akshay
password = 4rP#mNaS&7
4 Protected EAP (PEAP)
This was proposed by Microsoft, Cisco, and RSA Security, is very similar to EAP-
TTLS.
In PEAP, the secure tunnel is used to start a second EAP exchange where in the
station authenticates itself to the authentication server.
The enhanced security offered by EAP-TLS, EAP-TTLS, and PEAP does,
however, come at a steep price in performance measured by the message and
computational overheads incurred during authentication.
Key Hierarchy
Page 6 of 62
Maharaja Institute of Technology Mysore Dept of ISE
An alternative to computing a fresh PMK for each session is the Pre-Shared Key, (PSK),
which is used as the PMK.
Pairwise Transient Key (PTK).
The 256-bit PMK is used to derive a 384-bit pairwise Transient Key (PTK).
The PTK is a pseudo random function of the PMK.
PRF(nonce of AP,nonce of station,MAC address of AP.MAC address of
station, PMK).
Three 128 bit chunks are extracted from the 384 bit PTK for the following purposes:
1. A Temporal Key (TK) is used for both encryption and integrity protection of data between
the AP and the station.
2. A Key Confirmation Key (KCK): Integrity protection is supported by a MAC computed as
a function of the message and and Associate Request Frames andthe KCK.
3. A Key Encryption Key (KEK) is used to encrypt the message containing the group key.
256
384bit
Four-way Handshake
The main goals of the four-way handshake are to
Page 7 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 8 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 9 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Thus knowing c,c’, and p, we can obtain p’ which is called as known plaintext attack.
Message modification
Consider an attacker who wishes to modify a message sent by a legitimate user.
Let the sender's plaintext (not including the CRC checksum) be M1 F M2 where M1, F, and
M2 are each binary strings.
The attacker wishes to substitute the substring, F, with another substring, F',
so that the decrypted message seen by the receiver is M1 F' M2. The attacker does not need to
know the values, M1 and M2. However, we assume that he knows F and F'.
Ideally, the message integrity check should detect any modification to an existing message.
Can the attacker modify the message (including checksum) in such a way so that the
modification is undetected at the receiver end?
For the above plaintext, the ciphertext computed by the sender is :
CT=
The modified message has a valid CRC and so passes the integrity check at the receiver.
Hence, the receiver accepts the message, unaware that it has been modified by an
attacker.
Page 10 of 62
Maharaja Institute of Technology Mysore Dept of ISE
The technical name for WPA is Temporal Key Integrity Protocol (TKIP).
By contrast, the encryption key in TKIP is 128 bits.
TKIP generates a random and different encryption key for each frame sent. It employs a
process called two-phase key mixing.
The inputs to this process are the 128-bit temporal key, TK, computed as part of the four-
way handshake ,the sender's MAC address and the four most significant bytes of a 48 -bit
frame sequence counter.
The randomizing capability of the key mixing function and the large size of the key space
virtually guarantee that "keystream collisions" never occur.
Thus, known plaintext attacks that could be successfully launched on WEP have no
chance of success with TKIP.
The sequence counter is incremented for each frame sent.
It is also carried in the header of each frame.
This helps protect the receiver from replay attacks.
Figure 15.6 shows the two phases used in generating the RC4 key.
Two pseudo-random function (PRF1 and PRF2) are employed in the two phases.
The 32 most Significant bits of the sequence counter are input to PRF1.
The least significant 16 bits of the sequence counter are inputs to PRF2 So, the output
of PRF2 changes for each frame sent.
MIC is computed as a function of the data in the frame and also some fields in the MAC
header such as the source and destination addresses.
Page 11 of 62
Maharaja Institute of Technology Mysore Dept of ISE
It also uses as input a key derived from the PTK which was computed during the four-way
handshake.
Due to design constraints on WEP cards, MIC's implementation uses simple logical
functions, shifts, etc. Hence, it is not as secure as a keyed cryptographic hash.
On the other hand, it is much better compared to the CRC checksum used in WEP.
CCMP
The implementation of 802.11i that uses AES is referred to as WPA-2.its technical name
is counter mode with CBC MAC protocol(CCMP).
In CCMP terminology, this count is referred to as a packet number (PN).
The count is maintained at both sender and receiver ends.
The PN is also included in a special CCMP header field in a CCMP frame.
The PN is incremented by the sender after each frame is sent.
Upon receipt of a fresh frame in that session, the receiver compares the value of PN in the
CCM header versus the value stored by it.
If the value is less than the stored value, the frame is likely to be a replayed frame and is
hence discarded.
The first task in preparing a frame for transmission is to compute a MIC.
The MIC is computed using AES in Cipher Block Chaining (CBC) mode with block size
128 bits.
The key for performing encryption in each stage of Fig below is TK(temporal key).
The IV for the MIC computation is a "nonce," which includes the 48-bit PN.
The second and third blocks used in the MIC computation are specific fields in the frame
header such as the MAC addresses, sequence control, and frame type.
Next, the blocks in the frame data are sequentially processed resulting in an 8-byte MIC.
The next step is encryption.
The frame data and the MIC are concatenated and then encrypted using AES in counter
mode (Fig. 15.7).
Let n be the total number of blocks in the frame body + MIC.
The procedure for encrypting the i-th block is:
Compute Ai= ETK(PN +i*j). Here, PN is the packet number and j is a constant known to
both sender and receiver.
Compute i-th block of ciphertext = A (xor)Pi.
Here, Pi is the i-th block of plaintext.
The frame now includes two new fields — the CCMP header and the MIC.
Upon receipt of the frame, the receiver reverses the operations performed by the sender.
It performs decryption followed by MIC verification.
Page 12 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 13 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Firewalls
Definition: A firewall acts as a security guard controlling access between an internal protected
network and an external untrusted network based on a given security policy.
Besides preventing intruders getting in, a firewall also helps prevent confidential inside data
from getting out.
A firewall may be implemented in hardware as a stand-alone "firewall appliance" or in
software on a PC.
A single firewall may be adequate for small businesses and homes. However, in several large
enterprises, multiple firewalls are deployed to achieve defence in depth.
2.1 BASICS
2.1.1 Firewall Functionality
The main functions of a firewall are listed as follows:
Access Control:
A firewall filters incoming (from the Internet into the organization) as well as outgoing
(from within the organization to the outside) packets.
A firewall is said to be configured with a rule set based on which it decides which
packets are to be allowed and which are to be dropped.
Address/Port Translation.
NAT was initially devised to alleviate the serious shortage of IP addresses by providing
a set of private addresses that could be used by system administrators on their internal
networks but that are globally invalid (on the Internet).
it is possible to conceal the addressing schema of these machines from the outside
world through the use of NAT.
Through NAT, internal machines, though not visible on the Internet, can establish a
connection with external machines on the Internet. NATing is often done by firewalls.
Logging.
A sound security architecture will ensure that each incoming or outgoing packet
encounters at least one firewall.
The firewall can log all anomalous packets or flows for later study.
These logs are very useful for studying attempts at intrusion together with various
worm and DDoS attacks.
Authentication, Caching, etc. Some types of firewalls perform authentication of external
machines attempting to establish a connection with an internal machine.
A special type of firewall called web proxy authenticates internal users attempting to access an
external service. Such a firewall is also used to cache frequently requested webpages. This
results in decreased response time to the client while saving communication bandwidth.
Page 14 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 15 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Finally, it is important to include the default deny rule at the end of the rule set — this prevents
ambiguity over what action to take for a packet that has not been matched against the attributes
in any of the previous rules.
Drawbacks:
Page 16 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Consider an external mail server (IP address = ABC) that wishes to deliver mail to an
organization.
For this purpose, it should first establish a TCP connection with the organization's mail server,
MS.
Consider the arrival of a packet with the following attributes:
Source IP address = ABC
Destination IP address = MS
TCP destination port = 25 (SMTP port)
ACK flag set
Such a packet would be part of a normal flow provided a connection between ABC to MS has
been established. But suppose such a connection has not yet been established.
Should the packet still be allowed in? The simple packet filter will allow the packet to enter
even if no prior connection between ABC and MS was established.
It should be noted that such packets are often used to perform port scans.
A simple packet filter merely inspects the headers of an incoming packet in isolation. It does
view a packet as part of a connection or flow. Hence, it will not be able to filter out such pack
`'t arriving from ABC.
2. Stateful Inspection
A firewall uses packet's TCP flags and sequence/acknowledgement numbers to determine
whether it is part of an existing, authorized flow.
If it is participating in the establishment of an authorized connection or if it is already part of
an existing connection, the packet is permitted, otherwise it is dropped.
In the above example of the packet from ABC, the stateful packet inspection firewall will
realize that it has not encountered the first two packets in the three-way handshake and will
hence drop this packet.
3. Application Level Firewalls
A packet-filtering firewall, even with the added functionality of stateful packet inspection, is
still severely limited.
What is needed is a firewall that can examine the application payload and scans packets for
worms, viruses, spam mail, and inappropriate content. Such a device is called a deep inspection
firewall.
A special kind of application-level firewall is built using proxy agents. Such a "proxy firewall"
acts as an intermediary between the client and server.
The client establishes a TCP connection to the proxy and the proxy establishes another TCP
connection with the server as shown in Fig. 21.1.
To a client, the proxy appears as the server and to the server, the proxy appears as the client.
Since there is no direct connection between the client and the server, worms and other malware
will not be able to pass between the two, assuming that the proxy can detect and filter out the
malware. Hence, the presence of the proxy enhances security.
Page 17 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Two TCP connections between C and Proxy and between Proxy and S
Figure 21.1 Proxy firewall
There are proxy agents for many application layer protocols including HTTP, SMTP, and FTP.
In addition to filtering based on application layer data, proxies can perform client
authentication and logging.
An HTTP proxy can also cache webpages.
Caching has a major impact on performance.
If the webpage is cached in a web proxy server located in the client's organization, the response
time could be greatly reduced compared to that where the page has to be fetched from the
external web server.
Also, caching reduces the demand on external communication bandwidth while easing the
load on the web server.
Firewalls are a necessary element in the security architecture of an organization that permit
access to/from the external world. In the next section, we study firewall deployment.
Page 18 of 62
Maharaja Institute of Technology Mysore Dept of ISE
1. the Internet,
2. the region containing the publicly accessible servers,
3. and the internal network.
Figure 21.2 depicts a four-zone layout using three firewalls.
Of the three firewalls, the first is really a router (the Border Router) with some packet-filtering
capability.
This is the access router interfaces with the Internet.
It is connected to a stateful firewall, FW-1, which has three interfaces (firewalls that have more
than two interfaces are referred to as multi-homed).
The zone connected to the right interface of FW-1 is referred to as a screened subnet though
it is more commonly referred to as a De-Militarized Zone (DMZ). It is labelled DMZ-1 in Fig.
21.2. A DMZ, in the true sense, is the area between two firewalls.
In Fig. 21.2, the zone between firewalls FW-1 and FW-2 is a real DMZ labelled DMZ-2.
Page 19 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Demilitarized zones are so called because they often host servers that are accessible to the
Internet and also to the internal network.
Because they are accessible to the public, they are the most likely machines to be compromised
in the entire network.
Once a machine in the DMZ is compromised, other machines in the DMZ could get infected.
DMZ-1 contains the publicly accessible servers.
These include the web server, the external e-mail server, and the DNS server. All incoming
mail from the Internet is received by this e-mail server, which checks for virus signatures and
spam mail.
The DNS server resolves names of publicly accessible servers. However, care should be taken
to ensure that it does not contain address records of any of the internal machines. DMZ-2
contains the internal e-mail server. This is the server that hosts the mailboxes of the company
employees. It handles the sending and receiving of all mail between internal parties. It
Periodically establishes a connection to the external mail server (in DMZ-1) to retrieve all
incoming mail.
Outgoing mail (from the internal network to the Internet) can be handled in several ways. The
internal mail server can set up an SMTP connection to a remote mail server to transfer mail.
Alternatively, it can connect to the external mail server (in DMZ-1) and use it to relay all
outgoing mail.
DMZ-2 also contains an Internet proxy server.
All internal users who wish to access external webpages connect to the proxy.
The proxy authenticates the internal user and decides whether a page can be accessed (different
restrictions might apply to different classes of users).
The proxy scans incoming webpages for virus signatures and objectionable content. Finally,
the proxy also performs caching of webpages.
The internal network contains application servers, database servers, and user workstations.
It also has an internal DNS server. This DNS server is different from the external DNS server
in that it provides mappings between the domain names of the internal machines and their IP
addresses.
The internal machines all have private addresses. It is neither necessary nor desirable for third
parties on the Internet to be aware of the private addresses of the internal machines. Hence,
this DNS server is placed in the internal network.
A feature of the security architecture in Fig. 21.2 is that services such as DNS and e-mail are
split;that is, there is an internal DNS server as well as an external one.
Likewise, there is an internal e-mail server and an external one.
Generally, no external connection should be allowed to the internal servers.
Connections in the reverse direction from the internal servers to hosts on the Internet should
either be forbidden or severely restricted.
Page 20 of 62
Maharaja Institute of Technology Mysore Dept of ISE
The first rule states that no machine from any other security zone is permitted to establish a
TCP connection to any internal machine.
Rules 2-4 assert that, other than connections from internal stations to the internal mail server
(on port 25) and web proxy (on port 80), no other connections are permitted to DMZ-1, DMZ-
2, or the Internet.
Table 21.3 shows the ruleset for firewall FW-1.
Rule 1 in Table 21.3 states that no TCP connection is to be established to any machine in DMZ-2
from any machine in DMZ-1 or the Internet.
Rule 2 states that the external mail server can accept connections from the internal mail server to
receive incoming mail or to send outgoing mail.
Page 21 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Rule 3 allows connection to the external mail server from mail server on the internet to deposit
incoming mail.
Rule 4 and 5 permit connections from the internet to the organizations web server and external
DNS server, respectively.
Rule 6 states that no other connection may be set up to any machines in DMZ-1 for any other
purpose.
Rule 7 and 8:the internet proxy in DMZ-2 and external mail server are permitted to make
connections to machines on the internet to access webpages and to send outgoing mail.
Rule 9: confirms that no other connection from the organizations machine to the internet for any
other purpose is allowed.
Page 22 of 62
Maharaja Institute of Technology Mysore Dept of ISE
MODULE 4
Viruses, Worms and Other Malware,. Intrusion Prevention and Detection
Page 23 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 24 of 62
Maharaja Institute of Technology Mysore Dept of ISE
3. Passwords should be stored securely (not written on sticker pads) and should not be
communicated to friends, relatives, and co-workers.
4. After three consecutive unsuccessful attempts to a specific account, the system should be
designed to disable all further log-in attempts for the next 20 minutes.
➢ Rules 1 and 2 must be enforced by the system.
➢ Rule 3 involves the user alone,
➢ rule 4 involves the system alone.
➢ These rules are all measures intended to prevent intrusion.
➢ As a further preventive measure, a high-security organization may mandate two-factor
authentication — passwords in conjunction with biometrics.
➢ In addition to prevention, an IDS may also be deployed to monitor suspicious log-ins.
Page 25 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 26 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ They may be deployed at multiple points in system audit trails to identify events
a large organization. related to an intrusion.
➢ Operating system logs, for example, keep
track of when users log in, the number of
unsuccessful login attempts, the
commands executed, network connections
made, etc.
➢ Application logs keep track of which files
have been opened or which registry keys
have been accessed during the run of an
application.
➢ File system integrity checkers, for example,
compute a cryptographic hash on the
contents of each file. They detect file
changes by comparing the computed hash
of a file to its stored hash.
Page 27 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ Another strategy under high-load conditions is to allocate a full buffer of about 300 bytes for
a given TCP connection request only upon completion of the three-way handshake.
1. While the connection is still half-open, minimal information about it is stored in a
hash table called the SYN cache.
2. This information includes the TCP sequence numbers and source/destination
addresses and ports.
3. An alternative to the SYN cache is the SYN cookie, which stores no state information
at all for each half-open connection.
4. Instead, the responding machine places a cookie within the Sequence Number field
of the second handshake message.
5. The cookie is computed as a hash function of the source address, destination address,
source port, destination port, and a secret.
6. The initiator of the connection dispatches the cookie it just received in its ACK
message (third message of the three-way handshake).
7. Upon receiving the ACK, the responder re-calculates the cookie and verifies that it
matches the value enclosed in the received ACK.
8. Only then does it reserve buffer space for the connection.
9. If the source IP address in the first message of the handshake were spoofed, the
cookie in second message would not be received by the initiator but by the machine
corresponding to the spoofed IP, address.
10. The initiator would not be able to complete the three-way handshake since it does not
know the cookie value. Hence, its connection request would not be granted buffer
space.
Page 28 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ A filter, on the other hand, uses the packet's source address to make a decision on whether or
not to discard the packet.
➢ To implement Distributed Route Filtering (DRF), a filter maintains, for each of its inter-
faces, the set of all source addresses from which packets arrive en route to some destination.
➢ The router uses BGP routing information to obtain the latest mapping between each of its
interfaces and the subset of source addresses using that interface.
➢ The filtering decision is straightforward — if a packet with source IP address = S arrives via
an interface that it should not have, that packet is assumed to be spoofed and is hence
discarded.
➢ Figure 22.2(a) shows an example of a router implementing DRF.
➢ Each of its interfaces is marked with the source addresses that use that interface en route to
some destination.
➢ Note that packets from the same source may enter the router through different interfaces.
➢ For example, packets from source address 7 may arrive through interfaces b, c, or d.
➢ In the simplest implementation of the filter, the router checks whether a packet has arrived
on one of its "acceptable" interfaces based only on the packet's source IP address.
Page 29 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 30 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ Figure 22.3(b) shows two horizontal timelines — the top line shows the times of SYN packet
arrivals.
➢ The bottom line shows the corresponding FIN arrivals.
➢ Time is slotted into fixed-length observation intervals," T1, , during which we record the
number of SYN arrivals.
➢ The corresponding observation intervals for FINs, T1', T2’, ... are shifted to the right by the
average duration, of a TCP connection.
➢ To construct an anomaly detection system, we define the following variables as
➢ Si# of SYN packet arrivals in the i-th observation interval
➢ Fi = # of FIN packet arrivals in the i-th observation interval
➢ Di = normalized difference between # of SYN and FIN packets in the i-th observation
interval, i.e.,
➢ The different algorithms that attempt to detect the onset of a SYN Flood Attack by
monitoring the above series.
1. Algorithm 1. Raise an alert if the most recently computed detection variable Di exceeds
the threshold, i.e., D, >T1
➢ Figure 22.4(a) shows D versus time with the threshold set at T1 = 90.
➢ Some of the problems with this approach are as follows:
(i) The IDS may raise many false alarms since it bases its decision on point values.
(ii) A modest spike in D at just one point is very unlikely to result in memory exhaustion
but it does cause the IDS to raise an alarm.
(iii) The cumulative effect of the attack packets across the interval will cripple the system but
this algorithm will not raise an alarm.
Page 31 of 62
Maharaja Institute of Technology Mysore Dept of ISE
22.4.3 IP Traceback
➢ There are two principal approaches to IP traceback :
➢ packet marking:the packet keeps track of the routers it has visited
➢ packet logging:each router keeps track of the packets passing through it.
➢ hybrid approaches using a combination of packet marking and packet logging have
been proposed.
Page 32 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ They may split a datagram into two or more fragments and send each fragment
separately.
➢ The router at the destination end has the responsibility for reassembling the fragments
➢ To create the original packet.
➢ All the fragments carry the same number in their ID fields, so they can be identified for
re-assembly.
➢ On the assumption that the ID field is often unused, traceback schemes employing PPM
use the ID field to store partial information on intermediate routers.
➢ But, given that the length of each IP address is 4 bytes, how can a packet store router
address information in a 16-bit ID field?
➢ The answer lies in computing a global fingerprint for each router — this is, say, 16 or
fewer bits . of the hash of a router's IP address.
➢ An intermediate router writes its fingerprint value into the ID field of a packet with
probability p.
➢ Note that it could over-write a previously written fingerprint of a router closer to the
source of the attack.
➢ To identify the perpetrator of the attack, the ingress router at the victim end will need
to collect a sufficient number of packets that are all part of the same flooding attack.
➢ We assume that each ingress router has a map of all upstream routers from it.
Packet Logging
➢ Each router attempts to keep track of every packet that passes through it.
➢ Packet logging makes use of the idea of a packet fingerprint or digest.
➢ This is computed using a well-designed hash function — one that distributes the hash
values uniformly across all possible hash inputs.
➢ An interesting feature of packet logging is that it can help track even a single rogue
packet.
➢ First, assume that each router stores each packet received by it in the last 5 minutes.
➢ Suppose the victim wishes to obtain the exact path followed by a packet received by
it.
➢ The idea is that the victim's ingress router, A, queries each of its adjacent routers
whether they have seen the packet.
Page 33 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 34 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ Suppose the k hash computations yield the values i1, i2, i3, ... ik. Then, check whether
each of the elements of the Bloom Filter are set. If even one of these elements = 0, P
has not been encountered by this router.
➢ We next derive an expression for the probability of a false positive.
Page 35 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 36 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ One of the characteristic features of many viruses is the set of system calls they make.
System calls are used by application programs to request services of the operating
system.
➢ They are made to read/write files, spawn new processes, establish TCP connections,
etc. Some viruses make calls to copy their own code to other files, create/modify
entries in the Windows registry, or search for e-mail. Such "suspicious" calls are often
used to distinguish malicious from benign code.
➢ Enhanced Targeting
✓ The most important attribute of a Worm is that it spreads its infection to other
computers.
✓ Many target selection strategies have been proposed and implemented.
✓ Worms that spread through e-mail, for example, have an easy way to figure out
their targets.
✓ All they need to do is look into their victim's mailbox or e-mail address book
to find a set of targets.
✓ A mobile worm obtains phone numbers of its potential victims from the phone
book in the cellphone hosting the worm.
✓ Some web worms use search engines to harvest URLs of potentially vulnerable
targets.
✓ Internet scanning worms, on the other hand, scan the IP address space for
vulnerable machines.
✓ The most straightforward approach is random scanning — choosing IP
addresses at random. This was adopted by Code Red Version-I. However, Code
Red Version-II adopted localized scanning.
✓ Over 80% of the rime, it attempted to connect to victims with whom it shared
the network address (most significant 8 or 16 bits of the IP address). This
strategy was more successful since hosts in the same network are likely to be
closer and be running the same soft-ware.
✓ Worms like Nimda, unleashed in September 2001, spread aggressively thanks
to its five different vectors of propagation. Propagation through HTTP and e-
Page 37 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 38 of 62
Maharaja Institute of Technology Mysore Dept of ISE
✓ Figure 19.1 shows two versions of assembly code that look different but perform
the same function.
✓ The second version is inefficient with spurious instructions.
✓ The second version also has a spurious branch instruction to confuse worm code
detection software that relies on control flow analysis.
✓ Worms that have multiple such versions with or without relying on encryption are
referred to as metamorphic worms.
Page 39 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Slammer
➢ The SQL Slammer was launched on 25 January, 2003, and targeted a buffer overflow
vulnerability on the Microsoft SQL server 2000.
➢ The worm sent packets on UDP port 1434 — the database software's resolution
service.
➢ It used simple random scanning to propagate.
➢ Slammer's payload was a mere 384 bytes in length — far smaller than the 4 kb payload
of Code Red. Also, UDP, being a connectionless protocol, there is no overhead of
connection establishment.
Page 40 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Kermack—McKendrick Model
➢ The Kermack—McKendrick (K—M) model more accurately models the spread of
human infectious disease by considering three (instead of two) categories of people:
• those who are susceptible (state S)
• those who are infectious (state I) and
• those who are neither, i.e. individuals who are cured or those who have succumbed to
the disease (terminal T).
➢ Initially, all individuals in the population are susceptible.
➢ It is possible to go from state S to I but not vice versa .
Page 41 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 42 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 43 of 62
Maharaja Institute of Technology Mysore Dept of ISE
✓ One aspect of P2P worms is that they may result in no apparent traffic anomaly, so
an intrusion detection system monitoring network traffic is unlikely to raise an
alert.
Page 44 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ The malicious Javascript uploaded itself on to V1's profile on the MySpace server,
thus infecting it.
➢ This is done by an HTTP Post-request sent from the browser to the server. However,
that would cause the screen to freeze between sending the request and receiving the
HTTP response from the server.
➢ To ensure that the viewer had a normal screen experience, Samy'sJavascript created
an XMLHttpRequest object which was used to send the malicious Javascript to the
Myspace server. Unlike the regular HTTP request, the message from an
XMLHttpRequest object is asynchronous nd runs in the background.
19.6.1 Introduction
➢ New—generation smartphones combine the functionality of a cellphone and a lose-end
PC.
➢ They may be used for storing confidential documents, communicating via e-
mail/SMS/MMS, and taking photographs.
➢ They support feature-rich applications that run on top of a complete OS.
➢ The most common OS on smartphones is the Symbian followed by Windows Mobile,
Linux, and recently the Mac OS X (on the iPhone).
➢ They provide a rich set of APIs to access the phone book and other files, send
SMS/MMS messages, etc. Unfortunately, these very APIs can also be used by malware
to, for example, read a confidential document on the smartphone and ship it to the
attacker as an MMS attachment.
19.6.2 Bluetooth
➢ Bluetooth is both a communication technology and a protocol stack.
➢ As a communication technology,
✓ It supports short-range wireless communication —
✓ A maximum of between 10 and 100 meters between devices.
✓ Bluetooth uses 2.4 ghz shortwave radio technology.
✓ Bluetooth is a complex, multi-layered protocol.
Page 45 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 46 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ Bluetooth uses a procedure called pairing wherein this key is computed by two
participating devices.
➢ Pairing is preceded by discovery/inquiry and paging.
➢ The latter is a procedure whereby the discovering device, A, establishes a connection
with the discovered device, B.
➢ Computing the Link Key
1. The first step in deriving the common link key between A and B is to compute
an initialization key, Kinit.
✓ This is a function of the BD_ADDR of B and a nonce, IN_RAND, generated
by A as shown in Fig. 19.7(a).
✓ Before the pairing procedure, the owners of A and B must agree in an off-
line manner on a temporary PIN to be used specifically as part of the pairing
procedure.
✓ Both users then type in the temporary PIN. Kinit is also a function of this
temporary PIN agreed to by both parties. Kinit is computed from IN_RAND,
BD_ADDR0, and the PIN using an algorithm, E22, based on a block cipher
called SAFER+.
Page 47 of 62
Maharaja Institute of Technology Mysore Dept of ISE
➢ For this purpose, it generates a random number, RANDA (a challenge) and sends it to
B.
➢ The response computed by B is E1(KAB,RANDA,BD_ADDRB).
19.6.3 Examples
➢ Cabir was one of the earliest proof-of concept worms that targeted the Symbian Series
60 OS.
➢ Unleashed in June 2004, it was authored by the International Virus writing group 29A.
Page 48 of 62
Maharaja Institute of Technology Mysore Dept of ISE
19.7 BOTNETS
19.7.1 Basics
➢ A botnet is an army of compromised computers or bots connected to the Internet and
remotely controlled by a "botmaster."
➢ The earliest botnets were a collection of zombies that participated in DDoS attacks.
➢ The emergence of botnets is closely linked to the motive of financial gain that is
behind many recent cyber attacks.
➢ They are often used to send spam mail on behalf of third parties,
➢ For example, Bot programs , may contain keyloggers and other forms of spyware that
capture sensitive personal information such as passwords and credit card numbers and
send these to the botmaster.
➢ Botnets have also been used as an extortion tool — "Pay up or your website will be
bombarded by a DDoS attack".
➢ How does a computer become a bot?
➢ Bots are created in ways similar to many of the traditional trojan/worm/virus
infections.
➢ A common vector of propagation is e-mail that contains an infected attachment.
➢ Another is through downloading a malicious webpage containing scripts that exploit
vulnerabilities in certain browsers or application software.
➢ A bot infection may also be propagated by bots themselves by scanning the Internet
for vulnerable machines.
➢ Finally, open file shares and IRC (Internet Relay Chat) multicast messages have also
been widely used to spread infections.
➢ One important difference between a bot and a computer infected by a traditional
worm/virus/ Trojan is that a bot needs to communicate with specific nodes in the bonet
to receive fresh commands.
➢ A bot may be ordered to send spam or to "Launch a DDoS attack on site abc.com
beginning 14:00 hours on 01-12-10." Some of the nodes in the botnet play the role of
Command and Control (C&C) servers. They receive commands from the botmaster
and disseminate these to the rest of the bots.
Page 49 of 62
Maharaja Institute of Technology Mysore Dept of ISE
Page 50 of 62
Web services
• W3c defines a web service as:
• A software system identified by a URI whose public interfaces
and bindings are defined and described by XML.
• The entities involved are:
WEB SECURITY • Providers register or publish their services in a public registry.
• Requesters discover services by querying the registry for services
that match certain criteria.
• Once a requester has identified a provider whose services it needs
,it binds to and invokes the service of that provider.
1 2
Page 51 of 62
1
Possible Advantages of Using XML XML Documents
• Truly Portable Data What‘s in an XML document?
• Easily readable by human users • Elements
• Very expressive (semantics near data) • Attributes
• plus some other details
• Very flexible and customizable (no finite tag set)
• Easy to use from programs (libs available)
• Easy to convert into other representations
(XML transformation languages)
• Many additional standards and tools
• Widely used and supported
5 6
7 8
Page 52 of 62
2
A Simple XML Document A Simple XML Document
<article> <article> Freely definable tags
<author>Gerhard Weikum</author> <author>Gerhard Weikum</author>
<title>The Web in Ten Years</title> <title>The Web in Ten Years</title>
<text> <text>
<abstract>In order to evolve...</abstract> <abstract>In order to evolve...</abstract>
<section number=“1” title=“Introduction”> <section number=“1” title=“Introduction”>
The <index>Web</index> provides the universal... The <index>Web</index> provides the universal...
</section> </section>
</text> </text>
</article> </article>
9 10
Page 53 of 62
3
Elements vs. Attributes XML Documents as Ordered Trees
Elements may have attributes (in the start tag) that have a name and
a value, e.g. <section number=“1“>. article
What is the difference between elements and attributes?
• Only one attribute with a given name per element (but an arbitrary
number of subelements) author title text
• Attributes have no structure, simply strings (while elements can number=“1“
have subelements) abstract section
Gerhard title=“…“
As a rule of thumb: Weikum
• Content into elements
In order … The index provides …
• Metadata into attributes
The Web
Example: Web
in 10 years
<person born=“1912-06-23“ died=“1954-06-07“>
Alan Turing</person> proved that…
13 14
15
16
Page 54 of 62
4
3.2 XML Schema Basics A Simple XML Document
• XML Schema is an XML application <article>
<author>Gerhard Weikum</author>
• Provides simple types (string, integer, dateTime,
<title>The Web in Ten Years</title>
duration, language, …) <text>
• Allows defining possible values for elements <abstract>In order to evolve...</abstract>
<section number=“1” title=“Introduction”>
• Allows defining types derived from existing types
The <index>Web</index> provides the universal...
• Allows defining complex types </section>
• Allows posing constraints on the occurrence of elements </text>
</article>
• Allows forcing uniqueness and foreign keys Attributes with
name and value
18
19
20
Page 55 of 62
5
April 29th, 2003 Organizing and Searching Information with XML 21 22
WSDL WSDL
• Web services Definition langauge
• “An XML format for describing network services as a set
• Contains information where the service is located, what the
service does, and how to invoke the service such as
types ,messages,operation,port types,and bindings.
• Operation:abstract definition of a n action.
• Message: abstract definition of data beingexchanged as a part of
operation.
23 24
Page 56 of 62
6
UDDI WS security
• UNIVERSAL DESCRIPTION DISCOVERY AND • Token Types
INTEGRATION • XML Encryption
• IS a registry or catalogue that allows businesses across • XML signature
the globe to list themselves in internet.
• Clients query the registry services
• Response :access to WSDL.
25 26
27 28
Page 57 of 62
7
Token types
XML Encryption
29 30
31 32
Page 58 of 62
8
XML signature
• Specifies syntax for signatures and signature keys. XML signature
• Canonical form: transformed to • Signed Info
• Xml Signature is included in header of soap message.
• Signature Value
– Contains digital signature value.
– On Entire signature element
• Key Info
– the key required to verify digital signature at the receiver end.
33 34
35 36
Page 59 of 62
9
SAML:security assertions markup language SAML Assertions
• SAML is the XML based standard created to enable • SAML defines three types of assertions.
portable identities and the assertions these identities 1. Authentication
want to make.
2.Authorization
• Defines a standard message exchange protocol.
3.Attributes
Specifies how it is transported.
• Single Sign-On (SSO)
• Portable Trust” - a user, whose identity is established
and verified in one domain, can invoke services in
another domain
37 38
SAML
• Assertion is a claim, statement, or declaration of fact
made by SAML authority
• Types of assertions:
• Authentication - the subject was authenticated by a
particular means at a particular time
• Authorization - the subject was granted or denied access
to a specified resource
• Attributes -the subject is associated with the supplied
attribute.
39
40
Page 60 of 62
10
SAML code Example of SAML
41 42
43 44
Page 61 of 62
11
WS trust could be used in the following manner: Web security policy
• Web security policy enables a web sevice to specify the security
tokens it will accept for authentication and access control.
• Returning to the example of Fig. 25.9, the policies regarding
authentication laid out by relevant entities may be as follows:
• An importer must authenticate himself to his local bank via a
login name and password.
• A local bank must authenticate itself to the global bank using a
challenge-response protocol in conjunction with a digital
certificate.
• An importer must authenticate himself to the given exporter
through a SAML token signed by a global bank.
45 46
Page 62 of 62
12
Maharaja Institute of Technology Mysore Dept of ISE
MODULE 5
➢ The information technology act ,2000 is an important law related to Indian cyber law.
➢ The act strives to achieve the following objectives:
1. To give legal recognition to transactions done by electronic way or by use of the internet.
2. To grant legal recognition to digital signature for accepting any agreement via computer.
3. To provide facility of filling documents online.
4. To authorize any undertaking to store their data in electronic storage.
5. To prevent cyber crime by imposing high penalty for such crimes and protect privacy of
internet users.
6. To keep legal recognition for keeping books of account by bankers and undertaking in
electronic form.
Q.Define the following terms wrt to IT act 2000(any terminologies can be asked)
11. "computer system" means a device or collection of devices, including input and output support
devices and excluding calculators which are not programmable and capable of being used in
conjunction with external files, which contain computer programmes, electronic instructions, input
data and output data, that performs logic, arithmetic, data storage and retrieval, communication
control and other functions;
12. "data" means a representation of information, knowledge, facts, concepts or instructions
which are being prepared or have been prepared in a formalised manner, and is intended to be
processed, is being processed or has been processed in a computer system or computer network,
and may be in any form (including computer printouts magnetic or optical storage media, punched
cards, punched tapes) or stored internally in the memory of the computer;
13. "digital signature" means authentication of any electronic record by a subscriber by means
of an electronic method or procedure in accordance with the provisions of section 3;
14. "electronic form" with reference to information means any information generated, sent,
received or stored in media, magnetic, optical, computer memory, micro film, computer generated
micro fiche or similar device;
15. "Electronic Gazette" means the Official Gazette published in the electronic form;
1. electronic record" means data, record or data generated, image or sound stored, received or
sent in an electronic form or micro film or computer generated micro fiche;
17. "information" includes data, text, images, sound, voice, codes, computer programmes,
software and databases or micro film or computer generated micro fiche:
18. "intermediary" with respect to any particular electronic message means any person who on
behalf of another person receives, stores or transmits that message or provides any service with
respect to that message;
19. "key pair", in an asymmetric crypto system, means a private key and its mathematically related
public key, which are so related that the public key can verify a digital signature created by the
private key;
Q Explain any important provisions of IT act 2000.
Q Explain any important provisions of IT act 2000 with regard to:
1.digital signature,.
2. Legal recognition of electronic records.
3. Legal recognition of digital signatures
✓ to derive or reconstruct the original electronic record from the hash result
produced by the algorithm;
✓ that two electronic records can produce the same hash result using the
algorithm.
3. Any person by the use of a public key of the subscriber can verify the electronic record.
4. The private key and the public key are unique to the subscriber and constitute a
functioning key pair.
27.4.4 Use of electronic records and digital signatures in Government and its
agencies.
Government.
2. The appropriate Government may, for the purposes of sub-section (1), by rules, prescribe—
✓ the manner and format in which such electronic records shall be filed, created or
issued;
✓ the manner or method of payment of any fee or charges for filing, creation or issue
any electronic record under clause (a).
27.4. 6 Retention of electronic records.
1. Where any law provides that documents, records or information shall be retained for any
specific period, then, that requirement shall be deemed to have been satisfied if such
documents, records or information are retained in the electronic form, if—
(a) the information contained therein remains accessible so as to be usable for a
subsequent reference;
(b) the electronic record is retained in the format in which it was originally
generated, sent or received or in a format which can be demonstrated to
represent accurately the information originally generated, sent or received;
(c) the details which will facilitate the identification of the origin, destination, date
and time of despatch or receipt of such electronic record are available in the
electronic record:
➢ Where any law provides that any rule, regulation, order, bye-law, notification or any other
matter shall be published in the Official Gazette, then, such requirement shall be deemed
to have been satisfied if such rule, regulation, order, bye-law, notification or any other
matter is published in the Official Gazette or Electronic Gazette:
➢ Provided that where any rule, regulation, order, bye-law, notification or any other matter
is published in the Official Gazette or Electronic Gazette, the date of publication shall be
deemed to be the date of the Gazette which was first published in any form.
➢ The Central Government may, for the purposes of this Act, by rules, prescribe—
➢ the type of digital signature;
➢ the manner and format in which the digital signature shall be affixed;
➢ the manner or procedure which facilitates identification of the person affixing the digital
signature;
➢ control processes and procedures to ensure adequate integrity, security and confidentiality of
electronic records or payments; and
➢ any other matter which is necessary to give legal effect to digital sigtures.
(b) any conduct of the addressee, sufficient to indicate to the originator that the
electronic record has been received.
2. Where the originator has stipulated that the electronic record shall be binding only on
receipt of an acknowledgment of such electronic record by him, then unless
acknowledgment has been so received, the electronic record shall be deemed to have been
never sent by the originator.
3. Where the originator has not stipulated that the electronic record shall be binding only on
receipt of such acknowledgment, and the acknowledgment has not been received by the
originator within the time specified or agreed or, if no time has been specified or agreed to
within a reasonable time, then the originator may give notice to the addressee stating that
no acknowledgment has been received by him and specifying a reasonable time by which
the acknowledgment must be received by him and if no acknowledgment is received within
the aforesaid time limit he may after giving notice to the addressee, treat the electronic
record as though it has never been sent.
✓ if the addressee has designated a computer resource for the purpose of receiving
electronic records,—
✓ receipt occurs at the time when the electronic, record enters the designated computer
resource;
✓ if the electronic record is sent to a computer resource of the addressee that is not the
designated computer resource, receipt occurs at the time when the electronic record is
retrieved by the addressee;
3. UNLESS as otherwise agreed to between the originator and the addressee, an electronic
record is deemed to be dispatched at the place where the originator has his place of
business, and is deemed to be received at the place where the addressee has his place of
business.
4. if the originator or the addressee has more than one place of business, the principal place
of business, shall be the place of business;
5. if the originator or the addressee does not have a place of business, his usual place of
residence shall be deemed to be the place of business;
6. "usual place of residence", in relation to a bodycorporate, means the place where it is
registered.
3. The Controller shall maintain a computerised data base of all public keys in such a manner
that such data base and the public keys are available to any member of the public.
(a) be valid for such period as may be prescribed by the Central Government;
(c) be subject to such terms and conditions as may be specified by the regulations.
27.7.5 Application for licence
1. Every application for issue of a licence shall be in such form as may be prescribed by the
Central Government.
2. Every application for issue of a licence shall be accompanied by—
✓ a certification practice statement;
(a) made a statement in, or in relation to, the application for the issue or renewal
of the licence, which is incorrect or false in material particulars;
(b) failed to comply with the terms and conditions subject to which the licence
was granted;
any officer to exercise any of the powers of the Controller under this Chapter.
27.7. 17 Disclosure.
1. Every Certifying Authority shall disclose in the manner specified by regulations—
✓ its Digital Signature Certificate which contains the public key corresponding to
the private key used by that Certifying Authority to digitally sign another Digital
Signature Certificate;
✓ any certification practice statement relevant thereto;
✓ notice of the revocation or suspension of its Certifying Authority certificate, if
any; and
✓ any other fact that materially and adversely affects either the reliability of a
Digital Signature Certificate, which that Authority has issued, or the Authority's
ability to perform its services.
2. Where in the opinion of the Certifying Authority any event has occurred or any situation
has arisen which may materially and adversely affect the integrity of its computer system
or the conditions subject to which a Digital Signature Certificate was granted, then, the
Certifying Authority shall—
(a) use reasonable efforts to notify any person who is likely to be affected by that
occurrence; or
(b) act in accordance with the procedure specified in its certification practice
Q Describe the role of certifying authority with regard to issuing digital certificate and
Representation upon issuance,suspension and revocation .(27.8)
1. Any person may make an application to the Certifying Authority for the issue of a Digital
Signature Certificate in such form as may be prescribed by the Central Government
2. Every such application shall be accompanied by such fee not exceeding twenty- five
thousand rupees as may be prescribed by the Central Government, to be paid to the Certifying
Authority:
4. On receipt of an application under sub-section (1), the Certifying Authority may, after
consideration of the certification practice statement or the other statement under sub- section
(3)
5. and after making such enquiries as it may deem fit, grant the Digital Signature Certificate or
for reasons to be recorded in writing, reject the application:
Provided that no Digital Signature Certificate shall be granted unless the Certifying Authority
is satisfied that—
✓ the applicant holds the private key corresponding to the public key to be listed in the
Digital Signature Certificate;
✓ the applicant holds a private key, which is capable of creating a digital signature;
✓ the public key to be listed in the certificate can be used to verify a digital signature
affixed by the private key held by the applicant:
1. it has complied with the provisions of this Act and the rules and regulations made
thereunder,
3. the subscriber holds the private key corresponding to the public key, listed in the
Digital Signature Certificate;
4. the subscriber's public key and private key constitute a functioning key pair,
6. it has no knowledge of any material fact, which if it had been included in the Digital
Signature Certificate would adversely affect the reliability of the representations
made in clauses (a) to (d).
1. Subject to the provisions of sub-section (2), the Certifying Authority which has issued a
Digital Signature Certificate may suspend such Digital Signature Certificate,—
3. A Digital Signature Certificate shall not be suspended for a period exceeding fifteen days
unless the subscriber has been given an opportunity of being heard in the matter.
4. On suspension of a Digital Signature Certificate under this section, the Certifying Authority
shall communicate the same to the subscriber.
1. Where a Digital Signature Certificate is suspended or revoked under section 37 or section 38,
the Certifying Authority shall publish a notice of such suspension or revocation, as the case
may be, in the repository specified in the Digital Signature Certificate for publication of such
notice.
2. Where one or more repositories are specified, the Certifying Authority shall publish notices of
such suspension or revocation, as the case may he. in all such repositories.
Q. Describe the duties of subscriber under the section 40, 41, and 42 of IT act
2000(answer:27.9)
(a) the subscriber holds the private key corresponding to the public key listed in the
Digital Signature Certificate and is entitled to hold the same;
(b) all representations made by the subscriber to the Certifying Authority and all
material relevant to the information contained in the Digital Signature Certificate
are true;
(c) all information in the Digital Signature Certificate that is within the knowledge of
the subscriber is true.
1. Every subscriber shall exercise reasonable care to retain control of the private key
corresponding to the public key listed in his Digital Signature Certificate and take all steps to
prevent its disclosure to a person not authorised to affix the digital signature of the subscriber.
2. If the private key corresponding to the public key listed in the Digital Signature Certificate has
been compromised, then, the subscriber shall communicate the same without any delay to the
Certifying Authority in such manner as may be specified by .the regulations.
Discuss the penalties and adjudication under section 43 IT act 2000 for
a) Damage to computer, computer system
b) Failure to protect data.
c) Failure to furnish information return
➢ If any person without permission of the owner or any other person who is incharge of a
computer, computer system or computer network, —
1. accesses or secures access to such computer, computer system or computer network;
2. downloads, copies or extracts any data, computer data base or information from such
computer, computer system or computer network including information or data held or
stored in any removable storage medium;
3. introduces or causes to be introduced any computer contaminant or computer virus into any
computer, computer system or computer network;
4. damages or causes to be damaged any computer, computer system or computer network,
data, computer data base or any other programmes residing in such computer, computer
system or computer network;
5. disrupts or causes disruption of any computer, computer system or computer network;
6. denies or causes the denial of access to any person authorised to access any computer,
computer system or computer network by anymeans;
7. provides any assistance to any person to facilitate access to a computer, computer system
or computer network in contravention of the provisions of this Act, rules or regulations
made thereunder;
8. charges the services availed of by a person to the account of another person by tampering
with or manipulating any computer, computer system, or computer network,
1. he shall be liable to pay damages by way of compensation not exceeding one crore rupees
to the person so affected.
✓ "computer contaminant" means any set of computer instructions that are designed—
to modify, destroy, record, transmit data or programme residing within a computer,
computer system or computer network; orby any means to usurp the normal
operation of the computer, computer system, or computer network;
✓ "computer data base" means a representation of information, knowledge, facts, concepts or
instructions in text, image, audio, video that are being prepared or have been prepared in a
formalised manner or have been produced by a computer, computer system or computer
network and are intended for use in a computer, computer system or computer network;
✓ "computer virus" means any computer instruction, information, data or programme that
2. The Central Government shall also specify, in the notification referred to in sub- section
(1), the matters and places in relation to which the Cyber Appellate Tribunal may exercise
jurisdiction.
✓ A Cyber Appellate Tribunal shall consist of one person only (hereinafter referred to as the
Residing Officer of the Cyber Appellate Tribunal) to be appointed, by notification, by the
Central Government
27.11.3 Qualifications for appointment as Presiding Officer of the Cyber Appellate Tribunal.
✓ A person shall not be qualified for appointment as the Presiding Officer of a Cyber
Appellate Tribunal unless he—
27.11.5 Salary, allowances and other terms and conditions of service of Presiding Officer.
✓ The salary and allowances payable to, and the other terms and conditions of service
including pension, gratuity and other retirement benefits of. the Presiding Officer of a
Cyber Appellate Tribunal shall be such as may be prescribed.
✓ If, for reason other than temporary absence, any vacancy occurs in the office n the Presiding
Officer of a Cyber Appellate Tribunal, then the Central Government shall appoint another
person in accordance with the provisions of this Act to fill the vacancy and the proceedings
may be continued before the Cyber Appellate Tribunal from the stage at which the vacancy
is filled.
1. The Presiding Officer of a Cyber Appellate Tribunal may, by notice in writing under his
hand addressed to the Central Government, resign his office:
Provided that the said Presiding Officer shall, unless he is permitted by the Central
Government to relinquish his office sooner, continue to hold office until the expiry of
three months from the date of receipt of such notice or until a person duly appointed as
his successor enters upon his office or until the expiry of his term of office, whichever is
the earliest.
2. The Presiding Officer of a Cyber Appellate Tribunal shall not be removed from his office
except by an order by the Central Government on the ground of proved misbehaviour or
incapacity after an inquiry made by a Judge of the Supreme Court in which the Presiding
Officer concerned has been informed of the charges against him and given a reasonable
opportunity of being heard in respect of these charges.
3. The Central Government may, by rules, regulate the procedure for the investigation of
misbehaviour or incapacity of the aforesaid Presiding Officer.
✓ No order of the Central Government appointing any person as the Presiding Officer of a
Cyber Appellate Tribunal shall be called in question in any manner and no act or
proceeding before a Cyber Appellate Tribunal shall be called in question in any manner on
the ground merely of any defect in the constitution of a Cyber Appellate Tribunal.
1. The Central Government shall provide the Cyber Appellate Tribunal with such officers
and employees as that Government may think fit
2. The officers and employees of the Cyber Appellate Tribunal shall discharge their
functions under general superintendence of the Presiding Officer.
3. The salaries, allowances and other conditions of service of the officers and employees
or' the Cyber Appellate Tribunal shall be such as may be prescribed by the Central
Government.
27.11.10 Appeal to Cyber Appellate Tribunal.
1. Save as provided in sub-section (2), any person aggrieved by an order made by Controller
or an adjudicating officer under this Act may prefer an appeal to a Cyber Appellate
Tribunal having jurisdiction in the matter.
2. No appeal shall lie to the Cyber Appellate Tribunal from an order made byan adjudicating
officer with the consent of the parties.
3. Every appeal under sub-section (1) shall be filed within a period of tony-five days from the
date on which a copy of the order made by the Controller or the adjudicating officer is
received by the person aggrieved and it shall be in such form and be accompanied by such
fee as may be prescribed:
✓ Provided that the Cyber Appellate Tribunal may entertain an appeal after the expiry of the
said period of tony-five days if it is satisfied that there was sufficient cause for not filing it
within that period
4. On receipt of an appeal under sub-section (1), the Cyber Appellate Tribunal may, after
giving the parties to the appeal, an opportunity of being heard, pass such orders thereon as
it thinks fit, confirming, modifying or setting aside the order appealed against.
5. The Cyber Appellate Tribunal shall send a copy of every order made by it to" the parties to
the appeal and to the concerned Controller or adjudicating officer
6. The appeal filed before the Cyber Appellate Tribunal under sub-section (1) shall be dealt
with by it as expeditiously as possible and endeavour shall be made by it to dispose of the
appeal finally within six months from the date of receipt of the appeal.
2711.11.Procedure and powers of the Cyber Appellate Tribunal.
(1) The Cyber Appellate Tribunal shall not be bound by the procedure laid down by the
Code of civil Procedure, 1908 but shall be guided by the principles of natural justice and, subject
to the other provisions of this Act and of any rules, the Cyber Appellate Tribunal shall have
powers to regulate its own procedure including the place at which it shall have its sittings.
(2) The Cyber Appellate Tribunal shall have, for the purposes of discharging its functions
under this Act, the same powers as are vested in a civil court under the Code of Civil Procedure,
1908, while trying a suit, in respect of the following matters, namely:—
1. summoning and enforcing the attendance of any person and examining him on oath;
2. requiring the discovery and production of documents or other electronic records
3. receiving evidence on affidavits;
4. issuing commissions for the examination of witnesses or documents;
5. reviewing its decisions;
6. dismissing an application for default or deciding it ex pane;
7. any other matter which may be prescribed.
(3). Every proceeding before the Cyber Appellate Tribunal shall be deemed to be a judicial
proceeding within the meaning of sections 193 and 228, and for the purposes of section 196 of
the Indian Penal Code and the Cyber Appellate Tribunal shall be deemed to be a civil court for
the purposes of section 195 and Chapter XXVI of the Code of Criminal Procedure, 1973.
✓ The appellant may either appear in person or authorise one or more legal practitioners or
any of its officers to present his or its case before the Cyber Appellate Tribunal.
27.11.13 Limitation.
✓ The provisions of the Limitation Act, 1963, shall, as far as may be, apply to an appeal made
to the Cyber Appellate Tribunal.
27.11.13 Civil court not to have jurisdiction.
✓ No court shall have jurisdiction to entertain any suit or proceeding in respect of any matter
which an adjudicating officer appointed under this Act or the Cyber Appellate Tribunal
constituted under this Act is empowered by or under this Act to determine and no injunction
shall be granted by any court or other authority in respect of any action taken or to be taken
in pursuance of any power conferred by or under this Act.
decision or order of the Cyber Appellate Tribunal to him on any question of fact or law
arising out of such order
✓ Provided that the High Court may, if it is satisfied that the appellant was prevented by
sufficient cause from filing the appeal within the said period, allow it to be filed within a
further period not exceeding sixty days.
Q. Explain the offences and punishments ,penalties for offences under the IT act 2000
27.12 OFFENCES
27.12.1 Tampering with computer source documents.
damage to the public or any person destroys or deletes or alters any information residing
in a computer resource or diminishes its value or utility or affects it injuriously by any
means, commits hack
➢ Whoever commits hacking shall be punished with imprisonment up to three years, or
with fine which may extend up to two lakh rupees, or with both.
27.12.3 punishment for receiving stolen computer resource or communication device
✓ Whoever dishonestly received or retains any stolen computer resource of
communication device knowing 'on device or having reason to believe the same to be
stolen computer resource or communication three ice, shall be punished with
imprisonment of either description for a term which may extend to years or with fine
which may extend to rupees one lakh or with both [Section 66B].
27.12.4 punishment for identity theft
✓ Whoever fraudulently or dishonestly make use of the electronic signature, password or
any unique identification feature of any other person, shall be punished with
imprisonment of either description for a term which may extend to three years and shall
also be liable to fine which may extend to rupees one lakh [Section 66B].
27.12.5 Punishment for cheating by personation by using computer resource
✓ Whoever, by means for any communication device or computer resource cheats by
personating, shall be punished with imprisonment of either description for a term which
may extend to three years and shall also be liable to fine which may extend to one lakh
rupees [Section 66D].
27.12.6 Punishment for violation of privacy
✓ Whoever, intentionally or knowingly captures, publishes or transmits the image of a
private area of any person without his or her consent, under circumstances violating
the privacy of that person, shall be punished with imprisonment which may extend to
three years or with fine not exceeding two lakh rupees, or with both [Section 66E].
1. . Whoever,
(a) With intent to threaten the unity, integrity, security of sovereignty of India or to strike
terror in the people or any section of the people by-
(i) denying or cause the denial of access to any person authorized to access
computer resource; or
(ii) attempting to penetrate or access a computer resource without authorization or
exceeding authorized access; or
(iii) introducing or causing to introduce any computer contaminant, and by means of
such conduct causes or is likely to cause death or injuries to persons or damage
to or destruction of property or disrupts or knowing that it is likely to cause
damage or disruption of supplies or services essential to the life of the community
or adversely affect the critical information infrastructure specified under Section
70; or
(b) knowingly or intentionally penetrates or accesses a computer resource without
authorization or exceeding authorized access, and by means of such conduct obtains
access to information, data or computer database that is restricted; or any restricted
information, data or computer database, with reasons to believe that such information,
data or computer database so obtained may be used to cause or likely to cause injury to
the interests of the sovereignty and integrity of India, the security of the State, friendly
relations with foreign States, public order, decency or morality, or in relation to contempt
of court, defamation or incitement to an offence, or to the advantage of any foreign nation,
group of individuals, or otherwise, commits the offence of cyber terrorism.
(1) The Controller may, by order, direct a Certifying Authority or any employee of such
Authority to take such measures or cease carrying on such activities as specified in the order if
those are necessary to ensure compliance with the provisions of this Act, rules or any regulations
made thereunder.
(2) Any person who fails to comply with any order under sub-section (1) shall be guilty of
an offence and shall be liable on conviction to imprisonment for a term not exceeding three years
or to a Fine not exceeding two lakh rupees or to both.
27.12.11 Protected system.
(1) The appropriate Government may, by notification in the Official Gazette, declare that any
computer, computer system or computer network to be a protected system.
(2) The appropriate Government may, by order in writing, authorise the persons who are
authorized to access protected systems notified under sub-section (1).
(3) Any person who secures access or attempts to secure access to a protected system in
contravention of the provisions of this section shall be punished with imprisonment of either
description for a term which may extend to ten years and shall also be liable to fine.
27.12.12 Penalty for misrepresentation.
✓ Whoever makes any misrepresentation to, or suppresses any material fact from, the
Controller or the Certifying Authority for obtaining any licence or Digital Signature
Certificate, as the case may be. shall be punished with imprisonment for a term which
may extend to two years, or with fine which may extend to one lakh rupees, or with
both.
27.12.13 Penalty for breach of confidentiality and privacy.
✓ Save as otherwise provided in this Act or any other law for the time being in force, any
person who, in pursuance of any of the powers conferred under this Act, rules or
regulations made thereunder, has secured access to any electronic record, book,
register, correspondence, information, document or other material without the consent
of the person concerned discloses such electronic record, book. register,
correspondence, information, document or other material to any other person shall be
punished with imprisonment for a term which may extend to two years, or with fine
which may extend to one lakh rupees, or with both.
27.12.14 Penalty for publishing Digital Signature Certificate false in certain particulars.
(1) No person shall publish a Digital Signature Certificate or otherwise make it available to
any other person with the knowledge that—
(a) the Certifying Authority listed in the certificate has not issued it; or
(b) the subscriber listed in the certificate has not accepted it; or
unless such publication is for the purpose of verifying a digital signature created prior to such
suspension or revocation.
(2) Any person who contravenes the provisions of sub-section (1) shall be punished with
imprisonment for a term which may extend to two years, or with fine which may extend to one
lakh rupees, or with both.
(2) For the purposes of sub-section (1), this Act shall apply to an offence or contravention
committed outside India by any person if the act or conduct constituting the offence or
contravention involves a computer, computer system or computer network located in India.
27.12.17 Confiscation.
✓ Any computer, computer system, floppies, compact disks, tape drives or any other
accessories related thereto, in respect of which any provision of this Act. rules, orders
or regulations made thereunder has been or is being contravened, shall be liable to
confiscation:
✓ where it is established to the satisfaction of the court adjudicating the confiscation that
the person in whose possession, power or control of any such computer, computer
system, floppies, compact disks, tape drives or any other accessories relating to is found
is not responsible for the contravention of the provisions of this Act, rules, orders or
regulations made thereunder, the court may, instead of making an order for confiscation
of such computer, computer system, floppies, compact disks, tape drives or any other
accessories related thereto, make such other order authorised by this Act against the
person contravening of the provisions of this Act, rules, orders or regulations made
thereunder as it may think fit.
27.14.1 Power of police officer and other officers to enter, search, etc.
1. Notwithstanding anything contained in the Code of Criminal Procedure, 1973, any police
officer, not below the rank of a Deputy Superintendent of Police, or any other officer of
the Central Government or a State Government authorised by the Central Government in
this behalf may enter any public place and search and arrest without warrant any person
2. Where any person is arrested under sub-section (1) by an officer other than a police officer,
such officer shall, without unnecessary delay, take or send the person arrested before a
magistrate having jurisdiction in the case or before the officer-in-charge of a police station.
3. The provisions of the Code of Criminal Procedure, 1973 shall, subject to the provisions of
this section, apply, so far as may be, in relation to any entry, search or arrest, made under
this section.
✓ The provisions of this Act shall have effect notwithstanding anything inconsistent
therewith contained in any other law for the time being in force.
27.14.3 Controller, Deputy Controller and Assistant Controllers to be public servants.
✓ The Presiding Officer and other officers and employees of a Cyber Appellate Tribunal,
the Controller, the Deputy Controller and the Assistant Controllers shall be deemed to
be public servants within the meaning of section 21 of the Indian Penal Code.
27.14.4 Power to give directions.
✓ The Central Government may give directions to any State Government as to the
carrying into execution in the State of any of the provisions of this Act or of any rule,
regulation or order made there under.
✓ No suit, prosecution or other legal proceeding shall lie against the Central Government,
the State Government, the Controller or any person acting on behalf of him, the
Presiding Officer, adjudicating officers and the staff of the Cyber Appellate Tribunal
for anything which is in good faith done or intended to be done in pursuance of this Act
or any rule, regulation or order made thereunder.
27.14.6 Offences by companies.
(1) If any difficulty arises in giving effect to the provisions of this Act, the Central
Government may, by order published in the Official Gazette, make such provisions not
inconsistent with the provisions of this Act as appear to it to be necessary or expedient for
removing the difficulty:
(2) Every order made under this section shall be laid, as soon as may be after it is made,
before each House of Parliament.
27.14.8 Constitution of Advisory Committee.
1. The Central Government shall, as soon as may be after the commencement of this Act,
constitute a Committee called the Cyber Regulations Advisory Committee.
2. The Cyber Regulations Advisory Committee shall consist of a Chairperson and such
number of other official and non-official members representing the interests principally
affected or having special knowledge of the subject-matter as the Central Government may
deem fit.
3. The Cyber Regulations Advisory Committee shall advise—
(a) the Central Government either generally as regards any rules or for any other
purpose connected with this Act;
1. In any proceedings involving a secure electronic record, the Court shall presume unless
contrary is proved, that the secure electronic record has not been altered since the specific point
of time to which the secure status relates
2. In any proceedings, involving secure digital signature, the Court shall presume unless the
contrary is proved that—
(a) the secure digital signature is affixed by subscriber with the intention of signing
or approving the electronic record;
(b) except in the case of a secure electronic record or a secure digital signature,
nothing in this section shall create any presumption relating to authenticity and
integrity of the electronic record or any digital signature.
27.14.12 Presumption as to Digital Signature Certificates.
✓ The Court shall presume, unless contrary is proved, that the
information listed in a Digital Signature Certificate is correct, except