VVFGC Cns Unit1
VVFGC Cns Unit1
Introduction:
Information Security requirements have changed in recent times, traditionally provided by physical and administrative mechanisms.
computer use requires automated tools to protect files and other stored information. use of networks and communications links
requires measures to protect data during transmission
Network security needs to guard networked computer systems and protect electronic data that is either stored in networked computers
or transmitted in the networks. To achieve the goal of network security, one must first understand the attackers, what could become
their targets, and how these targets might be attacked. The tasks of network security are to provide confidentiality, integrity,
nonrepudiation, and availability of useful data that are transmitted in public networks or stored in networked computers.
Cryptography can reformat and transform our data, making it safer on its trip between computers. The technology is based on the
essentials of secret codes, augmented by modern mathematics that protects our data in powerful ways.
• Confidentiality
• Integrity
• Availability
These three pillars of Network Security are often represented as CIA Triangle, as shown below.
1. Confidentiality: The function of "Confidentiality" is in protecting precious business data (in storage or in motion) from
unauthorized persons. Confidentiality part of Network Security makes sure that the data is available OLNY to intended and
authorized persons. Access to business data should be only for those individuals who are permitted to use that data.
2. Integrity: Integrity aims at maintaining and assuring the accuracy and consistency of data. The function of Integrity is to
make sure that the date is accurate and reliable and is not changed by unauthorized persons or hackers. The data received by
the recipient must be exactly same as the data sent from the sender, without change in even single bit of data.
3. Availability:The function of "Availability" in Network Security is to make sure that the Data, Network Resources or
Network Services are continuously available to the legitimate users, whenever they require it.
1. Passive Attacks:Passive attacks are in the nature of eavesdropping on, or monitoring of, transmissions. The goal of the
opponent is to obtain information that is being transmitted. Passiveattacks are of two types:
• Release of message contents: A telephone conversation, an e-mail message and a transferred file may contain sensitive or
confidential information. We would like to prevent the opponent from learning the contents of these transmissions.
• Traffic analysis: If we had encryption protection in place, an opponent might still be able to observe the pattern of the
message. The opponent could determine the location and identity of communication hosts and could observe the
frequency and length of messages being exchanged. This information might be useful in guessing the nature of
communication that was taking place.Passive attacks are very difficult to detect because they do not involve any
alteration of data.However, it is feasible to prevent the success of these attacks.
2. Active attacks: These attacks involve some modification of the data stream or the creation of a false stream. These attacks
can be classified in to four categories:
• Masquerade – One entity pretends to be a different entity. A masquerade is a type of attack where the attacker pretends
to be an authorized user of a system in order to gain access to it or to gain greater privileges than they are authorized for.
• Replay – involves passive capture of a data unit and its subsequent transmission to produce an unauthorized effect.
• Modification of messages – Some portion of message is altered or the messages are delayed or recorded, to produce an
unauthorized effect.
• Denial of service – Prevents or inhibits the normal use or management of communication facilities. Another form of
service denial is the disruption of an entire network, either by disabling the network or overloading it with messages so
as to degrade performance.
It is quite difficult to prevent active attacks absolutely, because to do so would require physical protection of all communication
facilities and paths at all times. Instead, the goal is to detect them and to recover from any disruption or delays caused by them.
Passive Attack is danger for Confidentiality Active Attack is danger for Integrity as well as availability.
.
While due to passive attack, there is no any harm to Due to active attack system is always damaged.
the system.
While in passive attack, Victim does not get informed In active attack, Victim gets informed about the attack.
about the attack.
Examples: Examples:
1. Release of message content and 1. Masquerade,
2. traffic analysis 2. Replay attack,
3. Modification of message and
4. Denial of Service.
Security Mechanism:
A Mechanism which is designed to detect, prevent or recover from a security attack.These are the mechanisms used by network security.
o Encipherment:
It is a process of using mathematical algorithm to transform data in to readable form to unreadable (not readily intelligible).
o Data Integrity:
This mechanism appends to the data check value that has been created by a specific process from the data itself.
The receiver creates a new check value from the received data and compares the newly created check value with the one received.
If both values are same, the integrity on the data has been preserved.
Ex: sender receiver
ABCD 8 ABCS 8
o Authentication exchange:
In this, two entities exchange same message to prove their identity to each other.
o Traffic padding:
In this technique, we add some extra / dummy bits with the data while encrypting. Hence unauthorized persons might get
ambiguity on data.
o Routing control:
It means selecting and continuously changing different available routs between the sender and receiver to prevent the attackers
from eaves dropping on a particular route.
VVFGC[Type text] Page 3
Cryptography & Network security Unit1:Introduction
o Notarization:
This security mechanism involves trusted third party in communication. It acts as mediator between sender and receiver so that if
any chance of conflicts is reduced.
o Access Control:
It uses methods to prove that users has right to the data or resources owned by a system.
Ex: password, PIN codes.
Security services:
A service that enhances the security of the data processing systems and the information transfers of an organization. The
services are intended to counter security attacks and they make use of one or more security mechanisms to provide the service.
1. Confidentiality: Ensures that the information in a computer system and transmitted information are accessible only for
reading by authorized parties.
2. Authentication: Ensures that the origin of a message or electronic document is correctly identified, with an assurance that
the identity is not false.
3. Integrity: Ensures that only authorized parties are able to modify computer system assets and transmitted information.
Modification includes writing, changing status, deleting, creating and delaying or replaying of transmitted messages.
4. Non repudiation: Requires that neither the sender nor the receiver of a message be able to deny the transmission.
5. Access control: Requires that access to information resources may be controlled by or the target system.
6. Availability: Requires that computer system assets be available to authorized parties when needed.
A message is to be transferred from one party to another across some sort of internet. The two parties, who are the principals
in this transaction, must cooperate for the exchange to take place. A logical information channel is established by defining a route
through the internet from source to destination and by the cooperative use of communication protocols (e.g., TCP/IP) by the two
principals.
Introduction to cryptography:
Some of the keywords used in cryptography is as follows
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
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
Encipher (encode): The process of converting plaintext to cipher text using a cipher and a key
Decipher (decode): The process of converting cipher text back into plaintext using a cipher and 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
Code: An algorithm for transforming an intelligible message into an unintelligible one using a code-book.
Symmetric Key Symmetric-key encryption in which both users means sender and receiver uses
(Secret Key) the same cryptographic key for both encryption of plaintext and decryption of
cipher text. This can be denoted by KS
Asymmetric Key Asymmetric encryption in which both users means sender and receiver uses pair of
keys for encryption and decryption. They are Public key and Private key. Both
should be a pair. In this mechanism sender encrypt the message by using receiver’s
Public Key.
Public Key Public key is a key which is sharable to all users in a network and Public keys are
used to encrypt messages for aReceiver.
Private Key Private key may be part of a public/ private asymmetric key pair. It cannot be
sharable.
Types of Cryptography
Cryptographic systems are generally classified along 3 independent dimensions:
All the encryption algorithms are based on two general principles: substitution, in which each element in the plaintext is mapped
into another element, and transposition, in which elements in the plaintext are rearranged.
If the sender and receiver uses same key then it is said to be symmetric key (or)single key (or) conventional encryption.
If the sender and receiver use different keys then it is said to be public key encryption.
A block cipher processes the input and block of elements at a time, producing output block for each input block.
A stream cipher processes the input elements continuously, producing output element one at a time, as it goes along.
Cryptanalysis:
The process of attempting to discover X or K or both is known as cryptanalysis. The strategy used by the cryptanalysis depends on
the nature of the encryption scheme and the information available to the cryptanalyst.
There are various types of cryptanalytic attacks based on the amount of information known to the cryptanalyst.
Cipher text only – A copy of cipher text alone is known to the cryptanalyst.
Known plaintext – The cryptanalyst has a copy of the cipher text and the corresponding plaintext.
Chosen plaintext – The cryptanalysts gains temporary access to the encryption machine. They cannot open it to find the key,
however; they can encrypt a large number of suitably chosen plaintexts and try to use the resulting cipher texts to deduce the key.
Chosen cipher text – The cryptanalyst obtains temporary access to the decryptionmachine, uses it to decrypt several string of
symbols, and tries to use the results to deduce the key.
Cipher Text: The cipher text is produced as an output of Encryption algorithm. This is not readable.
Encryption Algorithm: The encryption algorithm is used to convert plain text into cipher text.
Decryption Algorithm:It accepts the cipher text as input and the matching key (Private Key or Public key) and produces the
original plain text
Public and Private Key: One key either Private key (Secret key) or Public Key (known to everyone) is used for encryption and
other is used for decryption
Working:
o When the two parties communicate to each other to transfer the readable or sensible message (plaintext), is converted into cipher
text.
o The process of changing the plaintext into the cipher text is referred to as encryption.
o The encryption process consists of an algorithm and a key. The key is a value independent of the plaintext. Once the cipher text is
produced, it may be transmitted.
o In this process users can uses 2 keys.
o Either of the two key (Public and Private key) can be used for encryption with other key used for decryp tion.
o Due to Public key cryptography, public keys can be freely shared, allowing users an easy and convenient method for encrypting
content and verifying digital signatures, and private keys can be kept secret, and ensuring only the owners of the private k eys can
decrypt content and create digital signatures.
o Here number of options sender can encrypt the data but sender will take the valid option to encrypt.
o The most widely used public-key cryptosystem is RSA (Rivest–Shamir–Adleman) DSA, Elliptic curve techniques.
Example:Public keys of every user are present in the Public key Register. There are 4 users like A, B, C and D.
If B wants to send a confidential message to C, then B encrypts the message using C’s Public key.
When C receives the message from B then C can decrypt it using its own Private key.
No other recipient other than C can decrypt the message because only C know C’s private key.
o Examples of symmetric encryption: Blowfish, AES, RC4, DES, RC5, and RC6.
o Private Key encryption is referred to as symmetric encryption, where the same private key is used for both encryption and
decryption purposes.
o A private key is typically a long, randomly generatednumber that cannot easily be guessed.
o Since only one key is involved, the process is fast and simple.
o Secret key ciphers generally fall into one of two categories: they are Stream Cipher and Block Cipher.
o Stream Cipher: The process of conversion takes place “bit by bit” or character by character. It is valid for short length of
messages.
o Block Cipher: The process of conversion takes place “block by block” where block is a group of bits. It is valid for large
messages.
o Symmetric-key encryption is muchfaster computationally than asymmetric encryption but requires a key exchange.
Encryption key management can become too complex if each user has their own privatekey.
Private keys need to be changed frequently to avoid being leaked or stolen.
If the private key is forgotten or lost, the system is broken and messages stay encrypted.
Private key is faster than public key. It is slower than private key.
In this, the same key (secret key) and algorithmis used to In public key cryptography, two keys areused, one
encrypt and decrypt the message. key is used for encryption and while the other is
In private key cryptography, the key is kept as asecret. In public key cryptography, one of the twokeys is
kept as a secret.
Private key is Symmetrical because there is onlyone key Public key is Asymmetrical because there are two
that is called secret key. types of key: private and public key
In this cryptography, sender and receiver needto share In this cryptography, sender and receiverdoes not
In this cryptography, the key is private. In this cryptography, public key can bepublic
After encrypting size of Cipher text is smaller than or equal After encrypting size of Cipher text is greater
Digital Signature
Definition:
A digital signature is a mathematical technique is used to validate the authenticity and integrity of a message or
document. (Or)
If a message is encrypted using Sender’s Private Key is called Digital Signature.
o Digital Signature is used Asymmetric encryption method which means public key algorithm.
o Digital Signature is equivalent to a hand written signature.
o It is an electronic verification of the sender.
o Digital Signature is mainly focuses on 2 things they are authentication and integrity.
o Authentication: receiver believes that message was created and sent by the original sender.
o Integrity: Digital Signature ensures that the message was not altered.
o Digital Signature is most commonly used for software distribution, financial transactions and other cases where it is important to
There are three algorithms at work in Digital Signatures. They are as follows:
1. Key Generation Algorithms: Key Generation Algorithms help ensure authenticity and integrity or it would be very easy to
tamper with the data. They also prevent anyone from pretending to be the sender.
2. Signing Algorithms: Signing Algorithms make one-way hashes of the data that has to be signed. Then they encrypt the hash
value using the signature key. The encrypted hash along with the other information is the Digital Signature.
3. Signature Verification Algorithms: Signature Verification Algorithms help process the Digital Signature and the verification
key to generate some values. The algorithm also processes the same hash function on the data received and creates a hash value.
Digital Signature is based on Public Key Cryptography. Let’s look at how a Digital Signature is created:
People who adopt the Digital Signature scheme have a public-private key pair.
The pairs for encryption/decryption and signing/verifying are usually different. The signature key is the private key that is used
for signing and the verification key is the public key.
The signer feeds all data to the hashing function and in turn, generates a hash of data.
The signature key and hash value are fed into the signature algorithm to help produce a Digital Signature on the given hash.
Once the signature is appended to the data, both are sent forward to the verifier.
The verifier will then feed the Digital Signature and the verification key into the verification algorithm. The verification
algorithm will generate an output value.
Verifier is also responsible for running some hashing functions on the data received so it can generate a hash value.
Verification is processed by comparing the hash value generated by the verifier and the output of the verification algorithm.
The result of this comparison helps the verifier decide if the Digital Signature is valid or not.
Nobody else has access to the private key of the signer and the Digital Signature is created using this key, so the signer cannot
reject signing the document in the future.
Digital Signatures are a very important tool in cryptography. Let’s find out why that is –
1. Message Authentication: The private key is only known to the sender. The verifier can use the public key of the sender to
validate that the Digital Signature was created by the sender.
2. Data Integrity: If at any time the data is attacked, there will be a discrepancy in the hash value and the verification algorithm as
they won’t match. Due to this, the receiver will end up rejecting the message and declaring a data breach.
3. Non-repudiation: The signer is the only one who is aware of the signature key so, naturally, they are the only ones who can
create a specific signature. Whenever there is a dispute, the data along with the Digital Signature can be presented as evidence.
Digital Certificate
Digital certificates are electronic credentials issued by trusted third party, which is not only verifies the identity of the owner but
also verifies that owner owns the public key.
Digital Certificate contains:
Certificate owner’s name.
Owner’s public key and its expiration date.
Certificate’s issuer’s name.
Certificate’s issuer’s digital signature.
Digital certificate is also sent with the digital signature and the message.
STEGANOGRAPHY
A Steganography technique involves hiding sensitive information within an ordinary, non-secret file or message, so that it will not be
detected. The sensitive information will then be extracted from the ordinary file or message at its destination, thus avoiding
detection. Steganography is an additional step that can be used in conjunction with encryption in order to conceal or protect data.
Steganography is a means of concealing secret information within (or even on top of) an otherwise mundane, non-secret document or
other media to avoid detection. It comes from the Greek words steganos, which means “covered” or “hidden,” and graph, which
means “to write.” Hence,“hidden writing.”
You can use Steganography to hide text, video, images, or even audio data. It’s a helpful bit of knowledge, limited only by the type of
medium and the author’s imagination.
2. Image Steganography − The second type of steganography is image steganography, which entails concealing data by using an image
of a different object as a cover. Pixel intensities are the key to data concealment in image steganography.
VVFGC[Type text] Page 11
Cryptography & Network security Unit1:Introduction
Since the computer description of an image contains multiple bits, images are frequently used as a cover source in digital steganography.
Message - Real data that you can mask within pictures. The message may be in the form of standard text or an image.
Stego-Key - Messages can be embedded in cover images and stego-images with the help of a key, or the messages can be derived
from the photos themselves.
3. Audio Steganography − It is the science of hiding data in sound. Used digitally, it protects against unauthorized reproduction.
Watermarking is a technique that encrypts one piece of data (the message) within another (the "carrier"). Its typical uses involve media
playback, primarily audio clips.
4. Video Steganography − Video steganography is a method of secretly embedding data or other files within a video file on a computer.
Video (a collection of still images) can function as the "carrier" in this scheme. Discrete cosine transform (DCT) is commonly used to
insert values that can be used to hide the data in each image in the video, which is undetectable to the naked eye. Video steganography
typically employs the following file formats: H.264, MP4, MPEG, and AVI.
5. Network or Protocol Steganography − It involves concealing data by using a network protocol like TCP, UDP, ICMP, IP, etc., as a
cover object. Steganography can be used in the case of covert channels, which occur in the OSI layer network model.
Embedding text in a picture (like an artist hiding their initials in a painting they’ve done)
Backward masking a message in an audio file (remember those stories of evil messages recorded backward on rock and roll records?)
Hiding an image in a video, viewable only if the video is played at a particular frame rate
Embedding a secret message in either the green, blue, or red channels of an RRB image
Steganography can be used both for constructive and destructive purposes. For example, education and business institutions, intelligence
agencies, the military, and certified ethical hackers use steganography to embed confidential messages and information in plain sight.
On the other hand, criminal hackers use steganography to corrupt data files or hide malware in otherwise innocent documents. For
example, attackers can use BASH and PowerShell scripts to launch automated attacks, embedding scripts in Word and Excel documents.
When a poor, unsuspecting user clocks one of those documents open, they activate the secret, hidden script, and attack the victim
computer.