Cns Full Unit 2marks
Cns Full Unit 2marks
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.
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.
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.
The one-time pad cipher combines each letter of the plaintext with a keyword letter using modular
arithmetic (mod 26).
Given:
• 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
The Rail Fence Cipher arranges text in a zigzag pattern across multiple "rails" (rows) and reads the
result row by row.
mathematica
Copy code
A N A U I E S T
NN I V R S I Y
UNIT 2
1. Difference between Public Key and 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.
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.
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.
Euclid’s algorithm for finding the GCD works by repeatedly applying the equation:
When the remainder is 0, the divisor at that step is the GCD. Thus:
Analyzes linear relationships between Analyzes how differences in input affect the
Methodology
plaintext, ciphertext, and key bits. resulting difference in output.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
Tunnel Mode provides end-to-end security by encrypting the entire IP packet, while Transport Mode
only encrypts the payload of the packet.