0% found this document useful (0 votes)
65 views20 pages

CNSimp

The document defines threat, attack, and lists categories of security attacks. It then explains different types of cryptanalytic attacks based on the amount of information known by the cryptanalyst. Finally, it describes the conventional security model used for information security, which uses symmetric encryption with a single secret key.

Uploaded by

mayurieth04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views20 pages

CNSimp

The document defines threat, attack, and lists categories of security attacks. It then explains different types of cryptanalytic attacks based on the amount of information known by the cryptanalyst. Finally, it describes the conventional security model used for information security, which uses symmetric encryption with a single secret key.

Uploaded by

mayurieth04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

1) Define the terms threat and attack.

List and briefly define categories of


security attacks.

Threat: A threat refers to any potential danger or harm that can exploit a
vulnerability in a system or organization's security controls, thereby causing
damage or loss.
Threats can encompass various forms such as malicious software (malware),
hackers, natural disasters, human error, and more.

Attack: An attack is the actual exploitation of a vulnerability or weakness in a


system, network, or organization's security defenses with the intent to
compromise confidentiality, integrity, availability, or other security properties.
Attacks can be initiated by threat actors or automated processes seeking to gain
unauthorized access, steal information, disrupt services, or cause other types of
harm.

Categories of security attacks in cryptography and network security include:

Passive Attacks: These attacks involve monitoring or eavesdropping on data


transmissions without altering the data itself. It's like someone quietly listening
in on a conversation without anyone noticing. Examples include sniffing network
traffic to capture sensitive information like passwords or reading encrypted
messages without decrypting them.

Active Attacks: Unlike passive attacks, active attacks involve modifying or


manipulating data to disrupt its integrity or confidentiality. It's like someone
actively interfering with the conversation, inserting false information, or altering
messages. Examples include data modification, replay attacks (retransmitting
captured data), and denial-of-service attacks (overloading a system to make it
unavailable to legitimate users).

Man-in-the-Middle (MitM) Attacks: MitM attacks involve an attacker


intercepting and possibly altering communication between two parties without
their knowledge. This can allow the attacker to eavesdrop on sensitive
information or manipulate the communication for malicious purposes.

Brute-Force Attacks:Brute-force attacks involve systematically trying all


possible combinations of keys or passwords until the correct one is found. This is
often used to break weak encryption schemes or gain unauthorized access to
systems or accounts.

Phishing Attacks:Phishing attacks involve the use of deceptive emails, websites,


or messages to trick individuals into revealing sensitive information such as login
credentials or financial data. Phishing attacks can be used to gain unauthorized
access to networks or compromise the security of cryptographic systems.

Denial-of-Service (DoS) Attacks:DoS attacks aim to disrupt the availability of


services or resources by overwhelming target systems with a flood of requests or
traffic, rendering them inaccessible to legitimate users. Distributed Denial-of-
Service (DDoS) attacks, which involve multiple compromised systems
coordinating an attack, are also common in network security.

Side-Channel Attacks:Side-channel attacks exploit unintended channels of


information leakage, such as power consumption, electromagnetic emissions, or
timing variations, to infer sensitive data or cryptographic keys. These attacks can
bypass traditional cryptographic defenses by targeting implementation flaws or
physical properties of cryptographic devices.

2). Explain the various types of cryptanalytic attack, based on the amount of
information known to the cryptanalyst.

Cryptanalysis is like solving puzzles to uncover secret messages hidden in


encrypted data. The types of cryptanalytic attacks depend on how much
information the attacker knows. Here are the main types:

Ciphertext-only attack: In this type of attack, the cryptanalyst only has access
to the encrypted messages. They don't have any other information to work with.
It's like trying to solve a puzzle without any clues. These attacks are the most
difficult because the attacker has to rely solely on the encrypted data to find
patterns or weaknesses.

Known-plaintext attack: Here, the cryptanalyst has some pairs of plaintext (the
original message) and corresponding ciphertext (the encrypted message). With
this information, they can try to analyze the patterns in the encryption process.
It's like having a few puzzle pieces already in place, which makes it easier to
figure out the rest.
Chosen-plaintext attack: In this scenario, the cryptanalyst can choose some
plaintext messages and obtain their corresponding ciphertexts. This gives them
more control and can help them understand how the encryption algorithm works.
It's like being able to ask for specific puzzle pieces and seeing how they fit
together.

