0% found this document useful (0 votes)
28 views

Cns Full Unit 2marks

Uploaded by

Ramya V
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Cns Full Unit 2marks

Uploaded by

Ramya V
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIT 1

1. What is Avalanche Effect?

The avalanche effect is a property of cryptographic algorithms where a small change in the input
(such as flipping a single bit) should cause a significant and unpredictable change in the output. In a
secure algorithm, even minor modifications in the plaintext or key should result in a drastically
different ciphertext, ensuring that patterns in the plaintext cannot be detected in the ciphertext.

2. Compare Passive and Active Attacks

Aspect Passive Attack Active Attack

To eavesdrop and gather information To alter, disrupt, or inject malicious data


Objective
without detection. into the system.

Impact on
No modification of data. Modifies, deletes, or adds data.
Data

Hard to detect as the attacker only Easier to detect since it involves data
Detection
observes. modification.

Man-in-the-Middle, Replay, Denial of


Examples Eavesdropping, traffic analysis.
Service.

3. Why is Asymmetric Cryptography Bad for Huge Data?

Asymmetric cryptography uses two keys (public and private) to encrypt and decrypt data, which
generally makes it more computationally intensive than symmetric encryption. Due to the complex
mathematical operations involved, asymmetric cryptography is slower and less efficient for large
amounts of data. Therefore, it’s typically used for encrypting smaller data or exchanging keys for
symmetric encryption rather than directly encrypting large data sets.

4. Calculate Cipher Text using One-Time Pad Cipher

The one-time pad cipher combines each letter of the plaintext with a keyword letter using modular
arithmetic (mod 26).

Given:

• Plain text: ROCK

• Keyword: BOTS

First, convert each letter to its alphabetical position (A=0, B=1, ..., Z=25):

Letter R O C K

Value 17 14 2 10

Letter B O T S

Value 1 14 19 18
Now, add each plaintext letter’s value to the corresponding keyword letter’s value (mod 26):

Cipher Text Values=(17+1) mod 26, (14+14) mod 26, (2+19) mod 26, (10+18) mod 26\text{Cipher Text
Values} = (17+1) \, \text{mod} \, 26, \, (14+14) \, \text{mod} \, 26, \, (2+19) \, \text{mod} \, 26, \,
(10+18) \, \text{mod} \,
26Cipher Text Values=(17+1)mod26,(14+14)mod26,(2+19)mod26,(10+18)mod26

This results in:

• (17+1)mod 26=18(17+1) \mod 26 = 18(17+1)mod26=18 → S

• (14+14)mod 26=2(14+14) \mod 26 = 2(14+14)mod26=2 → C

• (2+19)mod 26=21(2+19) \mod 26 = 21(2+19)mod26=21 → V

• (10+18)mod 26=2(10+18) \mod 26 = 2(10+18)mod26=2 → C

Cipher Text: SCVC

5. Rail Fence Cipher for "Anna University"

The Rail Fence Cipher arranges text in a zigzag pattern across multiple "rails" (rows) and reads the
result row by row.

Let's assume we use two rails for simplicity.

1. Arrange the text in a zigzag:

mathematica

Copy code

A N A U I E S T

NN I V R S I Y

2. Read row by row:

• First row: "ANAUIEST"

• Second row: "NNIVRSIY"

Cipher Text: ANAUIESTNNIVRSIY

UNIT 2
1. Difference between Public Key and Conventional (Symmetric) Encryption

Feature Public Key (Asymmetric) Encryption Conventional (Symmetric) Encryption

Two keys: public key (for encryption) One shared secret key used for both
Keys Used
and private key (for decryption). encryption and decryption.

Key Public key can be openly shared; only Both parties need access to the same secret
Distribution the private key is kept secret. key, which must be shared securely.
Feature Public Key (Asymmetric) Encryption Conventional (Symmetric) Encryption

Slower due to complex mathematical Faster and more efficient for large volumes
Speed
operations. of data.

Key exchange, digital signatures, and


Common Use Encrypting large datasets due to its speed.
authentication.

Based on computational difficulty (e.g., Based on key secrecy; compromise of the


Security
factoring large primes). key compromises security.

2. Brief the Strength of Triple DES

Triple DES (3DES) strengthens the original DES (Data Encryption Standard) by applying the DES
algorithm three times in succession with two or three different keys. This approach increases the
effective key length, providing stronger security against brute-force attacks. It uses a 168-bit key (for
three different keys) or a 112-bit key (when the first and third keys are the same), making it
significantly more secure than DES alone. However, it is slower and gradually being replaced by more
efficient algorithms like AES.

3. Five Modes of Operation in Block Cipher

The five main modes of operation for block ciphers are:

1. Electronic Codebook (ECB): Encrypts each block independently; however, identical plaintext
blocks yield identical ciphertext blocks, making it vulnerable to pattern analysis.

2. Cipher Block Chaining (CBC): Each plaintext block is XORed with the previous ciphertext
block before encryption, providing improved security.

3. Cipher Feedback (CFB): A mode that allows block ciphers to encrypt in a stream-like fashion
by processing small segments of data.

4. Output Feedback (OFB): Uses a feedback mechanism similar to CFB but generates a
keystream independently of the plaintext, making it more resistant to error propagation.

5. Counter (CTR): Generates the next keystream block by encrypting successive values of a
counter, which is excellent for parallel processing and minimizes error propagation.

4. Find GCD (1970, 1066) using Euclid’s Algorithm

Euclid’s algorithm for finding the GCD works by repeatedly applying the equation:

GCD(a,b)=GCD(b,amod b)\text{GCD}(a, b) = \text{GCD}(b, a \mod b)GCD(a,b)=GCD(b,amodb)

