NSC Unit-I Notes
NSC Unit-I Notes
These three are referred as the CIA triad. Although the use of the CIA triad to define security objectives is well
established, some in the security field feel that additional concepts are needed to present a complete picture. Two
most commonly mentioned are as follows:
o Authenticity: The property of being genuine and being able to be verified and trusted; confidence in the
validity of a transmission, a message, or message originator. This means verifying that users are who they
say they are and that each input arriving at the system came from a trusted source.
o Accountability: Because truly secure systems are not yet an achievable goal, we must be able to trace a
security breach to a responsible party. Systems must keep records of their activities to permit later
forensic analysis to trace security breaches or to aid in transaction.
EXAMPLES:
Confidentiality – student grades or question papers are more confidential than other details. Grades and
question papers must be given high confidentiality and other student details or faculty details can be kept with
lower, or they can be open to the normal public without providing any confidentiality.
Integrity – Integrity can be illustrated by the example of a hospital patient’s allergy information stored in a
database.
Availability: The more critical a component or a service is, the higher level of availability required.
· Applications involving financial transactions require high availability.
· Applications like public websites requires moderate availability.
· Applications like online telephone directory require low availability.
SECURITY ATTACKS:
There are four general categories of attack which are listed below.
1. Interruption
An asset of the system is destroyed or becomes unavailable or unusable. This is an attack on availability
e.g., destruction of piece of hardware, cutting of a communication line or Disabling of file management
system.
2. Interception
An unauthorized party gains access to an asset. This is an attack on confidentiality. Unauthorized party
could be a person, a program or a computer.e.g., wire tapping to capture data in the network, illicit
copying of files.
3. Modification
An unauthorized party not only gains access to but tampers with an asset. This is an attack on integrity.
e.g., changing values in data file, altering a program, modifying the contents of messages being
transmitted in a network.
4. Fabrication
An unauthorized party inserts counterfeit objects into the system. This is an attack on authenticity.
e.g., insertion of spurious message in a network or addition of records to a file.
Cryptographic Attacks
Cryptographic Attacks are divided into two categories: Passive attacks and Active attacks.
Passive attacks: In this type of attacks (As shown in the following figure) the opponent either
eavesdropping on, or monitor the transmissions. The goal is to obtain information that is being
transmitted.
Two types of passive attacks are the release of message contents and traffic analysis.
o A telephone conversation, an electronic mail message, and a transferred file may contain sensitive
or confidential information are the examples for release of message contents. We would like to
prevent an opponent from learning the contents of these transmissions.
o A second type of passive attack is traffic analysis. In this even if we had a way of masking the
contents of messages or other information traffic, even if they captured the message, could not
extract the information from the message. The opponent could determine the location and identity
of communicating hosts and could observe the frequency and length of messages being
exchanged. This information might be useful in guessing the nature of the communication that
was taking place.
Passive attacks are very difficult to detect, because there is no alteration of the data. The message traffic
is sent and received in a normal fashion, and neither the sender nor receiver is aware that a third party has
read the messages or observed the traffic pattern.
Active Attacks: In active attacks (as shown in the above figure) either the data stream will be modified
or a new false stream will be generated.
Active attacks can be subdivided into four categories: masquerade, replay, modification of messages, and
denial of service.
o A masquerade takes place when one entity pretends to be a different entity. For example an entity
with fewer privileges will behave like another entity to gain his extra privileges (path 2 in the
above figure b).
o In replay the data will be passively captured and its subsequent retransmission will be done to
produce an unauthorized effect (paths 1, 2, and 3 active).
o Modification of messages simply means that some portion of an actual message is altered, or that
messages are delayed or reordered, to produce an unauthorized effect (paths 1 and 2 active). For
example, a message meaning “Allow John to read confidential file accounts” is modified to mean
“Allow Fred to read confidential file accounts.”
o The denial of service prevents the normal use of communication facilities (path 3 active). This
attack may have a specific target; for example, an entity may suppress all messages directed to a
particular destination (e.g., the security audit service). Another form of service denial is the
disruption of an entire network, either by disabling the network or by overloading it with
messages to degrade its performance.
Active attacks present the opposite characteristics of passive attacks.
Passive attacks are difficult to detect but they can be prevented by taking certain measures. On the other
hand, it is quite difficult to prevent active attacks absolutely because of the wide variety of potential
physical, software, and network vulnerabilities.
SECURITY SERVICES
The definition of the term security services is given in two different standard documents.
X.800 defines a security service as a service that is provided by a protocol layer of communicating open
systems and that ensures adequate security of the systems or of data transfers.
RFC 4949 defines a security service as a processing or communication service that is provided by a
system to give a specific kind of protection to system resources.
X.800 divides these services into five categories and fourteen specific services (See the following table).
Authentication: The authentication service assures that a communication is authentic.
In the case of a single message, such as a warning or alarm signal, the function of the authentication
service is to assure the recipient that the message is from the source that it claims to be from.
In the case of an ongoing interaction, such as the connection of a terminal to a host, there are two aspects.
o First, at the time of connection initiation, the service assures that the two entities are authentic.
o Second, the service must assure that the connection is not interfered by a third party for the
purposes of unauthorized transmission or reception.
Two specific authentication services are defined in X.800:
o Peer entity authentication:
Provides peer entity verification in a communication.
Two entities are considered peers if they implement same protocol in different systems;
for example two TCP modules in two communicating systems.
It provide confidence that an entity is not performing either a masquerade or an
unauthorized replay of a previous connection.
o Data origin authentication:
Provides the verification of the source of a data unit.
It does not provide protection against the duplication or modification of data units.
This type of service supports applications like electronic mail, where there are no prior
interactions between the communicating entities.
Access Control
Access control is the ability to limit and control the access to host systems and applications via
communications links.
Each entity trying to gain access must first be identified, or authenticated, so that access rights can be
customized to the individual.
Data Confidentiality:
Confidentiality is the protection of transmitted data from passive attacks.
Different levels of protections are possible:
Broad Level protects the data transmitted between the users over a period of time. Example TCP
connection is established between the peers, the protection protects the data transmission until the
connection is released.
Narrow Level protects a single message or specific fields within a message. It is less useful compared to
broad level and are more complex and expensive to implement.
It also provide protection to traffic flow from analysis by the attacker. (i.e., frequency, length, or other
characteristics of the traffic on a communication channel.)
Data Integrity:
As with confidentiality, integrity can also be applied to a stream of messages, a single message, or
selected fields within a message. And, the useful approach is total stream protection.
A connection-oriented integrity service deals with a stream of messages and assures that messages are
received as sent with no duplication, insertion, modification, reordering, or replays.
A connectionless integrity service deals with individual messages and provides protection against
message modification only.
Nonrepudiation:
Nonrepudiation prevents either sender or receiver from denying a transmitted message.
When a message is sent, the receiver can prove that the alleged sender has sent the message. Similarly,
when a message is received, the sender can prove that the alleged receiver has received the message.
Availability Service:
The property of a system resource being accessible and usable whenever demanded by an authorized
system entity is known as availability.
Different types of attacks can result in either the loss of or reduction of availability.
Authentication and encryption are mostly affected by attacks in terms of availability, whereas others type
of services require some physical action to undone these type of attacks.
The availability service is the one which protects the system to ensure its availability.
SECURITY MECHANISMS
The security mechanisms are divided into two categories:
1. They are implemented in a specific protocol layer, such as TCP or an application-layer protocol.
2. They are not specific to any particular protocol layer or security service.
The following table lists the security mechanisms as defined in X.800.
X.800 distinguishes between reversible encipherment mechanisms and irreversible encipherment mechanisms.
A reversible encipherment mechanism is an encryption algorithm that allows data to be encrypted and
subsequently decrypted.
Irreversible encipherment mechanisms include hash algorithms and message authentication codes, which are
used in digital signature and message authentication applications.
May be incorporated into the appropriate protocol Mechanisms that are not specific to any particular
layer in order to provide some of the OSI security OSI security service or protocol layer.
services.
Trusted Functionality
Encipherment That which is perceived to be correct with respect to
The use of mathematical algorithms to transform data some criteria (e.g., as established by a security
into a form that is not readily intelligible. The policy).
transformation and subsequent recovery of the data
depend on an algorithm and zero or more encryption Security Label
keys. The marking bound to a resource (which may be a
data unit) that names or designates the security
Digital Signature attributes of that resource.
Data appended to, or a cryptographic transformation
of, a data unit that allows a recipient of the data unit Event Detection
to prove the source and integrity of the data unit and Detection of security-relevant events.
protect against forgery (e.g., by the recipient).
Security Audit Trail
Access Control Data collected and potentially used to facilitate a
A variety of mechanisms that enforce access rights to security audit, which is an independent review and
resources. examination of system records and activities.
Traffic Padding
The insertion of bits into gaps in a data stream to
frustrate traffic analysis attempts.
Routing Control
Enables selection of particular physically secure
routes for certain data and allows routing changes,
especially when a breach of security is suspected.
Notarization
The use of a trusted third party to assure certain
properties of a data exchange.
The following table indicates the relationship between security services and security mechanisms.
A MODEL FOR NETWORK SECURITY
• A model for Network Security is shown in the following figure.
• Assume that a message has to be transferred from one party to another across the open public network
(Internet). The two parties, must cooperate for the exchange of information to take place.
• A logical information channel is established by defining a route through the Internet from source to
destination by use of communication protocols (e.g., TCP/IP).
• Security aspects come into play when it is necessary to protect the information transmission from an
opponent who may present as a threat to confidentiality, authenticity, and so on.
• Above model reflects the concern of protecting an information system from unwanted access.
• Everyone is familiar with the problems caused by the existence of hackers, who attempt to penetrate
systems over a network.
• The hacker is someone who simply gets satisfaction from breaking and entering into a computer system.
• The intruder can be a frustrated employee who wishes to do damage to his company or a criminal who
seeks financial gain by exploiting computer assets. (e.g., obtaining credit card numbers or performing
illegal money transfers).
• Another type of unwanted access is placing an unwanted computer program or logic that exploits or
effects the system and application programs.
• Viruses and worms are two examples of software attacks. Such attacks can be introduced into a system
by means of a disk that contains the unwanted logic or they can also be inserted into a system across a
Network.
The security mechanisms needed for avoiding the above unwanted access fall into two broad categories:
• The first category is a gatekeeper function which includes password-based login procedures that are
designed to deny access to unauthorized users and give access to authorized users, detect and reject
worms, viruses, and other similar attacks.
• The second category consists of a variety of internal controls that monitor activity and analyze stored
information in an attempt to detect the presence of unwanted intruders.
WHAT IS CRYPTOGRAPHY?
Cryptography is the science of using mathematics to encrypt and decrypt data.
Cryptography enables you to store sensitive information or transmit it across insecure networks (like the
Internet) so that it cannot be read by anyone except the intended recipient.
Cryptanalysis:
Cryptanalysis is the science of analyzing and breaking secure communication.
Classical cryptanalysis involves an interesting combination of analytical reasoning, application of
mathematical tools, pattern finding, patience, determination, and luck.
Cryptanalysts are also called as attackers.
Cryptology:
Cryptology is combination of both cryptography and cryptanalysis.
TERMINOLOGY OF CRYPTOGRAPHY:
Plain Text: A message is plaintext (sometimes called clear-text).
Encryption: The process of converting a message into an unreadable form (so as to hide its substance) is
encryption.
Cipher-Text: An encrypted message is cipher-text.
Decryption: The process of turning cipher-text back into plaintext is decryption.
Cipher (or) Cypher:
o A cipher (or cypher) is an algorithm for performing encryption or decryption.
o It is a series of well-defined steps that can be followed as a procedure.
Brute-force attack:
o A brute-force attack involves trying every possible key until an intelligible translation of the
cipher-text into plaintext is obtained.
o On average, half of all possible keys must be tried to achieve success. That is, if there are X
different keys, on average an attacker would discover the actual key after X/2 tries.
Cryptographic systems are characterized using three independent dimensions:
1. The type of operations used for transforming plaintext to cipher-text:
All encryption algorithms are based on two general principles:
1. Substitution: In this each element in the plaintext (bit, letter, group of bits or letters) is mapped
into another element.
2. Transposition: In this elements in the plaintext are rearranged.
The basic requirement is that no information should be lost (i.e., that all operations are reversible).
In modern world cryptography there are systems that involve multiple stages of substitutions and
transpositions.
2. The number of keys used:
If both sender and receiver are using the same key, the system will be referred as symmetric, single-
key, secret-key, or conventional encryption.
If the sender and receiver use different keys, the system is referred to as asymmetric, two-key, or
public-key encryption.
3. The way in which the plaintext is processed:
A block cipher processes the plaintext one block of elements at a time, producing an output block for
each input block.
A stream cipher processes the plaintext elements continuously, producing output one element at a
time, as it goes along.
Other examples of Symmetric Key Encryption Algorithm: Lucifer, Madryga, FEAL, REDOC, LOKI, GOST,
CAST, Blowfish, Safer, Crab, RC5…etc.
Symmetric-key systems are simpler and faster; their main drawback is that the two parties must somehow
exchange the key in a secure way and keep it secure after that.
Key Management caused nightmare for the parties using the symmetric key cryptography.
They were worried about how to get the keys safely and securely across to all users so that the decryption
of the message would be possible.
This gave the chance for third parties to intercept the keys in transit to decode the top-secret messages.
Thus, if the key was compromised, the entire coding system was compromised and a “Secret” would no
longer remain a “Secret”.
This is why the “Public Key Cryptography” came into existence.
This was solved in April 26, 1994, cracked by an international effort via the internet with the use of 1600
workstations, mainframes, and supercomputers attacked the number for eight months before finding its
Public key and its private key.
Encryption key = 9007
The message "first solver wins one hundred dollars".
RSA algorithm is safe, as it would be incredibly difficult to gather up such international participation to
commit malicious acts.
ElGamal
ElGamal is a public key method that is used in both encryption and digital signing.
The encryption algorithm is similar in nature to the Diffie-Hellman key agreement protocol
It is used in many applications and uses discrete logarithms.
ElGamal encryption is used in the free GNU Privacy Guard software.
3. Hash Functions:
A cryptographic hash function is a hash function that takes an arbitrary block of data and returns a fixed-
size bit string (the cryptographic hash value) such that any (accidental or intentional) change to the data
will (with very high probability) change the hash value.
The data to be encoded are often called the message, and the hash value is sometimes called the message
digest or simply digest.
o If both letters are in the same row, take the letter to the right of each one (going back to
the left if at the farthest right)
o If neither of the preceding two rules are true, form a rectangle with the two letters and
take the letters on the horizontal opposite corner of the rectangle.
o Using these rules, the result of the encryption of ‘hide money’ with the key of ‘tutorials’
would be −
QC EF NU MF ZV
Decryption:
o Decrypting the Playfair cipher is as simple as doing the same process in reverse.
o Receiver has the same key and can create the same key table, and then decrypt any
messages made using that key.
o For example, let’s assume the key is ‘point’. Each alphabet of the key is converted to its respective
numeric value: In this case,
o The sender wants to encrypt the message, say ‘attack from south east’. He will arrange plaintext
and numeric key as follows –
o He now shifts each plaintext alphabet by the number written below it to create ciphertext as
shown below –
o Here, each plaintext character has been shifted by a different amount – and that amount is
determined by the key. The key must be less than or equal to the size of the message.
o For decryption, the receiver uses the same key and shifts received ciphertext in reverse order
to obtain the plaintext.
o Thus the cipher text is generated by performing the bitwise XOR of the plaintext and the
key.
o Decryption uses the same key. Because of the properties of XOR, decryption simply
involves the same bitwise operation:
Example: plaintext = 0 0 1 0 1 0 0 1
Key = 10101100
-------------------
Cipher-text = 1 0 0 0 0 1 0 1
Advantage:
o Encryption method is completely unbreakable for a cipher-text only attack.
Disadvantages:
o It requires a very long key which is expensive to produce and expensive to transmit.
o Once a key is used, it is dangerous to reuse it for a second message; any knowledge on the
first message would give knowledge of the second.
TRANSPOSITION TECHNIQUES:
o A very different kind of mapping is achieved by performing some sort of permutation on the plaintext
letters.
o This technique is referred to as a transposition cipher.
Rail fence
o Rail fence is simplest of such cipher, in which the plaintext is written down as a sequence of diagonals
and then read off as a sequence of rows.
o For example, the plaintext is “golden statue is in eleventh cave” and the secret random key chosen is
“five”. We arrange this text horizontally in table with number of column equal to key value. The
resulting text is shown below.
o The ciphertext is obtained by reading column vertically downward from first to last column. The
ciphertext is ‘gnuneaoseenvltiltedasehetivc’.
Decryption:
o To decrypt, the receiver prepares similar table. The number of columns is equal to key number. The
number of rows is obtained by dividing number of total cipher text alphabets by key value and rounding
of the quotient to next integer value.
o The receiver then writes the received cipher text vertically down and from left to right column. To obtain
the text, he reads horizontally left to right and from top to bottom row.
2. Cipher-only attack
o In the ‘cipher-only’ attack, the attacker knows the ciphertext of various messages which have been
encrypted using the same encryption algorithm.
o The attacker’s challenge is to figure the ‘key’ which can then be used to decrypt all messages.
o The ‘cipher-only’ attack is probably one of the easiest attacks to commit since it is easy to capture
the cipher-text (by sniffing) but difficult to implement since the knowledge about the encryption
process is limited.
3. Known-plaintext attack
o In the ‘known-plaintext’ attack, the attacker knows some of the plaintext and the ciphertext.
o He then has to figure the ‘key’ by reverse engineering and he can decipher other messages which use
the same ‘key’ and algorithm.
o The ‘known-plaintext’ attack was effective against simple ciphers such as the ‘substitution cipher’.
o It was popular for breaking ciphers used during the Second World War.
6. Differential cryptanalysis
o This was a popular type of attack against block algorithms such as DES in 1990.
o The primary aim of this attack, as with other attacks, is finding the ‘key’.
o The attacker follows several messages of plaintext into their transformed cipher-text.
o He observes the changes form plaintext to the cipher-text and deduces the key.
o This is a type of ‘chosen-plaintext’ attack since the attacker chooses the plaintext to observe the
transformation.
7. Linear cryptanalysis
o The attacker carries out a “known-plaintext” attack against several messages which have been
encrypted with the same key.
o This gives the attacker insight into the probability of a particular key.
o If more messages are attacked, there is a higher possibility of finding the particular “key”.
9. Replay attacks
o In a ‘replay attack’, the attacker captures some information (as an example, authentication
information) and re-submits it back to the receiver.
o This dupes the receiver and they give the attacker unauthorized access.
o Timestamps are one of the important countermeasures to handle ‘replay attacks’.