Chosen-ciphertext attack: This is the opposite of a chosen-plaintext attack.


Here, the cryptanalyst can choose some ciphertext messages and obtain their
corresponding plaintexts. This can be very powerful because it allows the attacker
to see the decrypted messages directly. It's like being able to peek at the completed
puzzle and work backward to figure out how it was put together.

Adaptive chosen-ciphertext attack: This is an advanced form of chosen-


ciphertext attack where the attacker can adapt their choices based on the results
of previous decryption attempts. It's like having a dynamic approach to choosing
puzzle pieces, allowing the attacker to refine their strategy as they go along.

3). Explain the conventional security model used for information security.

Conventional encryption is a cryptographic system that uses the same key used
by the sender to encrypt the message and by the receiver to decrypt the message.
It was the only type of encryption in use prior to the development of public-key
encryption.

It is still much preferred of the two types of encryption systems due to its
simplicity. It is a relatively fast process since it uses a single key for both
encryption and decryption In this encryption model, the sender encrypts plaintext
using the receiver’s secret key, which can be later used by the receiver to decrypt
the ciphertext. Below is a figure that illustrates this concept.
Conventional encryption has mainly 5 ingredients :

Plain text – It is the original data that is given to the algorithm as an input.

Encryption algorithm – This encryption algorithm performs various


transformations on plain text to convert it into ciphertext.

Secret key – The secret key is also an input to the algorithm. The encryption
algorithm will produce different outputs based on the keys used at that time.

Ciphertext – It contains encrypted information because it contains a form of


original plaintext that is unreadable by a human or computer without proper
cipher to decrypt it. It is output from the algorithm.

Decryption algorithm – This is used to run encryption algorithms in reverse.


Ciphertext and Secret key is input here and it produces plain text as output.

Requirements for secure use of conventional encryption :

We need a strong encryption algorithm.


The sender and Receiver must have obtained copies of the secret key in a secure
fashion and must keep the key secure.

Advantages of Conventional Encryption :

Simple – This type of encryption is easy to carry out.

Uses fewer computer resources – Conventional encryption does not require a


lot of computer resources when compared to public-key encryption.

Fast – Conventional encryption is much faster than asymmetric key encryption.


Disadvantages of Conventional Encryption Model:

Origin and authenticity of the message cannot be guaranteed, since both sender
and receiver use the same key, messages cannot be verified to have come from a
particular user.
It isn’t much secured when compared to public-key encryption.
If the receiver lost the key, he/she cant decrypt the message and thus making the
whole process useless.
This scheme does not scale well to a large number of users because both the
sender and the receiver have to agree on a secret key before transmission.

4) Define Cryptography and Cryptanalysis.

Cryptography: Cryptography is the practice of securing communication and


data using mathematical techniques to convert plaintext into ciphertext, ensuring
confidentiality, integrity, and authenticity.

Cryptanalysis: Cryptanalysis is the study of breaking cryptographic systems by


analyzing encryption algorithms and ciphertext to uncover weaknesses and
decrypt encrypted data without authorization.

5) What is the objective of attacking an encryption system? Write the two


approaches to attack a conventional encryption scheme.

The objective of attacking an encryption system is to recover the key in use rather
than simply to recover the plaintext of a single ciphertext. There are two general
approaches to attacking a conventional encryption scheme:

Cryptanalysis: Cryptanalytic attacks rely on the nature of the algorithm plus


perhaps some knowledge of the general characteristics of the plaintext or even
some sample plaintext- ciphertext pairs.

Brute-force attack: The attacker tries every possible key on a piece of ciphertext
until an intelligible translation into plaintext is obtained. On average, half of all
possible keys must be tried to achieve success.

6). Explain Playfair cipher with suitable example.


7). Let the keyword in playfair cipher is “keyword”. Encrypt a message
“come to the window” using playfair cipher.

