CNS Unit I Notes
CNS Unit I Notes
Security trends - Legal, Ethical and Professional Aspects of Security, Need for Security at
Multiple levels, Security Policies - Model of network security – Security attacks, services and
mechanisms – OSI security architecture – Classical encryption techniques: substitution
techniques, transposition techniques, steganography- Foundations of modern cryptography:
perfect security – information theory – product cryptosystem – cryptanalysis.
Computer data often travels from one computer to another and once the data is out of hand,
people with bad intention could modify or forge the data, either for amusement or for their own
benefit or for any other reasons. Cryptography can reformat and transform our data, making it safer
on its travel between computers. Cryptographic technology is based on the essentials of secret
codes, powered by modern mathematics that protects our data in powerful ways. It is very essential
to know the following higher level security terminologies.
Computer Security – It is the generic name for the collection of tools designed to protect data
and to thwart hackers
Network Security – It measures to protect data during their transmission
Internet Security – It measures to protect data during their transmission over a collection of
interconnected networks
1
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
1.2 LEGAL, ETHICAL AND PROFESSIONAL ASPECTS OF
SECURITY
Ethics: Rules that define socially acceptable behavior, not necessarily criminal, not
enforced (via authority/courts)
• Laws: Rules that mandate or prohibit behavior, enforced by governing authority (courts)
Laws are rules that mandate / prohibit certain behavior in society. Laws are drawn from
ethics, which define socially acceptable behavior.
Key difference between laws and ethics is that laws carry the sanction of a governing
authority and ethics do not. In turn ethics are based on cultural values – the fixed moral
attitudes / customs of a particular group.
Types of Law
• Civil Law – Represents a wide variety of laws that govern a nation / state.
• Tort Law – Enables individuals to seek recourse against others in the event of personal,
physical or financial injury.
• Private Law – Regulates relationship between the individual and the organization and
includes family law, commercial law and labor law.
2
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
• Public Law – Regulates the structure and administration of govt agencies and their
relationship with citizens, employees and other govt, providing careful checks and
balances. Includes criminal, administrative, constitutional laws
• Computer Security Act of 1987: sets minimal federal government security standards
• Health Insurance Portability and Accountability Act of 1996 (HIPAA), Gramm-Leach-Bliley Act
of 1999 (GLBA):
Requires privacy policies in healthcare and financial industries, restricts sharing & use of customer
info
• Freedom of Information Act of 1966: can request info from gov’t, some info is protected
3
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
• FACTA Red Flag regulation of 2009 (ID theft)
• With citations, you can include brief portions of others’ work as reference (“fair use”)
The need to ensure national security and to protect trade secrets and a variety of other state
and pvt assets, has led to several laws restricting what info and info mgmt and resources
may be exported from USA.
The Economic Espionage Act was passed in 1996 to prevent trade secrets from being
illegally shared. The Security and Freedom Through Encryption Act of 1999, provides
guidance in the use of encryption and provides measures of protection from govt
intervention.
Policies are a body of expectations that describe acceptable & unacceptable employee
behaviors in workplace.
Policy functions as organizational laws, complete with penalties, judicial practices and
sanctions to require compliance.
Since policies functions are laws, they must be crafted with the same care, to ensure that
the policies are complete, appropriate and fairly applied to everyone in workplace.
A policy differs from law, as the ignorance of a policy is an acceptable defense where as a
law cannot be treated so.
Only when all conditions are met, does the organization have a reasonable expectation of
effective policy and can go ahead in penalizing employees violating them without fear of
legal attritions.
The Ten Commandments of Computer Ethics from The Computer Ethics Institute :
6. Thou shalt not copy or use proprietary software for which you have not paid.
7. Thou shalt not use other people's computer resources without authorization or proper
compensation.
9. Thou shalt think about the social consequences of the program you are writing or the system
you are designing.
10. Thou shalt always use a computer in ways that insure consideration and respect for your
fellow humans.
Differences in cultures cause problems in determining what is ethical and what is not
ethical, when considering the use of computer.
Studies of ethical sensitivity to computer use reveal different nationalities have different
perspectives; difficulties arise when one nationality’s ethical behavior contradicts that of
another nation.
5
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Ethics and Education
Differences in the ethics of computer use are found among individuals within the same
country, within the same social class, and within the same company.
Employees must be trained and kept aware of a number of topics related to information
security, not the least of which is the expected behaviors of an ethical employee.
This is especially important in areas of information security, as many employees may not
have the formal technical training to understand that their behavior is unethical or even
illegal.
Proper ethical and legal training is vital to creating an informed, well prepared, and low-
risk system user.
The value of technology aspect of protection is well understood but value of policy is often
under estimated.
2. Accident: Individuals with authorization and privileges to manage info within the
organization most likely cause harm / damage by accident.
3. Intent: Criminal / unethical intent goes to the state of the individual performing
the act. Intent is often the cornerstone of legal defense, when it becomes necessary to
determine whether or not the offender acted out of ignorance, by accident or with specific
intent to cause harm / damage.
Deterrence
6
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Deterrence is the best method for preventing an illegal or unethical activity. Laws, policies,
and technical controls are all examples of deterrents.
Laws and policies and their associated penalties only deter if three conditions are present:
- Fear of penalty – Individual intending to commit the act must fear the penalty. Threats of
informal reprimand or verbal warnings may not have the same impact as the threat of imprisonment
/ forfeiture of pay.
- Probability of being caught – Individual has to believe there is strong probability of being
caught performing the illegal / unethical act. Penalties can be severe, but the penalty will not deter
the behavior unless there is an expectation of being caught.
- Probability of penalty being administered – Individual must believe that the penalty will in
fact be administered.
Many organizations have codes of conduct and/or codes of ethics that members are
expected to follow.
Codes of ethics can have a positive effect on an individual’s judgment regarding computer
use. Unfortunately, many employers do not encourage their employees to join these
professional organizations.
Individuals who have earned some level of certification or professional accreditation can
be deterred from ethical lapses by the threat of loss of accreditation or certification due to
violation of a code of conduct.
It is the responsibility of security professionals to act ethically and according to the policies
and procedures of their employer, their professional organization, and the laws of society.
7
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
- The ACM’s code of ethics requires members to perform their duties in a
manner befitting an ethical computing professional.
Both general mgmt & IT mgmt are responsible for implementing info security that protects
the organization’s ability to function.
Decision makers must set policy and operate their organization in compliance with
complex, shifting legislation that controls the use of technology.
Implementing info security has more to be done from mgmt side than from technological
side i.e., info security has more to do with policy and its enforcement than with technology
for its implementation.
8
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Communities of interest, with in organization must address info security in terms of
business impact and cost of business interruption, rather than focusing on security as a
technical problem.
Organizations must create integrated, efficient, and capable applications and such
applications should be guarded by using organization’s IT systems.
Those applns that serve as important elements of infrastructure for the organization are OS
platforms, e-mail, instant messaging etc.
Such applns can be outsourced or developed in-house by the mgmt. Once acquired and put
in place, management must continue to oversee it, and not abdicate the responsibility for
the entire infrastructure to the IT department.
One of the most valuable assets to an organization is data. Without data, an organization
loses its record of transactions and/or its ability to deliver value to its customers.
Any business, educational institution or govt agency that functions within in the modern
context of connected and responsive services relies on info systems to support these
transactions.
Even if transaction is not done online, it involves creation and movement of goods &
services. Therefore protecting data in motion and data at rest are both critical.
The value of data lures attackers. Therefore an effective information security program is
essential to the protection of the integrity and value of the organization’s data.
Organizations must have secure infrastructure services based on the size and scope of the
enterprise.
For eg., a small business may utilize e-mail facility of an ISP and augment it with an
encryption tool. As it grows, it must develop additional security services.
9
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
For eg., a larger organization may use Public Key Infrastructure (PKI), an integrated system
of s/w, encryption methodologies, legal agreements that can be used to support the entire
info infrastructure of an organization.
More robust solutions may be needed to replace security programs the organization has
outgrown. Eg., for robust technology could be a firewall.
• Communities of interest need to consider policies as starting point for security efforts
• Security policies are least expensive controls to execute but most difficult to implement
Policy Management
– A schedule of reviews
• Specific company policies may be classified, but general guidelines shared among companies
• A clean desk policy stipulates that at end of business day, classified information is properly
secured
11
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Fig 1.9Network security model
TERMINOLOGIES
Cryptography The art or science encompassing the principles and methods of transforming an
intelligible message into one that is unintelligible, and then retransforming that message back to
its original form
Plaintext The original message
Cipher text The transformed message
Cipher An algorithm for transforming an intelligible message into one that is unintelligible by
transposition and/or substitution methods
Key Some critical information used by the cipher, known only to the sender& receiver
12
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Encipher (encode) The process of converting plaintext to cipher text using a cipher using a key
Decipher (decode) The process of converting cipher text back into plaintext using a cipher and
using a key
Cryptanalysis The study of principles and methods of transforming an unintelligible message
back into an intelligible message without knowledge of the key. Also called code breaking
Cryptology Both cryptography and cryptanalysis
Code An algorithm for transforming an intelligible message into an unintelligible one using a
code-book.
OSI SECURITY
ARCHITECTURE
Security Security
Security Services
Attacks Mechanisms
Any action that is carried out in a system that compromises the information owned by an
individual or an organization is called as security attack. Sometimes it is also referred as a threat
possibly there is a difference between a threat and an attack.
THREAT
A threat is a possible danger that might exploit a vulnerability. A potential for violation of
security, which exists when there is a circumstance, capability, action, or event that could breach
security and cause harm.
ATTACK
13
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
An assault on system security that derives from an intelligent threat; that is, an intelligent
act that is a deliberate attempt (especially in the sense of a method or technique) to evade security
services and violate the security policy of a system.
Computer security is generally protecting the computer. Information security is about how to
prevent attacks and detect attacks on information-based systems.
TWO TYPES OF ATTACKS
Passive Attacks
Active Attacks
SECURITY ATTACKS
ACTIVE ATTACK
PASSIVE ATTACK 1. Masquerade
1. Release of message contents 2. Replay
2. Traffic Analysis 3. Modification of message contents
4. Denial of Service (DoS)
PASSIVE ATTACK:
Passive attacks are unauthorized reading of message. In this type of attack the
message contents are not modified and hence passive attacks are very difficult to detect. The main
aim of the attacker is to obtain the information that is being transmitted between the sender and
the receiver. Eavesdropping is a well known passive attack. Monitoring the transmission is also a
familiar passive attack as the attacker could gain confidential and sensitive information that are
transmitted. This attack can be feasibly prevented by encrypting the message i.e converting the
14
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
original message into unreadable message during transmission using the keys known to sender and
receiver only.
15
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Fig1.4 Traffic Analysis
ACTIVE ATTACKS
Active attacks involve modification of the message contents or the creation of a false
message contents. Active attacks are subdivided into four categories:
1. Masquerade
2. Replay
3. Modification of messages and
4. Denial of service.
MASQUERADE
A masquerade takes place when one entity pretends to be a different entity (Figure 1.5).
A masquerade attack usually includes one of the other forms of active attack. For example,
authentication sequences can be captured and replayed after a valid authentication sequence has
taken place, thus enabling an authorized entity with few privileges to obtain extra privileges by
impersonating an entity that has those privileges.
16
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Fig1.5 Masquerading
REPLAY
It involves the passive capture of a data unit and its subsequent retransmission to produce
an unauthorized effect (Figure 1.6).
Fig1.6 Replay
MODIFICATION OF MESSAGES
This simply means that some portion of a legitimate message is altered, or that messages
are delayed or reordered, to produce an unauthorized effect (Figure 1.7). For example, a message
17
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
meaning "Allow John Smith to read confidential file accounts" is modified to mean "Allow Fred
Brown to read confidential file accounts."
19
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Event detection- Detection of security-relevant events.
Security audit trails - Data collected and potentially used to facilitate a security
audit, which is an independent review and examination of system records and
activities.
Security recovery - Deals with requests from mechanisms, such as event
handling and management functions, and takes recovery actions.
1. Authentication
2. Access control
3. Data confidentiality
4. Data integrity
5. Non-repudiation
AUTHENTICATION
The assurance that the communicating entity is the one that it claims to be.
Two types
1.Peer Entity Authentication - Used in association with a logical connection to
provide confidence in the identity of the entities connected.
2. Data-Origin Authentication - In a connectionless transfer, provides assurance
that the source of received data is as claimed.
ACCESS CONTROL
The prevention of unauthorized use of a resource. Policies must be set for users or systems
that what they can access and what they cannot access.
20
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
DATA CONFIDENTIALITY
DATA INTEGRITY
The assurance that data received are exactly as sent by an authorized entity (i.e.,
contain nomodification, insertion, deletion, or replay).
Five types
1. Connection Integrity with Recovery - Provides for the integrity of all user data on a connection
and detects any modification, insertion, deletion, or replay of any data within an entire data
sequence, with recovery attempted.
3. Selective-Field Connection Integrity - Provides for the integrity of selected fields within the
user data of a data block transferred over a connection and takes the form of determination of
whether the selected fields have been modified, inserted, deleted, or replayed.
4. Connectionless Integrity - Provides for the integrity of a single connectionless data block and
may take the form of detection of data modification. Additionally, limited form of replay
detection may be provided.
5. Selective-Field Connectionless Integrity - Provides for the integrity of selected fields within
a single connectionless data block; takes the form of determination of whether the selected fields
have been modified.
NONREPUDIATION
21
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Two types
1. Nonrepudiation at source - Proof that the message was sent by the specified
party(source)
2. Nonrepudiation at destination - Proof that the message was received by the specified
party(destination).
CRYPTOGRAPHY
The cryptographic system can be characterized by:
Type of encryption operations used
• Substitution / transposition / product
Number of keys used
• Single-key or private / two-key or public
Way in which plaintext is processed
• Block / Stream
Stream cipher . Block cipher
Processes the input stream Processes the input one block of elements at a
continuously one element at a time. time producing an output block for each input
block.
Example: Caesar cipher Example: DES.
•
CRYPTANALYSIS
It is the objective to recover key not just message
General approaches:
Cryptanalytic attack
Brute-force attack
23
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
1.8 SUBSTITUTION TECHNIQUES
A substitution technique is one in which the letters of plaintext are replaced by other
letters or by numbers or symbols or if plaintext is viewed as a sequence of bits, then substitution
involves replacing plaintext bit patterns with cipher text bit patterns. The following are the various
substitution techniques
1. Caesar cipher
2. Monoalphabetic Cipher
3. Playfair cipher
4. Polyalphabetic cipher
5. Hill Cipher
6. One Time Pad
This technique replaces each letter of the alphabet with the letter standing three places further
down the alphabet as per the key.
The alphabet is wrapped around, so that the letter following Z is A. Mathematically assign each
alphabet a number as mentioned below.
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Example:
Key :3
24
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
u: C=(20+3) mod(26) = 23 mod 26 = 23 = X
…………………..
Plain u n i V e r s i t y
Text
Cipher X Q L Y H U V L W B
Text
2. Brute force attack can be easily performed as it involves trying all possible combinations
of 25 keys only.
a b c d e f g h i j K l M n o p q R s t u v w x y z
J Q L P B U Z C A K M T I F W Y R X V O S G H E N D
Precisely, rather than just shifting the alphabet (as like in Caesar cipher), shuffle (jumble)
the letters arbitrarily.
25
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Here each plaintext letter maps to a different random cipher text letter hence key is 26 letters
long.
Advantages of Caesar Cipher:
1. Brute force attack become more difficult when compared to Caesar cipher.
Disadvantages of Caesar Cipher:
1. Key management is difficult.
2. The attacker can compare the occurrence of letters in cipher text with standard frequency
of English letters and break the code.
3. Prone to guessing attack using the English letter frequency of occurrence of letters.
1.8.3 PLAYFAIR CIPHER
Not even the large number of keys in a mono alphabetic cipher provides security.
One approach to improve security was to encrypt multiple letters.
Playfair Cipher is an example for encrypting multiple letters. The plain text is broken into
digrams.
This technique was invented by Charles Wheatstone in 1854, but named after his friend
Baron Playfair
Playfair Key Matrix
A 5X5 matrix of letters based on a keyword is constructed for encryption and decryption
purpose.
Fill in letters of keyword (remove duplicates if any in the keyword) in the 5x5 matrix and
fill the rest of the matrix with other alphabets.
Example of filling the matrix using the keyword PLAYFAIR is shown below
P L A Y F
I R B C D
E G H K M
N O Q S T
U V W X Z
26
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Rules for encryption:
1. If the plain text letters are repeated in the digram they are separated with a filler character
“x”.
Digrams : ba lx lo on
3. Two plain letters that fall in the same column are replaced by the letter below it.
PT: ed is replaced as DO
PT: lu is replaced as RL
4. 2 plain text letters that fall in same row are replaced by the letter right to it.
PT: ex is replaced as XM
PT: ns is replaced as OK
27
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
5. if the plain text letter are in different row and column, then they are replaced by the
opposite letter in the row and column (Hint: Draw a rectangle for doing this
operation)
PT: hi is replaced as BM
PT: rw is replaced as XU
1. It is easy to break because the plain text structure remains the same or remains intact.
Example: Encrypting the message "Hide the gold in the tree stump" (note the null "X" used to
separate the repeated "E"s) using the keyword “Playfair” gives the cipher text shown below.
28
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
1. The pair HI
forms a rectangle,
replace it with BM
2. The pair DE is
in a column,
replace it with OD
3. The pair TH
forms a rectangle,
replace it with ZB
29
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
4. The pair EG
forms a rectangle,
replace it with XD
5. The pair OL
forms a rectangle,
replace it with NA
30
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
10. The pair EX (X
inserted to split
EE) is in a row,
replace it with XM
CIPHER TEXT: BM OD ZB XD NA BE KU DM UI XM MO UV IF
31
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Example 2:
32
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Key Matrix given : 3*3( so 3 letters are encrypted at a time)
This technic uses polyalphabetic substitution. Ex: vignere cipher based on vignere table.
33
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Fig 1.12 Vigenere table
EXAMPLE 1:
EXAMPLE 2:
If the plain text is longer than the key, then repeat the key till it fits to the plain text.
1. Simple encryption
The classical transposition or permutation ciphers hides the message by rearranging the
letter order without altering the actual letters used
It can recognise these since have the same frequency distribution as the original text
1. Rail fence
2. Row transposition ciphers
1.9.1 RAIL FENCE
This technique writes the message letters out diagonally over a number of rows and then
read off cipher row by row
Example:
Generation of cipher text for the plain text “meet me after toga party” (depth: 2)
m e m a t r h t g p r y
e t e f e t e o a a t
35
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
CIPHER TEXT: MEMATRHTGPRYETEFETEOAAT
Example 2
M m t h g r
e T e f e t e o a a t
e a r t p y
a t t a c k p
o s t p o n e
d u n t i l t
w o a m x y z
36
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
1.10 STEGANOGRAPHY
A plaintext message may be hidden so as to conceal the existence of the message. Various
ways to conceal the message
1. Arrangement of words or letters within an apparently innocuous text spells out the real
message
2. Character marking
Selected letters of printed or typewritten text are overwritten in pencil.
The marks are ordinarily not visible unless the paper is held at an angle to
bright light.
3. Invisible ink
A number of substances can be used for writing but leave no visible trace until heat
or some chemical is applied
4. Pin punctures
Small pin punctures on selected letters are ordinarily not visible unless the paper is
held up in front of a light.
Advantage of steganography
1. It can be employed by parties who have something to lose should the fact of their secret
communication bediscovered
2. Encryption flags traffic as important or secret or may identify the sender or receiver as
someone with something to hide
Drawbacks of steganography
37
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
1.11 FOUNDATIONS OF MODERN CRYPTOGRAPHY
In cryptography we have two types of security:
1. Concrete security: measures the security of protocols against current attacks and tries to predict
how long an adversary will take to break the system. These numbers are very hard to obtain for a
new protocol and should be judged conservatively.
2. Asymptotic security: considers a sequence of protocols and asks that the adversary gets work
at breaking the protocols as the sequence proceeds (even with additional resources). The standard
here is that when the adversary is given time that is a polynomial function of the sequence position
their success in breaking the protocol should shrink faster than any inverse polynomial function.
1.12 PERFECT SECURITY
(We want the ciphertext to provide no additional information about the message)
38
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
1.13 INFORMATION THEORY
The protection of computer systems and information from harm, theft, and unauthorized
use.
39
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
"Ensures that only authorized users have access to accurate and complete information
when required." (ISACA, 2008)
Protecting Internet
Avalanche property: a single input bit change should force the complementation
of approximately half of the output bits
40
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Completeness property: each output bit should be a complex function of every
input bits
In order to make the job of breaking the cryptosystem more di cult, we could use the product
of two cryptosystems to encode the messages. Here, we encrypt the given message rst with
one cryptosystem and then encrypt the resultant ciphertext using the next cryptosystem. We
consider only Endo-morphic cryptosystems i.e., those where C = P.
Given two cryptosystems S1 = (P; P; K1; E1; D1) and S2 = (P; P; K2; E2; D2),
we then do the product cryptosystem S1 S2 as (P; P; K1 K2; E; D).
The encryption and decryption functions are de ned as e(k1 ;k2 )(x) = ek2 (ek1 (x)) and,
d(k1 ;k2 )(y) = dk1 (dk2 (y)). The probability distribution of keys in the product
cryptosystem is given by pK(k1; k2) = pK1 (k1)pK2 (k2).
The product operation on cryptosystems need not always be commutative, but is always
associative. A cryptosystem S is said to be idempotent if S2 = S. Many common ciphers
like the Shift Cipher, the A ne Cipher and the Vignere Cipher are all idempotent. If a
cryptosystem S is idempotent then there is no point in using S2 to encrypt instead of S since
each extra key is a waste. Otherwise, we could iterate the encryption process to use S2
rather than S. For example, the Data Encryption standard uses 16 iterations.
If S1 and S2 are both idempotent and they commute, then S1 S2 is also idempotent
(since (S1 S2) (S1 S2) = S1 (S2 S1) S2 = (S1 S1) (S2 S2) = S1 S2).
Therefore to get a simple non-idempotent cryptosystem, we can simply take the product of
two different cryptosystems which don't commute.
1.15 CRYPTANALYSIS
Objective: to recover the plaintext of a ciphertext or, more typically, to recover the secret key.
Kerkhoff’s principle: the adversary knows all details about a cryptosystem except the secret key.
Two general approaches:
brute-force attack
non-brute-force attack (cryptanalytic attack)
• May be classified by how much information needed by the attacker:
– Ciphertext-only attack
– Known-plaintext attack
– Chosen-plaintext attack
– Chosen-ciphertext attack
– Chosen text attack
41
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College
Ciphertext only
only know algorithm & ciphertext, is statistical, know or can identify plaintext
Known plaintext
know/suspect plaintext &ciphertext
Chosen plaintext
select plaintext and obtain ciphertext
Chosen ciphertext
select ciphertext and obtain plaintext
Chosen text
select plaintext or ciphertext to en/decrypt
BRUTE FORCE ATTACK
It is always possible to simply try every key
Brute force attack is the most basic attack, proportional to key size by assuming either
know / recognise plaintext
42
CS 8792-CNS UNIT I Dr.R.Geetha /Professor & HoD / Department of CSE, S.A. Engineering College