1. 1970mod 1066=9041970 \mod 1066 = 9041970mod1066=904

2. 1066mod 904=1621066 \mod 904 = 1621066mod904=162

3. 904mod 162=82904 \mod 162 = 82904mod162=82

4. 162mod 82=0162 \mod 82 = 0162mod82=0

When the remainder is 0, the divisor at that step is the GCD. Thus:

GCD(1970,1066)=82\text{GCD}(1970, 1066) = 82GCD(1970,1066)=82


5. Difference between Linear and Differential Cryptanalysis

Aspect Linear Cryptanalysis Differential Cryptanalysis

Analyzes linear relationships between Analyzes how differences in input affect the
Methodology
plaintext, ciphertext, and key bits. resulting difference in output.

Attack Type Known-plaintext attack. Chosen-plaintext attack.

Relies on probabilistic linear Relies on studying pairs of plaintexts with


Complexity
approximations of the cipher. specific differences.

Commonly used against block ciphers Used to target block ciphers and find
Primary Use
with weak S-box structures. weaknesses in their diffusion properties.

Often requires many known plaintext- Often more effective for certain ciphers,
Difficulty
ciphertext pairs for accuracy. especially when analyzing round structures.

UNIT 3
1. Define Replay Attack

A replay attack is a network attack in which an attacker intercepts and retransmits valid data, often in
the form of authentication messages, to trick a system into granting unauthorized access or
executing actions on behalf of the attacker. By "replaying" a previously captured legitimate
transmission, the attacker can bypass security measures, impersonate users, or execute duplicate
transactions. This type of attack is common in scenarios where authentication tokens or credentials
are transmitted without using mechanisms to detect and reject repeated submissions, such as
timestamps or one-time tokens.

2. What is a Man-in-the-Middle (MitM) Attack?

A Man-in-the-Middle (MitM) attack occurs when an attacker secretly intercepts and potentially
alters communication between two parties who believe they are directly communicating with each
other. By positioning themselves in the middle, the attacker can eavesdrop, relay, or manipulate the
messages between the parties, which can lead to credential theft, data manipulation, or
unauthorized access. Common MitM techniques include intercepting unsecured Wi-Fi connections,
DNS spoofing, and HTTPS downgrades. MitM attacks exploit the lack of mutual authentication or
encryption in communication channels.

3. Define Euler’s Theorem and Its Application

Euler's theorem states that for any two coprime integers aaa and nnn (i.e., gcd(a,n)=1\text{gcd}(a, n)
= 1gcd(a,n)=1), the following holds:

aϕ(n)≡1(modn)a^{\phi(n)} \equiv 1 \pmod{n}aϕ(n)≡1(modn)

where ϕ(n)\phi(n)ϕ(n) is Euler's totient function, representing the number of integers up to nnn that
are coprime with nnn. This theorem is foundational in number theory and is particularly useful in
cryptography.

Application of Euler’s Theorem:


Euler's theorem is widely used in public-key cryptography, especially in the RSA algorithm. In RSA,
the theorem allows us to compute modular inverses efficiently, enabling secure encryption and
decryption operations. Specifically, Euler's theorem provides the mathematical basis for
exponentiation in modular arithmetic, which is used to encode and decode messages without
sharing private keys.

4.Write the difference between public key and private key crypto systems?

To conclude, private keys can be used for both encryption and decryption, while Public keys are used
only for the purpose of encrypting the sensitive data. Private keys are shared between the sender
and the receiver, whereas public keys can be freely circulated among multiple users.

5. List the Authentication requirements?

• Password Requirements. • General Authenticator Requirements. • Authenticator Lifecycle


Requirements. • Credential Storage Requirements. • Credential Recovery Requirements. • Look-up
Secret Verifiers. • Out-of-Band Verifiers. • Single or Multifactor One-Time Verifiers.

UNIT 4
1.What are birthday attacks?

A birthday attack is a cryptographic attack that uses probability theory to find hash collisions. It's a
type of brute-force attack that exploits the birthday paradox.

2.What do you mean by MAC?

A MAC address (short for medium access control address) is a unique identifier assigned to a
network interface controller (NIC) for use as a network address in communications within a network
segment. This use is common in most IEEE 802 networking technologies, including Ethernet, Wi-Fi,
and Bluetooth.

3. What is meant by Hash function?

A hash function is a mathematical function or algorithm that simply takes a variable number of
characters (called a ”message”) and converts it into a string with a fixed number of characters.

4. What is weak collision Resistance?

Weak collision resistance is a property of a hash function that makes it difficult to find another input
that produces the same hash as a given input. It's also known as second preimage resistance.

5. What are the functions used to produce an authenticator?

To produce an authenticator, the primary function used is a Message Authentication Code (MAC). •
Mac function • Cryptography hash func • Secret key

UNIT 5
1. Define S/MIME?

Secure/Multipurpose Internet Mail Extensions (S/MIME) is an email encryption and signing protocol
that protects the content and integrity of messages.

2.What are zombies?


In computing, a zombie is a computer connected to the Internet that has been compromised by a
hacker via a computer virus, computer worm, or trojan horse program and can be used to perform
malicious tasks under the remote direction of the hacker.

3. What is an intruder?

someone who enters a place without permission in order to commit a crime: Intruders had entered
the house through a back window.

4.Give the benefits of IP security?

• Encryption • Ip address management • Replay protection • Safeguarding ip address • Centralized


management • Data origin authentication

5. Differentiate Transport and Tunnel mode in IPsec?

Tunnel Mode provides end-to-end security by encrypting the entire IP packet, while Transport Mode
only encrypts the payload of the packet.

You might also like