8) Encrypt the message “Good morning” using the Hill Cipher with the
Key = 5 7
94
Q.9. Explain the one time pad scheme and Vegenere Cipher.
One-Time Pad:
- In this scheme, a random key that is as long as the message is used.
- The key is used to encrypt and decrypt a single message, and then is discarded.
Each new message requires a new key of the same length as the new message.
- It produces random output that bears no statistical relationship to the plaintext.
- Because the ciphertext contains no information whatsoever about the plaintext,
there is simply no way to break the code.
- For any plaintext of equal length to the ciphertext, there is a key that produces
that plaintext.
- Therefore, if you did an exhaustive search of all possible keys, you would end
up with many legible plaintexts, with no way of knowing which the intended
plaintext was.
- The security of the one-time pad is entirely due to the randomness of the key.
Example
Message: 'IF'
ASCII code for 'I': 1001001
ASCII code for 'F': 1000110
Key: 1010110 0110001
Encryption:
Plaintext (ASCII for 'I' + ASCII for 'F'): 10010011000110
Key: 10101100110001
XOR operation:
markdown
Copy code
10010011000110 (Plaintext)
10101100110001 (Key)
-----------------------
00111111110110 (Ciphertext)

VIgener cypher
This type of cipher is known as a polyalphabetic substitution cipher, where
multiple substitutions are used depending on the key. In this cipher, the key
determines which particular substitution is applied.
To encrypt a message, a key is needed that is as long as the message. Typically,
the key is a repeating keyword.
For example, if the keyword is "deceptive," and the message is
"wearediscovered," the encryption proceeds as follows:
Plaintext: wearediscovered
Key: deceptive
Encryption can be done by consulting the Vigenère Table, where the ciphertext
is found at the intersection of the letter key’s row and the plaintext’s column, or
by using the following formula:
Ci = (Pi + Ki) mod 26
The decryption formula is:
Pi = (Ci - Ki) mod 26
In these formulas:
Ci represents the ciphertext letter,
Pi represents the plaintext letter, and
Ki represents the key letter.
The "mod 26" operation ensures that the result remains within the range of the
alphabet (0 to 25).

9) Define Block Cipher. Explain Design Principles of block cipher.


Q.11. Draw and explain Feistel’s structure for encryption and decryption.

Q.12. Explain DES algorithm with Diagram.


The Data Encryption Standard (DES) is a symmetric-key algorithm for the
encryption of electronic data. It was widely used in the past, though it has been
largely replaced by more secure encryption algorithms like AES (Advanced
Encryption Standard). DES operates on 64-bit blocks of plaintext and uses a 56-
bit key.
Here's a simplified explanation of the DES algorithm along with a basic
diagram:
Initial Permutation (IP):
The 64-bit plaintext block undergoes an initial permutation.
This permutation rearranges the bits in a specific order.
Key Generation: The 56-bit key is used to generate 16 round keys, each 48 bits
long.These round keys are derived from the original key through a process of
permutation and shifting.
Feistel Network:
DES employs a Feistel network structure, where the plaintext block is split into
two 32-bit halves.
Each round of DES consists of the following steps applied to one half of the
data:
Expansion: The 32-bit half-block is expanded to 48 bits using a fixed expansion
permutation.
Key Mixing: The expanded half-block is XORed with the round key.
S-box Substitution: The result is divided into eight 6-bit blocks, each of which
is substituted using one of eight S-boxes (substitution boxes).
Permutation: The output of the S-boxes is permuted using a fixed permutation.
Rounds:
DES consists of 16 rounds of the Feistel network.
In each round, one half of the data is processed according to the Feistel network
steps, while the other half remains unchanged.
After each round, the halves are swapped.
Final Permutation (FP):
After the final round, the two 32-bit halves are swapped back.
The resulting 64-bit block undergoes a final permutation, which is the inverse of
the initial permutation.
Output:
The final 64-bit block is the ciphertext.
Q.13. Draw and explain the single round of DES algorithm.
Q.14. Explain the terms diffusion and confusion.
Diffusion:
Diffusion refers to the spreading out of the influence of each plaintext bit over
many ciphertext bits.
In other words, a small change in the plaintext should cause a significant change
in the ciphertext.
This property ensures that patterns or correlations in the plaintext are not
preserved in the ciphertext, making it difficult for an attacker to deduce
information about the plaintext from the ciphertext.
Diffusion helps to ensure that even a single bit change in the plaintext produces
extensive changes throughout the ciphertext.
It makes it challenging for an attacker to perform statistical analysis or exploit
patterns in the ciphertext to deduce information about the plaintext.
Confusion:
Confusion refers to the complex relationship between the plaintext, the
encryption key, and the ciphertext.
It ensures that the relationship between the plaintext and the ciphertext is highly
nonlinear and unpredictable.
Even a small change in the encryption key or the plaintext should result in a
completely different ciphertext.
Confusion helps to obscure the relationship between the plaintext and the
ciphertext, making it difficult for an attacker to discern any meaningful
information without knowledge of the encryption key.
It ensures that the encryption process is computationally difficult to reverse
without the proper decryption key.
Confusion complicates the relationship between the input and output of the
encryption algorithm, thereby enhancing the security of the system.

Q.15. What is the purpose of S-box in DES? Explain the avalanche effect in
DES.
In cryptography, an S-box (substitution-box) is a basic component of symmetric
key algorithms that takes input bits and transforms them into output bits. In
DES, the S-box is the only non-linear element and is the strength of the
algorithm. S-boxes are the main contributors to diffusion and the avalanche
effect in DES, because changing one input bit from an S-box can change up to
four output bits.
Q.16. Explain Sub key generation Process in Simplified DES algorithm
with Example.

Q.17. Explain AES algorithm with Diagram.


Q.18. Briefly describe SubBytes and ShiftRow.
SubBytes:
SubBytes is a step in the AES (Advanced Encryption Standard) encryption algorithm.
In this step, each byte of the state matrix (usually represented as a 4x4 grid of bytes) is
replaced by another byte using an S-box (substitution box).
The S-box is a fixed table that performs a nonlinear substitution, providing confusion in the
encryption process.
SubBytes ensures that each byte of the state matrix undergoes a nonlinear transformation,
contributing to the overall security of the AES algorithm.
ShiftRows:
ShiftRows is another step in the AES encryption algorithm.
In this step, the bytes in each row of the state matrix are shifted cyclically to the left.
The number of shifts applied to each row increases as you move down the matrix.
ShiftRows provides diffusion by spreading out the bytes across different rows, ensuring that
changes in one byte affect multiple rows.
This step enhances the confusion and diffusion properties of the AES algorithm, making it
more resistant to cryptanalysis.
Q.19. Explain triple DES

Before using 3TDES, user first generate and distribute a 3TDES key K, which
consists of three different DES keys K1, K2 and K3. This means that the actual
3TDES key has length 3×56 = 168 bits. The encryption scheme is illustrated as
follows –
The encryption-decryption process is as follows −

 Encrypt the plaintext blocks using single DES with key K1.
 Now decrypt the output of step 1 using single DES with key K2.
 Finally, encrypt the output of step 2 using single DES with key K3.
 The output of step 3 is the ciphertext.
 Decryption of a ciphertext is a reverse process. User first decrypt using K3, then encrypt
with K2, and finally decrypt with K1.

Due to this design of Triple DES as an encrypt–decrypt–encrypt process, it is possible to use


a 3TDES (hardware) implementation for single DES by setting K1, K2, and K3 to be the same
value. This provides backwards compatibility with DES.

Second variant of Triple DES (2TDES) is identical to 3TDES except that K3is replaced by
K1. In other words, user encrypt plaintext blocks with key K1, then decrypt with key K2, and
finally encrypt with K1 again. Therefore, 2TDES has a key length of 112 bits.

Triple DES systems are significantly more secure than single DES, but these are clearly a
much slower process than encryption using single DES.

Q.20. What is a meet-in-the-middle attack?

A meet-in-the-middle (MITM) attack, also known as a plaintext attack, is a


cyber attack that uses a tradeoff between space and time to make it easier to
gain access to data. The attack works by using two known assets: a plaintext
block and an associated ciphertext block. The attacker then works from either
end of the encryption chain toward the middle, breaking the process into
simpler, separate steps.

MITM attacks are commonly used against encryption algorithms that use symmetric keys.
The attack works by dividing the key space into two parts:

Encrypts the plaintext using all possible keys from one-half of the key space

Decrypts the resulting ciphertext using all possible keys from the other half

MITM attacks can have a significant impact. For example, a MITM attack is the primary
reason why Double DES is not used. An attacker with 2⁵⁶ space and 2¹¹² operations can brute-
force a Triple DES key using a MITM attack.

MITM attacks are typically used against users of financial applications, SaaS businesses, e-
commerce sites, and other websites where logging in is required. Information obtained during
an attack could be used for many purposes, including identity theft, unapproved fund
transfers, or an illicit password change.
Q.21. Define Block Cipher Modes of Operation.

Block cipher modes of operation are techniques used to enhance the security
and versatility of block ciphers, which encrypt fixed-size blocks of data at a
time. These modes dictate how a block cipher encrypts or decrypts plaintext or
ciphertext data of arbitrary length. They enable the encryption and decryption of
data larger than the fixed block size of the block cipher.

Some commonly used block cipher modes of operation include:

Electronic Codebook (ECB):In ECB mode, each block of plaintext is


encrypted independently using the same key. This can lead to security
vulnerabilities because identical plaintext blocks will encrypt to identical
ciphertext blocks.

Cipher Block Chaining (CBC):In CBC mode, each plaintext block is XORed
with the previous ciphertext block before encryption, adding an element of
randomness and removing the identical ciphertext blocks issue of ECB. It
requires an initialization vector (IV) to start the encryption process.

Cipher Feedback (CFB):CFB mode turns a block cipher into a stream cipher.
It operates on units smaller than the block size, typically 1 byte, and feeds back
the ciphertext to the encryption algorithm. This mode allows for arbitrary-length
plaintext encryption.

Output Feedback (OFB):Similar to CFB, OFB turns a block cipher into a


synchronous stream cipher. It generates a keystream independent of the
plaintext and XORs it with the plaintext to produce ciphertext. It also supports
arbitrary-length plaintext encryption.

Counter (CTR):CTR mode converts a block cipher into a stream cipher by


using a counter to generate a unique keystream for each block. It doesn't require
chaining, making it amenable to parallel processing and potentially faster than
CBC mode.

Galois/Counter Mode (GCM):GCM mode combines the Counter (CTR) mode


with a polynomial authentication tag, providing both confidentiality and
integrity. It is widely used in network security protocols like TLS due to its
efficiency and security features.

XOR and XTS modes:XOR and XTS modes are primarily used in disk
encryption applications. XTS (XEX-based tweaked-codebook mode with
ciphertext stealing) is designed specifically for encrypting data on storage
devices and provides both confidentiality and protection against certain types of
attacks.

Q.22.(i) Differentiate Symmetric and Asymmetric key cryptography.

ii)Compare conventional encryption with public key encryption.


Q.23. Explain RSA algorithm.

Q.24. (i) In a public key system using RSA, the ciphertext intercepted is
C=10 which is sent to the user
whose public key is e=5, n=35. What is the plaintext M?
(ii) Perform encryption and decryption using the RSA algorithm for p=3,
q=11

Q.25. Define the types of cryptanalytic attacks. Which cryptanalytic attack


can occur on RSA algorithm?
Known-Plaintext Analysis (KPA)
The attacker maps some plaintext-ciphertext pairs to find the encryption key
Chosen-Plaintext Analysis (CPA)
The attacker chooses random plaintexts and obtains the corresponding
ciphertexts to find the encryption key
Chosen ciphertext attack
The attacker analyzes a chosen ciphertext that corresponds to its plaintext, and
tries to obtain a secret key or system details
Differential cryptanalysis attack
A type of chosen plaintext attack on block ciphers that analyzes pairs of
plaintexts, so the analyst can determine how the targeted algorithm works when
it encounters different types of data
Side-channel attacks
Rely on information obtained from the physical system employed in the
encryption/decryption process, such as the target system's response time to
queries or power usage
The most common attack on RSA is the brute-force attack, which tries to factor
the public key and find the private key. To prevent this, RSA keys should be at
least 2048 bits long, and preferably 4096 bits or more

You might also like